Skip to content

Reject hidden Git index states and finish POSIX timeout cleanup - #70

Merged
hzw0813 merged 1 commit into
mainfrom
codex/snapshot-integrity-20260922
Sep 22, 2026
Merged

hzw0813 merged 1 commit into
mainfrom
codex/snapshot-integrity-20260922

Conversation

@hzw0813

@hzw0813 hzw0813 commented Sep 22, 2026 •

Copy link
Copy Markdown
Owner

Findings

Audited current main after #69 (9b886a2) and the production-readiness audit. Six new regression cases exposed five failures: hidden modifications under both Git index flags, missing sparse-checkout inputs, unresolved merge stages, and a surviving POSIX descendant after its timed-out parent exited.

Changes

  • Validate a bounded, NUL-delimited index inventory before extracting diff evidence. Every selection rejects unresolved merges and assume-unchanged/skip-worktree entries before repository checks can run.
  • Give recovery guidance; preserve the user's index. CLI errors remain exit 2 even with --fail-on never, without writing a new report.
  • Preserve POSIX TERM-to-KILL escalation after parent/pipe closure. Real-process regressions cover TERM-resistant descendants with redirected and inherited output.
  • Update the audit, verification model, security guidance, README, changelog, and generated distribution.

No runtime dependencies, network access, telemetry, source uploads, automatic execution, evidence-status changes, or schema changes.

Validation

Local Linux / Node 24:

  • npm run lint (TypeScript typecheck): passed.
  • Clean build and npm test: 176 passed.
  • npm run dogfood: all four checks passed; seven compiled targets observed; TypeScript source correctly remains partially verified.
  • npm run demo: all four asserted scenarios passed.
  • npm run test:action: passed, including production-only install and static-default checks.
  • npm pack --dry-run: passed, including packaging lifecycle tests.
  • Clean-build parity: all 100 generated files matched exactly.
  • git diff --check: passed.

CI run 35710985411 passed all 12 applicable jobs: Linux/macOS/Windows × Node 22/24/26, generated-dist parity, PR dogfood, and source Action smoke. Every matrix job passed both tests and packaging. Linux/macOS run all 176 tests; Windows reports 167 passed and 9 expected platform skips, including the two new POSIX process-group tests. The published-release Action smoke is intentionally push-only and was skipped for this PR.

Remaining limitations

Sparse checkouts and even clean flagged entries are conservatively rejected: use a full checkout or clear the flags. Snapshot isolation and concurrent mutation protection are still absent. Submodule visibility and broader monorepo/runner support remain audit follow-ups. Process-group cleanup cannot contain deliberately detached descendants and is not an OS sandbox. Windows retains native tree termination.

Draft for review; do not merge automatically.

@hzw0813
hzw0813 marked this pull request as ready for review September 22, 2026 09:41
@hzw0813
hzw0813 merged commit 72211d9 into main Sep 22, 2026
13 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.

1 participant