fix(compile): use macro form for same-job synthPr gate refs#944
Merged
Conversation
Co-authored-by: jamesadevine <4742697+jamesadevine@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix synthetic PR gate being silently bypassed
fix(compile): use macro form for same-job synthPr gate refs
Jun 10, 2026
jamesadevine
approved these changes
Jun 10, 2026
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
The synthetic-PR gate was silently bypassed on real CI builds.
prGateruns in the Setup job alongside thesynthPrstep that emitsAW_SYNTHETIC_PR*outputs, but the gate'senv:read them via the same-job runtime expression$[ variables['synthPr.AW_SYNTHETIC_PR'] ]— which ADO resolves to empty (step outputs aren't exposed to runtime expressions in the producing job).gate/bypass.tstherefore always took the "not a PR build — pass automatically" branch.Changes in
compile_gate_step_external(src/compile/filter_ir.rs):synthProutputs via$(synthPr.X), which expands from the job's output-variable namespace (empty when the step was skipped/unmatched, never a stray literal):coalesce(...)for the branch/id vars:synthPronly runs on non-PR builds andSystem.PullRequest.*is empty on non-PR builds, so exactly one side is ever non-empty. (Runtime expressions$[ ]must occupy the whole value and can't be concatenated, so the old coalesce form couldn't carry the macro.)dependencies.Setup.outputs['synthPr.X']) is correct and left unchanged.test_pr_filter_synth_mode_gate_step_uses_same_job_synth_refto assert the macro form and reject both thevariables['synthPr.X']and cross-job forms inside the Setup-job gate step.Test plan
cargo test— full suite green; updated synth gate-step regression testpr-filter-tier1-agent.mdand confirmed the Setup-jobprGateenv emits the macro form and the output YAML parses