eventcore-fs: ADR-0044: replica-id copy-trap fingerprint + ReplicaIdentityConflict #392
Labels
No labels
adr
automated
bug
chore
dependencies
documentation
enhancement
epic
github-actions
P1-high
P2-medium
P3-low
release
research
rust
bug
duplicate
enhancement
help wanted
invalid
question
wontfix
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Slipstream/eventcore#392
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Follow-up to PR #390 (eventcore-fs file backend). Covers the remaining replica
identity hardening from ADR-0044.
Context
Each writing working-copy has a machine-local
replica_idstored in agitignored
.eventcore/replica_id, generated lazily on first write. PR #390added the
.gitignorethat keeps it out of git, which prevents the copy trapfor the
git clonepath. Thecp -rpath (copying a working treeincluding
.eventcore/) can still duplicate a writer's identity, which wouldmake forks invisible — silent data corruption, the worst class.
Scope
replica_idto a working-copy fingerprint (e.g. an OS identifier +the repo absolute path + the
.gitinode); on open, if the recordedfingerprint no longer matches the environment, regenerate the id so a naive
cp -rgets a different id on its next write (the safe outcome).the same
replica_idbut cannot have come from one linear writer, fail loudwith
ReplicaIdentityConflictrather than guessing.replica_idoverride via config.Acceptance
cp -rof a working tree, then a write in the copy, yields a distinctreplica_id(proven by a test that copies a store dir and writes).replica_idwith inconsistent parent sets surfaceReplicaIdentityConflictfromreconcile/detect_forksrather than silentlymerging.
References: ADR-0044, PR #390.