Skip to content

Give the sequenced compound task the runOptions its siblings get - #1783

Open
Nathan (nturinski) wants to merge 1 commit into
feat/CoRfrom
nturinski-compound-task-runoptions
Open

Give the sequenced compound task the runOptions its siblings get#1783
Nathan (nturinski) wants to merge 1 commit into
feat/CoRfrom
nturinski-compound-task-runoptions

Conversation

@nturinski

Copy link
Copy Markdown
Member

A real azure-debug-generate run produced seven tasks. Six carried runOptions; 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 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.md 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:

task runOptions category
Start Emulators yes emulator (enumerated)
tasks-api: npm install yes install (enumerated)
tasks-api: npm clean yes clean (enumerated)
tasks-api: npm watch yes watch (enumerated)
tasks-api: func host start yes top-level (enumerated)
task-tracker-web: vite dev yes top-level (enumerated)
Debug All Services (sequenced) NO compound — not enumerated

Six 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.md 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.

The fix

Both causes. 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

Not by inspection. Adding exactly the line the fixed template emits, and nothing else, to that run''s tasks.json:

BEFORE  FAIL  • [invalidTaskRunOptions] Task "Debug All Services (sequenced)" …
AFTER   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.

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]>
@nturinski
Nathan (nturinski) requested a review from a team as a code owner September 3, 2026 20:38
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