Skip to content

Findings: where a commit is stored, and why no copy can go yet - #1776

Closed
joepio wants to merge 1 commit into
developfrom
claude/project-thread-mes3rj-commits
Closed

joepio wants to merge 1 commit into
developfrom
claude/project-thread-mes3rj-commits

Conversation

@joepio

@joepio joepio commented Sep 25, 2026 •

Copy link
Copy Markdown
Member

Requested by Joep · project thread

Before: the storage review said rights, parent and destroy commits are stored three times on the server, and suggested keeping critical commits only in Tree::Envelopes if rights lookups read from there.

After: no code changes. A new section in planning/auditability-loro-history.md lists every place a commit is written and every reader of each copy, and explains why neither copy can be removed safely under the default latest retention.

How: the payload of a critical commit is stored twice, not three times: once in the envelope and once in the commit row in Tree::Resources. The third place is the resource's own Loro oplog, which is its state, not a copy of the commit. Rights checks never read commit rows. The rows are read by the destroy replay guard in apply_commit, by get_resource, by all_resources, and by index queries on subject/signer. Envelopes are read by history attribution, SYNC_DIFF.removeCommits, SYNC_PUSH and vault packs. You can't drop the row, because latest deletes the envelope on the next edit. After a destroy followed by a re-create, the row is then the only local record of the destroy, and the only copy its signature can be checked against. You also can't skip the envelope, because every envelope reader would then need a fallback that finds the row by subject. That is more code than the copy saves, and the copy only lasts until the next edit anyway. The note also records two options for getting the space back later, neither built. It also flags that the tests that pinned the self-contained-row rule on the earlier branch are not on this base.

Tests: none run. This PR only changes documentation.

@joepio joepio self-assigned this Sep 25, 2026
Base automatically changed from trekmeester/combined-20260925 to develop September 25, 2026 13:04
@gitguardian

gitguardian Bot commented Sep 25, 2026 •

Copy link
Copy Markdown

️✅ There are no secrets present in this pull request anymore.

If these secrets were true positive and are still valid, we highly recommend you to revoke them.
While these secrets were previously flagged, we no longer have a reference to the
specific commits where they were detected. Once a secret has been leaked into a git
repository, you should consider it compromised, even if it was deleted immediately.
Find here more information about risks.


🦉 GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request.

joepio commented Sep 25, 2026

Copy link
Copy Markdown
Member Author

GitGuardian fails here on incident 37585749, which is not from this PR. The flagged commits (4f6fe33, 49ac330, 1d80224) come from #1767 through the base branch. The hit is a false positive: a test fixture in lib/src/vault/secret_envelope.rs with zero-byte placeholder salts for a legacy password wrapper kind. It is explained on #1767. The finding can only be cleared by marking the incident as a false positive in GitGuardian, not by a push here.


Generated by Claude Code

Maps the envelope, the critical commit row, its index rows and the Loro oplog, lists every reader of each, and records why critical commits cannot move to Tree::Envelopes only under latest retention.
@joepio
joepio force-pushed the claude/project-thread-mes3rj-commits branch from ce273cd to 720602c Compare September 25, 2026 16:46
@joepio

joepio commented Oct 4, 2026

Copy link
Copy Markdown
Member Author

Trekmeester cleanup (Joep agreed, 2026-10-04): closing as stale. Untouched for 2+ weeks and conflicting with develop, or superseded by later work. The branch stays; reopen if this is still needed.

@joepio joepio closed this Oct 4, 2026
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