Skip to content

fix(court-remand): five bounded conditions from the #76 qe-court verdict - #86

Merged
pacphi merged 2 commits into
pacphi:mainfrom
robertelee78:fix/court-remand-conditions
Jul 29, 2026
Merged

fix(court-remand): five bounded conditions from the #76 qe-court verdict#86
pacphi merged 2 commits into
pacphi:mainfrom
robertelee78:fix/court-remand-conditions

Conversation

@robertelee78

Copy link
Copy Markdown
Contributor

Summary

The cross-vendor qe-court on the #76 final head (6347d1a) returned REMAND with eight bounded conditions (record + rationale). This PR is the bounded subset:

  • B1 routing.mjs — a host-only --route override no longer inherits the previous host's default model (implementation:claude stopped handing codex's model to the claude CLI — reproduced live in the smoke). Cross-host leaves the model to the adapter's own default. The codified "unset falls back to default" behavior it replaces is re-pinned as same-host-only.
  • B8 run.mjs — the human status line is gated behind !flags.json: ak run --json emits exactly one parseable document again.
  • B6 subprocess.mjsprovider/providerProvenance recorded as unknown on the claude/codex subprocess path (exit codes don't prove billing identity — ADR-0018's own invariant), never fabricated from the host id.
  • A2 runner.mjsvalidateWorkerResult now covers the timeout interpret() branch: a malformed adapter result becomes a bounded protocol_error instead of shipping raw.
  • A3 registries.mjsvalidateRegistries (duplicate ids, dangling projection/observability refs, canDriveSession→routing capabilities, billing/credential consistency) now runs at module construction — a violating host edit throws at import instead of loading silently.

Deliberately not in this PR

The three remaining conditions are architectural and belong to the maintainer's in-flight work: B3 (threading dependency outputs into dependent prompts vs. documenting the shared-cwd contract), B4/B5 (runner lifecycle bounds: timeout coverage of readiness/prepare/launch + terminate() close-wait/SIGKILL), and B7 (generalized --escalate in ak run — punch-list item 1 on #76).

Verification

  • Regression test per fix: B1 same-host fallback re-pinned + cross-host null; B8 document-purity via a new run() executePlan test seam; B6 unknown-provenance on both subprocess adapters; A2 malformed-timeout-interpret bounded; A3 fresh-process import pin.
  • pnpm run check exit 0 (1055 kit + cjs), pnpm run test:surface exit 0 (25).

Refs #76. Stacks independently of #85 (adapter protocol fix).

…t verdict

The cross-vendor court on 6347d1a returned REMAND with eight conditions;
this is the bounded subset. (B3 dependency-output threading, B4/B5
runner-lifecycle bounds, and B7 generalized escalation are architectural
and intentionally left to the maintainer's in-flight work.)

- B1 routing.mjs: a host-only --route override no longer inherits the
  previous host's default model ('implementation:claude' stopped handing
  codex's model to the claude CLI); cross-host leaves the model to the
  adapter default. The codified 'unset falls back to default' behavior
  being replaced is re-pinned as same-host-only.
- B8 run.mjs: the human status line is gated behind !flags.json — one
  parseable document out of `ak run --json` again.
- B6 subprocess.mjs: provider/providerProvenance are recorded as unknown
  on the claude/codex subprocess path (exit codes don't prove billing
  identity — ADR-0018's invariant), never fabricated from the host id.
- A2 runner.mjs: validateWorkerResult now covers the timeout interpret()
  branch, so a malformed adapter result becomes a bounded protocol_error
  instead of shipping raw.
- A3 registries.mjs: validateRegistries (duplicate ids, dangling
  projection/observability refs, canDriveSession->routing capabilities,
  billing/credential consistency) now runs AT module construction — a
  violating host edit throws at import instead of loading silently.

Regression tests for each, incl. a fresh-process import pin for A3 and a
document-purity test for B8 via a new run() executePlan test seam.

pnpm run check exit 0 (1055 kit + cjs), pnpm run test:surface exit 0 (25).
…rm tests finding)

The B8 document-purity tests called run() which read the real kit.json via
loadKitConfig() — a machine with an unroutable stale host could flip the
exit code. run() gains a cfg seam (mirrors the executePlan seam); the tests
pass their own. No behavior change for callers.
@pacphi
pacphi merged commit 03d4266 into pacphi:main Jul 29, 2026
11 checks passed
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.

2 participants