feat: caregiver questions — audience-aware contracts, fail-closed policy, fixtures, UI prototype - #18
obvious-autobuild[bot] wants to merge 1 commit into
Conversation
…icy, fixtures, UI prototype Implements the Journal & Caregiver Coordination lane's caregiver-question contract on Effect v4 schemas: - packages/domain: careQuestions + careQuestionActivities schemas (entry/event targets, directed vs household audience, append-only lifecycle), pure deriveQuestionState, fail-closed policy (view/ask/answer/resolve/reopen with deny codes), handoff digest distinguishing no-questions from unresolved, operation contracts, index exports, 54 fixture-driven tests - evaluation/fixtures/agent-experience/caregiver-questions/: two-household synthetic corpus (lifecycle, draft visibility, directed isolation, explicit negatives, handoff exclusion, cross-household denial) - apps/mobile: pure viewer logic + prototype screen (viewer switcher, answer/ resolve/reopen gated by the domain policy, handoff digest card) + App toggle - backend/convex: careQuestions/careQuestionActivities tables via the adapter Verified at this commit: pnpm typecheck (7/7), pnpm test (54+10 pass), pnpm build (3/3), bun test ./security (17/17), evaluation corpus 6/6 with negative control failing as designed.
c3404b2 to
af02da5
Compare
Rule-5 rebase receipt (conflict repair)Prior evidence at New head: Rebase delta (only what the replay had to adapt):
Scope: diff vs master = 16 files, all caregiver-question scope; no Event.authorId work, authorship modeled on the question schema ( Uncached gates at CI: run 35261753409 — success on exactly Delta re-review is being routed to an independent lane reviewer; merge remains with the serialized merge-sweep owner. |
|
Correction to the rebase receipt above (5719651231), from the independent delta re-review (verdict PASS-WITH-NOTES, findings artifact art_w8eikm2M): the domain suite at |
Acceptance criteria
entriesrow (and one of its structuredeventsfor event targets). No standalone conversation table.audienceKind+addresseeIds); who MAY see it is resolved from household membership + target publication state, never fused.DENY_Q_*); anonymous, no-household-path, draft-author-only, non-addressee, attribution-mismatch, invalid-target, invalid-audience, addressee-not-in-household, and lifecycle violations are pinned by tests driven from the fixture corpus.deriveQuestionState). Reopening clears the resolution but preserves lineage (reopenedCount).hasQuestions: false) as a different fact from "questions exist, none for handoff", and preserves explicit negative answers ("None today.") verbatim.Verification (exact HEAD
c3404b2)pnpm typecheck— 7/7 packages greenpnpm test— 54 domain + 10 mobile logic tests passpnpm build— 3/3bun test ./security— 17/17 (touched domain contracts → re-run per repo contract)evaluationcorpus — 6/6 fixtures; negative control (--expect-failure) fails as designed