Skip to content

[#593] fix: honor run argument precedence and full preset eligibility - #610

Merged
rucka merged 14 commits into
mainfrom
feature/US-593-run-honor-argument-precedence-and-full
Nov 6, 2026
Merged

rucka merged 14 commits into
mainfrom
feature/US-593-run-honor-argument-precedence-and-full

Conversation

@rucka

@rucka rucka commented Nov 6, 2026 •

Copy link
Copy Markdown
Collaborator

PR Information

PR Title: [#593] fix: honor run argument precedence and full preset eligibility
Story/Epic: #593 / #605
Type: Bug Fix
Priority: P1
Assignee: rucka

Summary

What Changed

Explicit parallel, iteration, and repair limits override adoption values. Omitted loop parallelism inherits adopted global or per-tier limits, otherwise KB default 1; diagnostics and audit name the source. Winning autonomy keys/presets reach loop selection and direct-card dispatch, including full-preset red and untagged cards under autonomous consent.

Why This Change

Legacy configuration could clamp requested concurrency, reject valid overrides, or exclude cards selected by full.

Story Context

User Story: #593
Acceptance Criteria: AC1–AC7 covered by limit, selector, eligibility, consent, diagnostic, and invariant tests.

Changes Made

Implementation Details

  • T-1: Explicit limits override adoption; omitted parallelism inherits adoption/default; dependency and mutex limits remain.
  • T-2: Resolved root, filter, assignee, and status reach loop invocation and selection.
  • T-3: Direct-card mapping and fallback use effective eligibility; --autonomous still supplies consent.
  • T-4: Canonical skills, workflow, documentation, resolver copies, mirrors, and conformance align.

Files Changed

  • Modified: CLI run planner, handler, perimeter, cycle entry, tests, KB workflow and skills, docs, ADR-027.
  • Added: .changeset/593.md, argument precedence regression tests and real CLI smoke boundary coverage.
  • Remediation: registered help, reference, routing, pool diagnostics and batch/live audit agree on omission precedence; smoke consumer expects the effective KB-default diagnostic.

Services to Release

  • @pair/pair-cli: Argument precedence, selection, and card eligibility fixes (patch).

Testing

Test Results

  • pnpm quality-gate, pnpm build, pnpm smoke-tests, and pnpm --filter @pair/website e2e — passed on 4befabb9cd0ce80ba2723cd4e142ee22cf075dd6.
  • All 42 unique sealed witness/control commands pass on this head.
  • Four sealed snapshots preserved; seven test-artifact hashes unchanged; custody verification reports zero breaches.

Documentation

  • CLI reference, loop skill, automation guideline, and ADR-027 amendment updated.

Risk Assessment

  • risk:red story; explicit consent, custody, dependencies, mutexes, review and merge gates remain covered by tests.

Reviewer Guide

  • Review AC1–AC7 against the direct-card and parallel integration tests, then the shared resolver and canonical workflow changes.

T added 8 commits November 6, 2026 19:12
T-1: Let arguments supersede adopted parallel and iteration limits.

Refs: #593
T-2: Carry effective selector values and provenance to pair-loop.

Refs: #593
T-3: Resolve preset selection before mapped and fallback dispatch.

Refs: #593
@rucka rucka self-assigned this Nov 6, 2026
@rucka
rucka marked this pull request as ready for review November 6, 2026 19:10
@rucka rucka added the pr-state:to-be-reviewed PR state: awaiting review / gate label Nov 6, 2026
@rucka

rucka commented Nov 6, 2026

Copy link
Copy Markdown
Collaborator Author

Verdict

risk:red · cost:green — CHANGES-REQUESTED — omitted --parallel still forces serial CLI loops.

Open findings: 1.

PR: #610 · Author: rucka · Reviewer: independent verifier · Date: 2026-11-06 · Story: US-593 · Type: bug

Classification matrix — per dimension

Core workflow impact red (story floor); shared CLI and workflow diff yellow; input validation yellow; coupling balanced; no paid-service signal. Review tier red.

Assessments

Security — Input validation

Verdict: green — explicit numeric flags and selector values retain validation.

Security — Output handling

Verdict: green — changed diagnostics use existing text paths.

Security — Authentication

Verdict: green — no authentication path changed.

Security — Authorization

Verdict: green — --autonomous remains explicit for unattended consent.

Security — Introduced vulnerabilities

Verdict: green — none found.

Cost

Verdict: cost:green — no paid-service signal.

Architecture (Coupling)

Verdict: green — CLI and mirrored workflow share the established contract; no new boundary.

Bug fix — Red test before fix

Verdict: red — explicit override tests pass, but omission over adopted parallelism lacks a reproducing test.

Details

Findings by severity

Major (must fix before merge)

  • r0-1 — apps/pair-cli/src/commands/run/parser.ts:623; apps/website/content/docs/reference/cli/commands.mdx:807 — pair-cli run --preset full with adopted ## Max Parallelism 3 and five independent eligible cards injects parallel: 1, so the pool runs serially. AC1 says omission inherits adoption/default; the CLI reference also describes the serial behavior. Preserve an omitted request through loop routing and use the adopted cap; add an end-to-end omitted-argument test. VERIFY: run the CLI loop fixture without --parallel; ORACLE: adopted cap 3; ASSERT: peak concurrency 3 and diagnostics name adoption.
Functionality & requirements (AC coverage)

AC1 weak (omitted limit); AC2–AC5 and AC7 proven by limit, selector, card-entry, consent and invariant tests. AC6 weak for the omitted-limit diagnostic. Explicit overrides and full card admission work on tested paths.

Testing & quality gates

pnpm quality-gate, pnpm smoke-tests, website E2E: pass on 0cf165c5. Custody verified; this cycle sealed no contract.

Adoption compliance

Risk red full review set applied. ADR-027 amended; canonical mirrors and conformance checks pass.

Tech debt

None separate from the finding.

Documentation

CLI reference line 807 retains the incorrect omitted-argument behavior.

Performance & deployment

Serial fallback slows eligible batches; patch release and rollback are straightforward.

@rucka rucka added pr-state:not-approved PR state: changes requested risk:red Classification: high risk tier and removed pr-state:to-be-reviewed PR state: awaiting review / gate labels Nov 6, 2026
T added 6 commits November 6, 2026 21:46
Pair-RED-Snapshot: pr=610; phase=r1-g1; base=0cf165c531604a1542b4571e4b9c3501dad7179b; manifest=.pair/red-snapshots/pr-610-r1-g1.json
Pair-RED-Snapshot: pr=610; phase=r1-g1-rev2; base=2059bf7a0c807b72269287d54b8dad83bdc8f28d; manifest=.pair/red-snapshots/pr-610-r1-g1-rev2.json
Pair-RED-Snapshot: pr=610; phase=r1-g1-rev3; base=9d27b1abf76f6f184f1740912e3be7c3898446e9; manifest=.pair/red-snapshots/pr-610-r1-g1-rev3.json
Preserve argument omission through fan-out routing. Resolve adoption or\nKB default limits, retaining explicit overrides and source diagnostics.\n\nRefs: #593
Pair-RED-Snapshot: pr=610; phase=r1-g1-rev4; base=c2d8c54bf2a22e3a67533af35724051c02ccfde3; manifest=.pair/red-snapshots/pr-610-r1-g1-rev4.json
@rucka rucka added pr-state:to-be-reviewed PR state: awaiting review / gate and removed pr-state:not-approved PR state: changes requested labels Nov 6, 2026
@rucka

rucka commented Nov 6, 2026

Copy link
Copy Markdown
Collaborator Author

Delivery workflow summary

1. Identity — pair-implement-batch 4.0.1 | run story-593 | models: not recorded (in-session) | reviewed head: 4befabb9cd0ce80ba2723cd4e142ee22cf075dd6

2. Status — quality: converged · delivery: ready-for-merge · gate/custody: passed

3. Cycles — completed 0 / attempted 1 · review batches 2 · review executions 2 · retries 0 · redirects null · contract revisions 3 · preparation repairs 3 · invalidated remediations 0 · regression repairs 0 · active regression risks 0 · discharged regression risks 0 · admin/engine recoveries null

4. Cost / time — tokens not recorded (in-session: no host runtime supplied usage) · elapsed ≈ 3h05m (handoff timestamps, 21 handoffs; wall clock including waits) · profile KB default

5. Late defects (by origin) — preexisting-missed 0 · introduced-by-remediation 0 · unknown 0 · missedUpstream 0

Findings

id severity found status location summary resolution
r0-1 Major r0 resolved apps/pair-cli/src/commands/run/parser.ts:623; apps/website/content/docs/reference/cli/commands.mdx:807 With adopted Max Parallelism 3, five independent eligible cards, and pair-cli run --preset full without --par… resolved (see the re-review)

No scope proposals.

6. Machine-readable summary

{
  "schemaVersion": 1,
  "sourceDigest": "sha256:a83fe24cd21cd5a934a1abe5cd5cbdd66774985426fdeb8bbf03030bdb386c79",
  "asOf": "2026-11-06T22:19:17.153Z",
  "metricsRevision": 1,
  "completeness": "partial",
  "missingSources": []
}

@rucka rucka added pr-state:ready-to-merge PR state: gates green + review approved and removed pr-state:to-be-reviewed PR state: awaiting review / gate labels Nov 6, 2026
@rucka
rucka merged commit 4e27959 into main Nov 6, 2026
28 checks passed
@rucka
rucka deleted the feature/US-593-run-honor-argument-precedence-and-full branch November 6, 2026 22:29

This branch was successfully deployed

1 active deployment
Website Preview — 4befabb9 Deployed Nov 6, 2026 by github-actions[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr-state:ready-to-merge PR state: gates green + review approved risk:red Classification: high risk tier

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant