feat(ladder): plan-016 online promotion ladder — verifier-gated, per-tenant + system learning proven#2
Open
JayFarei wants to merge 9 commits into
Open
feat(ladder): plan-016 online promotion ladder — verifier-gated, per-tenant + system learning proven#2JayFarei wants to merge 9 commits into
JayFarei wants to merge 9 commits into
Conversation
…er + prereg boundaries Plan 016 supersedes the 014/015 offline bake-off framing with an online verifier-gated promotion ladder (loopcraft-forged). verify/ladder.sh is checksum-pinned and born-red at HEAD; prereg/ladder-boundaries.json is frozen before any episode so V0 ancestry holds. Includes plan 015 and the structured-learning design report the review ran against. Refs #1 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DsqpWFqTSQd9Py7gK4TqvF
Refs #1 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Refs #1 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Refs #1 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Refs #1 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
- replay: anchor V2/V6 to recorded world-state (assert mounted fingerprint == episode.snapshotHash and replay reproduces the committed answer before a replay/ablation counts as checked) so reproducibility, not just in-process determinism, is proven. - stateMachine.demote: reset live bookkeeping and archive pre-drift evidence so a demoted procedure re-earns promotion on fresh pairs instead of instantly re-promoting on pre-drift wins. - seed: abstain when a seed lands on a task other than its own (guards against a wrong-task serve being scored as a spurious win). - demo: measure the adversarial prose-in-string row's turns via ExecContext (no hard-coded constant); reword the masked prompt to reference the snapshot by fingerprint + record count (drop the false "records below" claim); record a promptHash tying each row to its on-disk prompt and assert masked prompts carry zero library tokens at generation. - REPORT: disclose the synthetic clock, the repeated-identical-traffic limit, the counterfactual nature of the inline-rederivation curve, and that only the decline half of cross-tenant earn-or-stay-put is exercised in the run. - tests: cover demote-reset and the promote-on-own-evidence system-learning branch. Refs #1 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DsqpWFqTSQd9Py7gK4TqvF
Re-stamps episodes.jsonl / REPORT / prompts with the commit that actually contains the generator, closing the review finding that evidence was stamped with a commit that could not reproduce it (commit generator first, run, commit artifacts second). Verifier GREEN on all 15 checks. Refs #1 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DsqpWFqTSQd9Py7gK4TqvF
Codex review F4: each procedure's pairs previously repeated one identical
task/query/answer, so the quarantine->shadow genericity rung and the V7:G1
post-promotion holdout passed on identical traffic (vacuous generalisation).
- TaskParam { asOf }: every pair instantiates its task on a distinct 'as of
the first N records filed' window (distinct query text, distinct answers
where the data supports it); records are filing-ordered so the window is a
prefix and inline cost varies with it (measured via scanPrefix).
- Genericity now counts DISTINCT query identities (queryKey) — identical
replays of one literal never advance quarantine->shadow; evidence records
distinctQueries.
- Holdout windows are strictly later than every promotion window, so the
post-promotion win-floor is earned on record windows never seen before
promotion.
- Seeds become window-capable (position-aware indexes: match positions,
first-occurrence maps, prefix sums) — one index serves the whole query
family, which is what makes the seed win distinct queries rather than one
memorised literal. Stale-clone control and probes updated likewise.
- Curves now cost each exposed episode against the masked row of the SAME
pair; per-window prompt files tied to rows by promptHash.
- Tests: 65 pass, including new 'identical replays never leave quarantine'
and distinct-traffic promote-on-own-evidence coverage.
Refs #1
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DsqpWFqTSQd9Py7gK4TqvF
Evidence now stamps 6247dce (which contains its generator): 281+220 episodes over distinct seeded windows, 10 distinct queries per promoted procedure (promotion windows 9-19, holdout 21-24 strictly unseen before promotion), answers varying with the window. Verifier GREEN 15/15. Refs #1 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DsqpWFqTSQd9Py7gK4TqvF
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #1
What this is
The plan-016 online promotion ladder, built end to end and gated by its own grounded verifier: a typed substrate (typed answer contracts, snapshot mount + drift fingerprints, measured-turn executor), a shadow-pair counterfactual harness (every pair runs exposed vs masked on the same query and snapshot, interleaved, with the masked arm's on-disk prompts provably free of library surface), and a verifier-gated promotion ladder (quarantine → shadow → candidate → promoted → deprecated) driven by pre-registered boundaries frozen in
prereg/ladder-boundaries.jsonbefore the first episode existed.Proof it works (re-runnable from this branch)
./verify/ladder.sh eval/ladder/runs/demo→ GREEN on all 15 checks, exit 0 (born red at plan creation,f4e378eee9). The evidence is committed; any reviewer can re-run the verifier against it, andpnpm ladder:demoregenerates it at the pinned commit. 65/65 vitest units pass.Key checks, each a frozen regression against a failure this repo shipped before:
src/diff and reaches a decisive terminal state.Per-user and system learning, shown in artifacts
alpha-open-high-count+alpha-open-topics-index; beta (orders) promotesbeta-delivered-sum+beta-open-regions-index. Divergent promoted sets from each tenant's own traffic; dashboard ineval/ladder/runs/demo/REPORT.md+curves.json(DL-per-intent, inline-rederivation curve, cumulative turns avoided).Honest boundary
The driver is a deterministic scripted policy over real mounted fixtures (
driver:"scripted"on every artifact; synthetic clock disclosed in the REPORT). Every number is measured by the executor (turns are paged store reads, never constants) and every probe is actually run. This PR proves the ladder mechanics; it does not claim helpers beat inline for a frontier model, nor that agent-authored procedures promote under live traffic (plan 016 P4, explicitly open).Review trail
Built via a staged multi-agent workflow: Opus build agents, Fable design gates re-observing each stage, Codex external code review (read-only sandbox). All confirmed findings fixed: replay anchored to recorded world-state (F1), demote resets live evidence (F2), prompt-hash row binding (F3), distinct-query holdout/genericity (F4, the load-bearing one), evidence regenerated at the commit containing its generator (F5), measured adversarial turns (F6), wrong-task seed guard (F7). Verifier and prereg are checksum-pinned and untouched since
f4e378eee9(0-line diff).Follow-ups (out of scope, tracked in #1 discussion): extend
verify/.checksumsto pin fixtures and seeds; exercise the promote half of cross-tenant suggestion in a live run; P4 (df.authoragent-authored candidates on live traffic).🤖 Generated with Claude Code
https://claude.ai/code/session_01DsqpWFqTSQd9Py7gK4TqvF