feat(protocol): add append-only integrity invariants and git merge support#27
Open
leonardobuares wants to merge 1 commit into
Open
feat(protocol): add append-only integrity invariants and git merge support#27leonardobuares wants to merge 1 commit into
leonardobuares wants to merge 1 commit into
Conversation
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Implements append-only integrity invariants and git merge support for the
shared state logs. Two branches that both appended to
JOURNAL.md,LESSONS.mdordecisions.jsonlpreviously produced a manual conflict, anda badly resolved one left
<<<<<<<markers insidedecisions.jsonl,silently breaking every subsequent boot. Nothing detected any of this.
Closes #5.
Changes
PROTOCOL_RULES.md(kernel 2.0.1 to 2.1.0): new§P3 Integrity invariants: corrections are new entries (never rewrites of history),every append ends with a final newline, structural corruption blocks new
appends until repaired and logged.
modules/git-substrate.md(1.2.0 to 1.3.0): new§M-git-7 Merge safety for append-only logs, plus a new.agents/.gitattributesshippingmerge=unionfor the three append-only logs.sessions/active_sessions.mdis deliberately excluded (rows are removed on close; union would resurrect
them). The section mandates post-merge validation and documents when human
review is still required.
validate_state.py: structural checks (conflict markers, missing finalnewline, duplicated top-level header), default targets now include
JOURNAL.md,LESSONS.md,sessions/active_sessions.md. New pytestcoverage; pre-commit regex and the state-validation workflow widened.
lead-protocol validate(auto-discover included);three corruption/restore scenarios added to
test-pack.mjs. Version2.0.3 to 2.1.0. Numbered assuming this lands before feat: add first-run setup interview gate (PROTOCOL_RULES §P10) #22/feat(cli): add update command and stop init from overwriting existing installs #26; happy to
renumber if they land first.
README.mdnew "State file integrity" section (per §M-git-3),cli/README.md,CHANGELOG.md[2.1.0].Testing
pytest .agents/scripts/: 115 passed.npm run typecheckpasses;npm run test:packpasses end to end,including the three new corruption scenarios (fail while corrupted,
pass after restore).
decisions.jsonlunder theshipped
.gitattributesmerge cleanly, both entries preserved, no markers.Checklist
framework files intentionally changed)