Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
5 changes: 3 additions & 2 deletions docs/adr/0002-decision-model-and-rl-environment.md
Original file line number Diff line number Diff line change
Expand Up @@ -124,13 +124,14 @@ The list leaves out models above 10 billion parameters and models built on a bas

A trained model should replace the base model only when a repository administrator approves it. The evaluation command writes a report with two numbers to compare against the base model on the test set: the mean reward, which should be higher, and the calibration error, which should not be worse. The command does not record a promotion decision or serve a model.

The customer-operated, single-node reference Replica decision runtime records that decision outside Hub. It accepts a taskset, tracks a job bounded by update, wall-time, and required credit limits, writes authoritative connector usage with the immutable candidate and durable job, and serves only the candidate an operator explicitly promotes. Promotion and rollback require the generation the operator read; the connector compares and advances that generation atomically, preserves exact idempotent retries, and appends every successful decision. A deterministic fixture backend runs this lifecycle without a GPU or external model download. Fixture candidates are for development and tests only and cannot be promoted in production. The real local backend trains d1-omni on NVIDIA CUDA or Apple silicon MPS and serves the verified pinned base model plus the promoted adapter; CPU mode is inference-only and does not claim model-quality validation. Provider-neutral infrastructure contracts separate taskset and artifact access, durable jobs and leases, candidates and promotion generations, training, inference, credentials, and usage reporting. Local and hosted implementations must preserve tenant and repository scope, hard-budget failure behavior, and restart recovery, and pass the same conformance suite.
The customer-operated, single-node reference Replica decision runtime records that decision outside Hub. It accepts a taskset, tracks a job bounded by update, wall-time, and required credit limits, writes authoritative connector usage with the immutable candidate and durable job, and serves only the candidate an operator explicitly promotes. Promotion and rollback require the generation the operator read; the connector compares and advances that generation atomically, preserves exact idempotent retries, and appends every successful decision. A deterministic fixture backend runs this lifecycle without a GPU or external model download. Fixture candidates are for development and tests only and cannot be promoted in production. The real local backend trains d1-omni on NVIDIA CUDA or Apple silicon MPS and serves the verified pinned base model plus the promoted adapter; CPU mode is inference-only and does not claim model-quality validation. Provider-neutral infrastructure contracts separate taskset and artifact access, durable jobs and leases, candidates and promotion generations, content-free copy inventory and deletion receipts, training, inference, credentials, and usage reporting. Local and hosted implementations must preserve tenant and repository scope, hard-budget failure behavior, consent-withdrawal revocation, restart recovery, and the same conformance suite.

## Consequences

- Teams can train on their own review outcomes without sending them anywhere they did not choose.
- Teams can practice and test the complete lifecycle with a deterministic backend before spending GPU budget. Its report proves the orchestration and scoring path, not real-model quality.
- A taskset copies screenshots and learning text. It lives under `.replica/` in a checkout, or outside any checkout. When someone withdraws training consent, `replica-learning` lists the export the taskset came from, and the owner must delete the taskset too.
- A taskset copies screenshots and learning text. It lives under `.replica/` in a checkout, or outside any checkout. The runtime records its source export, permitting grants and purposes, review and evidence digests, connector reference, retention metadata, and derived candidates and reports without copying raw evidence into receipts. Withdrawal revokes new and current runtime use before connector deletion begins.
- Runtime deletion cannot prove deletion from infrastructure outside its configured connectors. Operators must separately clear customer-derived model and trainer caches, merged weights, external registries, backups, and provider logs. Unmodified shared base models are not customer-derived copies.
- The Builds file holds screenshots of every published Build of each reviewed prototype. The operator should delete it after writing the taskset.
- A "follows" label rests on the reviewer's check of the fix, which may have covered one width and theme. The other screenshots of that page count as fixed unless a later thread reports the same theme there.
- A "breaks" label can still be wrong when the reviewer found the problem after scrolling, opening a menu, or resizing the window to another width, because the screenshots show each page as it first loads at two widths. Older Builds that kept light screenshots only give "follows" labels alone.
Expand Down
4 changes: 3 additions & 1 deletion docs/decision-model.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,4 +91,6 @@ See [Train d1-omni-600M](../packages/learning/environments/brand-check/README.md

## 4. Run the customer-specific model in the reference runtime

The [single-node reference runtime](../packages/learning/environments/brand-check/README.md#run-the-single-node-reference-runtime) runs the complete job, candidate, promotion, rollback, and inference lifecycle on customer-controlled infrastructure. Its default deterministic fixture backend is for development and tests only and remains ineligible for production promotion. Install the optional model dependencies and configure `--d1-model` to train d1-omni on NVIDIA CUDA or Apple silicon MPS, keep only the adapter and evaluation report in runtime storage, promote it explicitly, and serve the pinned base model plus that adapter. CPU mode supports an opt-in forward-pass smoke check and low-volume inference, not real training or a model-quality claim.
The [single-node reference runtime](../packages/learning/environments/brand-check/README.md#run-the-single-node-reference-runtime) runs the complete job, candidate, promotion, rollback, inference, disclosure, and consent-withdrawal deletion lifecycle on customer-controlled infrastructure. Its default deterministic fixture backend is for development and tests only and remains ineligible for production promotion. Install the optional model dependencies and configure `--d1-model` to train d1-omni on NVIDIA CUDA or Apple silicon MPS, keep only the adapter and evaluation report in runtime storage, promote it explicitly, and serve the pinned base model plus that adapter. CPU mode supports an opt-in forward-pass smoke check and low-volume inference, not real training or a model-quality claim.

The runtime records content-free provenance for tasksets, candidates, and reports. An authenticated deletion request can select copies by source export, permitting grant, evidence digest, or taskset digest. It revokes use first, cancels matching jobs, removes connector-backed copies, and keeps a durable receipt until every item is deleted or retained for a documented legal reason. Operators remain responsible for copies outside those connectors, including trainer and serving caches, merged weights, external model registries, backups, and provider logs.
4 changes: 2 additions & 2 deletions packages/learning/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ The output directory must be new and, inside a checkout, under `.replica/`. It h

| File | Contents |
| --- | --- |
| `taskset.json` | The export it came from, task counts for each split and label, and how much evidence it skipped and why |
| `taskset.json` | The export and export digest it came from, permitting grant IDs and purposes, review and evidence digests, task counts for each split and label, retention metadata, and how much evidence it skipped and why |
| `tasks.jsonl` | One task per line: its split, images, the questions, labels for the yes-or-no questions the evidence answers, and where the labels came from |
| `images/` | A copy of each screenshot, and of the image `--brand-sheet` names, which every task then shows first as a reference |

Expand All @@ -243,7 +243,7 @@ The command skips evidence it cannot turn into a label, and reports each reason:
| `renderings-incomplete` | The page lacks a screenshot at one width or theme, so it gets no "breaks" label |
| `learning-over-limit` | More than 64 learnings were accepted, and recall ranks this one below the first 64 |

The [single-node reference Replica decision runtime](environments/brand-check/README.md#run-the-single-node-reference-runtime) is customer-operated. Its authenticated API registers private content-addressed tasksets, tracks cancellable jobs with hard credit and time limits, stores immutable candidates with authoritative connector usage, requires generation-checked promotion or rollback, and serves the promoted result through an authenticated scoring endpoint. Durable job limits, usage, promotion history, and idempotency records survive restart. The fixture proves the lifecycle without a GPU or model download, but its candidates are development/test-only and cannot be promoted in production. Provider-neutral [infrastructure connectors](environments/brand-check/README.md#replace-the-infrastructure) separate tasksets, artifacts, durable jobs and leases, candidates and promotions, training, inference, credentials, and usage reporting so local and hosted implementations can share one conformance suite.
The [single-node reference Replica decision runtime](environments/brand-check/README.md#run-the-single-node-reference-runtime) is customer-operated. Its authenticated API registers private content-addressed tasksets, tracks cancellable jobs with hard credit and time limits, stores immutable candidates with authoritative connector usage, requires generation-checked promotion or rollback, and serves the promoted result through an authenticated scoring endpoint. It also discloses content-free runtime copy metadata and accepts idempotent consent-withdrawal deletion requests. A deletion revokes readiness, inference, promotion, uploads, and new training first; cancels matching jobs; removes or retention-tombstones tasksets, candidates, and reports through their connectors; and remains pending until every copy is gone or has a documented legal reason. Durable job limits, usage, promotion history, privacy receipts, and idempotency records survive restart. The fixture proves the lifecycle without a GPU or model download, but its candidates are development/test-only and cannot be promoted in production. Provider-neutral [infrastructure connectors](environments/brand-check/README.md#replace-the-infrastructure) separate tasksets, artifacts, durable jobs and leases, candidates and promotions, privacy inventory and deletion receipts, training, inference, credentials, and content-free usage reporting so local and hosted implementations can share one conformance suite.

## Local storage

Expand Down
1 change: 1 addition & 0 deletions packages/learning/environments/brand-check/.dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@
!README.md
!*.py
!server/*.py
!examples/runtime_deletion_demo.py
Loading
Loading