Repository navigation
Resolve experiment references in inline sub-agent frontmatter before writing the agent file; fail smoke-copilot when file-summarizer doesn't run - #70387
Conversation
… file-summarizer lifecycle in smoke-copilot Co-authored-by: SivaKesava1 <11771739+SivaKesava1@users.noreply.github.com>
file-summarizer doesn't run
There was a problem hiding this comment.
🔵 Needs a closer look
Confirmed correctness gaps remain, and end-to-end smoke validation depends on a separate alias-resolution fix.
4 open issues
What changed in this PR
Tightens experiment-model handling and delegation checks in gh-aw’s inline sub-agent pipeline.
Changes:
- Resolves selected experiment variants before writing agent frontmatter.
- Adds required sub-agent lifecycle checks to smoke-copilot.
- Adds regression coverage and updates experiment documentation.
| File | Description |
|---|---|
pkg/workflow/compiler_experiments_test.go |
Checks assignment and metadata consistency. |
docs/src/content/docs/experimental/experiments.md |
Documents substitution and failure behavior. |
actions/setup/js/smoke_model_routing_assertions.test.cjs |
Covers required delegation checks. |
actions/setup/js/smoke_model_routing_assertions.cjs |
Adds U4 lifecycle assertions. |
actions/setup/js/interpolate_prompt.test.cjs |
Exercises experiment expansion through interpolation. |
actions/setup/js/extract_inline_sub_agents.test.cjs |
Tests substitution and validation. |
actions/setup/js/extract_inline_sub_agents.cjs |
Resolves frontmatter experiment references. |
.github/workflows/smoke-copilot.md |
Requires file-summarizer delegation. |
.github/workflows/smoke-copilot.lock.yml |
Updates the compiled workflow and hashes. |
Review effort: Max
|
@copilot address the following outstanding work in one pass:
Push the necessary fixes, reply to each listed review thread and resolve it when addressed. Ignore feedback already answered or resolved. Use the pr-finisher skill and stop when only human review or CI remains; do not trigger CI. Sous-chef state: 3caddd95d8c526431f46b86beb7b2da902cd21959fcdbbc5b38c0449e81dd5e3
|
…ment-model-expressions Co-authored-by: gh-aw-bot <259018956+gh-aw-bot@users.noreply.github.com>
…tions Co-authored-by: gh-aw-bot <259018956+gh-aw-bot@users.noreply.github.com>
|
Caution agentic threat detected DetailsPotential security threats were detected in the agent output. Review the workflow run logs for details. @copilot address the following outstanding work in one pass:
Push the necessary fixes, reply to each listed review thread and resolve it when addressed. Ignore feedback already answered or resolved. Use the pr-finisher skill and stop when only human review or CI remains; do not trigger CI. Sous-chef head: 403070b
|
Co-authored-by: gh-aw-bot <259018956+gh-aw-bot@users.noreply.github.com>
…ment-model-expressions Co-authored-by: gh-aw-bot <259018956+gh-aw-bot@users.noreply.github.com>
End-to-end runs on
|
Pushed b9996c4:
Merged latest main via |
…pilot Co-authored-by: SivaKesava1 <11771739+SivaKesava1@users.noreply.github.com>
Done in a1d2aac:
|
|
@copilot address the following outstanding work in one pass:
Push the necessary fixes, reply to each listed review thread and resolve it when addressed. Ignore feedback already answered or resolved. Use the pr-finisher skill and stop when only human review or CI remains; do not trigger CI. Sous-chef head: a1d2aac
|
…ment-model-expressions Co-authored-by: gh-aw-bot <259018956+gh-aw-bot@users.noreply.github.com>
Co-authored-by: gh-aw-bot <259018956+gh-aw-bot@users.noreply.github.com>
Pushed edac572 after merging main at 24f43c2 via The failing conclusion correctly handled Passed: focused regression, 246 focused JS tests, |
|
@copilot address the following outstanding work in one pass:
Push the necessary fixes, reply to each listed review thread and resolve it when addressed. Ignore feedback already answered or resolved. Use the pr-finisher skill and stop when only human review or CI remains; do not trigger CI. Sous-chef head: edac572
|
…ment-model-expressions # Conflicts: # .github/workflows/smoke-copilot.lock.yml Co-authored-by: gh-aw-bot <259018956+gh-aw-bot@users.noreply.github.com>
Pushed d15824f, merging main at 44aab31 via |
This reverts commit edac572. Co-authored-by: SivaKesava1 <11771739+SivaKesava1@users.noreply.github.com>
…ment-model-expressions # Conflicts: # .github/workflows/smoke-copilot.lock.yml Co-authored-by: SivaKesava1 <11771739+SivaKesava1@users.noreply.github.com>
Resolve the smoke-copilot.lock.yml conflict by recompiling at the merged head (AWF v0.28.70 bump on main). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

In smoke-copilot, the
file-summarizeragent file is written with the literalmodel: ${{ experiments.subagent_model }}. The literal reaches AWF and gets HTTP 400. The run can still be green, because nothing checks that the sub-agent ran: one of the two audited runs never invoked it at all. The variant assignment andaw_info.jsonwere already correct; only the written agent file was wrong.Root cause
interpolate_prompt.cjsextracts and writes inline sub-agents at step 1.5. That is before variable interpolation (step 2) and experiment substitution (step 2.5), and those later passes only see the main prompt.Changes
extract_inline_sub_agents.cjs)resolveSubAgentExperimentReferences(agentName, content, env), called inwriteInlineSubAgentsjust before the file is written.${{ experiments.<name> }}form (runtime-import) and the__GH_AW_EXPERIMENTS_<NAME>__placeholder form (inlined content).GH_AW_EXPERIMENTS_<NAME>, the value already set fromsteps.pick-experiment.outputs.*. Nothing is re-picked and no other expression is evaluated.ERR_CONFIGnaming the sub-agent and field if the value is missing or empty. It also fails if the value doesn't match^[A-Za-z0-9][A-Za-z0-9._/@+:-]*$, which keeps it from injecting YAML.small/large) is written as is, with no alias resolution.smoke_model_routing_assertions.cjs)requiredSubAgentsoption forevaluateSessionContract. For each named sub-agent the check fails if:subagent.failedevent matches it;subagent.completed;${{or__GH_AW_.subAgentLifecyclehelper, shared with the existing S1/S2 routing checks.smoke-copilot.md: the post-step now passesrequiredSubAgents: ["file-summarizer"].GH_AW_HARNESS_VERSION.experimental/experiments.md.The agent file and the sub-agent model metadata read the same pick-experiment output, so they always agree. A Go test (
TestSubagentMetadataMatchesSelectedExperimentVariant) covers this.Tests
The named tests from the issue are included, except the compile-rejection test, which is only needed if this syntax is declined:
writes_selected_experiment_model_before_agent_file_writeboth_subagent_model_variants_are_reachablepreserves_plain_subagent_model_and_frontmattersubagent_metadata_matches_selected_experiment_variantsmoke_fails_when_file_summarizer_fails_to_startsmoke_fails_when_file_summarizer_is_not_invokedThe pipeline tests drive the real
interpolate_promptpipeline and fail if the fix is removed.Known gaps / follow-ups
End-to-end not run. I couldn't dispatch
smoke-copilotfrom this agent, so it hasn't run on this branch and there is no run URL or tested commit yet. Expected result:smallorlarge, and the 400 for the literal expression is gone;file-summarizerwill likely fail on the unresolved alias, and U4 should then fail the smoke on purpose.Please hold the merge until that fix lands, then rerun the smoke.
inlined-imports: truemode. The compiler drops## agent:blocks from the prompt in this mode, so no agent file is written at all. This existing gap is not fixed here.Shared imports. Experiment references in
.github/workflows/shared/*imports are still rejected at compile time.