Skip to content

Mover coverage asof re-collection (R-NOW-1): frozen plan, runner, E2 totals; E1 blocked on pinned private inputs - #485

Merged
seathatflowsinourveins merged 6 commits into
mainfrom
claude/mover-asof-recollection-20260929
Sep 29, 2026
Merged

seathatflowsinourveins merged 6 commits into
mainfrom
claude/mover-asof-recollection-20260929

Conversation

@seathatflowsinourveins

Copy link
Copy Markdown
Collaborator

Summary

This is roadmap move R-NOW-1. The 2026-09-28 mover research (#463, merged as 11648f9a) found that the v1/v2 candidate set covers 498 of 594 verified +20% events, 83.8% against the protocol's 95% bar. The suspected cause is that bars were keyed by today's symbol, so a reused ticker resolves to its current holder.

Commits (not rebased; see Evidence reachability):

  1. 6fb6ddb2 freezes plan.json before any fetch.
  2. 291c9909 adds the runner, README and synthetic tests under the frozen plan.
  3. 2f32494f adds the post-hoc F2 identity totals outside N2 (labelled post hoc; no estimand changes).
  4. 99dfec7c keeps classify outputs independent of the git revision.
  5. 7e749b63 adds the E2 run totals, the E1 gate refusal and the manifest registration.

Results

E1, the primary estimand: NOT RUN. It would give covered/594 and a reason class for each of the 96 misses. The gate refused with inputs_missing and sent 0 requests, because the three pinned private inputs (sha256 7e8b6999…, afe22552…, e8ea2dc3…) are not on this host. They are probably on the host that ran the 2026-09-24 study, which is unverified. The runner documents the exact E1 procedure once the inputs are copied in with sha256 checks.

E2, the secondary estimand: RAN. All validity conditions held: the KOD/LFCR positive control passed, the classify re-run was byte-identical, and no row fell in the holdout. Record: blueprints/us-equities/mover-coverage-asof/evidence/summary-asof-20260929.json.

  • The 715 package events are dated 2021-01-04 to 2025-12-31. N2 = 594, and it equals the committed tier counts exactly in every tier.
  • The frozen candidate rule on the as-of F1 bars passes for 594 of 594 N2 events.
  • F2 (each event's own symbol as of 2026-09-21) returns the same issuer's row for 594 of 594; another issuer 0, no row 0.
  • What this means: on the re-derived set, neither the touch rule on as-of data nor a reused ticker accounts for any event. That is consistent with the as-of route recovering the misses. But E2 cannot identify the 96, cannot show that N2 is the same event set as the committed 594, and does not substitute for E1.

Evidence reachability

  • The evidence cites commit revisions, so this PR is not rebased.
  • 6fb6ddb2, 291c9909 and 99dfec7c are protected by annotated receipt-revision/<sha8> tags, pushed 2026-09-29 following the repository's existing convention. They stay reachable after the squash merge deletes the head branch.
  • If manifests/evidence.json conflicts, it is resolved by merging origin/main under the docs/lanes.md hot-file protocol (the merge path), not by a rebase.

SOTA sources

  • Alpaca historical stock bars: the asof, feed=sip and adjustment parameters, at https://docs.alpaca.markets/reference/stockbars. The pinned client is alpaca-py 0.44.0 (catalogs/us-equities/runtime-target.json).
  • The frozen v1 study code reused unchanged: blueprints/us-equities/mover-early-entry/ (candidate rule and coverage), and the Mover v3 publication guard (totals only; no sealed file opened).

Checks

  • Independent stack-verifier: approve. It confirmed that plan.json was committed before the runner and results, that the tests pass, that validate.py exits 0, that the committed totals equal a recount of the private outputs, and that nothing per-event or private is in git.
  • Run as a systemd-run --user unit (CPUWeight 20, nice 10, MemoryMax 8G), with read-only market data on key pair 1.

Residuals

  • (a) E1 is blocked on the pinned inputs. (b) E1's fetch() has never run live. (c) The 1016 KB memory peak systemd reported is implausible and is not a measurement. (g) An upstream evaluate.coverage() leaves file handles open (a ResourceWarning); it is unchanged.

🤖 Generated with Claude Code

Scout and others added 5 commits September 28, 2026 21:51
Preregisters the as-of re-fetch of the mover-early-entry coverage misses
(594 price-verified +20% events, 498 present, 96 missing): the reproduction
gate, request shapes (F1 as of the event date, F2 as of the 2026-09-21
naming date), the frozen candidate touch rule, reason classes, labels,
tolerances, holdout and publication guards, and the secondary E2 estimand.
This commit is the freeze: no request has been sent under this plan.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…zen plan

refetch.py runs plan.json (sha256 5a5937e1...): gate reproduces
evaluate.coverage() on the three pinned private inputs and refuses
without them; fetch (E1) and e2 request SIP daily bars and auctions as of
the event date (F1) and as of 2026-09-21 (F2) plus the KOD/LFCR control,
after checking the whole request plan against the 2026-01-02..2026-09-18
holdout; classify applies the frozen touch rule in IEEE double, the
reason classes, flags and exact-rational labels on the provider's
decimal text; publish writes totals only after a structural scan.

It reuses audit.py (Client, official_close_v2, event_gain, split_factor,
verdict_for, load_events, credentials), evaluate.coverage and rules
tiers (loaded lazily, numpy), sessions_io.official_price and
corporate_actions.py. TextClient keeps audit.Client's pacing, retries
and pagination but keeps page text and records 5xx, network and
pagination failures as errors (audit D7).

Tests: 33 synthetic cases, written first (failing run: refetch.py
missing), then passing under the pinned 3.12.3/numpy 2.5.3 interpreter;
system python3 3.13 without numpy runs 28 and skips 5.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… revision

After the first E2 classify, every N2 event came back same_issuer from
F2. That total is only meaningful if the identity test can also say
other_issuer, so classify now reports F2 identity totals for the package
events outside N2 as well, labelled post hoc (it changes no estimand),
and records the code revision it ran at. The fetch snapshots are
unchanged; classify and verify rerun on them offline.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ision

2f32494 put the classify-time code revision into summary.json, so a
verify at any later commit (for example after a merge) would compare
unequal bytes and exit 3, although the snapshots and results were
unchanged. That breaks plan outputs.determinism: classify and summarize
read only the sealed snapshots. The revision now lives in verify.json,
and publish copies it into the committed block. A new test makes the
verify commit differ from the classify commit; it fails on 2f32494
(exit 3) and passes here.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ation

Run asof-20260929 under plan.json 5a5937e1 (freeze 6fb6ddb):

- E1 (primary) did not run: the gate refused with inputs_missing and sent
  no request, because the three pinned private inputs (audit results
  7e8b6999, candidates afe22552 and e8ea2dc3) are not on this host. No
  covered/594 figure is reported.
- E2 (secondary) ran in the systemd user unit asof-20260929-e2
  (CPUWeight=20, Nice=10, MemoryMax=8G, paper key pair 1, market data
  only; fetch code 291c990): result success, exit 0, 4 min 21.8 s. It
  sent 3,585 requests, all HTTP 200. N2 = 594, with the committed
  per-tier counts exactly. The frozen touch rule passes for 594 of 594
  on the as-of F1 bars, and F2 as of 2026-09-21 returns the same issuer
  for 594 of 594 (post hoc: other issuer for 4 of the 121 events outside
  N2). The KOD/LFCR control passed, a second classify at 99dfec7 was
  byte-identical, and no row falls in the 2026-01-02..2026-09-18 holdout.

evidence/summary-asof-20260929.json holds totals only and was written by
refetch.py publish. The README gives the results and what E2 cannot
show. The five new files are registered in manifests/evidence.json with
host_receipts.register_file; scripts/validate.py exits 0.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…publication schema)

One repair round for the review of 7e749b6, added on top. The existing
commits and their receipt-revision tags are untouched.

- classify_e2 computed the gain before it checked leg status, so an auction
  503 with valid bars became verdict=match inside N2. E1's leg check is now
  shared (new_vintage_gain). E2's symbol walk (e2_source) stops at the first
  symbol with a failed raw, split or auction leg, and the event becomes
  fetch_error (audit D7), so it never enters N2. The gain of each N2 event
  is asserted equal to the one assess() computes on the same legs.
- estimand_block trusted verify.byte_identical without provenance. It now
  counts the second classify only from a verify.json of this plan (by
  sha256) and this estimand that reports byte_identical and recorded the
  sha256 of the results, labels and summary now on disk, while summary.json
  names the snapshots now on disk. A summary.json of another plan or
  estimand is refused, and the verify's revision is carried only from a
  matching verify.json.
- scan_public enforces an explicit totals-only schema (PUBLIC_SCHEMA). It
  refuses unexpected keys and symbol-like keys, for example
  {"labels": {"ZZQA": ...}}.
- New tests cover the E1 gate refusals for mismatched candidate files and
  an unreproduced coverage. Each stops before any credential read,
  corporate-action run or request. A harness control shows that a passed
  gate does reach the credentials.
- README: "every request" is scoped to price requests, because E1 also
  calls /v1/corporate-actions. The readings and a repair record are added.

The tests came first. On 7e749b6 the new tests gave 34 assertion failures
(subtests included) and no errors. Items 4 and 5 have no old-code failure.
Now tests.test_mover_coverage_asof runs 51 tests OK under the pinned
Python 3.12.3 with numpy 2.5.3, and 51 with 6 numpy skips under
Python 3.13. scripts/validate.py exits 0. test_evidence_manifest (5),
test_validate (58), test_host_receipts (180), test_component_matrix (63)
and test_new_host_grand_list (36) pass.

The retained E2 run was recomputed offline with the repaired code
(refetch.py sha256 cdac9973). None of the 716 tried symbols has a failed
raw, split or auction leg. results, labels and summary came out
byte-identical to the retained files. A re-publish is byte-identical to
evidence/summary-asof-20260929.json (sha256 1258bd04), and validity still
stands. The committed totals and plan.json are unchanged. README.md,
refetch.py and the test module are re-registered in manifests/evidence.json.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@seathatflowsinourveins

Copy link
Copy Markdown
Collaborator Author

Repair round for the GPT-6 review (gpt-6-astra, effort max, read-only, head 7e749b63, changes-needed with 2 must-fix, 2 should-fix and 1 nit). All of it is fixed in 28a611b3, as one new commit. Nothing was rebased, and the tagged evidence commits 6fb6ddb2, 291c9909 and 99dfec7c are unchanged ancestors.

  1. A failed raw, split or auction leg can no longer qualify an event for N2. A shared new_vintage_gain helper applies assess()'s check; such an event becomes fetch_error, outside N2.
  2. verify.json is accepted only when it matches. Its kind, plan sha256, estimand, byte_identical and the recorded output and snapshot hashes must all equal the files on disk; a stale or unrelated file is refused.
  3. scan_public enforces an explicit aggregate-only schema and rejects symbol-like keys. The review's {"labels":{"ZZQA":…}} probe is now refused.
  4. E1 refusal tests cover mismatched candidate hashes and a failed coverage reproduction. In both, the credentials are never read and 0 requests are sent.
  5. README now says "Every price request"; the corporate-actions call is named.

Checks:

  • tests.test_mover_coverage_asof: 51 OK under the pinned interpreter, 51 OK (6 NumPy tests skipped) under the default one. 34 failures, counting subtests, on 7e749b6.
  • validate.py passed.
  • The committed E2 totals are unchanged: the repaired classify, recomputed offline from the retained snapshots, reproduces summary-asof-20260929.json byte-for-byte (1258bd04…), and validity.stands stays true. 0 legs in the committed run were non-ok.
  • Independent stack-verifier: pass.

Under the bounded-review rule there is one review and one repair, with no second review round.

@seathatflowsinourveins
seathatflowsinourveins enabled auto-merge (squash) September 29, 2026 06:57
@seathatflowsinourveins
seathatflowsinourveins merged commit 703b2bd into main Sep 29, 2026
25 checks passed
@seathatflowsinourveins
seathatflowsinourveins deleted the claude/mover-asof-recollection-20260929 branch September 29, 2026 07:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

lane:trading Trading lane: sim, paper and live north star

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant