Skip to content

Milestone 4 design: defensible records (owner decisions needed) #32

Closed

Description

@TusanHomichi

Problem or outcome

Milestone 3 is complete: #22 settled the design, ADR 0008 encodes it, and #24/#26/#29/#31 shipped it — trainers document an invented session collaboratively without losing attribution, through review. Milestone 4 (roadmap: defensible records) is where drafts become records: the canonical record format, immutable finalized versions, rating and narrative rules, weekly summaries linked to daily versions, acknowledgments/responses/refusals with the trainee timeline, amendments and successor versions, and database-enforced immutability. Exit: the full lifecycle is reproducible and mutation attempts fail closed.

Design comes first again, because everything here is permanent by construction: canonical bytes, hashes, and version chains cannot be retrofitted onto records that already exist. Implementation should not start until the owner settles the questions below; this issue is the design work record.

Proposed shape (for reaction, not a fait accompli)

  • Finalization: a finalized EvaluationVersion is produced from an approved draft — canonical bytes per docs/records-integrity.md (RFC 8785 canonical JSON, versioned envelope), a stored SHA-256 content hash, the pinned program version and form identities, and the attribution stream it summarizes. The working copy is consumed by finalization; corrections from then on are successor versions, never edits (PRINCIPLES.md). Database triggers make finalized rows and their content refuse every mutation, in the style the Milestone 3 freeze backstops established.
  • Completion rules as versioned configuration: what a draft must satisfy before finalization is program-version configuration, not code — review approval, required narratives present, rating completeness. ADR 0008 already deferred "is review required" here.
  • Trainee-facing timeline: view_own_records and acknowledge_own_record capabilities (deferred from Milestone 3 design: sessions, drafts, and attribution (owner decisions needed) #22), a read-only timeline of the trainee's finalized versions, and the acknowledgment workflow — acknowledge, respond (attributed appended text, never an edit), refuse with reason, and escalation surfaced to coordinators through the 0003 notice table.
  • Amendments: a successor version starts from its predecessor's content, records actor and required reason, links into the version chain (predecessor hash), leaves the predecessor presented, and re-enters acknowledgment.
  • Weekly summaries: a weekly_summary record type reusing the entire draft → review → finalize machinery, whose links to finalized daily versions are data rows validated at finalization.
  • Vertical slice order, mirroring Milestones 2 and 3: (1) canonical bytes, finalization, completion rules, hashes, and database-enforced immutability; (2) trainee timeline and the acknowledgment/response/refusal/escalation workflow; (3) amendments and successor versions; (4) weekly summaries and the milestone-exit e2e. Web interface in every slice.

Decisions that need the owner

  1. Hashing scope at v1: content hash only, or the domain-separated integrity-chain hash on version relationships too (docs/records-integrity.md sketches both)? My recommendation: both from the first finalized record — the chain is cheap at creation and impossible to retrofit honestly, while Ed25519 signing stays a future mode as written. The review(workflow): single-step review for daily drafts #31 review's content-binding question carries forward here with records-integrity.md's stated limits kept honest: hashes over canonical bytes make finalized versions reproducible and their byte/hash consistency verifiable, but against a writer with direct database access they prove internal consistency, not provenance — stronger binding is the future signed mode, and ADR 0010 records why no trigger-level check can close that gap.
  2. The completion-rule set: which finalization gates exist in v1's closed set, and their defaults? My recommendation: review approval required, required narratives present, and all form competencies rated-or-explicitly-marked-not-observed — each configurable per program version, all defaulting on. Conservative defaults protect records; a center that wants less rigor changes configuration, attributably.
  3. Acknowledgment depth in v1: the roadmap names acknowledgments, responses, refusals, and escalation — all four verbs now, or acknowledge-only first? My recommendation: all four — a refusal without a response channel and escalation is a dead end that punishes the trainee, and the exit criterion covers the full lifecycle.
  4. Amendment authority and re-acknowledgment: who may create a successor version, and does it re-enter acknowledgment? My recommendation: the same capability set that finalizes, with a required reason; re-acknowledgment always — an amended record the trainee never saw defeats the purpose of acknowledgment.
  5. Weekly summary content: does a weekly summary carry its own ratings/narratives against the pinned weekly form, links to daily versions, or both? My recommendation: both — the pinned weekly_summary form defines its content exactly like daily reports, and the daily-version links are validated references, so the summary is a record in its own right rather than a view.
  6. Task signoffs: Milestone 3 design: sessions, drafts, and attribution (owner decisions needed) #22 deferred them to Milestone 4's versioned-record machinery. In scope now, or their own milestone-adjacent slice? My recommendation: in scope as attributed signoff rows against the pinned task vocabulary, finalized with the daily record — but as the last slice, split out without ceremony if the milestone core needs the room.

Explicitly not in this milestone

Exports and deterministic PDFs, trainee packets, retention/holds/disposition (Milestone 5); installation signing keys (held until justified); configured multi-step review chains (ADR 0008's rejection stands); concurrent-active-enrollment policy limits; schema-level authorization enforcement (rejected by ADR 0010 — authorization is the service's typed contract).

Expected proof (once design is settled)

  • ADR for the canonical record format and finalization model (and one for completion rules if the shape warrants it)
  • Canonicalization golden vectors and hash/predecessor-chain vectors (docs/records-integrity.md names both)
  • Database tests: every mutation attempt against a finalized version and its content fails closed, raw and through the service
  • e2e for the milestone exit: draft → submit → review → finalize → trainee acknowledges → amendment → re-acknowledgment, with the finalized bytes reproducible and the chain verifiable

Related roadmap, decisions, or issues

Activity

  1. TusanHomichi commented on Aug 31, 2026

    @TusanHomichi
    MemberAuthor

    Owner decisions recorded (2026-08-30) — all six recommendations approved as written:

    1. Hashing scope: both the SHA-256 content hash and the domain-separated integrity-chain hash from the first finalized record; Ed25519 signing stays a future mode. Local hashes are presented with their honest limits (reproducibility and internal consistency, not provenance against a direct writer — ADR 0010).
    2. Completion rules: a closed v1 set — review approved, required narratives present, every competency rated or explicitly marked not-observed — each configurable per program version, all defaulting on.
    3. Acknowledgment depth: all four verbs in v1 — acknowledge, respond (attributed appended text), refuse with reason, and escalation surfaced to coordinators.
    4. Amendments: created by the finalizing capability set with a required reason; re-acknowledgment always.
    5. Weekly summaries: both — content against the pinned weekly form and validated links to finalized daily versions.
    6. Task signoffs: in scope as attributed signoff rows against the pinned task vocabulary, finalized with the daily record; scheduled last and split out without ceremony if the core needs the room.

    Slice order as proposed: (1) canonical bytes, finalization, completion rules, hashes, and database-enforced immutability; (2) trainee timeline and the acknowledgment workflow; (3) amendments and successor versions; (4) weekly summaries and the milestone-exit e2e, with signoffs riding along. The canonical-format and finalization ADR ships with slice 1, which also closes Milestone 0's open canonical-bytes deliverable (docs/roadmap.md current position).

    Slice 1 work item follows.


    Generated by Claude Code

  2. TusanHomichi commented on Aug 31, 2026

    @TusanHomichi
    MemberAuthor

    Milestone 4 is complete. All four slices of the plan recorded here merged, each against its own issue's acceptance criteria:

    1. Canonical bytes, finalization, and completion rules — Milestone 4 slice 1: canonical bytes, finalization, and completion rules #36 / PR records(finalize): canonical bytes, completion rules, and the immutable version #37, with ADR 0011 settling the canonical format (Milestone 0's last open deliverable), the immutable EvaluationVersion with content and chain hashes, and finalization_policy as versioned per-program-version configuration.
    2. Acknowledgments and the trainee timeline — Milestone 4 slice 2: trainee timeline and the acknowledgment workflow #38 / PR records(ack): acknowledgments and the trainee timeline #39: the four verbs of decision 3 plus supervisor attestation, version-bound and append-only, view_own_records/acknowledge_own_record in the Trainee bundle and granted at enrollment, refusal escalation, and the My Records timeline.
    3. Amendments and successor versions — Milestone 4 slice 3: amendments and successor versions #40 / PR records(amend): amendments and successor versions #41, with ADR 0012: decision 4's authority-plus-reason amendments reopening the one working copy through the ordinary workflow, successors chained per ADR 0011, every retained version readable, re-acknowledgment by construction.
    4. Weekly summaries and task signoffs — Milestone 4 slice 4: weekly summaries and task signoffs #42 / PR records(summary): weekly summaries, schema 2, and task signoffs #43, with ADR 0013: decision 5's summaries as ordinary records pinning exact daily versions into the record-schema-2 bytes, and decision 6's versioned signoffs with authority-gated, reasoned overrides.

    The six decisions recorded above were implemented as decided, with two adjustments already noted on their PRs: decision 2's backfill leaves the content-completion rules off for pre-existing program versions (retroactive rules could wedge approved drafts — ADR 0011 records the rationale), and re-acknowledgment (decision 4) is enforced by construction through the version binding rather than a separate mechanism.

    The roadmap's current position now reads Milestones 0 through 4 complete; the exit holds — the full lifecycle reproduces from stored bytes and mutation attempts fail closed, raw and through the services, per the finalization, acknowledgments, amendments, and summaries_signoffs suites. Milestone 5 (exports and recovery) is next.


    Generated by Claude Code

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