feat(catch-up): since-last-seen caregiver catch-up — contract delta v0.1 + deterministic acceptance cases - #33
Open
obvious-autobuild[bot] wants to merge 2 commits into
Open
obvious-autobuild[bot] wants to merge 2 commits into
obvious-autobuild[bot] wants to merge 2 commits into
Conversation
…0.1 + deterministic acceptance cases Implements the catch-up slice per the published design (art_6qhBut41): - packages/domain: additive Effect v4 contracts (CaregiverReadStateFields, CatchUpQueryInput/Source/Item, CoverageDay, CatchUpReport, AdvanceReadStateInput, EventRevision proposal) + deterministic computeCatchUp reducer (fail-closed grants, horizon clip, strict-after watermark, late/corrected projection, coverage days, gap disclosure, confirmation counts) + monotonic advanceReadState + utcDayKey. - backend/convex: additive caregiverReadState table with by_caregiver_child index, getCatchUp query and advanceReadState mutation (fail-closed allowlist placeholder pending membership slot 19; corrected path TODO pending eventRevisions slot 10). Regenerated _generated/api.d.ts. - apps/mobile: presentational CatchUpView prototype (typecheck-verified only, not device-verified); links @journal/domain (lockfile importers entry only — no new npm dependencies). - evaluation/fixtures/agent-experience/catchup: synthetic two-household fixtures + AC-01..AC-14 cases (no real names/ids/medical content). Co-authored-by: Gilbert Polanco <gilbertpolanco42@gmail.com>
Register the catch-up scenario-and-authorization area (cases.json, grants.json, history.json) in the fixture-area manifest with the loader-legal binding pair (bun-test-data), making it visible to the fail-fast registration path and listed by corpus runs. Update the manifest self-check's committed-shape pin to two areas (seed corpus + registered scenario area); all fail-fast rejection checks unchanged. Co-authored-by: Gilbert Polanco <gilbertpolanco42@gmail.com>
obvious-autobuild
Bot
force-pushed
the
spike/agent-experience-catchup
branch
from
September 17, 2026 20:21
377eab7 to
3e94820
Compare
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.
Human author: Gilbert Polanco (gilbertpolanco42@gmail.com)
Acceptance criteria
All 14 cases are fixture-driven (synthetic two-household history, grants, per-case expectations) and green locally on HEAD
a54cd90aae18197421eb18d1ab8573d869ab647f:{ _tag: "UnauthorizedReader" }and nothing else — no partial output, no coverage leak.atstays at the watermark; a same-value advance is a no-op).Schema.encodeSync(CatchUpReport)→decodeUnknownSync→ deep-equal (contract round-trip lossless).Local verification on HEAD
a54cd90aae18197421eb18d1ab8573d869ab647f:pnpm typecheck(10/10 turbo tasks),pnpm test(14 AC tests + retrieval suite green),pnpm build(5/5),bun test ./security(29 pass / 0 fail),evaluationharness 6/6 + negative control--expect-failureexit 0, month-history journeys 28/28.Design summary
packages/domain/src/catchup.tsare the single contract source (annotated viaconvexId, decoded withSchema.Schema.Type; no Date.now/Math.random in domain).computeCatchUpis a pure reducer over (input, history, grants, dayKeyOf): fail-closed authorization first, horizon clip, strict-after-watermark new items, late projection, corrected projection from revisions, per-day coverage, confidence counts, exact gap disclosure.caregiverReadStatetable +getCatchUpquery /advanceReadStatemutation (monotonic clamp), validators derived through the existingconvexFieldsadapter; rows decode through the*Documentcontracts.knownReadersallowlist that defaults to DENY — replaced by the real membership check when slot 19 lands.CatchUpViewprototype taking a validatedCatchUpReport; disclosure discipline (exact gap string, confidence markers, correction lineage) lives in the domain, not the view.Evidence labels
evaluation/fixtures/agent-experience/catchup/), no LLM in the loop.eventRevisionstable on master; the query passes empty revisions and the corrected surface is exercised at the domain level).Design artifact: art_6qhBut41 (contract proposal, v0.4 fold target). The
EventRevisionshape there is a proposal for the fold owner — this PR consumes it fixture-level only and creates no table.Deviations (one line each)
fd7a6ab(the brief's241ffe6is stale — master moved), branched-Bfrom origin as required.apps/mobile/package.jsonlinks@journal/domain(workspace:*) so the view can take the domainCatchUpReporttype — lockfile importers entry only (3 lines), no new npm dependencies.CatchUpRevisionadds a fixture-level revision identity so corrected items can citerevisionIds(the EventRevision proposal has no persisted id).Coordination note
Per the execution coordinator: no namespace-manifest registration or
evaluation/srcchanges are included here — the catch-up fixtures stay plain bun-test-loadable data. A manifest entry for the catchup area will be added and this branch rebased after the namespace-loader PR (task todo_l5QeXI2q) merges.How to review
Start at
packages/domain/src/catchup.ts(contracts + reducer, the heart of the change), thenpackages/domain/test/catchup.test.ts(AC-01…AC-14 againstevaluation/fixtures/agent-experience/catchup/). The backend sketch (backend/convex/convex/catchup.ts, schema table) and the prototype view (apps/mobile/src/catchup/CatchUpView.tsx) are thin consumers. Intentionally excluded: membership authorization (slot 19), eventRevisions persistence (slot 10), device QA, and any evaluation-harness registration (loader PR owns the seam).No device evidence, live-model runs, or medical/clinical validity are claimed anywhere in this change.
🔗 Obvious Project · 🧵 Obvious Thread