feat(strix): map official scan modes from dual-flow events - #1054
feat(strix): map official scan modes from dual-flow events#1054seonghobae wants to merge 3 commits into
Conversation
Set STRIX_SCAN_MODE from the GitHub event instead of inheriting Quick on every trigger. Required PR and repository_dispatch evidence stay quick; push to develop stays quick; push to main/master and the weekly schedule use standard. Restore workflow_dispatch with a scan_mode choice so an incomplete RC can be scanned by hand. Deep is manual-only and is the only path that raises the 360/340/4h/4.5h budget. Do not invent release or RC-tag triggers. Allowlist official CLI mode names and reject the unofficial normal alias. Co-authored-by: Seongho Bae <seonghobae@users.noreply.github.com>
|
Important Review available on request
Reviews should be triggered manually for repositories with fewer than 10 stars. Select Trigger review above or comment ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
grep -F treats an embedded newline as a second pattern, so a leading newline made the release-trigger guard match every file. Co-authored-by: Seongho Bae <seonghobae@users.noreply.github.com>
|
Bugbot is not enabled for your account, so this pull request was not reviewed. Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs. |
There was a problem hiding this comment.
Verdict: COMMENT — do not mark ready until exact-head quality is green
No defect maps required pull_request_target / repository_dispatch to Standard or Deep, applies the 360/340/4h/4.5h budget to the required PR job, lets repository_dispatch inherit Standard from github.ref, or widens the pull_request_target job token. Official names are only quick|standard|deep; normal fails closed before the scanner starts.
Do not APPROVE while this PR is draft and exact-head strix-changed-path-quality-ci on 1e3f85c2835e1ef5a3cb951d377e147c214bb45e is unfinished. Do not REQUEST_CHANGES: the event→mode contract is correct.
CodeRabbit skipped this draft. Local mapping/queue/hash contracts passed (39).
What is sound
STRIX_SCAN_MODErequiresgithub.event_name == 'push'beforemain/masterbecomes Standard, so arepository_dispatchSHA on the default branch stays Quick.- Job/step
fromJSON(...)and the process/total budgets raise only whenworkflow_dispatch+scan_mode=deep. A mis-setSTRIX_SCAN_MODE=deepon PRT keeps 5400/5700. - Fail-closed PR scoping,
STRIX_FAIL_ON_MIN_SEVERITY: MEDIUM, hashed-lock installer, and trusted-base script execution are unchanged. - Commit
1e3f85ccorrectly replaced the newlinegrepneedle that treated every file as a release trigger.
Residual risk to land on this head (not a second PR)
- Branch-selected YAML. Restoring
workflow_dispatchon privilegedstrix.ymlre-opens GitHub's Branch dropdown /--refpath. After this file is on the default branch, a writer can dispatch a feature-branch revision; that revision supplies the workflow definition before the trusted checkout, withSTRIX_*/NVIDIA_NIM_*/GCP_SA_KEY/ merge tokens andid-token: write. A job-levelif:onmaindoes not stop a malicious selected revision. Write access is the only control. Record that residual in the doctoring record, or move Deep to a non-pull_request_targetworkflow that is not this privileged file. - Merge-scheduler parking.
strix_evidence_state()treats anyStrix Security Scancheck run as required evidence. A manual Deep on a PR head can hold an approved PR for up to six hours. Do not fold the scheduler change into this slice; it is a follow-up onmain. - Tautological mapping table.
test_dual_flow_event_maps_to_official_modereimplements the policy in Pythonif/elifand never evaluates the pinned expression. Keep the exact-string pin; bind the table to that string (or drop the Python mirror). - Org-wide minutes. Every sibling
pushtomain/mastermoves from inherited Quick to official Standard. Any writer can start a 360-minute Deep job. Call that out as a capacity change before first org-wide use.
PR_GOVERNANCE_AUDIT.md and docs/org-required-workflow-rollout.md do not currently claim “Strix is always Quick” or “no workflow_dispatch on strix.yml”, so they are not stale in a failing-test sense. Durable policy for this change is the new doctoring record.
Next action
Keep #1054 as the only landing vehicle. After exact-head quality and the required Strix smoke are green on 1e3f85c, add the doctoring residual-risk sentences and bind the mapping table to SCAN_MODE_EXPRESSION on this branch, then mark ready. Do not add release:, v*-rc*, client_payload.scan_mode, or a second same-slice PR. Do not Deep-dispatch a PR head you want merged until the scheduler ignores workflow_dispatch check runs.
Sent by Cursor Automation: Fix Issues
| # workflow revision still requires write access, matching GitHub's | ||
| # workflow_dispatch model. Privileged same-head retries stay on | ||
| # repository_dispatch above. | ||
| workflow_dispatch: |
There was a problem hiding this comment.
Restoring workflow_dispatch on this privileged file re-opens GitHub's Branch dropdown / gh workflow run --ref path (GitHub, n.d., Manually running a workflow). After this YAML is on the default branch, the selected revision supplies the workflow definition before the trusted-source checkout, with scanner secrets and id-token: write.
A job-level if: on main does not stop a malicious selected revision. Write access is the only control. Either record that residual in docs/doctoring/strix-scan-mode-dual-flow.md, or move Deep off this pull_request_target file. Do not add target_repository / pr_number inputs to “fix” it.
Evaluate the exact GitHub Actions mapping instead of a parallel Python remake, and record that restored workflow_dispatch still lets a writer choose the workflow revision. Co-authored-by: Seongho Bae <seonghobae@users.noreply.github.com>


The org-required Strix workflow always inherited Quick because
.github/workflows/strix.ymlnever setSTRIX_SCAN_MODE. The gate already forwards that variable asstrix -n -t . --scan-mode $SCAN_MODE.CWL runs both GitHub Flow (
main/master) and Git Flow (develop) without a consistent RC-tag, prerelease, or GitHub release-event convention. RankWeave forbids prerelease GitHub Releases. This PR therefore does not inventrelease:orv*-rc*triggers.Event → official CLI mode
Official Strix modes are only
quick,standard, anddeep(nonormalalias). CWL keeps choosing explicitly; the CLI default is deep.pull_request_targetquickrepository_dispatchstrix-scanquickpushtodevelopquickpushtomainormasterstandardschedule(Monday 03:00 UTC)standardworkflow_dispatchscan_modequick/standard/deep, defaultstandard)repository_dispatchcannot inherit Standard fromgithub.ref. A dispatch SHA is the default branch and is oftenmain; the mapping requiresgithub.event_name == 'push'before treatingmain/masteras Standard.Deep is allowed only on the restored
workflow_dispatchpath. The required PR job stays on the 120-minute budget. The Deep raise uses the GitHub-hosted 360-minute ceiling and leaves about 20 minutes after the 340-minute step for artifact and status publication.What did not change
STRIX_FAIL_ON_MIN_SEVERITY: MEDIUMpull_request_targetstill executes trusted base scripts onlyrepository_dispatchstrix-scanremains PR-metadata-bound and cannot scan a branch/tag RCpip install --require-hashes/ the region PRs fix(strix): install hashed locks without pip re-resolution #969 and fix(strix): persist 1.5.3 reports without dropping cryptography 50 #961 edit)strix-agentversion and lock filesrequire_safe_scan_modenow allowlistsquick|standard|deepand rejectsnormal.Overlap check (scan-mode policy unchanged)
This branch stays based on
mainand does not take neighbor work:pip install --require-hashes/--no-deps/ cryptography 50 pinmainSTRIX_TARGET_PATH,STRIX_DISABLE_PR_SCOPING, fail-closed wrappermainSTRIX_FALLBACK_MODELSUltra-253B,nim_process_budget_seconds=1800main; no NIM process-cap lines added--instructionmain; gate command line unchanged except the mode allowlistShared surface only: this PR renames
Run Strix (quick)→Run Strixand replaces the 5400/5700 prelude with a Deep-only if/else in the samerun:block. On merge, keep this mapping/timeout/workflow_dispatchand take their scoping / fallback / fail-closed / NIM-cap hunks as-is. Do not duplicate them here.Tests
tests/test_strix_scan_mode_policy.pypins the mapping expression and fails if Deep timeouts apply to the required PR jobscripts/ci/test_strix_quick_gate.shand the required-workflow smoke test assert the same contractworkflow_dispatchonly onstrix.yml, and only as ascan_modechoiceDoctoring record:
docs/doctoring/strix-scan-mode-dual-flow.md.