Skip to content

Fix single-quoted experiment branches in sub-agent smoke prompts - #70747

Merged
pelikhan merged 1 commit into
mainfrom
pelikhan-probable-sniffle
Oct 21, 2026
Merged

pelikhan merged 1 commit into
mainfrom
pelikhan-probable-sniffle

Conversation

@pelikhan

Copy link
Copy Markdown
Collaborator

Summary

Fix the remaining reproducible sub-agent smoke gap after #70652: the template truthiness helper treated single-quoted comparisons as nonempty truthy strings. All three smoke-copilot-sub-agents experiment branches survived rendering, including the instruction not to invoke sub-agents during an inline_strict run.

  • Recognize both single- and double-quoted literal comparisons without evaluating expressions as code.
  • Parse equality/inequality operators together so !== is not consumed as an equality expression with ! appended to the left-hand side.
  • Cover both quote styles, all four existing comparison operators, empty operands, and opposite quotes inside literals.
  • Run the actual smoke workflow's Tasks section through interpolate_prompt.main() for every variant and require exactly the assigned instructions. Isolate the existing integration tests' workspace in their temporary directory.

Fixes #70670.

Existing-run evidence

  • Run 39516047181: experiment assignments.json selects inline_strict; activation logs show inline_strict == 'single_agent_control', inline_strict == 'delegated_sequential', and inline_strict == 'inline_strict' all retained. The final prompt includes both “Do not call any sub-agent” and delegation instructions. The post-step correctly rejects zero invocations (haiku-whoami must actually run exactly once, 0 !== 1).
  • Run 39521603916, reported in Smoke Test: Copilot Sub Agents - 39521603916 #70717: assignment is single_agent_control; its assertion and overall run succeed. The issue's synthetic FAIL is expected by experiment design, not evidence of a model regression or successful positive-arm delegation.

Scope and residuals

#70652 is already merged and #70649 closed. The repository pin regression passes against its recorded 36-model catalogue, with only the explicitly owner-deferred video-analyzer / copilot/gemini-3.7-flash pin unresolved. That fixture is historical evidence, not a live catalogue availability claim. #70675 predates the pin-fix merge.

No model pins, fail-closed model-resolution behavior, routing instrumentation, Claude/Codex parity, workflow configuration, or generated locks are changed. The literal variant interpolation in the smoke issue text is unchanged; the root cause fixed here is contradictory branch selection.

Validation

  • Reproduced the baseline false-branch defect and confirmed that the patched helper excludes control instructions from inline_strict.
  • Focused suites: 169 tests pass across is_truthy, interpolate_prompt, render_template, smoke_copilot_sub_agents, and model_pin_check.
  • PATH="/opt/homebrew/bin:$PATH" make agent-report-progress passes formatting, JavaScript lint, schema freshness, build, and impacted tests. No Go changes; impacted Go tests and workflow recompilation correctly skip.
  • Read-only security review found no vulnerabilities in this focused comparison/test change.

Hosted verification

No workflow was dispatched. These changes are locally verified and published, not yet landed or hosted-verified. The latest main-branch smoke runs available at investigation time predate #70652; a passing negative-control run does not establish positive-arm delegation or wire-API success.

Draft per inherited user preference.

Recognize both quote styles and compare equality/inequality operators consistently so sub-agent smoke variants cannot retain conflicting control instructions. Exercise all three real smoke task branches through prompt interpolation.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@pelikhan
pelikhan marked this pull request as ready for review October 21, 2026 02:15
Copilot AI max review requested due to automatic review settings October 21, 2026 02:15
@pelikhan
pelikhan merged commit f253b9a into main Oct 21, 2026
32 checks passed
@pelikhan
pelikhan deleted the pelikhan-probable-sniffle branch October 21, 2026 02:16
Copilot stopped reviewing on behalf of pelikhan due to an error October 21, 2026 02:16
@github-actions

Copy link
Copy Markdown
Contributor

🧠 Matt Pocock Skills Reviewer is reviewing this pull request using Matt Pocock's engineering skills...

@github-actions

Copy link
Copy Markdown
Contributor

🔎 PR Code Quality Reviewer is reviewing code quality for this pull request...

@github-actions

Copy link
Copy Markdown
Contributor

🔬 Test Quality Sentinel is analyzing test quality on this pull request...

@github-actions

Copy link
Copy Markdown
Contributor

✂️ Ponytail Reviewer has started processing this pull request

@github-actions

Copy link
Copy Markdown
Contributor

🔍 Design Decision Gate 🏗️ is checking for design decision records on this pull request...

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Unresolved experiment references in elseif conditions can select incorrect instructions or remove required prompt sections.

1 open issue
What changed in this PR

Adds single-quoted comparison support to gh-aw’s prompt renderer to correct sub-agent smoke experiment selection.

Changes:

  • Handle both quote styles and all four comparison operators.
  • Add comparison and smoke-workflow rendering regression tests.
  • Isolate integration-test workspaces.
File Description
actions/​setup/​js/​is_truthy.test.cjs Covers quote styles, operators, and empty operands.
actions/​setup/​js/​is_truthy.cjs Unifies equality and inequality parsing.
actions/​setup/​js/​interpolate_prompt.test.cjs Tests smoke variants and isolates workspaces.

Review effort: Max

const neqMatch = trimmed.match(/^(.*?)\s*!==?\s*"([^"]*)"\s*$/);
if (neqMatch) {
return neqMatch[1].trim() !== neqMatch[2];
const comparison = trimmed.match(/^(.*?)\s*(===?|!==?)\s*(?:"([^"]*)"|'([^']*)')\s*$/);
@github-actions

Copy link
Copy Markdown
Contributor

🎉 This pull request is included in a new release.

Release: v0.93.0

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.

[aw] Smoke Copilot Sub Agents: failed

2 participants