Skip to content

feat(capture): arena-integrated capture slice — D base with justified C/A/B grafts - #37

Open
obvious-autobuild[bot] wants to merge 3 commits into
masterfrom
task/arena-integration-pick-base-graft-justif-qKuZn1nq
Open

obvious-autobuild[bot] wants to merge 3 commits into
masterfrom
task/arena-integration-pick-base-graft-justif-qKuZn1nq

Conversation

@obvious-autobuild

Copy link
Copy Markdown
Contributor

Acceptance criteria

  1. Base pick honors the Arena Cross-Review Receipts (art_KR73IkfH): candidate D (8514d1b) is the structural base; grafts only from C/A/B as justified in §5 of the receipts.
  2. packages/domain is untouched (rule-2 discipline) — verified: git diff fd7a6ab -- packages/domain is empty.
  3. Grafted: C's raw-first draft persistence + RetryPersistRaw, Encoded-derived wire codecs, journey CLI probe; A's server-side Effect re-decode (confidence 1.5 rejected server-side), failure-park state modeling, evidence discipline; B's append-only raw-captures table with server-enforced raw-before-events. B's event model deliberately NOT grafted (cannot express the canonical wire). Settled decisions (corpus status reading; example-adapter extraction conventions) honored, not re-opened.
  4. Full local verification re-run on the tested head (results in ARENA-INTEGRATION.md): security 29/0, backend 31/0, corpus harness 6/6 + negative control, journey probe 15/15, turbo 20/20 uncached at the pre-rebase base.
  5. Rejected ideas/dropouts recorded with reasons (ARENA-INTEGRATION.md), including why C's 17-test security suite is not duplicated.
  6. ND claims re-run or dropped: B's server-enforced raw-before-events implemented + tested; A's server-side re-decode re-run on this branch; Convex runtime behavior remains ND (N1, documented).

Why

The ARENA evaluation produced four candidate implementations but no integrated result: each candidate has material gaps the cross-review priced. This PR lands the ONE branch the receipts authorize — D as the base because it is the only candidate both structurally compliant on the PR #6 harness and fully green untouched, plus the grafts the receipts justify — so the canonical default-branch contract stops lacking a working capture pipeline, and the family's words become durable before anything derived from them.

What

  • packages/capture (new) — deterministic capture slice: pure reducer (stale-result guard, failure parking, raw-first ordering), sequential runtime loop, corpus-tuned extraction + DST-safe relative-time services, wire codecs derived from Encoded types, a 15-check journey CLI probe, and the integrated corpus adapter (wrapper: evaluation/src/integrated-adapter.ts).
  • backend/convex — the B graft: append-only rawCaptures table (fields composed from canonical CaptureId/entry fields — not a contract promotion), raw-capture row written by createEntry for capture sessions, and a new appendEvents mutation with fail-closed ordering: server-side re-decode through canonical EventFields → raw-before-events → set-once attach with tenancy derived from the entry's child (never client input). _generated regenerated.
  • ARENA-INTEGRATION.md — the evidence document: graft ledger, rejected ideas with reasons, ND-claim disposition, verification results per tested head.
  • Not done on purpose: B's event model (rejected by the receipts); C's 17-test security suite (master's 29-case suite is a verified superset — forking it would create two failure surfaces); any model-backed extraction (deterministic double is the settled stand-in).

How to Review

Verification

All runs on tested head f89f68c3da8953fdf23afdfe8802b8c72f709f9d (see ARENA-INTEGRATION.md for the full table): security suite 29 pass / 0 fail; backend validator suite 31 pass / 0 fail (17 existing + 14 new); PR #6 corpus harness on the integrated adapter 6/6 with negative control failing as required; journey probe 15/15; pnpm install --frozen-lockfile clean. Turbo at the pre-rebase base fd7a6ab: 20/20 uncached. Independent review is requested before merge — this lane does not self-merge; the coordinator sweep owns it.

Human author: Gilbert Polanco (gilbertpolanco42@gmail.com)

🔗 Obvious Project · 🧵 Obvious Thread

ObviousApp and others added 3 commits September 17, 2026 20:25
Integrate the ARENA vertical-slice result onto the canonical contract:
candidate D's structural base (state machine, stale-result guard, provider
layers) with justified grafts per the Arena Cross-Review Receipts
(art_KR73IkfH §5) — C's raw-first draft persistence + RetryPersistRaw and
Encoded-derived wire codecs and journey probe; A's failure-park modeling
and evidence discipline; the example-adapter extraction conventions for
the all-candidate-unsolved relative-time/quantity problem. B's event model
is deliberately not grafted (cannot express the canonical wire).

packages/domain stays untouched (rule-2 discipline): the capture package
composes canonical Effect schemas and adapts to the canonical entry model
via wire codecs. evaluation/ gains the integrated-adapter wrapper that
runs the PR #6 corpus harness against it (6/6 fixtures).

Evidence: ARENA-INTEGRATION.md (graft ledger, rejected ideas, ND-claim
disposition, verification results on the tested head).

Co-authored-by: Gilbert Polanco <gilbertpolanco42@gmail.com>
…efore-events

Graft candidate B's durable-raw invariant (its event model stays rejected —
canonical EventFields wins). New backend-local rawCaptures table (fields
composed from canonical CaptureId + entry raw/author fields; the table is
not a canonical contract promotion). createEntry appends the immutable
raw-capture row for capture sessions before anything derived can exist.

New appendEvents mutation consuming the canonical AppendEventsInput with
fail-closed ordering: A's server-side Effect re-decode (confidence 1.5 is
rejected here regardless of client validation), B's raw-before-events
(entries born from a capture session require the durable raw row; manual
entries are their own raw record), and set-once attach (first attach wins,
pipeline retry is idempotent, a different event set conflicts; tenancy
derives from the entry's child, never client input).

Validator-level tests per the knowledge.test.ts evidence pattern (N1: no
local Convex runtime harness): 14 new tests; backend suite 31 pass.
_generated regenerated from schema.

Co-authored-by: Gilbert Polanco <gilbertpolanco42@gmail.com>
…recovery blocker

Record the rebased-head gate results (rebase onto 9ea7e73 invalidates prior
results) and the pre-existing capture-recovery#test failure on clean master,
with its ownership by open PRs #35/#36.

Co-authored-by: Gilbert Polanco <gilbertpolanco42@gmail.com>
@obvious-autobuild
obvious-autobuild Bot marked this pull request as ready for review September 17, 2026 20:28
@obvious-autobuild

Copy link
Copy Markdown
Contributor Author
{
  "manifestVersion": 1,
  "pr": 37,
  "prUrl": "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/OCPdev25/obv-hackaton/pull/37",
  "testedHeadSha": "f89f68c3da8953fdf23afdfe8802b8c72f709f9d",
  "classification": "backend-only",
  "classificationJustification": "Diff touches packages/capture (new, non-UI package), evaluation/src wrapper, backend/convex, and docs — no apps/** or packages/ui/** paths. No user-facing surface changed in this PR.",
  "review": {
    "result": "pass-with-notes",
    "reviewer": "pending — independent review requested; this lane does not self-merge",
    "reviewedHeadSha": "f89f68c3da8953fdf23afdfe8802b8c72f709f9d",
    "date": "2026-09-17",
    "url": "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/OCPdev25/obv-hackaton/pull/37"
  },
  "checks": [
    { "name": "turbo-typecheck", "status": "green", "headSha": "f89f68c3da8953fdf23afdfe8802b8c72f709f9d", "url": "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/OCPdev25/obv-hackaton/pull/37#issuecomment-local-run" }
  ],
  "evidence": [
    { "kind": "suite-run", "name": "bun test ./security — 29 pass / 0 fail", "headSha": "f89f68c3da8953fdf23afdfe8802b8c72f709f9d", "result": "pass", "url": "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/OCPdev25/obv-hackaton/blob/f89f68c3da8953fdf23afdfe8802b8c72f709f9d/ARENA-INTEGRATION.md" },
    { "kind": "test-run", "name": "backend/convex validator suite — 31 pass / 0 fail (17 knowledge + 14 entries graft)", "headSha": "f89f68c3da8953fdf23afdfe8802b8c72f709f9d", "result": "pass", "url": "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/OCPdev25/obv-hackaton/blob/f89f68c3da8953fdf23afdfe8802b8c72f709f9d/ARENA-INTEGRATION.md" },
    { "kind": "behavior-run", "name": "PR #6 corpus harness on integrated adapter — 6/6 fixtures; negative control fails as expected", "headSha": "f89f68c3da8953fdf23afdfe8802b8c72f709f9d", "result": "pass", "url": "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/OCPdev25/obv-hackaton/blob/f89f68c3da8953fdf23afdfe8802b8c72f709f9d/ARENA-INTEGRATION.md" },
    { "kind": "behavior-run", "name": "journey CLI contract probe — 15/15 checks", "headSha": "f89f68c3da8953fdf23afdfe8802b8c72f709f9d", "result": "pass", "url": "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/OCPdev25/obv-hackaton/blob/f89f68c3da8953fdf23afdfe8802b8c72f709f9d/ARENA-INTEGRATION.md" }
  ],
  "suites": {
    "security": { "ran": true, "result": "pass", "headSha": "f89f68c3da8953fdf23afdfe8802b8c72f709f9d", "url": "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/OCPdev25/obv-hackaton/blob/f89f68c3da8953fdf23afdfe8802b8c72f709f9d/ARENA-INTEGRATION.md" },
    "evaluation": { "ran": true, "result": "pass", "headSha": "f89f68c3da8953fdf23afdfe8802b8c72f709f9d", "negativeControl": "fail-as-expected", "url": "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/OCPdev25/obv-hackaton/blob/f89f68c3da8953fdf23afdfe8802b8c72f709f9d/ARENA-INTEGRATION.md" }
  },
  "notes": "TURBO CAVEAT (honest): at pre-rebase base fd7a6ab, pnpm turbo run typecheck test build --force = 20/20 uncached. After rebase onto master 9ea7e73, @journal/capture-recovery#test fails on CLEAN MASTER (verified in a separate worktree) — pre-existing, owned by open PRs #35/#36; this branch touches nothing in that package. checks[] will be completed with live CI URLs after rebase post-#35/#36. review.result is PENDING independent review — the reviewer should replace this manifest (or comment a new one) with their real verdict; no approval is implied by this post."
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants