Closed
Copilot
AI
changed the title
[WIP] Add gate for agent job based on custom setup job
Add first-class agent job gating via jobs.agent.needs and jobs.agent.if
Closed
pelikhan marked this pull request as ready for review
August 2, 2026 17:34Copilot AI review requested due to automatic review settings
August 2, 2026 17:34Closed
… bypass for builtin job augmentation - Strip 'if: ' prefix from jobs.<built-in>.if values before storing in Job.If, matching the Job.If contract (bare expression only) and preventing 'if: if: ...' in the compiled output - Report the actual field name (.if or .needs) in the 'cannot augment' error so authors can identify the misconfigured field - Add guardIfAgainstStatusFuncBypass helper that inserts explicit needs.<compiler-job>.result == 'success' guards when user condition contains a status function (always/failure/cancelled/success), preventing bypass of compiler-managed activation/pre_activation permission checks - Add ifExpressionContainsStatusFunc helper for string-based status function detection (the expression parser tokenises failure() as an ExpressionNode literal, so AST-based detection is not reliable here) - Add tests for prefix stripping, field-specific error messages, and status function bypass guarding - Update ADR-49814: status changed from Draft to Accepted, guard mechanism documented Co-authored-by: gh-aw-bot <259018956+gh-aw-bot@users.noreply.github.com>
…Augmentations; strengthen integration test if assertion Co-authored-by: gh-aw-bot <259018956+gh-aw-bot@users.noreply.github.com>
pelikhan deleted the copilot/feature-agent-job-level-if branch
August 2, 2026 19:53Closed
Merged
Merged
Open
github-actions Bot added a commit that referenced this pull request
Aug 3, 2026Document jobs.agent.needs/if built-in job gating (#49814) in syntax-agentic.md, and split token-optimization.md (423 -> 384 lines) by extracting OpenTelemetry/ AgenticOps and harness-experience-learning content into a new token-optimization-observability.md, bringing it back under the 400-line target.
Closed