Skip to content

fix(hooks): atomic writes for prune/settings/githooks state; single-parse prune transcript (#191 #188)#212

Merged
SUaDtL merged 3 commits into
mainfrom
fix/tribunal-atomic-prune
Jul 2, 2026
Merged

fix(hooks): atomic writes for prune/settings/githooks state; single-parse prune transcript (#191 #188)#212
SUaDtL merged 3 commits into
mainfrom
fix/tribunal-atomic-prune

Conversation

@SUaDtL

@SUaDtL SUaDtL commented Jul 2, 2026

Copy link
Copy Markdown
Collaborator

Lane E2 — reliability + performance from the tribunal audit.

What

Verification

  • 711 hook tests pass (+11 new: test_atomic_writes.py, test_prune_single_parse.py); TDD-verified red→green (reverting the impl corrupts state / double-parses); py_compile clean; LF.
  • security-reviewer: PASS — 0 critical/high/medium. Verified the _githooks shim atomicity (backstop preserved), the settings-heal concurrency correctness (no clobber, no wedge), single-parse parity, and the wire-statusline sys.path insert resolving only its trusted hooks dir. 2 no-action LOWs (benign 0711 shim perms; inert mkstemp-leak-on-SIGKILL).

Bumps ca 2.8.6 → 2.8.7.

Closes #191
Closes #188

https://claude.ai/code/session_01PVTCDji6bEuf9SifQ8tfsa

SUaDtL added 3 commits July 2, 2026 14:53
…arse prune transcript

reliability-008/009/010 route bare open('w') writers through _hooklib.write_text_atomic
(temp + os.replace); the SessionStart settings-heal now reloads-before-save with a
per-call temp so concurrent sessions can't clobber each other. #188: hook_run threads
its single transcript read+parse through run() instead of re-reading it.
reliability-016 (write_provenance) was already atomic since PR #197.

Claude-Session: https://claude.ai/code/session_01PVTCDji6bEuf9SifQ8tfsa
…parse)

Version bump + README badge sync for the crash-atomic state writers (#191) and
the single-parse prune-transcript fix (#188).

Claude-Session: https://claude.ai/code/session_01PVTCDji6bEuf9SifQ8tfsa
write_in_place opens the transcript one extra time on POSIX (os.replace/verify),
so the no-duplicate baseline is 5 on Windows / 6 on POSIX; the hardcoded <=5 red
on ubuntu/macos CI. Bound raised to 6 — still catches the +2 duplicate-read
regression on either platform. The platform-independent single-parse proof is
the sibling load_lines-count-1 test.

Claude-Session: https://claude.ai/code/session_01PVTCDji6bEuf9SifQ8tfsa
@SUaDtL
SUaDtL merged commit 6125402 into main Jul 2, 2026
23 checks passed
@SUaDtL
SUaDtL deleted the fix/tribunal-atomic-prune branch July 24, 2026 21:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant