Repository navigation
chore(org-sync): sync Heretek-AI/.github@607db4d standards (tier-1 / node-zerodep) #68
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,66 @@ | ||
| --- | ||
| name: ocr-thread-resolution | ||
| description: Clear unresolved PR review threads (including OCR inline threads) so Tier 1 branch protection lets the PR merge. Use when a PR is blocked on review threads, after pushing fixes to an OCR-reviewed PR, or before merging any PR in a Heretek-AI repository. | ||
| license: MIT | ||
| compatibility: opencode claude codex copilot | ||
| metadata: | ||
| audience: maintainers-and-agents | ||
| workflow: github-pr | ||
| opencode/slash: "true" | ||
| --- | ||
|
|
||
| # OCR Thread Resolution | ||
|
|
||
| Tier 1 rulesets set `required_review_thread_resolution: true` | ||
| (`templates/rulesets/tier1-main.json`). GitHub blocks merge while **any** | ||
| review thread is unresolved — including OCR's inline threads. OCR runs with | ||
| `resolve_outdated: 'true'`, so it auto-resolves its own outdated threads, but | ||
| live findings still need a human or agent to fix the code or reply with a | ||
| reason. | ||
|
|
||
| ## Steps | ||
|
|
||
| 1. **List unresolved threads.** From the repository root: | ||
|
|
||
| ```bash | ||
| bash scripts/ocr/list-unresolved-threads.sh <owner/repo> <pr-number> | ||
| ``` | ||
|
|
||
| When working in a fleet clone the script lives in the `.github` checkout; | ||
| use its path there (e.g. `bash /path/to/.github/scripts/ocr/list-unresolved-threads.sh`). | ||
| Stdout is one JSON object per unresolved thread (`id`, `path`, `line`, | ||
| `isOutdated`, `author`, `body` truncated to 500 chars, `url`); the count | ||
| goes to stderr. Exit status is always 0 in list mode, so piping to `jq` | ||
| is safe. | ||
|
|
||
| 2. **Fix or reply, per thread.** For each thread, do exactly one of: | ||
| - Fix the code, commit, and push; or | ||
| - Reply on the thread with a written justification (why the finding does | ||
| not apply), then resolve. | ||
|
|
||
| 3. **Resolve deliberately.** Resolve one thread at a time after its fix or | ||
| reply is in place: | ||
|
|
||
| ```bash | ||
| bash scripts/ocr/list-unresolved-threads.sh --resolve <thread-id> --confirm | ||
| ``` | ||
|
|
||
| The `--confirm` flag is mandatory; the script refuses without it. | ||
|
|
||
| 4. **Re-run to zero.** Repeat step 1 until the stderr count reads | ||
| `unresolved_threads=0`. | ||
|
|
||
| 5. **Wait for the incremental OCR re-run and re-check.** Pushing fixes | ||
| triggers OCR again in incremental mode, which may post new threads. Run | ||
| step 1 once more after the re-run finishes. | ||
|
|
||
| ## Gotchas | ||
|
|
||
| - Never resolve a thread without a code fix or a written reason on the thread. | ||
| - Never bulk-resolve: resolve one thread at a time so each fix-or-reason is | ||
| auditable. | ||
| - Outdated OCR threads are auto-resolved by OCR in `resolve_outdated: 'true'` | ||
| mode; do not hand-resolve a thread OCR is about to clear — re-run the | ||
| list script after the OCR run instead. | ||
| - `required_review_thread_resolution` counts threads from every reviewer, | ||
| not just OCR. Human threads need the same fix-or-reply treatment. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.