docs/history-and-liveness #75

Merged
xavier merged 54 commits from docs/history-and-liveness into dev 2026-11-22 22:51:10 +01:00
Owner
No description provided.
ADR-033: activity rows are store facts — one activity namespace per store (filestore .skuld/activity/, boltstore's activity bucket), rows derived where the identities live and staged inside the mutation's transaction, carried on the wire and validated/subject-stamped at landing, anchored reads through the port, the recode lineage fact, the one-time serve-startup migration of the accumulated rows, export/import exclusion. Supersedes ADR-024 points 1/3/4/5, keeps its addressing.

ADR-034: claim liveness — passive staleness from the claimant's last act, the fixed 3d domain constant (no config surface), the liveness arm beside every claim-carrying render (verdict + anchors verbatim, no raw age), the widened ending gate (E_NOT_CLAIMANT at staging, the E_CLAIM_LIVE commit-time guard re-derived on the store's own record), the episode's stale ground.

Co-Authored-By: Xavier's assistant <assistant@gijoe88.com>
application (the Activity port, StagedFacts, the fact-address vocabulary's new home, the staging helper, the widened ending and the history use cases, liveness in the computed-facts discipline), domain (the threshold constant, the pure derivation, the episode's stale ground, the item's former_codes lineage), filestore (the activity layout and row schema, rows riding the write-set, the new merge rows), boltstore (the activity bucket, the guard member, carried-row landing, boundary rules), protocol (the anchored read, carried rows validated and subject-stamped, E_CLAIM_LIVE), httpstore (List over the wire, Append as a carried row), cli (the history verbs, the liveness arm and its determinism carve, the new code), audit-log re-scoped to the server-trust ledger + the migration, serve (startup migration), storeconformance (the activity dimension, the guard's race clause), export-import (the rows exclusion), ARCHITECTURE (storage, diagram, vocabulary, flow, testing).

Co-Authored-By: Xavier's assistant <assistant@gijoe88.com>
ADR-033's application layer: ActivityRow (the four-field row, the ULID its identity), ActivityQuery (the anchored reads — the code set or the actor, AND-combined inclusive filters), the Store's Activity() repo and the Tx's StagedFacts capability. The fact-address vocabulary (the table's home, both row seams deriving from it) and the mutation pipeline's staging helper — ActivityStamper.Stage reads the staged fact list, stamps the identities, mints monotonic ULIDs and stages the rows inside the same Tx. FilterActivityRows is the anchored reads' one semantic home, every engine resolving through it.
One file per row beside the facts the rows record (the comments pattern): canonical four-field bytes, the ULID the identity and the file name, loud reads (the name/identity agreement, the actor through the roster grammar, the stamp and address present), Tx-bound staging landing with the facts they record, ULID-ordered reads through the view. The Tx records the staged fact addresses as its repos stage (FactOf's table, stage order — a recode naming the pre-recode key, an episode write the archived episode) and exposes them through StagedFacts; the activity namespace joins the up-flip's retirement set (rows never migrate between modes, ADR-033 point 8).
The same canonical bytes the filestore writes, the ULID the key: the bucket joins the closed root set (ensured at Open, walked by the snapshot and the apply), the loud reader pins the key/identity agreement and re-validates the actor, staged writes land inside the one write transaction, reads ride the MVCC view in ULID order. The staged fact addresses record exactly as the filestore's — the same app vocabulary, stage order — exposed through StagedFacts.
The commit request carries the client's rows (ADR-033 point 4): the server replays the write-set through the engine transaction — building its own staged-fact list — and admits the carried rows only if they match that derivation exactly (same addresses, same order, the declared actor, unique identities), overwrites each row's subject with the authenticated machine and lands them through Activity().Append inside the same transaction — atomic, no gap, no client-enriched record. The commit's audit-ledger seam is superseded (audit.db shrinks to the server-trust ledger; protocol's FactOf now resolves through the app vocabulary, serving the client's staged-fact derivation). The activity read is one project-scoped resource read (GET /p/<acronym>/activity: the code set or the actor, inclusive since/until), the httpstore buffering rows in the Tx and answering List over the committed state.
Every mutation use case runs the staging helper at exactly one seam — after staging, before Commit (ADR-033 point 2): the actor the request's declared name, the subject GitContext's machine, the moment the injected clock, the identities the process-wide monotonic mint. The thin-config writes are excluded deliberately (the boot selector, never store data in server mode); the server birth's materialization derives its rows server-side — the birth being a server-side act, the subject the registry-vouched issuer; the migration landing stages its rows like every mutation while the payload bridge itself still excludes the namespace (ADR-033 point 8); init's runtime carries the generator the rows mint from.
The clause catalog gains the activity dimension (ADR-033): the Append/List round-trip in ULID order with the four facts verbatim; Rollback leaves none; reads stage nothing; the anchored reads (the boundary-aware code set, the actor anchor, the AND-combined inclusive bounds); a hard delete leaves the rows resting; a recode moves no rows; StagedFacts at the FactOf table's granularity in stage order. The clauses stage facts through the mutation pipeline's own shape — mustCommit's staging helper derives the rows, the port's real mutation shape, the wire's carried-rows validation included — and the harness gains the declared-actor override (the rows record exactly what each harness's clients declare). The filestore merge reality gains its row: two clones mutating different facts land distinct ULID-named row files — the merge clean, both facts and all rows live (ADR-033's «predictable concurrent merges» consequence).
The test accommodations the substrate demands: every wire seed commit stages its rows (the production pipeline's shape); the audit-ledger pins rewritten to the new discipline — audit.db the server-trust ledger alone (registration, machines), the commit's rows pinned in the project engine's activity namespace, subject stamped at the boundary; the landing's forensics read the activity bucket; the discrete-change pins filter the rows' lines (the facts' change set), the receipt-moment pins count the rows' clock ticks; the rebuild comparison excludes the rows (testimony of acts, keyed by the mint — the bridge skips them); the raw commit probes carry their rows; the storeconformance fixture ids draw from a process-shared counter (per-call counters would collide across concurrent racers — identical ids are identical keys).
The test pass's additions (rjxe5c.3): the conformance suite gains the
rejection leg of the atomic-staging promise — activity/rejected-
commit-records-nothing stages a doomed create, races it against a
landed same-code item, and pins the typed refusal leaving the
namespace exactly as the interference left it, on all three engines
(the wire dialect's interferer legitimately lands its own rows — the
baseline is post-interference, the rejected transaction adds nothing).

The wire's carried-rows validation (ADR-033 pt 4) gains its rejection
probes: count mismatch, per-index address disagreement, actor
mismatch, identity uniqueness — every refusal leaving nothing staged,
nothing applied — plus the end-to-end pin of the hole the validation
leaves: a carried row reusing a COMMITTED row's ULID passes every
check and lands, overwriting the held testimony's key (flagged to the
architect).

The filestore pins the no-op surface's current behavior: the
value-identical set stages its fact and lands its row file (the
tracked bytes untouched — the FR-045 tension, flagged), and Append's
missing commit-time id guard at the engine level (the overwrite
surface).

Co-Authored-By: Xavier's assistant <assistant@gijoe88.com>
Extends ADR-033 with the substrate's boundary semantics, ruled on the tester's end-to-end evidence: the row-id commit-time guard (E_DUPLICATE_ROW, ADR-021 L1's create-uniqueness discipline extended to the activity namespace, both engines, the wire inheriting through the engine Tx); the stated non-checks (identity validated, time never judged — at and monotonicity stay client testimony); no change no row (the no-op paths stage nothing, fact and row alike, detection in the use case, never a helper suppression); rowless/mismatched commits malformed and the import landing deriving its own rows; the selector exception (thin-config writes stage no rows, the seed materialization writes them); and the wire Tx's committed-view List with the presence-rule corollary for the liveness signal. Append's error return recorded. Components synced: application, protocol, boltstore, storeconformance, cli, export-import, serve, httpstore, ARCHITECTURE.

Co-Authored-By: Xavier's assistant <assistant@gijoe88.com>
The no-op audit's fixes: the item set detects the value-identical fold (itemUnchanged — field-by-field against the pre-fold snapshot, the ordered label slice, the optional pointers by value) and skips staging the fact; the version tag re-stating the held ref and the receipt correction to the held pointer skip likewise. No staged fact derives no row — the helper's staged-fact/row exactness untouched (the wire's admission contract). The evidence seam is deliberately untouched: a pointer on an explicit status write is its own fact and lands with its row even on a same-value set. The already-quiet paths stand as they were (config verbs, agent-owner flips, the idempotent-create retry).
A staged activity row whose ULID collides with a live namespace key rejects typed at commit, never overwrites — ADR-021 L1's create-uniqueness extended to row identity, on both engines inside the write transaction's view (filestore: the absence precondition re-checked against the disk; boltstore: the guard re-checked against the write transaction's fresh view). The wire inherits it for free — the server lands carried rows through the engine Tx — so the carried-rows validation needs no separate namespace check. E_DUPLICATE_ROW joins the typed precondition family and the audited catalogue (ADR-006).
The storeconformance suite gains the row-id guard's clause pair (ADR-035): activity/append-id-uniqueness (direct — a staged row reusing a held id rejects E_DUPLICATE_ROW, the held testimony standing, nothing landed) and activity/append-recheck-at-commit (race — an interloper landing a row under the staged id between staging and commit, the guard re-checking the fresh view). The race's dialect verb RowAppears joins every harness: filestore's raw row file, boltstore's raw bolt transaction, the wire and production paths as a second client's commit staging the fact its row names and carrying exactly the colliding row (the exactness admits one row per staged fact — no derived extra; the actor the declaring harness's own, the wire validation checking it). The tester's pins flip as ruled: the two overwrite probes assert the typed rejection with the held testimony byte-intact and nothing landed; the no-op pin asserts the zero delta — no change, no row.
The tester's verification of the ADR-035 fixes (rjxe5c.3 fix cycle):
the app-level fakes read StagedFacts empty, so only a real engine
shows what a mutation derived — these pins drive the real filestore
and boltstore through the real use cases.

The no-op ruling's edges (point 3): the evidence seam's carve pinned
at the engine level (a same-value status set with a pointer lands
exactly the receipt's row, the unchanged item staging nothing, its
bytes untouched — the e2e asserted the receipt but never the row
shape); the two audited no-op skips (SetVersionTag re-stating the
held ref, CorrectReceipt to the held pointer) pinned zero-delta with
their real-change twins landing exactly one row; the author-only gate
pinned PRECEDING the quiet branch (a non-author's same-pointer
correction still rejects E_NOT_AUTHOR — the promise is not shadowed).

The guard's whole-request shape (point 1) on both engines and over
the wire: a write-set carrying one colliding row beside fresh facts
and rows rejects E_DUPLICATE_ROW whole — nothing of the doomed commit
lands, the held testimony answers its first content unmoved. Over the
wire the partial collision rides a two-fact write-set (the exactness
admits one row per staged fact, so the count check would refuse a
one-fact/two-row request first).

Co-Authored-By: Xavier's assistant <assistant@gijoe88.com>
Co-Authored-By: Xavier's assistant <assistant@gijoe88.com>
Co-Authored-By: Xavier's assistant <assistant@gijoe88.com>
Co-Authored-By: Xavier's assistant <assistant@gijoe88.com>
Co-Authored-By: Xavier's assistant <assistant@gijoe88.com>
StaleThreshold — 3x24h, one exported constant beside the claim state machine, no configuration surface. ClaimLiveness is pure over passed-in facts: claim, the claimant's last recorded act (nil = the claim's start anchors, the pre-landing anchor), threshold, evaluation moment; returns the verdict plus the anchor facts. No clock, no store — the verdict is the caller's observation, never a mutation.

Co-Authored-By: Xavier's assistant <assistant@gijoe88.com>
The read-side resolution (ADR-034 point 2, ADR-035 point 6): one actor-anchored activity read per claimant — presence anywhere on the project counts — feeding the pure derivation at the fixed threshold. The presence rule: a fact-staging mutation whose acting agent is the claimant passes its own act as the anchor candidate, so a returning claimant's own mutation renders live identically in both modes (the derivation runs before the rows stage — nothing consumes in-Tx staged rows; a no-op stages no row and counts no act). Wired: item show (one actor-scoped read), claims + brief's claims arm (the claimant-to-latest map), the claim verb's response, the create retry's active claim. The signal writes nothing.

Co-Authored-By: Xavier's assistant <assistant@gijoe88.com>
The liveness arm joins the active-claim object of item show, the mutation responses' computed claims, the claims rows and the brief's claims arm (additive seam, ADR-016): verdict, anchor moment RFC 3339 UTC, the threshold as its fixed literal (72h, derived from the one domain constant). Deliberately no computed age — the truthfulness-at-emission carve. The human forms carry the same three facts on the claim lines; the in-flight table gains the LIVENESS column.

Co-Authored-By: Xavier's assistant <assistant@gijoe88.com>
The golden battery's arms founding the claimant made its birth rows mode-inherent (the local init's at the fixed client clock, the server materialization's at the host clock) — the liveness arm surfaced the difference. Both arms now found as production-agent, the seed commits' own actor: the claimant (dev-agent) holds no row in either mode and anchors on the claim's own start, fixture-fixed, byte-identical. The existing claim-render pins carry the additive liveness arm; the use-case call sites take the clock.

Co-Authored-By: Xavier's assistant <assistant@gijoe88.com>
Co-Authored-By: Xavier's assistant <assistant@gijoe88.com>
Domain: the threshold-boundary table (exactly-at-72h reads live —
'older than' is strict), the spec's two-days-live/four-days-stale
numbers, the pre-landing anchor, row-over-start, purity, the verdict
vocabulary (ADR-034 points 1-2's table-testing).

App seam: the presence rule at emission (a claimant silent 96h
claims — the arm reads live anchored on the request's own act,
verified to bite: nil ownAct flips it stale), the anchor-merge table,
presence anywhere on the project (an act on ANOTHER item moves the
claimed item's anchor), per-claimant arms on the in-flight list, and
«staleness derives, never writes» over repeated reads.

E2e through the real run path: the arm on item show / claims / brief,
machine and human forms, the key-set pin (verdict + anchor + threshold
literal only — no raw age, no evaluation moment), byte-identity across
DIFFERENT evaluation moments within one verdict window, the flip
touching the verdict alone, the store tree byte-identical across
stale renders, the returning-claimant probe in BOTH modes with the
cross-arm golden bytes on the seeded claim, and the no-config-surface
sweep over the whole command tree.
The FR-042 retry converging on a claimed item renders its liveness
arm derived over the committed record, no own act (the retry stages
no facts): a 97h-old claimant record answers stale with the row
anchor — the nil-ownAct shape pinned beside the claim verb's
presence-rule shape.
Co-Authored-By: Xavier's assistant <assistant@gijoe88.com>
Extends ADR-033/034/035 with the second bundled ruling pass: (1) the wire validates lineage as a set — ItemFromWire and every carrier of the field reject current-among-former and within-duplicates as malformed requests, aligning the boundary with the stores' read-parse invariants (the consequence class rules the posture: lineage is the first wire-carried field whose corrupt form poisons the record rather than rendering oddly); (2) ADR-034 point 2's one-activity-pass mechanism sentence corrected — the port admits no unanchored read, the ruled shape is one actor-anchored read per distinct claimant with the map assembled in memory; (3) the claims table's verdict-only LIVENESS column blessed on the receipt-count scan-surface precedent. Component notes in protocol.md (decode discipline), application.md (read shape + the no-unanchored-pass note), cli.md (the compression line).

Co-Authored-By: Xavier's assistant <assistant@gijoe88.com>
ClaimRecord.Liveness becomes *LivenessRecord, no omitempty: a derived arm renders bytes identical to the pins (every live surface passes a derived arm — none moved), a nil arm renders "liveness":null, the honest not-derived. The hazard pinned at the mapper: claimRecord(claim, nil) marshals the null arm, the zero arm's empty verdict never renders (internal/cli/claim_record_nullarm_test.go); the human forms word a nil arm with the absent-marker -, humanArmField. InFlightRecord.Liveness stays a value: every list-shaped surface fills it (ClaimLiveness never answers a zero verdict) — the diff did not force the pointer there.

Co-Authored-By: Xavier's assistant <assistant@gijoe88.com>
Co-Authored-By: Xavier's assistant <assistant@gijoe88.com>
Co-Authored-By: Xavier's assistant <assistant@gijoe88.com>
Co-Authored-By: Xavier's assistant <assistant@gijoe88.com>
Co-Authored-By: Xavier's assistant <assistant@gijoe88.com>
Co-Authored-By: Xavier's assistant <assistant@gijoe88.com>
Co-Authored-By: Xavier's assistant <assistant@gijoe88.com>
Co-Authored-By: Xavier's assistant <assistant@gijoe88.com>
Co-Authored-By: Xavier's assistant <assistant@gijoe88.com>
Co-Authored-By: Xavier's assistant <assistant@gijoe88.com>
Co-Authored-By: Xavier's assistant <assistant@gijoe88.com>
The migration's refusal class is the exact-one-project rule per ADR-033 pt 7's positive definition of unambiguity: a root whose registry does not hold exactly one project — none or several — refuses while unscoped legacy rows remain (audit-log.md's migration section, serve.md's composition, and ARCHITECTURE.md's testing pin aligned; the ADR's own multi-project gloss is history, the positive definition governs). boltstore.md names RehomeLegacyActivity beside the import line: the one sanctioned wholesale writer over the activity namespace, serve-startup only, keys and bytes unchanged, identical-byte upserts making re-runs no-ops — migration-class writing beneath the row-id guard's discipline.

Co-Authored-By: Xavier's assistant <assistant@gijoe88.com>
Co-Authored-By: Xavier's assistant <assistant@gijoe88.com>
Co-Authored-By: Xavier's assistant <assistant@gijoe88.com>
docs: the present moves — history reads and claim liveness in the README tour, the v0.12.0 serve migration in the admin guide
All checks were successful
/ secrets-scan (gitleaks 8.28.0, all refs, redacted) (pull_request) Successful in 4s
/ test (linux/amd64, full suite) (pull_request) Successful in 1m37s
/ alias (re-point latest, main pushes only) (pull_request) Has been skipped
/ build windows/amd64 (pull_request) Successful in 50s
/ build darwin/arm64 (pull_request) Successful in 52s
/ build linux/amd64 (pull_request) Successful in 58s
/ build darwin/amd64 (pull_request) Successful in 1m0s
/ build linux/arm64 (pull_request) Successful in 47s
/ build windows/arm64 (pull_request) Successful in 47s
/ release (six binaries + checksums.txt, tag pushes only) (pull_request) Has been skipped
/ image (the release container, tag pushes only) (pull_request) Has been skipped
9cafb90e12
xavier deleted branch docs/history-and-liveness 2026-11-22 22:51:10 +01:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
assistant/skuld!75
No description provided.