feat(month-history): deterministic month-history view model with executable journeys + RN prototype - #27
Conversation
Independent review — verdict: pass-with-notesTested head SHA: Verification gates (re-run independently at the tested SHA)
Acceptance criteria (all ten verified in code + executed checks)1–5 (placement/boundaries/DST/failed-extraction/gaps): verified in Focused checks: (a) draft-content cannot reach any rendered structure — Notes (non-blocking)
Scope hygieneDiff confined to Verdict for the evidence receipt: pass-with-notes — reviewer: independent review lane, 2026-09-17. Notes 1–2 are repair-suggestions for the merge owner; none blocks merge under the repo workflow. |
…utable journeys + RN prototype New @journal/month-history package (proposal tier per the 30-slot delivery map): - zone.ts: household-timezone calendar (DST-safe month bounds, 721h Nov, deterministic en-US labels), isInstantInMonth membership - access.ts: monthAccess/correctionAccess adapters over the existing fail-closed security policy (timeline gate first, author-only drafts, excluded-draft counts, attribution-mismatch denial) - view.ts: pure month-history view builder — care-day event placement, capture-day fallback, late-entry disclosure, failed-extraction preservation, correction lineage display, explicit gap cells with honest copy, a11y metadata, month-scoped totals - corrections.ts: append-only lineage (chain integrity enforced), latest-winner resolution - handoff.ts: receiver-authorized source-linked digest with count-only draft disclosure - a11y.ts: quiet-input + font-scaling + layout contracts as data - fixtures: deterministic synthetic family (8 entries, 6 events, Mom/Dad/ Ana/outsider principals, month-boundary + DST pairs) - journeys + rubric.json + run.ts: 28 executable checks across three journeys (parent-retrieval, parent-correction, caregiver-handoff) with bidirectional rubric/execution coverage enforcement - 12 package tests (bun); exports map source-facing (types+default -> src/index.ts) since the package imports the repo-root security policy by relative path and runs under bun/Metro without a dist build - mobile: MonthHistoryScreen renders the same authorized view the journeys assert (grid, day panel, honest gap copy, lineage, extraction-failure label); App.tsx wires it - README + .obvious/obvious.md layout and verification table updated
…stale rubric text Round-1 review (pass-with-notes) findings: 1. view.ts orphan classification never consulted scopeEntryIds (dead linkableEntryIds), so an event claimed by an in-scope-but-invisible entry (Mom's draft, from Dad's perspective) was mislabeled as an orphan — contradicting the BuildMonthHistoryInput docs. scopeEntryIds (entry-id list) could not actually distinguish 'claimed by hidden entry' from 'unclaimed'; replaced with scopeEntries (full entry views, the claim universe via structuredEventIds). Events now classify three ways: visible-claimed (rendered), in-scope-invisible (excluded, not orphan, excluded from totalEvents), unclaimed (orphan). journeys.ts passes SCOPE_ENTRIES (full fixture entry views). 2. rubric.json J1-A2 measure text said events=5; the executed assertion and fixture arithmetic give events=6. Text now matches the check. 3. New package test pins the hidden-vs-orphan divergence from both the scoped and default-claim-universe directions (no fixture exercised it before, which is how the dead-code bug survived 28/28).
890c15d to
a893b2c
Compare
Independent review — round 2 (rule-5 delta re-review) — verdict: pass-with-notesTested head SHA: Delta scope (rebase artifact clarified)The two-dot range Round-1 Note 1 (orphan accounting) — REPAIRED, verified in code and behavior
Round-1 Note 2 (rubric measure) — REPAIREDJ1-A2 measure Round-1 Note 4 (rebase) — RESOLVEDBranch is exactly on the Gates re-run at
|
| Gate | Result |
|---|---|
pnpm install --frozen-lockfile |
✓ (lockfile unchanged by the repair) |
pnpm typecheck |
✓ 10/10 turbo tasks |
bun test packages/month-history |
✓ 13/13 (12 + new orphan-accounting test) |
bun test packages/domain |
✓ 61/61 |
pnpm --filter @journal/month-history journeys |
✓ 28/28, exit 0 |
bun test ./security |
✓ 17/17 |
evaluation corpus / negative control |
✓ 6/6; negative-control exit 0 |
pnpm build |
✓ 5/5 (turbo cache valid — buildable package inputs byte-identical to the round-1 run; the repair touched only month-history) |
| CI on this head | ✓ both checks green: Typecheck/test/build (run 35262906355) + suites (run 35262906350) |
Remaining note (non-blocking, non-code)
Round-1 Note 3 — evidence-table correction claimed but not verifiable from the reviewer lane. The PR body's verification table still reads "domain 11 + month-history 12 tests" (actual at a893b2c: domain 61, month-history 13); no correction comment exists on the PR; art_IYBAPF9R still returns NOT_FOUND from this thread (re-verified this round). The claimed correction may live in the artifact (owned by the merge-owner thread, inaccessible to this lane) — but as of this review it is not visible anywhere inspectable. Merge owner: land the corrected counts in the PR body or evidence artifact so the evidence receipt's fields are accurate at merge time (the receipt policy requires every field fillable and accurate).
Verdict: pass-with-notes — code repairs for Notes 1, 2 and the rebase (Note 4) are complete and verified; the sole remaining note is the evidence-table accuracy item above. Merge ownership remains with the PR worker thread.
|
Round-2 review landed (pass-with-notes at a893b2c, comment 5719831240) — all round-1 findings repaired and verified. Corrections landed per the reviewer's remaining note: the verification block above now reads the true counts (domain 61 across 4 files, month-history 13 — an earlier draft's 'domain 11 + month-history 12' was a single-file run misread as the suite total). Full evidence receipt: project artifact PR #27 Month-History Journeys — Verification Evidence (round history, criterion→check map, design decisions, correction-of-record on the earlier un-published artifact id). |
|
PR #27 evidence receipt (complete): PR: #27 Notes: Round-1 review found the orphan-accounting defect (dead scopeEntryIds path mislabeling Mom's draft event as an orphan from Dad's view), the stale J1-A2 rubric measure, and evidence-count typos; all repaired at a893b2c and verified in the round-2 delta re-review. Full round history, criterion→check map, and design decisions: project artifact "PR #27 Month-History Journeys — Verification Evidence" (art_WzdyFYRC). |
Acceptance criteria
What's in the box
packages/month-history— zone calendar, fail-closed access adapters, view builder, corrections lineage, handoff digest, a11y contracts, deterministic fixtures, 28-check journey harness + rubric, 13 bun testsapps/mobile— MonthHistoryScreen renders the same authorized view the journeys assert (grid, day panel, lineage, extraction-failure label), App.tsx wiredDesign note: source-facing exports
Unlike @journal/domain and @journal/ui (dist-based), this package exports
types/default→./src/index.ts: it imports the repo-rootsecurity/access/policyby relative path (outside any buildable rootDir), it is consumed by Metro (which compiles TS natively) and bun, and there is no LLM/runtime dependency on a dist build. TS ~6.0.3 resolves the types condition fine (verified).Review & repair history
scopeEntriesvia structuredEventIds — three-way classification: visible-claimed rendered / in-scope-invisible hidden+excluded-from-totals / unclaimed orphan); rubric measure fixed to events=6; new package test pins the hidden-vs-orphan divergence both directions.Verification (head a893b2c, post-rebase onto 90b76d9)
Full evidence receipt (round history, criterion→check map, design decisions): project artifact "PR #27 Month-History Journeys — Verification Evidence".