Commit graph Weksa/crates/weksa/tests/golf_loop.rs
Author SHA1 Message Date
Weksa
caaa3b0650 Accepting is one write, pinned by a store that refuses its second write
Delete the source-shape tripwire for one put_prepared_batch; run_cache_over
lets a unit test run cycle over a CacheBackingStore failing write 1 or 2:
the round and the decision land together or not at all.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-10 07:55:11 +00:00
Weksa
5f97aad6a2 run: create removes the inventory copy when a later step fails
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-10 07:49:15 +00:00
Weksa
52e7c44990 rustfmt the new tests
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-10 07:11:04 +00:00
Weksa
c28f1fbb13 Pin the one-write accept: an injected run.cc write failure leaves neither round nor decision; tripwire on a second write
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-10 07:10:43 +00:00
Weksa
f1fc31e420 cycle: every rejection removes a stale candidate inventory an earlier attempt built
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-10 07:10:43 +00:00
Weksa
b0321fe487 Pin the last-edit word to the latest decision: a reject after an accept is told as rejected
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-10 07:10:43 +00:00
Weksa
467ce98ea0 Pin the head to the latest accept: two accepted cycles, the third builds on the second
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-10 07:10:43 +00:00
Weksa
d02029c8b8 Pin the Ladder release: a rejected candidate's score never reaches the editor, only the stepped head's
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-10 07:10:43 +00:00
Weksa
20ca3aaae5 Pin the noise floor: distinct replicates set the per-field and composite spread, and a gain inside it is no gain
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-10 07:10:43 +00:00
Weksa
afe1a1b434 create: copy the inventory with create_new, so a root that holds inventory.cc refuses and never truncates it
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-10 07:10:43 +00:00
Weksa
ae8deb1e03 weksa loop cycle: a Train-only editor proposes an inventory edit, a candidate round scores it, a Ladder-stepped noise-floor rule accepts or rejects on Validation
Reading, decide and LADDER_STEP are pure; Decision (weksa.loop_decision) holds
digests and numbers; the latest Accepted decision names the run's head. The
candidate round and its decision are one batch put.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-10 05:10:47 +00:00
Weksa
fc52f3d3a4 RoundRecord keys 16 inventory_digest and 17 cycle; round becomes the drift check, score_round and one put
An encode answer the port reports as InvalidData is that item's Refused(Parse),
not an aborted round.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-10 05:01:18 +00:00
Weksa
a14bcaf9f8 The run stops opening the caller's inventory store: create copies it to <root>/inventory.cc and pins its digest (key 11)
RunRecord.inventory is provenance only; open refuses Drift(Inventory) when the
run's own file differs. A run.cc from before has no key 11 and its open fails.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-10 05:00:34 +00:00
Weksa
2425030fe3 Pin the round-start discard: a stale packets.cc and lock in an unrecorded round dir do not refuse a revised draft
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-10 04:41:02 +00:00
Weksa
a014fc3f87 Pin the scored counts of the Dao round
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-10 04:15:57 +00:00
Weksa
3e1e1a07da Fix the golf_loop test that did not compile in the previous commit
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-10 04:15:00 +00:00
Weksa
fd0c3b0edb Round: means count a refused item as 0, a failed round discards its packets, the round line is pinned
Validation and Train means are over every item of the split with scored counts
beside them, so refusing a weak item cannot raise a mean. A round that fails
before its record is put (embedder down) removes its packets.cc, and a round
starts from none, so a rerun with revised answers is not refused as a changed
packet. RoundRecord::summary_line owns the printed line and is pinned with exact
values. The RoundRecord compile_fail doctest gives every field and fails on
E0451, with its twin literal in a lib unit test.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-10 04:14:39 +00:00
Weksa
8ac92f5af3 Kill the mutation survivors: error texts, unreadable files, the second round's number
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-10 04:04:36 +00:00
Weksa
49879000f7 run::round: a pinned run encodes Train and Validation, admits, lowers, scores and records the round
encode.rs reads a model answer into a PacketDraft (the one JSON door for
models) and the encoder step sets everything the model does not write. round
asks every offer first and writes nothing while any prompt is unanswered, then
admits into the round's own packets.cc, lowers, scores in one call and keeps a
RoundRecord with Train rows and Validation only as means and refusal counts.
The Dao stores reproduce the base scores (Train 44.18, Validation 78.56).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-10 03:50:04 +00:00
Weksa
77d8b13952 ModelPort and AnswerFiles; the encode prompt lists the live inventory and has a digest
The encoder's instructions are written, Prompt::encode takes the run inventory
and revision, and Prompt::digest names a prompt for AnswerFiles: a prompt with
no answer file is written to <digest>.prompt and nothing else happens.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-10 03:47:24 +00:00
Weksa
e7b4d9a68b RunStores is the one public producer of TrainItems and EncoderOffer: a run pins its corpus and entity stores by digest
TrainItems::from_corpus and EncoderOffer::for_round become pub(crate). RunStores
(run.rs) creates a run over three stores, records their canonical paths and
FNV-1a 64 digests plus the prompt and lowerer source digests in run.cc, and
reopens only from that record, refusing on drift. RunRecord and RoundRecord are
published CultCache types. tests/context.rs and the context.rs doctests move to
RunStores; the two mutated-clone gate cases become a unit test.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-10 03:45:49 +00:00