deploy(convex): thin-path functions on dev deployment reliable-panther-823 - #5
Merged
Merged
Conversation
Minimal Convex functions per the published Effect v4 Schema Contract v0.1 (art_I2TCG08V), effect@4.0.0-rc.115: - children:create — non-empty name, optional birthDate (unix ms) - entries:createEntry — raw transcript always preserved; extraction events decoded through the canonical Effect schema before storage; idempotent on captureId retry (original capture wins, retries are absorbed without a second write); validation failures return captured_with_event_errors and never block the capture - timeline:list — per-child entries, chronological by createdAt Convex validators (wire.ts) are the one-directional schema->storage mapping from the contract's Convex mapping section; range constraints (confidence in [0,1]) are enforced by the Effect schema at the mutation boundary. This branch is a deployment-verification vehicle — the winning candidate's shared domain package replaces convex/contract.ts at integration. Co-authored-by: Gilbert Polanco <gilbertpolanco42@gmail.com>
Deployment-verified finding: Convex rejects stored fields starting with an underscore (reserved for system fields like _id), so the contract's wire-level _tag literal cannot be persisted as the mapping table in the published contract assumed. Keep _tag on the wire in both directions — createEntry strips it after encode before insert, timeline:list re-wraps stored rows on read so returned objects still decode through the canonical Entry/Event schemas unchanged. Table + validator identity replaces the tag at rest. Co-authored-by: Gilbert Polanco <gilbertpolanco42@gmail.com>
…er-823 Full redacted transcripts: deployment-scope verification, deploy output, synthetic write→read loop (idempotent captureId retry, 2-entry timeline, validation-failure case with raw preserved), Finding F1 (Convex underscore-field storage constraint vs the contract's _tag mapping), and the effect/Schema import-style note. Labels the branch as a deployment-verification vehicle in the README. Co-authored-by: Gilbert Polanco <gilbertpolanco42@gmail.com>
This was referenced Sep 17, 2026
obvious-autobuild Bot
pushed a commit
that referenced
this pull request
Sep 17, 2026
…tract Port the retired thin-path functions (PR #5) onto backend/convex with validators derived from the packages/domain contracts via the tested Effect->Convex adapter: - contracts: CreateEntryInput gains authorId + optional captureId (the capture session id, required for PR #5's idempotency semantic); new CreateEntryOutput, CreateChildInput/Output, minimal CreateHouseholdInput/ Output (children:create needs a household creation path); EntryFields gains optional captureId - schema: entries gains by_capture (idempotency lookup) and by_child_createdAt (chronological timeline) indexes - functions: households:create, children:create (trim + non-empty name, household existence check), entries:createEntry (raw-first capture, extractionStatus pending, idempotent on captureId - original capture wins, retried payload changes absorbed, same entryId returned), timeline:list (by_child_createdAt asc, optional limit, rows decode through EntrySchema so output is validated contract shape) - convex codegen (_generated) committed per repo policy (CI has no deployment) Divergence from the thin path: createEntry no longer accepts inline events - the canonical model captures raw-first and events belong to the extractor via the AppendEventsInput contract. Co-authored-by: Gilbert Polanco <gilbertpolanco42@gmail.com>
obvious-autobuild Bot
added a commit
that referenced
this pull request
Sep 17, 2026
…tract (#13) Ports the retired thin-path functions (PR #5) onto backend/convex with validators derived from the packages/domain contracts via the tested Effect->Convex adapter: - contracts: CreateEntryInput gains authorId + optional captureId (capture session id, required for PR #5's idempotency semantic); new CreateEntryOutput, CreateChildInput/Output, minimal CreateHouseholdInput/Output; EntryFields gains optional captureId - schema: entries gains by_capture (idempotency lookup) and by_child_createdAt (chronological timeline) indexes - functions: households:create, children:create (trim + non-empty name, household existence check), entries:createEntry (raw-first capture, extractionStatus pending, idempotent on captureId - original capture wins, retried payload changes absorbed, same entryId returned), timeline:list (by_child_createdAt asc, optional limit, rows decode through EntrySchema so output is validated contract shape) - convex codegen (_generated) committed per repo policy (CI has no deployment) - deploy/port-evidence.md: synthetic smoke on reliable-panther-823 - idempotency, contract-shaped timeline, fail-closed negatives - re-run at the rebased head after the v0.3 fold (PR #14) merged mid-flight Divergence from the thin path: createEntry no longer accepts inline events - the canonical model captures raw-first and events belong to the extractor via the AppendEventsInput contract. Review: pass-with-notes at c5dc6fb (independent reviewer, th_9CCFeh6U); CI run 35259935719 SUCCESS on c5dc6fb. Co-authored-by: Gilbert Polanco <gilbertpolanco42@gmail.com>
obvious-autobuild Bot
pushed a commit
that referenced
this pull request
Sep 17, 2026
… 7/7; F1 refinement - qa-convex: standard convex/ functions layout + convex.json + package root; entries table gains events column so the F1 probe isolates the _tag question - driver: route queries to /api/query; neutral F1-probe reporting - executed against anonymous local backend (anonymous-qa-convex): upload URL -> POST (storageId) -> commit (photoId), SHA-256 read-back match - F1 REFINED: raw /api layer strips _tag as protocol metadata and ACCEPTS the entry-carrying commit — the 'Convex rejects _-prefixed fields' interpretation from PR #5 F1 does not hold at the wire layer; adapter-layer scope - QA-DEVICE-PROOF.md: item 9 marked EXECUTED with full evidence + F1 note
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.
Why
The Shared Child Journal's thin path — capture a dictated entry, validate extracted events, read a per-child timeline — currently exists only as shapes in the published Effect v4 Schema Contract (art_I2TCG08V). This branch deploys the actual functions to the EXISTING Convex dev deployment
reliable-panther-823(created by Gil; the stored deploy key scopes to it — verified before any write) and proves them with a synthetic write→read loop through the Convex CLI.What
convex/contract.ts— canonical Event/Entry Effect v4 schemas (effect@4.0.0-rc.115), mirroring the spike-verified contract: six category literals, unix-ms wire times, confidence ∈ [0,1], non-empty strings, explicit null rejected, empty events allowed (extraction failure never blocks capture).convex/wire.ts+convex/schema.ts— the one-directional schema→validator mapping from the contract's "Convex mapping" section; entries indexed bycaptureId(idempotency) and[childId, createdAt](timeline).convex/children.ts—children:createmutation (non-empty name, optionalbirthDate).convex/entries.ts—entries:createEntrymutation: raw transcript always preserved; each extraction event decoded through the canonical schema; idempotent oncaptureIdretry (original capture wins — a retried submit with a changed payload is absorbed, no second row); validation failures returncaptured_with_event_errorswith per-event detail while the capture itself persists.convex/timeline.ts—timeline:listquery, per child, chronological.deploy/contract-smoke.ts— local decode/reject/encode verification run before deploying (7 checks, all pass).Deployment-verified finding (F1): Convex rejects stored fields starting with
_(reserved for system fields), so the contract's wire-level_tagliteral is stripped on write and re-wrapped on read — a correction to the contract's mapping table that other candidates need (the spike never executed a real insert). Also verified:import { Schema } from 'effect/Schema'does not resolve on rc.115 — a namespace import is required.How to Review
deploy/thin-path-evidence.mdholds the full redacted transcripts: deployment-scope verification (npx convex env list→reliable-panther-823), deploy output ("Schema validation complete"), the idempotency loop (duplicate submit →idempotent_hit, same entryId), the timeline showing 2 entries, not 3, and the validation-failure case (schema-precise errors returned, raw transcript preserved, zero events stored). This branch is a deployment-verification vehicle — the winning candidate's shared domain package replacesconvex/contract.tsat integration.Test Evidence
reliable-panther-823) with synthetic data via CLI — NOT live-LLM extraction, NOT native device, NOT browser app UI.npm run contract:smokepass,tsc --noEmitclean, deploy completed with schema validation.94e706c; branch head with evidence:14a038b.Human author: Gilbert Polanco (gilbertpolanco42@gmail.com)
🔗 Obvious Project · 🧵 Obvious Thread