Abstract

A method is disclosed for keeping a version-controlled corpus of structured documents, each a front-matter header carrying a unique identifier and an integer version followed by a body, editable and historically addressable when a serving database upserts the documents in place. An author acquires a per-document editing lease stored as one deterministically serialized file per document inside the repository, named by a collision-resistant identifier-to-name mapping so that leases on different documents land on distinct paths and do not collide in a merge. Check-out records a whole-file hash, a body-only hash computed after stripping the front-matter block, and the declared version. Check-in is fail-closed: it refuses a caller who does not hold the open lease and a check-in lacking a reviewer-re-runnable verification command; when the body-only hash has changed and the version has not risen it rewrites the version line to the next integer before validating, so front-matter-only edits never trigger an increment; it then validates the document against the whole corpus and refuses on any blocking finding. In the serving database a conditional row trigger snapshots the prior row into a history table, deduplicated per identifier, version and content hash, recording as data rather than refusing whether the replacing write raised the version. A separate append-only verification-run ledger refuses updates and deletions by trigger, requires every failing run to name a gap or a remedy, and is read by a side-effect-free counting function under which only non-downgraded runs of designated kinds count, the latest counting run deciding the verdict.

Creative Commons License

Creative Commons License
This work is licensed under a Creative Commons Attribution 4.0 License.

Share

COinS