Skip to content

records(summary): weekly summaries, schema 2, and task signoffs - #43

Merged
TusanHomichi merged 1 commit into
mainfrom
claude/milestone-2-org-rename-q8b2q8
Aug 31, 2026
Merged

TusanHomichi merged 1 commit into
mainfrom
claude/milestone-2-org-rename-q8b2q8

Conversation

@TusanHomichi

Copy link
Copy Markdown
Member

Primary Issue

Closes #42. Refs #32 (Milestone 4 slice 4 — the closer; decision 5: summaries carry own content plus validated links to exact daily versions; decision 6: task signoffs in scope).

Problem And Outcome

The two remaining Milestone 4 record kinds existed only in configuration: weekly_summary forms could be authored but no summary record could be created, and the domain model's TaskSignoff had no implementation. This slice delivers both on the finished substrate, closing Milestone 4: a weekly summary is an ordinary record — working copy, policy gates, review, finalization, acknowledgment, amendment, all unchanged — whose copy additionally pins the exact finalized daily-report versions it covers, sealed into the bytes; a task signoff is versioned per (enrollment, task) with authority-gated, reasoned overrides. ADR 0013 records the durable decisions.

Changes

  • Migration 0013 — summary_daily_link (unique per summary+version; weekly records only, own enrollment only, daily reports only, added/removed but never edited, frozen with the copy via the 0009 frozen view — all raw) and task_signoff (closed kind set observed | demonstrated | revoked, signer display-name snapshot, append-only; the task pinned to the enrollment's version, overrides requiring a non-blank reason past the 0009 White_Space trim, revocations requiring something to revoke — all raw).
  • Record schema 2 (ADR 0013) — the envelope gains the canonically ordered daily_reports member ({content_hash, record_id, version_number} per link; present and empty for records that link nothing), so a summary's bytes commit to exactly what it covered. RECORD_SCHEMA bumps to 2 for new finalizations; schema-1 bytes stay untouched and present under their own stored schema, per ADR 0011's evolution rule.
  • Services — summaries (creation on an enrollment by a coordinator or assigned author, weekly_summary form resolution with the same picker semantics as dailies, link add/remove riding the working copy's revision token with cycle-scoped contribution attribution shared with content saves, the linkable-dailies picker presenting labels from stored envelopes via json_extract — no live joins) and task_signoffs (record with the first-signoff/override authority split, the matrix read behind the enrollment-history gate, task_signoff_recorded audits).
  • API — GET/POST /api/enrollments/{id}/summary-forms|weekly-summary, GET /api/drafts/{id}/linkable-dailies, POST /api/drafts/{id}/links and /links/remove, GET/POST /api/enrollments/{id}/signoffs; the workspace carries record_type and summary_links (redacted alongside the other workflow-only fields for own-record readers).
  • Web — the enrollment page gains weekly-summary creation and the task-signoff matrix (sign, override-with-reason, revoke); the workspace gains the covered-daily links panel with the picker; the sealed view presents the covered dailies from the envelope, each linking its pinned immutable version through the slice-3 version-addressed read.
  • Roadmap — Milestones 0 through 4 recorded complete; Milestone 5 (exports and recovery) next.

Scope

No acknowledgment windows, attachments, retention/disposition, phase evaluations, or exports (Milestone 5 owns schema 2's portable identity). Signoffs neither freeze with records nor enter envelopes — they attach to the enrollment's pinned vocabulary, and their portable representation is Milestone 5's decision (recorded in ADR 0013).

Verification

  • cargo fmt --check, cargo clippy --workspace --all-targets -- -D warnings (pedantic): clean.
  • cargo test --workspace: 104 tests green, including the new 3-test summaries_signoffs suite — link validation typed and raw (type, enrollment, duplication, never-edited, frozen after sealing, a sealed summary is not a linkable daily), schema-2 byte reproducibility with the coverage member carrying the daily's exact hash, the lifecycle matrix on a summary (acknowledge, amend, re-seal with reduced coverage, chain verify), and the signoff matrix (authority split, reason shape, revocation, permanence, pinning, name-snapshot survival of a rename, audit counts) plus the HTTP round trips.
  • npm run check, npm run build, npm run e2e in web/: 5/5, the drafts spec extended through the coordinator signing off tasks (with a reasoned override) and creating, linking, authoring, sealing, and verifying a weekly summary in a real browser.

Review And Merge Notes

This slice completes Milestone 4 and the #32 slice plan; after merge I'll close out #32 against its acceptance list. Two judgment calls worth eyes: (1) all new finalizations emit schema 2 (dailies get an empty daily_reports) rather than per-type schemas — one format per era, keyed by the stored record_schema, per ADR 0011's evolution rule; (2) the e2e fixture's policy now sets review_approved: false so the browser flow can exercise summary sealing by its creator — the review path is still driven explicitly earlier in the same spec, and the review-required matrix stays covered in the Rust suites.

🤖 Generated with Claude Code

https://claude.ai/code/session_01DNP3dkn9c84v2YoNwx7KTg


Generated by Claude Code

The last Milestone 4 slice (#32 decisions 5 and 6; ADR 0013). A weekly
summary is an ordinary evaluation record — the whole existing
lifecycle applies unchanged — whose working copy additionally links
the exact finalized daily-report versions it covers: pinned versions,
validated typed and held raw (weekly records only, own enrollment
only, daily reports only, added and removed but never edited, frozen
with the copy). Sealing commits the coverage into the bytes: record
schema 2 adds the canonically ordered daily_reports member (content
hash, record id, version number; empty for records linking nothing);
schema-1 bytes stay untouched and present under their own schema.

Task signoffs are versioned state per (enrollment, task): append-only
rows with kind observed/demonstrated/revoked, a signer name snapshot,
and the latest row answering the current state. The first signoff
takes authoring scope; every override takes review_evaluation and a
recorded reason, and a revocation supersedes something — held raw with
pinning to the enrollment's version. Audited task_signoff_recorded.

The enrollment page gains summary creation and the signoff matrix;
the workspace gains the link picker; the sealed view presents the
covered dailies from the envelope, each linking its pinned immutable
version. The roadmap now records Milestones 0 through 4 complete.

Refs #42.

Co-Authored-By: Claude Fable 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01DNP3dkn9c84v2YoNwx7KTg
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Aug 31, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-08-31T08:17:56.480275Z 666dacf PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@TusanHomichi
TusanHomichi merged commit 639b147 into main Aug 31, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Milestone 4 slice 4: weekly summaries and task signoffs

2 participants