[Bug] Concurrent Python and TypeScript harness writes can lose accepted changes #2009
fettpl
started this conversation in
Bug reports
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Affected area
Continual harness persistence in the coding agent and Python runtime.
What happened?
The same harness state can be written by Python CRUD and TypeScript refinement without a shared transaction boundary. Python has an mtime-based reload guard, and TypeScript has atomic replacement, but neither closes the interval between read and write across processes.
Steps to reproduce
Use disposable harness directories only; no real user harness is required.
w, read from the other process, and inspect the malformed/empty fallback behavior. Do not use timing sleeps when a deterministic barrier can expose the window.This is source-verified; the coordinated process fixture was not executed during this read-only audit.
Expected behavior
Distinct accepted mutations survive concurrent writers. A crash or temporarily unreadable file must not silently erase prior harness knowledge.
Acceptance criteria
Solution design and verification
Choose a shared filesystem transaction protocol or a single host-owned writer; either must preserve local/global scope behavior and keep degraded reads from blocking ordinary agent startup. Use the current atomic TypeScript writer as a starting pattern, add cross-language barriers/fault injection, and document the schema/revision migration. If a daemon command is introduced, apply the repository's protocol/capability compatibility rules.
Additional context
Revalidated from closed #929 / PR #961. Accepted #1380 is the broader crash-safe persistence tracker; this discussion isolates the cross-language harness boundary. Discussion #1765 covers settings/auth/migration storage, not this store. Existing local hardening is acknowledged above.
Please confirm whether this belongs under #1380 and whether maintainers want an implementation. I will wait for an invitation.
Version and environment
Source audit of
main@cd10724fe02bbe9a18592737de17c8101710bf73(package version 0.9.1), 2026-09-03. Reviewed a clean source snapshot on macOS 26.6.2 (25G83), arm64, zsh 5.9 in a non-interactive Codex terminal. Installation method: source snapshot; no installation or live application reproduction was performed. The steps above describe isolated verification, not a claim that a production failure was induced.All reactions