Repository navigation
records(summary): weekly summaries, schema 2, and task signoffs - #43
Merged
Merged
Conversation
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
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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_summaryforms 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
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) andtask_signoff(closed kind setobserved | 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).daily_reportsmember ({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_SCHEMAbumps to 2 for new finalizations; schema-1 bytes stay untouched and present under their own stored schema, per ADR 0011's evolution rule.summaries(creation on an enrollment by a coordinator or assigned author,weekly_summaryform 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 viajson_extract— no live joins) andtask_signoffs(record with the first-signoff/override authority split, the matrix read behind the enrollment-history gate,task_signoff_recordedaudits).GET/POST /api/enrollments/{id}/summary-forms|weekly-summary,GET /api/drafts/{id}/linkable-dailies,POST /api/drafts/{id}/linksand/links/remove,GET/POST /api/enrollments/{id}/signoffs; the workspace carriesrecord_typeandsummary_links(redacted alongside the other workflow-only fields for own-record readers).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-testsummaries_signoffssuite — 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 e2einweb/: 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 storedrecord_schema, per ADR 0011's evolution rule; (2) the e2e fixture's policy now setsreview_approved: falseso 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