-
Notifications
You must be signed in to change notification settings - Fork 0
feat(automation): run BandScope hourly NVIDIA NIM review repair #817
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
Closed
Closed
Changes from all commits
Commits
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,30 @@ | ||
| name: BandScope Hourly Review Repair | ||
|
|
||
| on: | ||
| schedule: | ||
| # Minute 53 avoids the Clearfolio, DiskSage, and planned Inkspan heartbeats. | ||
| - cron: "53 * * * *" | ||
|
|
||
| concurrency: | ||
| group: bandscope-hourly-review-repair | ||
| # A later heartbeat must not cancel an in-flight queue decision or repair. | ||
| cancel-in-progress: false | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| jobs: | ||
| dispatch-review-repair: | ||
| permissions: | ||
| contents: read | ||
| id-token: write | ||
| uses: ./.github/workflows/pr-review-fix-scheduler.yml | ||
| with: | ||
| target_repository: ContextualWisdomLab/bandscope | ||
| base_branch: develop | ||
| max_prs: "50" | ||
| max_dispatches: "1" | ||
| retry_hours: "1" | ||
| secrets: | ||
| PR_REVIEW_MERGE_TOKEN: ${{ secrets.PR_REVIEW_MERGE_TOKEN }} | ||
| OPENCODE_APPROVE_TOKEN: ${{ secrets.OPENCODE_APPROVE_TOKEN }} | ||
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
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,88 @@ | ||
| # BandScope hourly review-repair caller | ||
|
|
||
| Materialize accepts only exact SHA-256 pins or a bounded relative `-r` include; a lone `--require-hashes` line is not lock evidence. | ||
|
|
||
| ## Decision and operating boundary | ||
|
|
||
| The central repository owns a thin scheduled caller for | ||
| `ContextualWisdomLab/bandscope`. It runs at minute 53 each hour and calls the | ||
| product-neutral `pr-review-fix-scheduler.yml` for pull requests targeting | ||
| BandScope's protected `develop` branch. The offset avoids Clearfolio minute 23, | ||
| DiskSage minute 37, and the planned Inkspan minute 47 heartbeat. | ||
|
|
||
| The caller contains product identity, cadence, and explicit reusable-workflow | ||
| inputs only. Queue classification, exact-head/live-base binding, root-cause | ||
| analysis, remediation feasibility, retry markers, and repair dispatch remain | ||
| central. BandScope owns its application, evidence, data, runtime, accessibility, | ||
| and release semantics. | ||
|
|
||
| ## Authority and secret contract | ||
|
|
||
| The caller keeps workflow `GITHUB_TOKEN` at `contents: read` and grants | ||
| the reusable job `id-token: write` so the central scheduler can mint the | ||
| OpenCode GitHub App token from GitHub OIDC when the mapped PAT is absent | ||
| (GitHub, n.d.-c). It maps only `PR_REVIEW_MERGE_TOKEN` and | ||
| `OPENCODE_APPROVE_TOKEN`. It never uses `secrets: inherit`, receives | ||
| `NVIDIA_NIM_API_KEY`, or introduces `COPILOT_GITHUB_TOKEN`. CWE-250 | ||
| forbids executing the caller with write or model privileges it does not | ||
| need (MITRE, 2026). Model credentials remain scoped to the separately | ||
| reviewed repair worker. The worker cannot approve, merge, release, | ||
| resolve review findings by inference, change protection, or manufacture | ||
| passing checks. | ||
|
|
||
| Before protected-main activation, the repository variable | ||
| `OPENCODE_REPOSITORY_DISPATCH_TARGETS` must contain the exact | ||
| `ContextualWisdomLab/bandscope` target. Missing or mismatched configuration | ||
| fails before mutation credential materialization. GitHub App installation and | ||
| both mapped credentials must remain limited to approved repositories. | ||
|
|
||
| ## Failure and recovery | ||
|
|
||
| A missing target mapping, credential, protected base, or exact-head evidence is | ||
| a non-passing configuration state. Operators correct the bounded configuration | ||
| and rerun unchanged protected source; they do not widen credentials, inherit all | ||
| secrets, bypass review, or perturb a clean source head. A later heartbeat does | ||
| not cancel an in-flight decision. Same-head retry markers and the per-PR writer | ||
| lease prevent duplicate repair writers. | ||
|
|
||
| After source integration, closure requires a scheduled or manual protected-main | ||
| consumer run proving the exact BandScope repository and `develop` base. This | ||
| protected-main operational acceptance must also prove the | ||
| read-only caller token, bounded dispatch decision, and fail-closed allowlist and | ||
| credential behavior. Source checks alone are not protected-main operational | ||
| acceptance. Merge still requires zero unresolved valid findings and a | ||
| qualifying independent non-author approval. | ||
|
|
||
| ## Verification and rollback | ||
|
|
||
| Machine-checkable contracts require the exact target/base, minute 53 cadence, | ||
| non-cancelling single-flight group, one dispatch, one-hour retry floor, explicit | ||
| secret mapping, read-only contents plus job-scoped `id-token: write`, focused | ||
| path-filter coverage, and absence of model or Copilot credentials. The full | ||
| owned suite and hosted security and review gates must pass on the unchanged | ||
| exact head. | ||
|
|
||
| Rollback removes the BandScope caller, its focused test, doctoring, and central | ||
| path-filter/documentation entries. It must not remove scheduler dispatch | ||
| validation or affect independent product callers. | ||
|
|
||
| ## APA 7th references | ||
|
|
||
| MITRE. (2026). *CWE-250: Execution with unnecessary privileges*. | ||
| https://cwe.mitre.org/data/definitions/250.html | ||
|
|
||
| GitHub, Inc. (n.d.-a). *Events that trigger workflows*. GitHub Docs. Retrieved | ||
| August 12, 2026, from | ||
| https://docs.github.com/en/actions/reference/workflows-and-actions/events-that-trigger-workflows#schedule | ||
|
|
||
| GitHub, Inc. (n.d.-b). *Reuse workflows*. GitHub Docs. Retrieved August 12, | ||
| 2026, from | ||
| https://docs.github.com/en/actions/how-tos/sharing-automations/reuse-workflows | ||
|
|
||
| GitHub, Inc. (n.d.-c). *Automatic token authentication*. GitHub Docs. | ||
| Retrieved August 17, 2026, from | ||
| https://docs.github.com/en/actions/security-for-github-actions/security-guides/automatic-token-authentication#permissions-for-the-github_token | ||
|
|
||
| National Institute of Standards and Technology. (2022). *Secure software | ||
| development framework (SSDF) version 1.1* (NIST SP 800-218). | ||
| https://doi.org/10.6028/NIST.SP.800-218 |
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.