Skip to content

Event log schema: fix before M0b's first durable write (irreversible after) #475

Description

@phall1

The only recommendation in the investigation that becomes strictly impossible if deferred. You cannot chain history retroactively, and you cannot re-adjudicate a log whose reducer has moved on across a 30-day Bar A window that spans deploys.

All four acceptance bars are measured from the event log. mq explain renders from it. M6 grades the scheduler by replaying it. And it has never been attacked.

Four structural holes, all verified against lib/domain.mli:

  1. type event = { command_id; payload } has no timestamp, no event ID, no atom ID, no repository identity — directly contradicting TDD-M0A §5, which requires all four.
  2. No schema_version. A v_n reducer folding a v_1 log silently answers a different question.
  3. Not self-contained. Constitution rule 3 makes "complete required evidence" a function of .mq.yml at policy_commit_sha, but the log stores the pointer. diagnostic_url / run_url point into stores with finite, operator-deletable retention.
  4. No hash chaining. An append-only convention over a Postgres table is not append-only to anyone with DB access — including the operator whose landings it attests.

Do all of this before M0b writes its first durable event

  • event_id, atom_id, repository_id, recorded_at (TDD-M0A §5 already requires them)
  • schema_version per event
  • Resolved values not pointers for anything the log must later adjudicate: the required-target set, the policy digest, the attestation body, a structured fingerprint preimage
  • prev_event_hash chaining with periodic external anchoring
  • A snapshot format with a stated fold(snapshot, tail) == fold(genesis, all) property — CONFIGURATION §1.2's retention promise and README's "state is a fold over the log" are otherwise incompatible

The strongest positioning available to this project — the merge queue you can prove to an auditor — is exactly the claim an unversioned, unchained, pointer-based log cannot support.

See docs/INVESTIGATION.md §4, §6 Q11, §7 R4.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions