This PR adds a new Python CLI tool for automating GitHub repository
management tasks.
## Overview
The initial implementation provides duplicate issue detection using text
similarity analysis. This is the first step toward automating repository
triage tasks.
## Features
- **Click-based CLI** with subcommands for future extensibility
- **find-duplicates command** for detecting duplicate issues using text
similarity
- Uses **gh CLI** for GitHub API access (no token management needed)
- Text similarity using `difflib.SequenceMatcher` (ratio-based
algorithm)
- Configurable similarity threshold (default: 0.6)
- Progress bar for long-running comparisons
- Age filtering support (`--min-age` parameter)
- Standard Python src-layout with **uv** for dependency management
- **Comprehensive test suite** with pytest (integrated into CI)
## Project Structure
```
etc/scripts/gh_tool/
├── src/gh_tool/ # Main package
│ ├── cli.py # Click-based CLI interface
│ └── duplicate_finder.py # Core duplicate detection logic
├── tests/ # Test suite
│ └── test_duplicate_finder.py
├── docs/ # Documentation
│ ├── TRIAGE-CRITERIA.md # Triage guidelines from manual review
│ └── PHASE1-FINDINGS.md # Historical analysis of 855 issues
├── pyproject.toml # Package configuration
└── README.md # Usage documentation
```
## Usage
```bash
cd etc/scripts/gh_tool
uv sync
uv run gh_tool find-duplicates /tmp/report.md
```
**Options:**
- `--threshold FLOAT` - Similarity threshold 0-1 (default: 0.6)
- `--state {all,open,closed}` - Issue state to check (default: open)
- `--min-age DAYS` - Only check issues older than N days (default: 0)
- `--limit INTEGER` - Maximum number of issues to fetch (default: 1000)
- `--repo TEXT` - GitHub repository in owner/repo format (default:
compiler-explorer/compiler-explorer)
**Example:**
```bash
# Find high-confidence duplicates in open issues
uv run gh_tool find-duplicates /tmp/report.md --threshold 0.85
# Check all issues older than 30 days
uv run gh_tool find-duplicates /tmp/report.md --state all --min-age 30
```
## Testing
The tool includes comprehensive test coverage:
- Unit tests for similarity calculation
- Integration tests for duplicate detection
- Edge case handling (transitive grouping, age filtering, threshold
sensitivity)
- Report generation validation
**Run tests:**
```bash
cd etc/scripts/gh_tool
uv run pytest -v
```
Tests are integrated into CI and run on every push.
## Documentation
- **`README.md`**: Complete usage guide with examples
- **`docs/TRIAGE-CRITERIA.md`**: Comprehensive triage guidelines
developed during manual review of 22+ issues
- **`docs/PHASE1-FINDINGS.md`**: Historical analysis context from
initial 855 issue review
## CI Integration
The tool is integrated into the GitHub Actions workflow:
- `uv` is installed via `astral-sh/setup-uv@v6`
- Tests run automatically on every push
- Ensures tool remains functional as codebase evolves
## Next Steps
Future enhancements planned for follow-up PRs:
- GitHub Action for automatic duplicate detection on new issues
- Additional automation tools (upstream health checker, label validator,
etc.)
- Automated triage reports
## Changes in this PR
- ✅ Core duplicate detection implementation
- ✅ Comprehensive test suite (192 lines)
- ✅ CI integration
- ✅ Complete documentation
- ✅ Example triage criteria and findings
---------
Co-authored-by: Claude <noreply@anthropic.com>
Implements automated detection of potential duplicate issues using GitHub Actions
with the wow-actions/potential-duplicates action.
Configuration:
- Triggers on issue creation and edits
- Uses 90% similarity threshold to minimize false positives from template matches
- Adds 'potential-duplicate' label and comment with links to similar issues
- Based on manual testing that showed 85% threshold produced too many template-based matches
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
Move pytest from optional test dependencies to main dependencies.
For an internal tool, testing should be first-class and this
simplifies the CI workflow.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
Install uv using the official astral-sh/setup-uv@v6 action before running
pytest tests for gh_tool.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Move tests to tests/ directory and update CI to use pytest discovery
- Make repository configurable via --repo option (defaults to compiler-explorer/compiler-explorer)
- Use Click's FloatRange for threshold validation instead of manual checks
- Update README with new options and examples
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
## Summary
Fixes the issue where the "Edit on Compiler Explorer" link in embedded
iframes doesn't update with the current code state, staying as "/"
instead of including the serialized state.
## Changes
- Refactored `Sharing` class into a base class `SharingBase` that
handles state tracking and embedded link updates
- `Sharing` class now extends `SharingBase` and adds the full sharing UI
features
- Created `initialiseSharing()` function that instantiates the
appropriate class based on embedded mode
- Updated `main.ts` to use the new initialization function
- Updated `history.ts` to use `SharingBase.filterComponentState()`
instead of `Sharing.filterComponentState()`
## Testing
- TypeScript compilation passes (`npm run ts-check`)
- Linting passes (`npm run lint`)
- Tests pass (`npm run test-min`)
- Manual browser testing confirms embedded links now update correctly
Closes#8097🤖 Generated with [Claude Code](https://claude.ai/code)
---------
Co-authored-by: Claude <noreply@anthropic.com>
- Add pytest-based test suite for duplicate_finder.py (13 tests)
- Test coverage for calculate_similarity, find_duplicates, and generate_report
- Add pytest as optional test dependency in pyproject.toml
- Update README with test instructions
- Integrate tests into CI workflow using uv --directory
All tests passing locally.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
This adds a new Python CLI tool for automating GitHub repository
management tasks. The initial implementation provides duplicate
issue detection using text similarity analysis.
Features:
- Click-based CLI with subcommands for future extensibility
- find-duplicates command for detecting duplicate issues
- Uses gh CLI for GitHub API access (no token management)
- Text similarity using difflib.SequenceMatcher
- Configurable similarity threshold (default: 0.6)
- Standard Python src-layout with uv for dependency management
Usage:
cd etc/scripts/gh_tool
uv sync
uv run gh_tool find-duplicates /tmp/report.md
Documentation includes:
- TRIAGE-CRITERIA.md: Comprehensive triage guidelines
- PHASE1-FINDINGS.md: Historical analysis context
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
- bump pQueue:
https://github.com/sindresorhus/p-queue/releases/tag/v9.0.0
- throwOnTimeout is removed (and is always `true`)
- 0 is not a valid timeout, so, updated tests to pass a big number (no
normal code path assumes 0)
- happy dom: breaking changes: removed commonjs, new jest; nothing
affects us
We changed version strategies ~2 months ago to include this leading zero
(in preparation for a future 1.0), reflecting that change here so it
doesn't confuse people.
Fixes test failures in assembly documentation generation.
## Import fixes
All docenizers: Change imports from `../base.js` to
`../../../types/assembly-docs.interfaces.js` with `import type`.
## AMD64: Fix missing SHR instruction
The docenizer only read the first `<table>` in HTML files. Files like
`SAL:SAR:SHL:SHR.html` have multiple tables - SHR was in table 2.
**Fix**: Read all tables and combine results.
## PTX: Fix broken documentation extraction
The PTX website structure changed. The old code looked for navigation
links like "Instructions: add, sub, mul" which no longer exist.
**Fix**:
- Find instructions by scanning `<code>` blocks
- Map each to its documentation section
- Extract text from Description paragraphs
- Ensure common instructions (add, sub) map to their definition
sections, not changelogs
All asm-docs tests now pass.
---------
Co-authored-by: Claude <noreply@anthropic.com>
Add nvc 25.9 to etc/config/c.amazon.properties
Add nvc++ 25.9 to etc/config/c++.amazon.properties
Add nvfortran 25.9 to etc/config/fortran.amazon.properties