Give the sequenced compound task the runOptions its siblings get - #1783
Open
Nathan (nturinski) wants to merge 1 commit into
Open
Give the sequenced compound task the runOptions its siblings get#1783Nathan (nturinski) wants to merge 1 commit into
Nathan (nturinski) wants to merge 1 commit into
Conversation
A real `azure-debug-generate` run produced seven tasks. Six carried
`runOptions: { instanceLimit: 1, instancePolicy: "silent" }`; one did not, and
`validate-debug-config` failed the run:
• [invalidTaskRunOptions] $.tasks: Task "Debug All Services (sequenced)"
must set runOptions.instanceLimit to 1 and runOptions.instancePolicy to
"silent" so a repeated invocation is a no-op.
That looks like the agent being careless until you line the tasks up against the
instructions, and then it is the instructions being wrong in two reinforcing
places.
`generate.md` § Task `runOptions` Rules said "Every task generated for the debug
chain (install, clean, watch, build, top-level, and emulator tasks) must
include...". The parenthetical reads as exhaustive, and the sequenced compound
task is not in it. Measured against the real output, the correlation is exact:
Start Emulators runOptions=yes emulator (enumerated)
tasks-api: npm install runOptions=yes install (enumerated)
tasks-api: npm clean runOptions=yes clean (enumerated)
tasks-api: npm watch runOptions=yes watch (enumerated)
tasks-api: func host start runOptions=yes top-level (enumerated)
task-tracker-web: vite dev runOptions=yes top-level (enumerated)
Debug All Services (sequenced) runOptions=NO compound (NOT enumerated)
Six for six on the enumerated categories, and the single miss is the single
category the enumeration omits.
The second cause is the one that actually produced the artifact. `multi-service.md`
§ Compound Debug Configuration ships a literal JSON template for this exact task,
and that template had no `runOptions` — while the `Start Emulators` template a few
lines away in `generate.md` does. The agent copied what it was given.
Both fixed: the template now carries `runOptions`, and the prose says "every task
in tasks.json" with the compound named explicitly, plus why it matters most there
rather than least — it is reachable both directly and as a compound's
`preLaunchTask`, so it is the likeliest of all of them to be invoked twice.
Verified against the captured run rather than by inspection. Adding exactly the
line the fixed template emits, and nothing else, turns that run's `tasks.json`
from the failure above to:
PASS: gate=debug-config — launch.json and tasks.json are structurally sound
Pinned with a `check-agent-drift.ts` contract on the template, since the template
is what gets copied. Falsification-tested: reverting the template reports
`compound-task-run-options: ... no longer states this contract` rather than only
moving the asset hash.
Contracts 17/17. All nine suites pass.
Co-authored-by: Copilot App <[email protected]>
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.
A real
azure-debug-generaterun produced seven tasks. Six carriedrunOptions; one did not, andvalidate-debug-configfailed the run:That looks like agent carelessness until you line the tasks up against the instructions — and then it is the instructions being wrong in two reinforcing places.
Cause 1: the enumeration excludes the failing task
generate.mdsaid "Every task generated for the debug chain (install, clean, watch, build, top-level, and emulator tasks) must include...". The parenthetical reads as exhaustive, and the sequenced compound task is not in it.Measured against the real output, the correlation is exact:
runOptionsSix for six on the enumerated categories, and the single miss is the single category the enumeration omits.
Cause 2: the template it copied
multi-service.mdships a literal JSON template for this exact task, and that template had norunOptions— while theStart Emulatorstemplate a few lines away ingenerate.mddoes. The agent copied what it was given.The fix
Both causes. The template now carries
runOptions, and the prose says "every task intasks.json" with the compound named explicitly — plus why it matters most there rather than least: it is reachable both directly and as a compound''spreLaunchTask, so it is the likeliest of all of them to be invoked twice.Verified against the captured run
Not by inspection. Adding exactly the line the fixed template emits, and nothing else, to that run''s
tasks.json:Pinned with a
check-agent-drift.tscontract on the template, since the template is what gets copied. Falsification-tested — reverting the template reportscompound-task-run-options: ... no longer states this contract, rather than only moving the asset hash.Contracts 17/17. All nine suites pass.