Skip to content

fix(harness): minors batch part 2 - #209

Open
cljiahao wants to merge 6 commits into
mainfrom
claude/minors-batch-part-2-6f3f74
Open

cljiahao wants to merge 6 commits into
mainfrom
claude/minors-batch-part-2-6f3f74

Conversation

@cljiahao

@cljiahao cljiahao commented Dec 2, 2026

Copy link
Copy Markdown
Owner

fix(harness): close the second batch of minor review findings

One batch of small, closed findings from earlier review rounds, each with a test.

Changes

  • gate-budget hook: the hook reads stdin with one bounded read (5 s), so a stdin that never closes, or is closed, cannot keep it alive. The test now tracks and reaps every process it starts and fails if one survives.
  • set-coverage-floor.sh: a jest section in package.json and jest.config.json are refused with messages that state the real limit (adopt-install.md says the same); comment text no longer counts when the insertion line is found.
  • harness-refresh.sh: a repeated or non-plain stack key stops the run (new test).
  • check-docs: tests for a linked and an empty baseline wrapper.
  • gate-baselined.sh: a path word holding a control character is refused (new test with a guard mutation).
  • adopt-docs-baseline test gets its own job in all-checks.needs.
  • lint-skills.sh: every line that reads CI in tc-copy.sh must match an allow-list, so a second CI=none exit in any form fails; probes added and the head-variant probes use different bodies.
  • harness-live.sh: a jest test:ci line needs a coverageThreshold in jest.config.*; the noop message lists every refused character.
  • Skipped: check-env-example.sh (no defect found by reading), check-complexity-rule.sh (open PR holds it).

Threat model

A wrapper or hook that can hang, or a path word the wrapper lets through, weakens a gate. Attackers are a stdin that never closes, a crafted path word, and a hidden second early exit in tc-copy.sh.

Allow-list design

Path words: no leading dash, no shell operator, no control character. CI reads in tc-copy.sh: only the four listed forms plus the single CI=none branch. Everything else fails closed.

Probe list

  • stdin never closes, stdin closed, signal exit, survivor detected (gate-budget.test.sh)
  • tab, carriage return, newline path words, with a guard mutation (gate-baselined-paths.test.sh)
  • second CI=none exit reordered, one-liner, case form, braced variable (lint-skills.test.sh)
  • jest floor missing, config without threshold, floor only in package.json (harness-live.test.sh)

Tests

preflight, gate-budget (116), seeded-coverage-floor (216), harness-refresh-keys (12), gate-baselined-paths (9), check-docs (226), lint-skills ONLY subset (69). harness-live.test.sh was not run locally on the final head; CI runs it.

🤖 Generated with Claude Code

Kelerence and others added 6 commits December 2, 2026 17:57
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…art-2-6f3f74

# Conflicts:
#	tests/golden/fastapi-azure.sha256
#	tests/golden/fastapi-github.sha256
#	tests/golden/nestjs-azure.sha256
#	tests/golden/nestjs-github.sha256
#	tests/golden/nextjs-azure.sha256
#	tests/golden/nextjs-github.sha256
#	tests/golden/vite-react-azure.sha256
#	tests/golden/vite-react-github.sha256
…SC1007

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…entry too

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
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