Skip to content

chore(harness): deferred hygiene — gate live tests, fix tsc cast, doc clarifications - #6

Merged
pdettori merged 2 commits into
mainfrom
chore/harness-hygiene
Jun 26, 2026
Merged

pdettori merged 2 commits into
mainfrom
chore/harness-hygiene

Conversation

@pdettori

Copy link
Copy Markdown
Member

Batches the small deferred items flagged across M5/M6/M7 reviews. No behavior changes to production paths; CI-affecting fix + clarity.

Fixes

  • run-turn.test.ts gated — its two LLM cases made ungated real gateway calls and failed CI on stopReason variance. Now gated behind SH_RUN_LIVE=1 + ANTHROPIC_AUTH_TOKEN (it.runIf); the no-key "throws on unknown session" case still runs. Harness suite goes from 25✓/1✗ to 29✓ / 2 skipped with no live key.
  • x-api-key:null TS2352 cleaned (run-turn.ts) — as unknown as Record<string,string>. The null still strips x-api-key under gateway Bearer auth; runtime behavior unchanged.
  • flush-extension.ts — comment noting session_shutdown is interactive/reload-only and does not fire in the headless runTurn path (which relies on turn_end + the explicit final flush).
  • e4-recovery.sh — comment explaining wait_for_zero_pods … || true is correct here (recall grep is the gate; not the E3 fall-through bug).
  • smoke.sh — usage comment --port 8080 → --port=8080 to match the retained flag form.

Verification (no key)

  • harness pnpm test: 29 passed | 2 skipped (live gated)
  • session-backend: 10/10 · experiments: 7 passed | 1 skipped
  • bash -n clean on the edited scripts

Excluded (feature, not hygiene): the Gemini-via-gateway wire-id bridge.

Assisted-By: Claude Code

Paolo Dettori added 2 commits June 26, 2026 09:58
run-turn.test.ts made real gateway calls ungated, failing CI on stopReason
variance. Gate the two LLM cases behind SH_RUN_LIVE + ANTHROPIC_AUTH_TOKEN
(via it.runIf); the no-key 'throws on unknown session' case still runs.
Also fix the pre-existing TS2352 on the x-api-key:null header cast via
'as unknown as Record<string,string>' (the null strips x-api-key under
gateway Bearer auth — behavior unchanged).

Assisted-By: Claude (Anthropic AI) <[email protected]>
Signed-off-by: Paolo Dettori <[email protected]>
flush-extension: note session_shutdown is interactive-only (not headless).
e4-recovery: explain wait_for_zero_pods ||true is correct (recall grep is the
gate, unlike E3). smoke: usage comment --port 8080 -> --port=8080 to match the
retained flag form.

Assisted-By: Claude (Anthropic AI) <[email protected]>
Signed-off-by: Paolo Dettori <[email protected]>
@pdettori
pdettori merged commit 23f2635 into main Jun 26, 2026
1 check passed
@pdettori
pdettori deleted the chore/harness-hygiene branch June 26, 2026 14:11
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