-
Notifications
You must be signed in to change notification settings - Fork 0
fix(ci): restore executable hourly governance #36
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
base: main
Are you sure you want to change the base?
Changes from all commits
d452500
51fb2c6
e80f719
c320e7c
3eb3cdb
5e32251
2389f2e
e65f518
a05fe5a
0d9ec79
05f33e3
3e3cb6a
d660011
ec6a266
f2bbc04
d28f92a
4c2cfd4
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -31,15 +31,32 @@ jobs: | |
| merge_mode: direct_or_auto | ||
| update_branches: true | ||
|
|
||
| # Review-feedback repair is dispatched by the central, always-current | ||
| # rankweave-hourly-review-repair.yml caller in ContextualWisdomLab/.github | ||
| # (uses: ./.github/workflows/pr-review-fix-scheduler.yml, a same-repository | ||
| # reference). A local repair-review-feedback job here previously called | ||
| # that reusable workflow cross-repository at a pinned commit SHA; that | ||
| # shape can never satisfy pr-review-fix-scheduler.yml's same-repository | ||
| # trusted-source check (github.repository == ContextualWisdomLab/.github), | ||
| # so every run failed before any job was scheduled ("workflow file issue", | ||
| # zero jobs created) for as long as that hardening has been in place. | ||
| repair-review-feedback: | ||
| needs: inspect-pr-queue | ||
| if: ${{ always() }} | ||
| runs-on: ubuntu-latest | ||
| timeout-minutes: 5 | ||
| permissions: | ||
| contents: read | ||
| pull-requests: read | ||
| env: | ||
| TARGET_REPOSITORY: ContextualWisdomLab/RankWeave | ||
| steps: | ||
| - name: Keep review repair fail-closed until protected NVIDIA repair is available | ||
| env: | ||
| GH_TOKEN: ${{ github.token }} | ||
| run: | | ||
| set -euo pipefail | ||
| open_pr_count="$( | ||
| gh api "/repos/${TARGET_REPOSITORY}/pulls?state=open&per_page=1" \ | ||
| --jq 'length' | ||
| )" | ||
| if [ "$open_pr_count" -eq 0 ]; then | ||
|
Comment on lines
+50
to
+54
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 📝 Info: Hold job can flake if the PR-count query returns empty
Was this helpful? React with 👍 or 👎 to provide feedback. |
||
| echo "No pull request requires review repair." | ||
| exit 0 | ||
| fi | ||
| echo "::notice::Review repair remains fail-closed while the protected central NVIDIA NIM scheduler is pending. Existing independent review agents and the central merge scheduler remain unchanged." | ||
|
seonghobae marked this conversation as resolved.
|
||
|
|
||
| revalidate-pr-queue: | ||
| needs: inspect-pr-queue | ||
| if: ${{ always() }} | ||
|
Comment on lines
60
to
62
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 📝 Info: Repair hold runs parallel to revalidation, not before it
Was this helpful? React with 👍 or 👎 to provide feedback. |
||
|
|
@@ -93,16 +110,9 @@ jobs: | |
| id: gate | ||
| env: | ||
| GH_TOKEN: ${{ github.token }} | ||
| NVIDIA_API_KEY: ${{ secrets.NVIDIA_NIM_API_KEY }} | ||
| run: | | ||
| set -euo pipefail | ||
|
|
||
| if [ -z "${NVIDIA_API_KEY:-}" ]; then | ||
| echo "::warning::NVIDIA_NIM_API_KEY is not configured; product development remains fail-closed." | ||
| echo "eligible=false" >>"$GITHUB_OUTPUT" | ||
| exit 0 | ||
| fi | ||
|
|
||
| open_pr_count="$( | ||
| gh api "/repos/${TARGET_REPOSITORY}/pulls?state=open&per_page=1" \ | ||
| --jq 'length' | ||
|
|
@@ -231,6 +241,11 @@ jobs: | |
| run: | | ||
| set -euo pipefail | ||
|
|
||
| if [ -z "${NVIDIA_API_KEY:-}" ]; then | ||
| echo "::error::NVIDIA_NIM_API_KEY is not configured; product development remains fail-closed." | ||
| exit 1 | ||
| fi | ||
|
seonghobae marked this conversation as resolved.
|
||
|
|
||
| prompt="$(cat <<'PROMPT' | ||
| Work only from the trusted files on the checked-out RankWeave main branch. | ||
| Do not read GitHub issues, pull requests, external web pages, environment | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,50 @@ | ||
| # ADR 0006: Fail closed when the central repair workflow is unreachable | ||
|
|
||
| - **Status:** Accepted | ||
| - **Date:** 2026-08-07 | ||
|
|
||
| ## Context | ||
|
|
||
| The hourly RankWeave workflow composed central inspection, review repair, | ||
| revalidation, and local NVIDIA NIM product development. Its review-repair call | ||
| was pinned to a central commit that became unreachable from protected central | ||
| history. GitHub rejected each scheduled caller before creating jobs, disabling | ||
| the whole loop. | ||
|
|
||
| The current protected central repair implementation still uses GitHub Models, | ||
| while a reviewed NVIDIA NIM replacement remains outside protected main. Calling | ||
| either the orphaned SHA, mutable central `main`, or an unmerged branch would | ||
| violate the product's credential and immutable-source boundaries. | ||
|
|
||
| ## Decision | ||
|
|
||
| Keep the two immutable reachable merge-scheduler calls. Replace review repair | ||
| with a local read-only hold job until the protected central NVIDIA NIM repair | ||
| engine is available at a reachable immutable SHA. The hold job may inspect only | ||
| the open-PR count and must not receive mutation, OIDC, provider, or inherited | ||
| secret permissions. | ||
|
|
||
| ## Consequences | ||
|
|
||
| - The hourly workflow executes instead of failing during reusable-workflow | ||
| resolution. | ||
| - PR inspection and revalidation continue each hour. | ||
| - Product development can proceed when all governance jobs succeed and the PR | ||
| queue is empty. | ||
| - Review repair remains unavailable rather than silently routing through an | ||
| unapproved provider or mutable control plane. | ||
| - Re-enabling repair requires a focused PR that pins the protected central | ||
| NVIDIA scheduler and updates tests, operations documentation, and this ADR's | ||
| supersession record. | ||
|
|
||
| ## Diagram | ||
|
|
||
| ```mermaid | ||
| flowchart LR | ||
| S[Hourly schedule] --> I[Immutable central inspection] | ||
| I --> H[Local read-only repair hold] | ||
| H --> R[Immutable central revalidation] | ||
| R -->|PR queue empty| N[NVIDIA NIM product development] | ||
| R -->|PR open| Q[Ordinary review and checks] | ||
| C[Protected central NVIDIA repair] -. future reachable SHA .-> H | ||
| ``` |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,53 @@ | ||
| # Hourly reusable-workflow reachability incident | ||
|
|
||
| - **Date:** 2026-08-07 | ||
| - **Component:** `.github/workflows/hourly-commercialization-loop.yml` | ||
| - **Failure:** scheduled workflow concluded `failure` before GitHub created any | ||
| jobs. | ||
|
|
||
| ## Root cause | ||
|
|
||
| RankWeave pinned the central review-fix reusable workflow to commit | ||
| `21397126d708d2d536ccc1d68b0d333653ce9315`. That commit later diverged from the | ||
| protected central history, so the caller could no longer resolve the reusable | ||
| workflow. Recent failed runs contained zero jobs, while the last successful | ||
| hourly run used the same RankWeave caller before the central ref became | ||
| unreachable. | ||
|
|
||
| ## Remediation | ||
|
|
||
| The local hourly workflow now retains its reachable immutable merge-scheduler | ||
| calls and replaces the unavailable repair call with a read-only local hold job. | ||
| The bridge checks whether an open PR exists and records the fail-closed repair | ||
| state, but it has no write, OIDC, issue, provider, or model credential. It does | ||
| not copy the repair engine and does not fall back to GitHub Models. | ||
|
|
||
| The central repair call may return only after a protected central NVIDIA | ||
| NIM/OpenCode scheduler has merged and RankWeave pins its reachable immutable | ||
| commit. The existing independent review workflows and their credentials remain | ||
| unchanged. | ||
|
|
||
| ## Verification | ||
|
|
||
| - Contract tests reject any `pr-review-fix-scheduler.yml@...` reference in the | ||
| temporary bridge state. | ||
| - Contract tests require two immutable merge-scheduler calls. | ||
| - Contract tests require the bridge to remain local, read-only, secret-free, | ||
| provider-neutral, and bounded. | ||
| - Full Python 3.10-3.13 CI, package smoke, Security Scan, and SAST must pass on | ||
| the exact PR head before merge. | ||
|
|
||
| ## Rollback | ||
|
|
||
| Restore a central review-repair call only with a protected, reachable, reviewed | ||
| commit SHA whose workflow uses NVIDIA NIM/OpenCode and preserves the existing | ||
| review-agent credential boundary. Never restore the orphaned SHA or substitute | ||
| a mutable branch. | ||
|
|
||
| ## References | ||
|
|
||
| GitHub. (2026). *Reusing workflow configurations*. GitHub Docs. | ||
| https://docs.github.com/en/actions/reference/workflows-and-actions/reusing-workflow-configurations | ||
|
|
||
| GitHub. (2026). *GITHUB_TOKEN*. GitHub Docs. | ||
| https://docs.github.com/en/actions/concepts/security/github_token |
Uh oh!
There was an error while loading. Please reload this page.