Skip to content

fix(smoke): audit SELF under the rule matching how the orchestrator is triggered - #1799

Merged
jamesadevine merged 1 commit into
mainfrom
fix/smoke-released-orchestrator-self-audit
Aug 3, 2026
Merged

fix(smoke): audit SELF under the rule matching how the orchestrator is triggered#1799
jamesadevine merged 1 commit into
mainfrom
fix/smoke-released-orchestrator-self-audit

Conversation

@jamesadevine

Copy link
Copy Markdown
Collaborator

The trigger-policy audit unconditionally appended \SELF_ID\ to the PR-definition list, which requires fork hardening and a \pullRequest\ trigger with a collaborator comment gate.

That held while the candidate orchestrator was the only one. The released orchestrator (2568) is scheduled-only by design, so it failed its own audit before running a single case:

\
PR trigger policy drift detected for definition 2568 (ado-aw released smoke).
\\

Found by the first live released run (build 629514), which reached the audit and stopped there — the guard working correctly, on the wrong rule.

Fix

\SELF\ now joins whichever list matches its trigger model: \PR_IDS\ in candidate mode, \SCHEDULED_ONLY_IDS\ in released mode. The comment-gate assertion is likewise PR-only.

Keyed off the compile mode, not the definition's own triggers. Reading the triggers would be fail-open: a candidate definition that lost its PR trigger would silently reclassify into the weaker scheduled-only rule and pass. Keying off the mode keeps both directions fail-closed.

Validation


  • px vitest run src/compiler-smoke-e2e\ green, incl. a new regression test
  • Mutation-checked: pinning \SELF_IS_PR_DEFINITION=True\ fails the new test
  • \cargo test --test bash_lint_tests\ green (shellcheck over the modified body)

…s triggered

The trigger-policy audit unconditionally appended SELF_ID to the
PR-definition list, which requires fork hardening AND a pullRequest
trigger carrying a collaborator comment gate. That held while the
candidate orchestrator was the only one, but the released orchestrator
is scheduled-only by design - REGISTERED.md says so explicitly - so it
failed its own audit with 'PR trigger policy drift detected for
definition 2568' before running a single case.

SELF now joins whichever list matches its trigger model: PR_IDS in
candidate mode, SCHEDULED_ONLY_IDS in released mode. The comment-gate
assertion is likewise PR-only, since there is no PR trigger in released
mode to carry one.

Keyed off the compile mode rather than off the definition's own
triggers. Reading the triggers would be fail-OPEN: a candidate
definition that LOST its PR trigger would silently reclassify itself
into the weaker scheduled-only rule and pass. Keying off the mode keeps
both directions fail-closed.

Found by the first live released run (build 629514), which reached the
audit and stopped there - the guard working, on the wrong rule.

Mutation-checked: pinning SELF_IS_PR_DEFINITION to True fails the new
test.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 323b70ff-d193-4c6e-b4c7-9ec6c3dc6ebd
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
2 pipeline(s) were filtered out due to trigger conditions.
There may be pipelines that require an authorized user to comment /azp run to run.

@jamesadevine
jamesadevine merged commit 0094e40 into main Aug 3, 2026
7 checks passed
@jamesadevine
jamesadevine deleted the fix/smoke-released-orchestrator-self-audit branch August 3, 2026 15:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant