Training-data collection readiness¶
Note
Mirrored from docs/TRAINING-DATA-READINESS.md — edit the source, then run python3 bin/docs_build.py build.
This is the operator's runbook for the decision-time collection and export seam in
bin/training_data.py, and the readiness report that goes with it. The specification it
implements is tasks/kits/decision-improvement/TRAINING-DATA.md; where the two disagree, the
specification is the authority and this document is the defect.
The machine-readable half of this page is training_data.readiness_report(...), and its standing
form — the gates with no data behind them — prints from:
python3 bin/training_data.py readiness
What is not ready¶
Read this section before any other. The name of this page is readiness, and its own acceptance says the green suite behind it does not establish the thing the name suggests.
- No real decision has ever been captured. Every record this seam has ever held was invented
by a test or by
training_data.py demo, in a temporary directory that is deleted when the process exits. There is no production call site, so nothing has accumulated and nothing could have. - No real label has been adjudicated. Every reviewer id in every test is a made-up string, and
reviewer-not-authenticatedrides on every adjudication: a reviewer is a name and a source the module was handed, with no controller identity, no signature and no session behind either. - No dataset has been built from anything but a fixture. A manifest's digest establishes that nothing was altered after the export. It never establishes that the inputs were real — a correct digest is computable over a forged record.
- No collection target exists. No minimum sample count is asserted anywhere in the module and
none is invented here.
MAX_DATASET_EXAMPLESis a ceiling of 2000 examples that refuses past itself rather than trimming; there is no floor. It is a chosen bound, not a derived or measured one — an export is held in memory, digested whole and written as one file, so some ceiling has to exist, and the constant states what it is chosen against. A target comes from a pilot and learning curves on a separate development validation split, and nobody has run one. - No checkpoint exists.
CHECKPOINT_LINK_FIELDSnames what a later run would have to bind and every field isNone. There is no trainer here, nothing downloads or uploads a model, and revoking an example only ever identifies a checkpoint. - A green suite is not readiness. It says the mechanics work. A gate that reads
metover fixture records is a gate the fixtures opened.
Those statements are on the report itself as codes, not only here as prose. Every report carries
readiness_codes() unconditionally — D33's DATASET_NOT_ESTABLISHED plus these five — so a reader
holding a report never has to come back to this page to learn what it does not establish:
synthetic-fixtures-are-not-readiness
label-agreement-counted-not-calibrated
sampling-bias-not-estimable
checkpoint-link-is-a-forward-declaration
readiness-is-a-report-not-an-authorization
No branch can discharge one of them. They are on an empty report, on a partial one and on a complete one alike, which is what stops a disclaimer from quietly becoming conditional on a check that happened to pass.
Collection is off, and three separate facts say so¶
| Fact | Value | What it means on its own |
|---|---|---|
training_data.COLLECTION_ENABLED |
False |
the switch is shut; every entry point re-derives it at call time rather than capturing it in a default argument |
training_data.CAPTURE_WIRED |
False |
no production path calls the hook. This is a different fact from the switch |
a declared scope's eligibility |
defaults to "unknown" |
unknown use rights cannot persist a byte; only "approved" may |
Flipping the constants alone collects nothing. CAPTURE_WIRED is False because there is no
call site: no decision owner and no attempt owner invokes capture_hook, so a checkout with both
switches on still gathers nothing. Turning collection on therefore takes four acts, not three
— declare the scope, switch it on, write the caller, and then run something eligible.
With collection off, capture_hook does nothing at all. The evidence is not gathered, no artifact
is read, no digest is taken, no directory is created and no path is touched, because the hook takes
a callable rather than a payload. A host with the hook wired in behaves identically to a host
without it, which is what "disabled collection preserves legacy behaviour" has to mean to be worth
asserting.
The eleven gates and the eleven steps¶
readiness_gates() names the gates; runbook() names the steps; runbook() refuses unless the
steps cover the gates exactly. They are one authority, so the advice on this page cannot drift away
from the check behind it.
| # | Step | Gate it opens |
|---|---|---|
| 1 | declare the collection scope | scope-eligibility-approved |
| 2 | turn the switch on at the call site | collection-switched-on |
| 3 | wire the hook into a decision or attempt owner | capture-wired-to-a-caller |
| 4 | run the eligible authorized run, read the capture date back | records-captured |
| 5 | let the reader re-derive every record's digests | records-intact |
| 6 | have an independent reader adjudicate the cause | labels-adjudicated |
| 7 | check use rights against an explicit instant | retention-enforceable |
| 8 | build the evaluation manifest so related variants share a group | grouped-partition-assigned |
| 9 | build, write and read back the dataset | dataset-exported-and-readable |
| 10 | record the exposure yourself | exposure-recorded-in-the-eval-store |
| 11 | run a pilot and choose a collection target | collection-target-chosen |
A gate is met, unmet, or unknown. unknown is not unmet: it means the report could not
see the thing — no dataset was offered, no exposure log was given, no scope was passed. A report
that cannot see a gate says so rather than calling it clean.
Gate 11 is always unmet, and not because something is broken. Nobody has measured a target,
and a number chosen to close the gate would be exactly the arbitrary threshold this work refuses.
Step 10 is the one an operator skips¶
The export records no exposure in the evaluation store. build_dataset reads
workflow_eval's exposure log and writes nothing to it, because that store has exactly one writer
and training_data.py is not it. Every manifest carries the code
exposure-not-recorded-in-the-eval-store and names the remedy.
The remedy is yours to run:
workflow_eval.record_exposure(evals_dir, eval_manifest,
partition="development", purpose="development",
items=[...the item ids this export drew...],
by="you", note="training export <dataset id>")
The item ids are on the export's own manifest, at content.examples[].item, and
readiness_report(...) prints the ones with no entry in the log under
exposure.items_with_no_exposure_entry.
If you skip this step, the next held-out draw may silently overlap material a training export already spent. That is the failure the partition machinery exists to prevent, and it is the one thing on this page that no code in this repository can do for you.
The eligible-run scope¶
A scope is declared before anything is collected, never decided afterwards. Every field is required except the source restrictions:
- purpose — what the data may be used for, in at least three words. It is compared as TEXT against an export's declared purpose later, so two wordings of the same intent refuse each other and a wording that matches while meaning something else passes. A string comparison cannot read intent.
- retention_days — at least 1, at most 3650. Zero days is not a policy, it is an unanswered question.
- approval_ref — a reference produced by
attempt_ledger.make_ref. An unattributed scope cannot be withdrawn by whoever granted it. - eligibility — must be
"approved". The default is"unknown", and"unknown","refused","expired"and"revoked"all fail closed with nothing written. - source_restrictions — up to 16 bounded strings, carried onto every record.
An eligible run is one whose evidence that scope actually covers. Nothing here inspects a repository's licence, a customer agreement or a provider's terms; the scope is a declaration the operator makes and the module records.
What is bounded, and what redaction does not promise. A snapshot holds five closed input
fields, at most 8 entries each, at most 2000 characters per entry, at most 16 KiB per record —
refused past any of those rather than truncated, because a training input silently halved is a
corrupt example. What goes through bin/redact.py is input entries and the revocation reason —
each input entry's text and a revocation's reason, which is the whole of REDACTED_FIELDS — and
its findings ride on the record as {kind: count} beside the names of the fields they were
computed over: enough to see that something was caught, never enough to reconstruct it.
The question's wording and rubric are not redacted, and they reach the model's input file.
decision_contract.QuestionSpec.digest() is taken over the complete wording and rubric, so a
stored spec has to stay byte-exact or the digest beside it stops identifying it; _payload_line
copies that spec verbatim into payload.jsonl. A credential shape typed into a question wording is
therefore stored and exported as typed, and redaction.redactions — which covers the two fields
above and nothing else — will read {} for it. Every record carries redaction.fields,
redaction.not_redacted and REDACTION_SCOPE_NOTE so no reader has to infer that scope. What
keeps a question honest instead is that an operator authors it: it is a versioned contract object,
not text scraped off a run.
Shape-matching cannot prove absence even for the two fields it does reach: a password that looks like a word, a customer name or an address has no shape and is not caught.
Retention¶
expires_on is computed at capture from the scope's retention period and the capture date, and
recorded on the record. Nothing acts on it until someone asks:
eligibility_state(record, now=...)takes the instant explicitly and has no default clock. A retention verdict taken against whatever clock the reader happened to hold is not a verdict anybody can reproduce.- The expiry date itself is the last usable day; past it the state is
expired. - An expiry nobody could compute fails closed as
unknown, never as still-approved. - A revocation beats both, and it is terminal: an expired record is not renewed and a revoked one is not reinstated.
Revocation reach, read from REVOCATION_REACH rather than restated:
| Downstream artifact | Reach |
|---|---|
| export manifest | invalidated |
| derived dataset | invalidated |
| readiness report | invalidated |
| trained checkpoint | identified-only |
And four things revocation does not reach, on every tombstone unconditionally: trained weights are not unlearned, exported copies are not recalled, downstream artifacts are not rebuilt, and byte erasure is not proven. Deleting a file is not an erasure proof — this tree is distributed, cached and often backed up.
Destination restrictions¶
- Export is local only. No destination is contacted, no connection is opened, no byte leaves the machine, and no external transfer is part of this release.
- The
destinationargument is a declared string. It is recorded on the manifest and compared with nothing except the bounds on its length; thepurposeis what is compared against the scope. export_eligibilitydecides;build_datasetprevents. That distinction matters to an operator who calls the wrong one: the gate returns a verdict with refusal codes and carriesenforcement-not-providedunconditionally, while the exporter requiresstore_dirand lets no record with a non-empty refusal list reach a payload line. Calling the gate and ignoring its answer is possible; calling the exporter and getting an ineligible record out is not.- The export draws from one partition — the trainable one — and that name is checked against
workflow_eval.PARTITION_ROLESat call time. Held-out and single-use material refuses, and so does a source manifest with a group split across partitions: related variants of one defect on opposite sides of a split mean a held-out result was already solved in full view. - The manifest identifies content; it does not enforce access. What confines a reader is the
store's
0700/0600modes and whateverbin/exec_policy.pyreports, either of which may be absent on a given host.
Dataset quality checks¶
readiness_report(records, store_dir=..., now=..., dataset=..., eval_manifest=...,
exposure_dir=...) returns each of these, and each one says what it is not.
| Section | What it counts | What it does not establish |
|---|---|---|
records |
offered, unique, intact, and the permitted purposes seen | that any record describes a real run |
label_agreement |
statuses, supervised targets, corroborated and disputed heads, corrections, distinct reviewers | an inter-rater statistic; it is a count, uncorrected for chance, over reviewer names nobody authenticated |
category_coverage |
every cause class with its count, zero included | that a class with nothing in it is rare rather than unrepresented |
unknown_fields |
every dotted path that is absent, and the reference gaps | that an absent field is a zero — it never is |
resources |
records by completeness and by usage basis, never summed | a total; model-reported tokens, an estimate, a subscription proxy and an unpriced run answer different questions |
retention |
records by eligibility state, expiries nobody could compute, revoked ids | that the rights were checked against the right clock — you supplied it |
dataset |
included, excluded by code, targets, the selection policy | that the material is enough for anything |
duplication |
duplicates collapsed, groups, solo groups | which of the grouping rule's fallbacks produced a key; a group of one is recorded as a group of one |
exposure |
log entries, the items drawn, the ones with no entry | that anything was recorded — this module records nothing there |
sufficiency |
the ceiling | a floor; there is none |
Two further properties hold of every export and are worth checking on your own material:
- It is deterministic. The same records, the same source manifest and the same declared
provenance produce byte-identical files. Nothing reads a clock, a home directory or a set's
iteration order;
built_atandbuilt_byare passed in and sit outside the digest, so re-exporting the same material a year later gets the same dataset id. - The model's input and the audit metadata are two files sharing exactly one key — the example id they join on. Provenance, reviewer identity, label rationale, eligibility, resource bases and redaction counts are audit metadata: in a model's input they would be features, and a model that can read the bookkeeping can read the answer off it.
One deliberate absence: no action record reaches either file. The exported target is the adjudicated cause only. An action's outcome can currently be declared by a caller rather than derived from the attempt result, so exporting it would ship an assertion as a measurement; closing that needs an explicit basis field on the action record first.
Turning it back off¶
Set both constants back to False and remove the call site. Nothing is deleted, no record is
rewritten, and nothing is migrated. The store keeps whatever it already held:
python3 bin/runtime_data.py where # where the training store resolves
python3 bin/runtime_data.py forget --store training # lists; deletes only with --apply
The store lives outside this tree, is 0700/0600, is root-anchored in .gitignore, and has
never been tracked. It is also excluded from repair-context candidates automatically, because it is
registered through bin/runtime_data.py rather than resolved as a path by hand.
Future checkpoint links¶
A later run would have to bind its parent checkpoint, the dataset manifest it consumed, its recipe,
software and seed, its compute budget, its outcome, and its generation lineage. checkpoint_links()
names those fields and every value is None.
That is a forward declaration, not a capability. No checkpoint exists, this module cannot read
one, nothing here downloads, uploads, fine-tunes or evaluates a model, and naming the fields does
not make any of it reachable. When a revocation eventually names such an artifact, its reach stays
identified-only: the checkpoint is named and never unlearned.
Commands¶
python3 bin/training_data.py status # both switches, where the store resolves, how to enable
python3 bin/training_data.py taxonomy # the cause taxonomy, reconciled against the ledger's classes
python3 bin/training_data.py readiness # the standing gates, their remedies, what is not established
python3 bin/training_data.py demo # capture -> review -> export -> revoke -> refuse, in a temp dir
All four are offline. They contact nothing, spend nothing, and read no harness home. demo builds
its own temporary directory and removes it.
What this document is¶
It is authored prose about a mechanism, and it is not a stored record: nothing here was captured,
nothing is dated by a capture boundary, and nothing in this file may be read back as evidence about
a run. A readiness report generated from real material would be a separate artifact, held by the
operator who generated it — and a revocation would mark it invalidated, which is a statement
about it rather than an action on it.
One measurement note, because it surprises people. workflow_eval.assert_no_gain_claim sweeps a
document for token spellings that read as claims about performance, and this repository's own
directory name contains one of them. Any absolute path quoted out of this checkout therefore trips
the sweep. readiness_report(...) is swept and passes, because it carries the store's name and
never its path; the readiness command's payload is deliberately not swept, because status()
puts a resolved path in it. That is a limitation of a token match, disclosed rather than patched
around by widening an exemption.