Skip to content

Slice S0: the native harness, the fixture app and probes 1 to 5 - #1

Merged
darko-mijic merged 28 commits into
mainfrom
slice/s0
Oct 1, 2026
Merged

darko-mijic merged 28 commits into
mainfrom
slice/s0

Conversation

@darko-mijic

@darko-mijic darko-mijic commented Oct 1, 2026 •

Copy link
Copy Markdown
Contributor

Slice S0 is the first code in this repository. It builds what every later slice tests on, and runs five of the doc's seven probes.

What is in it

  • A native test harness (harness/). Each test starts its own convex-local-backend process of one pinned release on fresh storage, deploys the fixture app, and removes the process and the storage when it ends, however it ends. A caller under test is an ordinary client with a token signed by a fixture issuer. The admin key deploys, reads tables and the function log, and is never a caller.
  • A fixture Convex app (fixture/convex/) with one component, mounted as annex.
  • Four test tiers (tests/): type tests, pure tests, convex-test, and native. The root README.md says how to run each and what a pass at each one proves.
  • npm run codegen and npm run dev. The second keeps the generated files current while a fixture file is edited.
  • CI on Linux: checks, then codegen with a stale-file gate, then the native tier.
  • Evidence records (evidence/): the record of each run a Spec or a commit cites.
  • Specs: spec:platform.native-harness with four examples, fourteen probe examples under design/specs/facts/, each bound to a native test, and the probe plan's rule for how a probe states its expectation.

What passed, and at which tier

On 2026-10-01, backend release precompiled-2026-09-28-5c7cb5b, convex 1.46.0:

Tier Result Where
Compiled, pure test, convex-test 14 files, 80 tests 61c3879, macOS; CI on Linux
Native backend 21 files, 31 tests, clean tree 61c3879, macOS, record under evidence/; CI on Linux at bf80ec4

Reviewers proposed 37 native mutations over three rounds. Twelve left their test green when first run. Eleven of those were fixed and one is a tuning value no example binds.

What the probes showed

  • Probe 1. Across a backend kill and restart, every mutation's promise stayed pending through the kill, resolved after the restart and left one row. A caller's own retry over ConvexHttpClient leaves two.
  • Probe 2. ConvexError data crosses a nested mutation and a component boundary unchanged. The child's write rolls back and the parent commits.
  • Probe 3. A component call costs 1.5 to 2.4 ms more than a helper call on a local backend. The quota half needs a hosted deployment.
  • Probe 4. Read and write byte budgets are shared across nested and component calls. A stack of 9 functions commits, 10 does not.
  • Probe 5. A parent query over a component query stays reactive and its pages stay contiguous. The usePaginatedQuery hook of convex-helpers/react loses rows after a capped split.
  • Not a probe: ctx.auth.getUserIdentity() inside a component returned the caller's identity, against the documentation.

What waits for the owner

design/STATE.md, section "Owner queue". In short: ready on the harness Spec, extensions E-13, E-15 and E-16, the F11 observation, a request key for ConvexHttpClient callers after Probe 1, eleven places where the doc and the probes disagree, and a license.

How it was built

Three main threads, about forty-five delegated jobs. Sol and then Opus agents built and folded in, a Fable agent designed, astra and sol reviewed frozen copies, and the main thread ruled on every finding and ran the mutations. design/SESSIONS.md has the protocol as it stands after this slice.

Five fold-ins, each reviewed on a frozen copy. The slice stopped when what the reviews still found was in the handling of failed cleanup, and what it did not tackle is tracked in design/STATE.md under "Leads". From the next slice on there is no pull request per unit: CI runs on every push and the session fast-forwards main.

🤖 Generated with Claude Code

darko-mijic and others added 24 commits October 1, 2026 16:10
…xamples

Four decisions on paper before the first code, all on the acceptance contract.

- E-13 changes its option. A caller under test is an ordinary client carrying a
  token signed by a fixture issuer; auth.config.ts reads the issuer and a
  data-URI key set from environment variables. The admin key acting as an
  identity is dropped: it passes Convex's visibility check for internal
  functions.
- E-15 is new: the native harness. Two compositions, faults only through parts
  the fixture composition supplies, assertions only on what a client or admin
  access can read, four controls and no clock or scheduler switch. Sc L2-9's
  production-configuration run is read as the scenarios routed to the
  production composition.
- An 'or' in a scenario's text enumerates cases; a bullet never stands in for
  one (PLAN section 4, acceptance contract verification).
- Seventeen example Specs: four verify the acceptance contract, thirteen are
  probes 1 to 5 and verify F4, F5, F13, F14 and F15.

The Protocol's root moves to the repository root so that test anchors outside
design/ bind to the Specs. check.py follows, and its --slice listing no longer
runs validate.

Ledger: four S0 findings ruled, one fixed and three partially fixed with what
each later slice still owes.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…the harness

- Toolchain pinned to releases current on 2026-10-01: TypeScript 7.0.2 as the
  compiler with the TypeScript 6 package for typescript-eslint, Convex 1.46.0,
  convex-test 0.0.60, convex-helpers 0.1.124, Vitest 5.0.3, ESLint 10.11.0,
  Prettier 3.9.9, Node 24.
- fixture/ is the kernel's fixture app: one app that mounts one component.
- harness/ runs a disposable convex-local-backend per test from a pinned,
  hash-checked release, deploys the fixture app, signs tokens for the fixture
  issuer and writes an evidence record per native run.
- Four tiers, one command each: types, pure, simulator (convex-test), native.
- Four native tests bind the acceptance contract's examples through their
  generated step contracts.

Passed on 2026-10-01: compiled (tsc 7.0.2, 1 type test), pure (1), convex-test
(3), native backend precompiled-2026-09-28-5c7cb5b (5).

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…unit

The probe code is unreviewed and partly red. The job that wrote it died with
the conversation and left no report. First run on 2026-10-01, backend
precompiled-2026-09-28-5c7cb5b: codegen, lint and format pass; tsc fails on
four errors in convex-helpers' shipped source under
exactOptionalPropertyTypes; native 11 pass, 7 fail, one file does not load.
Green: probe 2 on both boundaries, the subscription half of probe 5, all
three probe 1 cases. Red: probe 3 (log capture), probe 4 (seeding hits the
backend's write rate limit; the depth is 9 where the example binds 8), the
pagination half of probe 5.

SESSIONS.md gains the design step before a build, the owner's three rulings
of 2026-10-01 on who designs, who reviews taste and how a job is sized, and
the procedure for handing over inside a unit. STATE.md gains an In progress
block that points at the handover note.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…he probe examples

Rulings S1 to S7 on the three reviews of the foundation commit, and the
rulings on the first native run of the probes.

- spec:platform.native-harness owns E-13 and E-15, one rule per bullet. The
  acceptance contract keeps the doc's rules and E-14. The four harness
  examples move under the new Spec; their test anchors follow.
- The issuer is the identity source, not an adjustment. The fixture
  composition shares the libraries' tables, not the schemas. A test hook is
  defined. A refusal shows its own error, nothing stored and the target
  existing on the same deployment.
- spec:facts.probe-plan gains extension E-16: bound values are the
  expectation written before the first run, a different first result is
  recorded on the fact, an example fails when its boundary is not reached.
- Probe 1 names its client and must reach each boundary. Probe 3 says what a
  local backend cannot say. Probe 4's depth binds 9 as observed. Probe 5's
  hook check is its own example.
- Seven findings added to the ledger as fixed and unreviewed.

The probe tests do not match the rewritten examples yet. The fold-in follows.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
… ten gaps the design found

The Fable design pass proposed rules and Design entries for
spec:platform.native-harness; the main thread ruled and wrote them.

- Five rules: CLI calls bound to the owned backend, cleanup owned before a
  start can stall, no secret in output, an incomplete read fails, the record
  takes its facts from the backends that ran.
- Design entries, signatures only: the executable and its pin, the fixture
  issuer, the backend and its admin access, the table read, the function
  log, the clients and their two faults, the evidence record, the layout.
- Probe 5's hook example is rebound to what the backend showed: 40 of 45
  rows after a capped split. Ledger finding for slice S2.
- The split example says where the second half ends. The component refusal
  example covers the third route, the WebSocket protocol.
- docs/sdp-feedback.md: a Spec with designed stubs is a maturity the
  Protocol cannot state; the owner asks for a ts block in the carrier.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
The Fable design agent built this in a scratch worktree while designing the
fold-in. It is applied unchanged as a head start: a reshaped harness, the
fixture's component renamed to annex with modules named for what they hold,
one package.json with a root convex.json, one codegen script, two CI jobs.

Unreviewed. On this tree, 2026-10-01, backend precompiled-2026-09-28-5c7cb5b:
codegen leaves no diff; lint and format pass; 21 tests pass in the type,
pure and convex-test tiers; native, 7 of 9 files pass. The two red files
bind example steps that were reworded after the patch was cut, and typecheck
fails on the same two. Ten probe tests are not written yet.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…r examples

Two sol build jobs on top of the design pass's prototype.

- Harness: every Convex CLI call bound to the owned backend, cleanup owned
  before a start can stall, a bounded stop with escalation, a three-attempt
  port retry, complete table and log reads, facts kept when a deploy fails.
  Five native tests for the backend's lifecycle.
- The component refusal example covers three routes.
- Ten probe tests written and the hook test brought in line: 14 probe
  examples and 4 harness examples each have one bound native test.
- The fixture counts written blobs through small count rows.
- spec:platform.native-harness: the completion record's type follows the
  exported one.

On this tree before the commit, 2026-10-01, backend
precompiled-2026-09-28-5c7cb5b: codegen left no diff; compiled, pure test
and convex-test tiers, 22 tests pass; native tier, 20 files and 24 tests
pass. The record of a run on the clean commit follows in the next commit.
Unreviewed.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
20 files, 24 tests, all passed, on backend precompiled-2026-09-28-5c7cb5b
with convex 1.46.0, macOS on Apple silicon, 2026-10-01. The record says
clean: true and names ba5eddd.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
The facts pass, from a scout's inventory of every sentence that named a
probe as pending or a fact as assumed.

- F14 is probed and defined: ConvexError data survives a nested mutation and
  a component boundary on the pinned backend.
- F15 is probed and defined: documented, and shown by Probe 5. Pinned pages
  stay contiguous; the convex-helpers hook loses rows after a capped split.
- F13: the limits are one budget across nested calls and components, read
  and written; a stack of nine functions commits. New key
  transactionMetrics.
- F5: the guarantee holds across a restart; a closed client can lose a
  command; ConvexHttpClient does not retry. Whether its callers need a
  request key is left to the owner on D6.
- F4: a first local reading, about 2 ms per component call over a helper.
  Quota waits for a hosted deployment.
- F11: an open question records that the pinned backend returns the caller's
  identity inside a component, against the documentation. Owner.
- The doc keeps its own statuses until the owner edits it.

Ledger: the nested-limits finding is partially fixed and moves to S3, the
F15 finding is fixed, the F11 finding is added for the owner.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
- E-16: a later run that shows another value is again a finding; a measured
  size is recorded, a limit the backend enforces is bound as observed.
  Twelve probe examples say their bound values held on the first run.
- spec:platform.native-harness: the fault rule is two rules; the Design
  keeps the stubs later slices build on, marks one release's readings as
  observed and drops ten entries of implementation detail.
- The component refusal example says what each route showed. The depth
  example binds the refusal's text. Probes 2 and 3 say what their tests
  must show before they count.
- docs/sdp-feedback.md: measured count, a cited definition, a proposal.
- Four findings added to the ledger as fixed and unreviewed.

The tests for the reworded steps follow in the second fold-in.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…lf-way

Job A (sol) closed list A of rulings-4 in harness/, scripts/ and the pure
tests. Its native tests have not run.

Job B (sol) hung after about three minutes of edits and was cancelled. It
left the Probe 2 throwers, the depth test and the blob counting changed and
tests/native/shared-limits.ts not compiling. The read-cost tests, the
component refusal test and the measurement names are not done. Codegen has
not run since two fixture functions were removed.

Unreviewed. Typecheck fails. Nothing was run on a native backend.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…probes closed

Rulings-4 lists A and B, and one finding from an adversarial review.

- Harness: the sweep signals only a process this run started; disposal is
  final; a log mark dies with its backend process; a stale cache look never
  removes a published executable; evidence files are unique per run; output
  is redacted before it is truncated and per stream; the record keeps the
  arguments that ran; codegen cleans up on SIGINT and SIGTERM.
- Probes: the Probe 2 throwers prove their write; Probe 3 counts a sample
  only when its path read the document; the depth probe binds the refusal
  text; the component refusal test names its target and shows the socket
  request sent and the connection closed by the backend.
- One counting path for written blobs; depth rows in their own table.
- Generated component API regenerated.

On this tree before the commit, 2026-10-01, backend
precompiled-2026-09-28-5c7cb5b, macOS on Apple silicon: codegen, typecheck,
lint and format pass; compiled, pure test and convex-test tiers, 34 tests
pass; native tier, 21 files and 30 tests pass. Unreviewed.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
21 files, 30 tests, all passed, on backend precompiled-2026-09-28-5c7cb5b
with convex 1.46.0, macOS on Apple silicon, 2026-10-01. The record says
clean: true and names 5f63f97. On the same commit the six mutations that
survived the first fold-in turn their tests red, and so does the control
in which the socket mutation is never sent.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
STATE.md's In progress block names the seam and the note: after the second
fold-in was committed and proven on a native backend, before the review of
the fixes. SESSIONS.md step 4 of the slice unit: a design pass designs the
key abstractions as proposed Spec entries, with a time bound, and a
prototype is handed on as a patch.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…over cmux

Step 5 of 'Handing over inside a unit': two panes take turns; the thread
that hands over checks that Claude Code runs in the other pane, that its
conversation is clear and that it is Fable 5.1 at high effort, then sends
the prompt with cmux.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…he Protocol's maintainers

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
One disposable backend started through the harness, with convex dev bound to it
by --url and --admin-key and the same three-variable environment as every other
CLI call. Built by an Opus agent from the main thread's rulings; checked by hand
on a native backend. Not reviewed yet.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
The sweep rule says what the harness does before a signal and when it cannot
inspect a process, and a Design entry states the interval it does not close
(report U, findings 1 and 2; ledger s0-sweep-rule-promises-more-than-a-process-id-allows).
PLAN section 0 names the recipes a build uses and the Protocol's own corpus.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…n protocol its new roles

The owner ruled on 2026-10-01 that Claude models write and GPT models review:
Opus 5.5 builds and folds in, Fable designs, GPT reviews frozen copies beside
the write lanes. SESSIONS.md says so, with one worktree per writer, the
launcher for GPT jobs, code anchors on built code, recipes 21 and 23 in the
scout and settle steps, and the session's mandate to merge.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…e closed

Three lanes, merged by the main thread (rulings-5): an Opus agent on the
harness and the scripts (a failed process inspection keeps the backend and
fails the sweep; codegen and the watch mode observe an interrupt in every
phase; the watch mode removes only the .env.local convex dev wrote, exits 130
or 143 on an interrupt and runs every cleanup step), an Opus agent on two
probes (the restart test shows each promise pending at the kill and at the
release; a read-cost sample counts only when the backend's own documentsRead
metric says the bound number was read), and sol on redaction of overlapping
secrets and two pure tests. The harness carries a codeAnchor and three of its
own tests a specTest, so the graph holds 22 anchors.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Nine ruled items (rulings-6), built by the Opus agent that wrote the code: a
ps answer without a command line is a failed inspection and a zombie is dead;
a failed final sweep fails the run's record; the download and the watch
mode's CLI home are cleaned up when an interrupt arrives while they are being
created; the watch mode lets go of the CLI's streams after its grace period;
an abort of runChild ends a child that handles SIGTERM; a signal that fails
for any reason but ESRCH keeps the backend; the scripts' signal hand-over is
checked on parsed source; three tests for surviving mutations.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Oct 1, 2026

Copy link
Copy Markdown

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Autopilot is currently an internal CodeRabbit preview.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

darko-mijic and others added 4 commits October 1, 2026 21:51
…on closed

Three behavior items and five tests (rulings-7), by the Opus agent that wrote
the code: an amended run record replaces the old one in one step; a run's
cleanup amends only its own record, once; a process that is gone by the time
its state is read is absent.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…le for review rounds

The owner on 2026-10-01: a pull request per unit was not a good idea while the
design is iterated quickly. A unit keeps its branch, CI runs on every push, and
the session fast-forwards main when green. The harness Spec states what a
process with an unreadable command line does to the sweep.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
STATE.md rewritten: what S0 built, what passed at which tier and commit, what
each probe showed, what changed in the Specs, the tactical decisions of the
slice, the owner queue, and under Leads everything the slice did not tackle.
The ledger has the session entry.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@darko-mijic
darko-mijic marked this pull request as ready for review October 1, 2026 19:54
@darko-mijic
darko-mijic merged commit 772bb05 into main Oct 1, 2026
3 checks passed
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.

1 participant