Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
143 commits
Select commit Hold shift + click to select a range
9950a5f
docs(progress): reconcile release candidate state
ALikesToCode Jul 20, 2026
6d8d9c6
fix(learner): require enforced live isolation
ALikesToCode Jul 20, 2026
5259a49
fix(a11y): simplify command trigger name
ALikesToCode Jul 20, 2026
22d48a5
docs(progress): record browser design review
ALikesToCode Jul 20, 2026
2b94c9d
feat(runner): enforce Bubblewrap generation boundary
ALikesToCode Jul 20, 2026
f365132
fix(release): version enforced isolation receipts
ALikesToCode Jul 20, 2026
ce2da76
docs(progress): record isolation release state
ALikesToCode Jul 20, 2026
b5d2359
fix(runner): hash Bubblewrap startup evidence
ALikesToCode Jul 20, 2026
fc1c581
fix(runner): bind pinned Bubblewrap version
ALikesToCode Jul 20, 2026
9a15ec4
feat(release): define image isolation evidence
ALikesToCode Jul 20, 2026
56638e9
feat(release): persist exact-image isolation evidence
ALikesToCode Jul 20, 2026
151854b
docs(progress): record image isolation evidence
ALikesToCode Jul 20, 2026
e8ae61f
fix(release): bind qualified isolation identity
ALikesToCode Jul 20, 2026
9348093
fix(release): bind fresh isolation recheck
ALikesToCode Jul 20, 2026
ea01ca7
docs(progress): record fresh release chain
ALikesToCode Jul 20, 2026
de21f14
fix(release): verify refreshed image digest
ALikesToCode Jul 20, 2026
85c5652
fix(runtime): preserve supervisor response channel
ALikesToCode Jul 20, 2026
9ac208d
docs(progress): record runtime startup repair
ALikesToCode Jul 20, 2026
773e808
fix(judge): open verified sample proof directly
ALikesToCode Jul 20, 2026
c7a3b9e
docs(progress): record proof access and release blockers
ALikesToCode Jul 20, 2026
fac223f
docs(release): align isolation and completion claims
ALikesToCode Jul 20, 2026
cd58f3c
test(release): accept wrapped engine verification command
ALikesToCode Jul 20, 2026
889a12d
docs(progress): record consolidated source gates
ALikesToCode Jul 20, 2026
1f3067c
perf(learner): defer verified theater payload
ALikesToCode Jul 20, 2026
6b0bf01
fix(judge): bind isolation copy to release health
ALikesToCode Jul 21, 2026
0621b79
docs(submission): make Devpost fields paste-ready
ALikesToCode Jul 21, 2026
55788ef
docs(demo): lead with the verified belief break
ALikesToCode Jul 21, 2026
eafd867
docs(codex): separate build and runtime authority
ALikesToCode Jul 21, 2026
45038ce
docs(readme): document samples and Codex decisions
ALikesToCode Jul 21, 2026
94a5d51
fix(runtime): align timeout rlimit authority
ALikesToCode Jul 21, 2026
b7c54fe
fix(runtime): retain deterministic cgroup limits
ALikesToCode Jul 21, 2026
fa4261d
test(runtime): harden cgroup intent bindings
ALikesToCode Jul 21, 2026
22e489f
fix(runtime): request delegated cgroup namespace
ALikesToCode Jul 21, 2026
d797b4c
feat(runtime): bind aggregate qualification requests
ALikesToCode Jul 21, 2026
79d25ba
feat(runtime): validate aggregate cgroup evidence
ALikesToCode Jul 21, 2026
275dd9e
docs(progress): record cgroup source checkpoint
ALikesToCode Jul 21, 2026
cb8705a
feat(runtime): derive qualified rootless receipts
ALikesToCode Jul 21, 2026
3b7796c
feat(runtime): persist qualified receipts once
ALikesToCode Jul 21, 2026
0077f1a
feat(runtime): add fixed cgroup controls
ALikesToCode Jul 21, 2026
fbc5ba9
feat(runtime): bind cgroup observer identity
ALikesToCode Jul 21, 2026
37684dd
feat(runtime): define cgroup observer protocol
ALikesToCode Jul 21, 2026
771d8bf
feat(runtime): observe aggregate cgroup controls
ALikesToCode Jul 21, 2026
317ba44
fix(runtime): bind qualified receipts to live sessions
ALikesToCode Jul 21, 2026
c2c1817
feat(runtime): define cgroup finalization signal
ALikesToCode Jul 21, 2026
cf90647
fix(runtime): fail closed on cgroup qualification
ALikesToCode Jul 21, 2026
f0c9f7b
test(learner): cover recovery and notebook intake
ALikesToCode Jul 21, 2026
88f96c9
docs(progress): record observer and recovery gates
ALikesToCode Jul 21, 2026
bb1cc0b
feat(runtime): bind cgroup finalization evidence
ALikesToCode Jul 21, 2026
3cdf38b
fix(runtime): verify qualification artifact chain
ALikesToCode Jul 21, 2026
1ea2ed8
fix(runtime): permit honest pre-draft aborts
ALikesToCode Jul 21, 2026
40db9bc
feat(runtime): coordinate aggregate qualification
ALikesToCode Jul 21, 2026
eaf4a60
feat(runtime): wire aggregate qualification
ALikesToCode Jul 21, 2026
75dfb65
fix(runner): consume qualified timeout receipts
ALikesToCode Jul 21, 2026
f19387b
test(learner): align live journey selectors
ALikesToCode Jul 21, 2026
e4dc33e
docs(progress): record aggregate runtime integration
ALikesToCode Jul 21, 2026
bd6e5c3
docs(release): map qualification dependencies
ALikesToCode Jul 21, 2026
e80b390
fix(judge): tighten first-fold belief break
ALikesToCode Jul 21, 2026
830d61b
fix(learner): restore prompt-first landing hierarchy
ALikesToCode Jul 21, 2026
dd7b372
test(learner): guard prompt-first landing fold
ALikesToCode Jul 21, 2026
dd99800
docs(progress): record prompt-first release checkpoint
ALikesToCode Jul 21, 2026
2986046
test(e2e): authorize private session assertions
ALikesToCode Jul 21, 2026
e9529b0
test(e2e): await fresh recovery sessions
ALikesToCode Jul 21, 2026
52b40ef
fix(learner): activate session routes before render
ALikesToCode Jul 21, 2026
6142e5e
test(e2e): align current learner journeys
ALikesToCode Jul 21, 2026
d184e5a
test(e2e): configure local intake authority
ALikesToCode Jul 21, 2026
cdbe153
fix(learner): distinguish notebook evidence keys
ALikesToCode Jul 21, 2026
4f7bbda
test(perf): scope first-fold browser budgets
ALikesToCode Jul 21, 2026
f5155e0
docs(progress): record browser harness recovery
ALikesToCode Jul 21, 2026
e031310
docs(release): record local browser matrix
ALikesToCode Jul 21, 2026
9229c8e
style(tests): normalize scientific UI fixtures
ALikesToCode Jul 21, 2026
6a92e06
docs(readme): reconcile judge link and evidence
ALikesToCode Jul 21, 2026
1aefd20
docs(submission): align fields demo and screenshot evidence
ALikesToCode Jul 21, 2026
62cf3c9
docs(progress): record deterministic and submission gates
ALikesToCode Jul 21, 2026
e4f723b
feat(learner): clarify landing audience and method
ALikesToCode Jul 21, 2026
9441166
feat(proof): expose validated session evidence
ALikesToCode Jul 21, 2026
783581f
fix(judge): gate inaccessible source instructions
ALikesToCode Jul 21, 2026
d942c08
feat(submission): add fail-closed package preflight
ALikesToCode Jul 21, 2026
74ff037
docs(audit): mark submission snapshot historical
ALikesToCode Jul 21, 2026
3174a1f
fix(proof): bind stored bundle authority
ALikesToCode Jul 21, 2026
14dfea7
docs(progress): reconcile current release gates
ALikesToCode Jul 21, 2026
9ea8484
fix(submission): bind verified evidence bytes
ALikesToCode Jul 21, 2026
07c9091
fix(submission): bind release evidence chain
ALikesToCode Jul 21, 2026
8e33154
fix(submission): validate publication evidence
ALikesToCode Jul 21, 2026
eee333a
docs(progress): record publication evidence gate
ALikesToCode Jul 21, 2026
8e9e336
docs(release): refresh verification graph
ALikesToCode Jul 21, 2026
b37f7d9
fix(runtime): preserve command response channel
ALikesToCode Jul 21, 2026
8c60f6f
docs(progress): record runtime release blockers
ALikesToCode Jul 21, 2026
84ef49d
fix(web): validate bound release isolation
ALikesToCode Jul 21, 2026
547cc0f
fix(worker): preserve historical proof validation
ALikesToCode Jul 21, 2026
7e25a09
fix(live): require exact release readiness
ALikesToCode Jul 21, 2026
d88b159
docs(progress): reconcile release readiness
ALikesToCode Jul 21, 2026
3e75281
test(browser): cover release viewport matrix
ALikesToCode Jul 21, 2026
3db3e52
test(browser): capture privacy-safe INP evidence
ALikesToCode Jul 21, 2026
8a68bdd
test(browser): open tablet navigation before audit
ALikesToCode Jul 21, 2026
adea1c9
test(browser): emit fail-closed journey evidence
ALikesToCode Jul 21, 2026
a6f6d8d
test(browser): bind qualification telemetry
ALikesToCode Jul 21, 2026
ba853d2
docs(progress): record browser evidence gates
ALikesToCode Jul 21, 2026
0ee8934
feat(release): finalize browser qualification evidence
ALikesToCode Jul 21, 2026
19d8967
docs(progress): record browser finalizer gate
ALikesToCode Jul 21, 2026
d561bc4
docs(progress): record release blockers
ALikesToCode Jul 21, 2026
faa2c2a
test(browser): require exact live intake authority
ALikesToCode Jul 21, 2026
9ee49ee
test(browser): await verified action responses
ALikesToCode Jul 21, 2026
99e9741
test(browser): reconcile expected HTTP failures
ALikesToCode Jul 21, 2026
d365118
docs(progress): record CloakBrowser recovery
ALikesToCode Jul 21, 2026
d7d23af
fix(worker): stabilize evidence snapshots
ALikesToCode Jul 21, 2026
ccb876b
fix(replay): harden mobile read-only journey
ALikesToCode Jul 21, 2026
d037036
docs(progress): record focused Cloak repairs
ALikesToCode Jul 21, 2026
29ea8c3
fix(replay): make evidence table keyboard reachable
ALikesToCode Jul 21, 2026
b78632f
docs(progress): record full local verification
ALikesToCode Jul 21, 2026
6b85f2a
docs(submission): clarify browser evidence status
ALikesToCode Jul 21, 2026
d16fc77
docs(release): refresh dependency and review graph
ALikesToCode Jul 21, 2026
6ee5954
fix(runtime): recover preserved contained session safely
ALikesToCode Jul 21, 2026
17c1a5e
docs(progress): record historical runtime recovery
ALikesToCode Jul 21, 2026
3b1ae9d
docs(release): refresh dependency graph
ALikesToCode Jul 21, 2026
8e1d80b
docs(progress): record browser authority handoff
ALikesToCode Jul 21, 2026
90af3b2
test(runtime): characterize shim root binding
ALikesToCode Jul 21, 2026
ce772eb
fix(learner): clarify first-fold hierarchy
ALikesToCode Jul 21, 2026
ca40ad3
feat(learner): expose first-fold method and authority
ALikesToCode Jul 21, 2026
12f3cf6
feat(learner): label explanation authority
ALikesToCode Jul 21, 2026
9e07849
feat(learner): clarify verified result direction
ALikesToCode Jul 21, 2026
dabc058
fix(learner): align artifact and proof state labels
ALikesToCode Jul 21, 2026
71f9ef2
feat(learner): show live test authority phases
ALikesToCode Jul 21, 2026
cb25d90
fix(learner): prevent mobile proof bar overlap
ALikesToCode Jul 21, 2026
25e42b1
docs(progress): record first-fold qualification work
ALikesToCode Jul 21, 2026
0d2fa32
docs(readme): explain learner authority and mode claims
ALikesToCode Jul 21, 2026
f7a1b55
fix(runtime): preserve address-space limit through nerdctl
ALikesToCode Jul 21, 2026
3c50ebf
docs(progress): record containment repair checkpoint
ALikesToCode Jul 21, 2026
552a1eb
fix(runtime): separate setup and candidate deadlines
ALikesToCode Jul 21, 2026
2cc2b2d
docs(progress): record candidate deadline repair
ALikesToCode Jul 21, 2026
b804f48
fix(runtime): use delegated cgroup leaf
ALikesToCode Jul 21, 2026
5209d06
docs(progress): record delegated cgroup repair
ALikesToCode Jul 21, 2026
7c0cbe2
fix(release): scope Worker secret preflight
ALikesToCode Jul 21, 2026
ef9f283
docs(progress): record delegated release preflight
ALikesToCode Jul 21, 2026
533b6d3
fix(runtime): evacuate delegated cgroup after workers start
ALikesToCode Jul 21, 2026
9d8e823
fix(runtime): preserve non-root runner execution
ALikesToCode Jul 21, 2026
f6b26c3
fix(runtime): mark FUSE mount helper executable
ALikesToCode Jul 21, 2026
6006bcd
feat(authority): bound learning guidance and callbacks
ALikesToCode Jul 21, 2026
ea352cb
feat(learner): harden the guided evidence journey
ALikesToCode Jul 21, 2026
767d757
chore(release): ignore stale local evidence
ALikesToCode Jul 21, 2026
c491afe
docs(release): record the source freeze gates
ALikesToCode Jul 21, 2026
0f32b05
fix(runtime): tolerate BuildKit host mounts
ALikesToCode Jul 21, 2026
1ad3439
fix(runtime): preserve adapter access in rootless builds
ALikesToCode Jul 21, 2026
6608ad2
fix(runtime): normalize bounded adapter image
ALikesToCode Jul 21, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,6 @@ dist/
*.tsbuildinfo
.wrangler/
apps/web/worker-configuration.d.ts
apps/web/.vitest-app-baseline.json
devpost-01-landing-1440x900.png
docs/submission-assets/public-2026-07-22/
35 changes: 34 additions & 1 deletion Dockerfile.runner
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,14 @@ RUN pnpm install --frozen-lockfile --filter @counterlab/hosted-runner... \
&& node --check /out/runner.mjs \
&& mkdir -p /out/codex \
&& cp -a /build/node_modules/.pnpm/@openai+codex@0.144.4-linux-x64/node_modules/@openai/codex/vendor/x86_64-unknown-linux-musl/. /out/codex/ \
&& mkdir -p \
/out/runtime-rootfs/dev/pts \
/out/runtime-rootfs/dev/shm \
/out/runtime-rootfs/dev/mqueue \
/out/runtime-rootfs/sys/fs/cgroup \
/out/runtime-rootfs/counterlab-runtime \
/out/runtime-rootfs/etc \
&& touch /out/runtime-rootfs/etc/hosts \
&& chmod -R a+rX /out

FROM python:3.13-slim-trixie@sha256:bffeb7bd6a85767587059c6ba23e1e9122078e3aa3fa836099171b9bb5a9bb00
Expand All @@ -69,8 +77,12 @@ ENV DEBIAN_FRONTEND=noninteractive \

COPY --from=node-builder /usr/local/bin/node /usr/local/bin/node

RUN chmod 0555 /usr/local/bin/node \
RUN apt-get update \
&& apt-get install --yes --no-install-recommends bubblewrap=0.11.0-2+deb13u1 \
&& chmod 0555 /usr/local/bin/node \
&& test -x /usr/local/bin/node \
&& test "$(/usr/bin/bwrap --version)" = "bubblewrap 0.11.0" \
&& test -x /usr/bin/bwrap \
&& test -x /usr/sbin/groupadd \
&& test -x /usr/sbin/useradd \
&& test -x /usr/bin/setpriv \
Expand All @@ -86,6 +98,7 @@ COPY fixtures/public/fraud_rare_event.csv ./fixtures/public/fraud_rare_event.csv
COPY --from=python-builder /wheelhouse/ /opt/counterlab-wheelhouse/
COPY --from=node-builder /out/runner.mjs /app/runner.mjs
COPY --from=node-builder /out/codex/ /opt/codex/
COPY --from=node-builder /out/runtime-rootfs/ /

RUN chmod -R a+rX /opt/codex \
&& ln -s /opt/codex/bin/codex /usr/local/bin/codex \
Expand All @@ -104,6 +117,26 @@ RUN chmod -R a+rX /opt/codex \
&& chown -R root:root /app \
&& chmod -R a=rX /app \
&& chmod 555 /app/runner.mjs \
&& chown root:root \
/usr/lib \
/usr/lib64 \
/usr/lib/x86_64-linux-gnu \
/usr/lib/x86_64-linux-gnu/ld-linux-x86-64.so.2 \
/dev/pts \
/dev/shm \
/dev/mqueue \
/sys/fs/cgroup \
/counterlab-runtime \
&& chmod 0755 \
/usr/lib \
/usr/lib64 \
/usr/lib/x86_64-linux-gnu \
/usr/lib/x86_64-linux-gnu/ld-linux-x86-64.so.2 \
/dev/pts \
/dev/shm \
/dev/mqueue \
/sys/fs/cgroup \
/counterlab-runtime \
&& chown -R counterlab-codex:counterlab-codex /work/jobs /run/counterlab-codex \
&& chmod 700 /work/jobs /run/counterlab-codex

Expand Down
140 changes: 111 additions & 29 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,20 +11,30 @@ misconceptions in supported Jupyter notebooks. Its released Subject Packs cover
entity leakage and class imbalance/metric choice; it is not a generic notebook
copilot or an unrestricted code runner.

**Live judge surface:** <https://counterlab.cserules.workers.dev>
**Live judge surface:** <https://counterlab.cserules.workers.dev/judge>

The v6.1 learner UX is implemented locally on
`feat/learner-ux-v6.1`; it has not been pushed, deployed, or browser-qualified.
The public URL represents its separately recorded deployment and must not be
treated as running this branch.
`feat/learner-ux-v6.1` and has current local CloakBrowser evidence. It has not
yet been pushed, deployed, or qualified as one exact public source/image/Worker
tuple. The public URL represents its separately recorded historical deployment
and must not be treated as running this branch.

The first screen states the operating contract directly: CounterLab is a
**belief debugger, not a tutor or notebook linter**. Its visible sequence is
`State claim → lock Prediction → controlled test runs → result passes
verification`. GPT-5.6 proposes a bounded belief frame, Runtime Codex compiles
an allowlisted experiment plan, fixed kernels compute values, and the frozen
verifier decides whether evidence may be released. No live call begins on the
landing screen.

## Learner journey

CounterLab presents one six-stage path while preserving the existing scientific
state machine and authority gates:

1. **Question** — state a claim or attach a supported notebook. Sample prompts
are optional, and Judge Mode remains a secondary route.
are optional. **Start verified sample** and **Judge Mode** are the first
visible cold-user paths; claim testing remains available immediately below.
2. **Prediction** — review exact notebook evidence and the sanitized packet,
confirm that the two-model comparison captures the learner's view, then seal
an immutable categorical prediction and confidence.
Expand All @@ -48,11 +58,11 @@ local verification record is in

## Judge Mode

| Path | Mode | Meaning | Secrets required |
| --------------- | --------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------ |
| Verified sample | `sample` | Bundled approved leakage lesson evidence; clearly labelled, credential-free, and separate from live authority | No |
| Live notebook | `live_notebook` | Artifact-specific GPT analyst plus the authenticated Container runner, typed bounded artifacts, fixed scorer/kernel, frozen verifier, and copied-notebook patch | Server-side model and runner configuration |
| Verified replay | `replay` | Read-only reconstruction of stored events and payloads; persistently labelled and unable to make a new model call | No |
| Path | Session mode | GPT-5.6 / Runtime Codex | Numerical source | Mutability | May claim | Must not claim |
| --------------- | ----------------- | -------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------ |
| Verified sample | `sample_lesson` | No live call; reviewed Subject Pack framing | Integrity-checked bundled fixed-kernel fixture | Learner inputs may advance a new Sample session; the verified fixture is immutable | The scoped fixed Sample demonstrates the recorded mechanism | A live run, artifact-specific analysis, or newly calculated browser result |
| Live notebook | `live_notebook` | Server-side calls may occur only after supported upload, packet approval, and capability admission | Fixed scorer, kernel, and frozen verifier bound to that artifact | Explicit persisted state transitions; original upload remains read-only and patching targets a copy | The bounded artifact-specific result and provenance that actually occurred | Authority when capability is absent, an unsupported notebook result, or a Sample/Replay fallback |
| Verified replay | `verified_replay` | No new model or compiler call | Stored validated events and signed or integrity-bound payloads | Read-only | A reconstruction of the specific recorded verified session | A current rerun, a new configuration, or live capability |

Sample is not live and cannot enter a live session. Replay does not make a new
model call or borrow sample authority. The rejected compiler run authorized no
Expand All @@ -62,6 +72,14 @@ backed by a versioned, precomputed fixed-kernel fixture. It does not add an
arbitrary sample configuration matrix, and the browser never computes a
substitute authoritative result.

Visible source labels preserve that separation: learner-authored framing is
`Your input`; reviewed fixed framing is `Reviewed Subject Pack draft`;
`AI-suggested draft` appears only with genuine model provenance. During a live
test, `Generated planning`, `Fixed testing`, and `Verified result` are derived
from the real runner job kind and result-ready evidence. Artifact surfaces say
`Bundled sample artifact`, `Uploaded notebook`, or `Replay artifact`; a
route/session mode mismatch withholds proof instead of guessing.

## Supported notebook contract

CounterLab accepts `nbformat` 4 `.ipynb` files up to 10 MiB containing the
Expand All @@ -86,15 +104,36 @@ The server defaults to `OPENAI_MODEL=gpt-5.6` and
safety identifier, and resolves every evidence reference locally. Invalid,
unsupported, or unresolved output cannot advance state.

For supported live Belief Specs, the current source then runs a bounded
Learning Director over the same approved evidence. It may make at most four
read-only tool calls across three stateless Responses turns, ask at most one
optional fixed-choice clarification, and select only registered presentation
scaffolds, scene recipes, Boundary views, and candidate references. The fixed
question and answer labels are local UI copy; the model cannot author them or
veto learner-owned Belief Spec confirmation. Invalid Director output is omitted
while the deterministic learner flow remains available. It uses `store: false`
and the same hashed safety identifier. CounterLab persists only the validated
decision, tool hashes/durations, configured model and prompt identifiers, and
token totals; it does not persist provider response IDs or private reasoning.
The Learning Director cannot select the final experiment, compute values,
verify evidence, grade transfer, unlock Repair, or issue proof.

`OPENAI_BASE_URL` optionally selects a compatible Responses API endpoint. It is
server-only and may be configured as an HTTPS host root, a `/v1` base, or the
full `/v1/responses` endpoint; CounterLab normalizes all three to the SDK base
and never returns the endpoint in health, events, evidence, or browser state.

Before a live call, Studio shows the exact sanitized packet: concept routing,
claim, schema summary, support state, and bounded evidence excerpts. The learner
must approve that packet; sensitive-looking excerpts require a second explicit
confirmation. Editing the claim or artifact invalidates the approval.
Before a live call, Studio shows the exact sanitized packet envelope for both
the Belief Analyst and Learning Director: concept routing, claim, schema
summary, support state, bounded evidence excerpts, Subject Pack version, and
registered candidate references. One approval hash binds that envelope to the
resulting Belief Spec and any persisted presentation decision. Privacy
inventory covers every declared schema field before the visible 64-field cap;
declared-sensitive names and common identifier patterns are normalized and
redacted before truncation. The learner must approve that packet;
sensitive-looking or suppressed fields require a second explicit confirmation.
Editing the claim or artifact invalidates the approval. This remains heuristic
redaction, not a guarantee of complete de-identification.

### Runtime Codex generates

Expand Down Expand Up @@ -152,12 +191,34 @@ The complete authority matrix is in

## Architecture

Evidence release follows one bounded authority chain:

```text
Question / supported artifact
│
▼
sanitized packet ──► GPT-5.6 Belief Spec + bounded presentation plan
│
▼
Runtime Codex typed plan ──► fixed candidate scorer
│
▼
fixed kernel result ──► frozen verifier
│
▼
verified UI + Boundary Map + Proof Capsule
```

The proposal and presentation layers never supply numerical truth. A result
cannot cross the final boundary until the learner has sealed a Prediction and
the fixed evidence has passed verification.

```text
Vite React Studio
│ typed requests + reconnectable public events
Cloudflare Worker ── D1 sessions/jobs/event chain
│ └─ R2 private inputs/artifacts/results/patches/proofs
├─ Responses API (optional live analyst)
├─ Responses API (optional live analyst + Learning Director)
├─ stored sample/replay path
└─ Container-backed Durable Object
├─ Codex App Server over stdio JSONL
Expand Down Expand Up @@ -190,6 +251,14 @@ Required for local reproduction: Node 22+, pnpm 11.13.1, Python 3.12+, and the
locked dependencies. A Docker-compatible engine is required for local
Cloudflare Container development and for the advanced local adapter proof.

The two ready-to-use supported notebook fixtures are:

- `fixtures/notebooks/customer_churn_leakage.ipynb`
- `fixtures/notebooks/fraud_class_imbalance.ipynb`

Use them for the entity-leakage and class-imbalance live paths respectively;
do not treat them as evidence that arbitrary notebooks are supported.

```bash
cp .env.example .env.local
./scripts/clean-demo.sh
Expand Down Expand Up @@ -266,10 +335,10 @@ The current measured artifact is
- random accuracy 0.984722, group accuracy 0.594444, ablation accuracy 0.673611;
- group entity overlap 0;
- canonical result hash
`2501654264b9aa85b39fca944e585ff9b04263b83e182bc186d1f16464fee3b0`;
- 12/12 published critical mutations detected;
`a6ae7652e04e4d70196f991c63b8f7bcb3b76f8c4ab833d3ce2b626df0ab6c94`;
- 14/14 published leakage critical mutations detected;
- class-imbalance majority accuracy 0.989333 with 0 rare-class recall, and
12/12 imbalance mutations detected;
15/15 published imbalance mutations detected;
- held-out intake/routing 10/10 and fixed full-loop completion 7/8; the
Random Forest patch is explicitly outside the registered non-sample patch
contract;
Expand All @@ -288,7 +357,10 @@ Map, fixed transfer, patch lock, copied-notebook repair, Reasoning Diff v2,
Proof Capsule v2, resumable six-stage learner navigation, and privacy-safe
interaction evidence. Historical production evidence separately covers the
legacy sample/replay and hosted leakage/imbalance paths identified above. The
v6.1 CloakBrowser journey is specified but has not been executed.
v6.1 landing, Judge, proof-navigation, keyboard, and fixed-Sample journeys have
been executed locally with CloakBrowser at mobile and desktop sizes. Those
mutable-development checks are non-qualifying; the full matrix against one
exact public release is still pending.

Failed honestly: the first live Codex run used an unsupported SDK argument; two
repairs then left an unexpected `__pycache__`, so that run remained rejected and
Expand All @@ -310,20 +382,30 @@ The recorded local host App Server replay could inspect global skill files
outside its generation directory, so that replay remains labelled `PARTIAL`.
The hosted source-free Plan path is separate: credentials are staged only for
App Server initialization and revoked before the generated turn; generated
child commands receive neither model credentials nor signing authority. The
Container launch uses a fixed non-root UID, `setpriv --no-new-privs`, and write
constraints, but it has no
mount namespace or filesystem read allowlist. Hosted filesystem generation
read isolation is explicitly `PARTIAL`; formal sandbox proof is not claimed.
child commands receive neither model credentials nor signing authority. Current
source refuses a live launch unless the exact runner reports a pinned
Bubblewrap boundary with an allowlisted runtime mount set, a writable
generation workspace, missing repository/held-out/verifier paths, a fixed
non-root UID, and `no-new-privs`. That is source-level admission logic, not production evidence:
until a newly built exact image passes the sentinel and release qualification,
hosted live authority remains unavailable and no `OS_ENFORCED` deployment claim
is made.
See [docs/THREAT_MODEL.md](docs/THREAT_MODEL.md).

## How Codex accelerated the build

Codex helped implement and test the monorepo, then CounterLab used Codex itself
as a bounded runtime compiler. The real rejected trace exposed two product
contract defects: incomplete public SDK documentation and transient bytecode in
an exact-file workspace. The public contract was strengthened; a separate later
run verified successfully.
Build-time Codex helped map the monorepo, turn audit findings into focused
regressions, implement bounded UI and release slices, triage cross-language
failures, review authority drift, and keep the evidence documents synchronized
with executed checks. Changes were integrated as small independently reviewed
commits; a source test, deployment receipt, model call, or learner result was
never treated as successful without direct evidence.

That engineering role is separate from Runtime Codex inside CounterLab. Runtime
Codex acts only as a bounded Plan compiler. The real rejected trace exposed two
product-contract defects: incomplete public SDK documentation and transient
bytecode in an exact-file workspace. The public contract was strengthened; a
separate later run verified successfully.

Human decisions remained the product thesis, learner authority, concept scope,
fixture parameters, evidence contracts, verifier invariants, transfer design,
Expand Down
23 changes: 22 additions & 1 deletion apps/web/e2e/browser-authority.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,27 @@ export type BrowserAuthority =

type BrowserEnvironment = Readonly<Record<string, string | undefined>>;

export function validateCloakCdpEndpoint(configured: string): string {
const endpoint = new URL(configured);
if (!["http:", "https:", "ws:", "wss:"].includes(endpoint.protocol)) {
throw new Error(
"CLOAK_CDP_ENDPOINT must use an http(s) or ws(s) CDP endpoint",
);
}
if (endpoint.username !== "" || endpoint.password !== "") {
throw new Error("CLOAK_CDP_ENDPOINT must not contain URL credentials");
}
if (
!new Set(["127.0.0.1", "localhost", "[::1]"]).has(endpoint.hostname) ||
endpoint.port === ""
) {
throw new Error(
"CLOAK_CDP_ENDPOINT must use an explicit port on a loopback host",
);
}
return configured;
}

export function resolveBrowserAuthority(
environment: BrowserEnvironment,
): BrowserAuthority {
Expand All @@ -34,7 +55,7 @@ export function resolveBrowserAuthority(
return {
kind: "cloak",
evidenceLabel: "CLOAK_CDP_ENDPOINT",
endpoint,
endpoint: validateCloakCdpEndpoint(endpoint),
};
}
if (requestedAuthority !== STOCK_CHROMIUM_DESIGN_REVIEW) {
Expand Down
Loading
Loading