Skip to content

feat(run): --chain and multi-issue runs print an "experimental" warning with their measured success rates — fixed, dated counts; the code stays #1651

Closed

Description

@admarble

Epic: graph-2026-11-simplify Tier: mechanical Execution: sequant_run Blocked by: #1648 (both edit src/commands/run.ts; #1648 removes --stacked's implication of --chain)

Problem

D-3: mark --chain and multi-issue runs experimental, with a warning that names the measured success rates; the code stays. Measured on this repo's .sequant/metrics.json (453 runs, 2026-01-21 to 2026-10-28): multi-issue runs 41 of 87 success, single-issue 301 of 366; --chain 3 of 9 (and 2 of 7 in #604, 2026-05). Founding doc §4, P-7.

Decisions

ID Decision Rejected
W-1 Fixed text with the counts and their source date, printed once per run to stderr before any worktree is provisioned; --json output unchanged reading the user's own metrics (P-7); a suppression flag (new surface)
W-2 Multi-issue means more than one issue number on the command line, any concurrency counting only concurrency > 1 (the measurement did not split by concurrency)

Text, exactly:

  • ⚠ --chain is experimental: 3 of 9 recorded --chain runs succeeded (sequant's own runs to 2026-10-28; 2 of 7 in #604). Single-issue runs: 301 of 366.
  • ⚠ Multi-issue runs are experimental: 41 of 87 recorded multi-issue runs succeeded, against 301 of 366 single-issue runs (sequant's own runs, 2026-01-21 to 2026-10-28).

Acceptance Criteria

  • AC-1: A --chain run prints the chain line, a two-issue run prints the multi-issue line, a --chain run of two issues prints both, and a one-issue run prints neither. Evidence: npx vitest run src/commands/run.experimental-warning.test.ts → ≥ 4 passed, 0 failed
  • AC-2: The run command reference marks both modes experimental with the same counts. Evidence: grep -c '41 of 87' docs/reference/run-command.md → ≥ 1
  • AC-3: Chain behaviour is unchanged. Evidence: npx vitest run src/lib/workflow/chain-preflight.test.ts src/lib/workflow/chain-resume.test.ts → 0 failed (constraint)
  • AC-4: The changelog records the change. Evidence: awk '/^## \[Unreleased\]/,/^## \[[0-9]/' CHANGELOG.md | grep -ci 'experimental' → ≥ 1
  • AC-5: No skill-directory edits. Evidence: git diff --name-only $(git merge-base origin/main HEAD)..HEAD | grep -cE '^(plugin/|\.claude/skills/|templates/skills/)' → 0 (constraint)

isGateTestEvidence classifies none of these ACs as a gate (parse-check, 2026-11-04).

May touch

src/commands/run.ts, src/commands/run.experimental-warning.test.ts (new), docs/reference/run-command.md (the chain and multi-issue sections only), CHANGELOG.

Non-Goals

  • Changing chain or multi-issue behaviour, removing either (D-3), or --concurrency's default.
  • The MCP result shape.

Done when

Anyone starting a chain or multi-issue run sees the measured rate before it starts.

Activity

  1. added
    graph-2026-11-simplify
    on Nov 7, 2026
  2. admarble commented on Nov 11, 2026

    @admarble
    ContributorAuthor

    Runner context, 2026-11-11: repo state since this issue was written

    #1648 merged as d1eb83be7, so --stacked and its implication of --chain are gone from src/commands/run.ts. The pre-flight checks are now at lines 60–80 (--chain with --batch is rejected at :67). Print the warnings before worktrees are provisioned (W-1).

  3. admarble commented on Nov 11, 2026

    @admarble
    ContributorAuthor

    Complexity: Standard (5 ACs, 4 directories)

    AC Quality Check

    • AC-1..AC-4 carry command-shaped Evidence:; each fails on current main (test file absent; grep -c '41 of 87' → 0; no "experimental" in [Unreleased] — AC-4 matches only if the new entry says it, and the existing entries don't mention it; verify at exec). Not vacuous.
    • AC-3 and AC-5 are constraints and pass today by design; they guard regressions, not progress.
    • AC-1 counts "≥ 4 passed" but does not pin the exact text. Plan adds exact-string assertions for both W-1 lines so a reworded line fails.
    • Non-Goals present.

    Scope Assessment

    Non-Goals: present (no behaviour change, no removal, MCP result shape untouched).

    Metric Value Status
    Feature count 1 ✅
    AC items 5 ✅
    Directory spread 4 (src/commands, docs/reference, CHANGELOG, test) ✅

    Verdict: ✅ SCOPE_OK

    Acceptance Criteria

    AC-1: warnings printed per mode

    Verification: Unit Test (src/commands/run.experimental-warning.test.ts, new; mock harness as in run-preflight-exit.test.ts)
    Scenario: Given runCommand with stderr spied → When run with --chain + 1 issue / 2 issues no chain / --chain + 2 issues / 1 issue → Then chain line / multi line / both / neither.
    Assumptions: W-1 text exact; lines start at column 0 with ⚠ (#1655 AC-1 regex ^⚠ (--chain is|Multi-issue runs are) experimental).

    AC-2: docs mark both modes experimental

    Verification: Manual Test (grep) — grep -c '41 of 87' docs/reference/run-command.md ≥ 1. Edit only ### Running Multiple Issues (l.23) and ### Chain Mode (l.179); #1650 and #1652 edit the same file.

    AC-3: chain behaviour unchanged

    Verification: Integration Test (existing chain-preflight, chain-resume suites) — constraint.

    AC-4: changelog

    Verification: Manual Test (awk/grep) — one entry under [Unreleased] → ### Changed, using the word "experimental".

    AC-5: no skill-dir edits

    Verification: Manual Test (git diff grep) — constraint.

    Implementation Plan

    Phase 1: Warning

    1. In src/commands/run.ts, after the pre-flight rejections (--chain + --batch at :67, --concurrency check) and before RunOrchestrator.resolveConfig/worktree provisioning, emit to stderr with console.error (no chalk colour prefix, so ^⚠ anchors): chain line if options.chain; multi line if issues.length > 1 (W-2: any concurrency). Chain line first. Rejected runs print nothing.
    2. Always emit regardless of --json/--quiet (W-1: stderr, --json stdout unchanged); once per run, never in the per-issue loop.
    3. Text as module constants, copied verbatim from W-1 (no metrics reads, P-7).

    Phase 2: Tests

    1. New run.experimental-warning.test.ts: the four AC-1 cases plus exact-string assertions, a --json stdout-unchanged case, and "printed before RunOrchestrator.resolveConfig" via call order.

    Phase 3: Docs

    1. run-command.md: a short experimental note in the two sections with both counts and source dates.
    2. CHANGELOG [Unreleased] → ### Changed entry.

    Design Review

    1. Where does this belong? runCommand pre-flight in src/commands/run.ts, the single entry for CLI runs. The MCP path doesn't pass through it (result shape is a non-goal).
    2. Simplest approach? Two constants + two ifs. Rejected: reading .sequant/metrics.json (P-7), suppression flag (new surface), warning inside the orchestrator (would also hit MCP/ready).
    3. Pattern / re-patch count? Follows warnDeprecatedFlags (run-flags.ts) in spirit. This is a new warning, not a re-patch of a fix; no prior fix-class issues.
    4. Reviewer challenge? "Why hardcode stale counts?" — decided in W-1; dated in the text. "run.ts is at 187/200 LOC (arch: extract RunOrchestrator — decouple execution engine from CLI wiring #503 cap)" — see Open Question 1.
    5. Producers/consumers: one producer (runCommand). Consumers: smoke(simplify): first real use — one detached run of a main build on two notes-fixture smoke issues, after #S-01 to #S-07 merge; the owner reads the report #1655 smoke regex; run-command.md. ready/sequant run wrappers call runCommand? Check at exec with grep -rn "runCommand(" src; if ready calls it with multiple issues, the warning would appear there too (acceptable, same run).

    Feature Quality Planning

    All standard checks pass. Notable:

    Open Questions

    1. Put the constants and an emitExperimentalWarnings(issues, options) helper in a new src/commands/run-experimental.ts? — Recommendation: yes, to keep run.ts under 200 LOC; "May touch" doesn't list it, so this needs a nod. Impact if no: inline ~10 lines, ≈197 LOC, tight.
    2. --batch runs (issues may be empty, batches carry issues) — Recommendation: also print the multi-issue line when the resolved issue count > 1, otherwise W-2's "on the command line" is read literally and batch runs stay silent. Impact: minor either way; AC-1 does not cover it.

    Recommended Workflow

    Phases: exec → qa
    Quality Loop: disabled
    Reasoning: Mechanical, 5 ACs, one source file; a unit test is authored directly in exec so testgen adds nothing. No UI, no security surface.

    Label Review

    Current: graph-2026-11-simplify
    Recommended: + planned
    Quality Loop: won't auto-enable (SCOPE_OK)

  4. added
    planned
    on Nov 11, 2026
  5. admarble commented on Nov 11, 2026

    @admarble
    ContributorAuthor

    QA Verdict: NEEDS_VERIFICATION

    Gaps:

    • Two new exported constants are only used inside their own module; un-export them or import them in the test
    • Suggestions:

    Needs human review:

    • Required CI check test still running; re-run QA after it reports

    Reviewed in a separate session by claude-code (claude-opus-5-5); the change was written by claude-code (claude-sonnet-5-5).

  6. added a commit that references this issue on Nov 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    graph-2026-11-simplifyplanned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions