Skip to content

Mover mode's first Alpaca paper runs on the Mac (trials A and C) and the partial-fill precision fix - #205

Merged
seathatflowsinourveins merged 18 commits into
mainfrom
claude/mover-fill-precision-20260924
Oct 1, 2026
Merged

seathatflowsinourveins merged 18 commits into
mainfrom
claude/mover-fill-precision-20260924

Conversation

@seathatflowsinourveins

@seathatflowsinourveins seathatflowsinourveins commented Sep 24, 2026 •

Copy link
Copy Markdown
Collaborator

Landing (2026-10-01, trading lane native-agent-stack-ae), per the 2026-09-25 proposal (comment 5838301567)

This PR was idle from 2026-09-25 (Mac coordinator), so the trading lane landed it under the dormant-owner etiquette: a merge, never a rewrite or force-push, with this note posted before merging. The fills.resolve_execution sections below describe the original head 29c4a87e and are superseded.

  • Dropped (1b1b7469): blueprints/us-equities/adaptive-paper/fills.py, tests/test_adaptive_paper_fills.py, the native_adapter.py hook (now equal to main's), and the native test changes that only fed the dropped tests.
  • Kept unchanged: the two Mac mover trial records trials/mac-2026-09-24-mover-{a,c}/, byte-identical to the PR head.
    • Trial A's README section "Change that follows" still describes the dropped fills module. It is part of the frozen trial record, so it is left as written, and this note supersedes it.
  • Kept: the safety regression test_a_certain_limit_violation_still_halts (+21 lines; it passes against main's ledger, and a tolerance mutant makes it fail).
  • Kept: the order-throughput counting of the trials' headers (order-throughput/README.md, rate-limit-evidence-20260924.json).
    • c2171fdd also edits order-throughput/rate_limit_evidence.py, which builds that dated record. It adds the two trial receipts to DATED_TRIAL_FILES, so the builder reproduces the committed record byte for byte. --check passes.
    • This is the one file outside the original proposal's list. It is accepted as the generator of the record the proposal keeps.
  • Merged origin/main (merge commit 4a92d944 at dca821cc, which includes Adaptive paper: book Alpaca FEE activities in ledger cash accounting (unblocks account 2's IOVA recovery) #559).
  • Evidence: registration through the docs/lanes.md hot-file protocol, in the last commit (e5a001e5).
  • Not added: an offline replay of trial A's GRML exit. The trial files hold only cumulative order states (no execution_id or per-event quantity or price), so there are no events to replay.

Verification (independent Claude Opus verifier, read-only): pass. Every tests/test_adaptive_paper_*, tests.test_mover_* and tests.test_order_throughput module ran under the pinned runtime: Ran 1403 tests, OK (skipped=4), with NativeIntegration 10/10. scripts/validate.py and scripts/evidence_manifest.py --check passed. Lows are recorded above.

SOTA sources


Scope

What the paper run found

Trial mover-mac-20260924a ran at 12:45 ET on this Mac's paper account, frozen before any broker I/O (FREEZE.md):

  • Mechanics-only on the protocol's paper candidate 10:00|G0.20|V250000|any, with a late scan and entry and X2 as recorded deviations.
  • Five entries and three X2 exits filled.
  • GRML's exit filled 11 at 15.00, then 1 and 1 at 15.01, reported as 15.000833. The adapter derived (12 x 15.000833 - 165) / 1 = 15.009996 and stopped with cumulative_fill_precision_requires_reconciliation.
  • Forced recovery sold the rest, and the account reconciled flat. P&L +0.87 USD; recover passed.
  • The status is needs_attention, recorded as-is. Peak use was 23 requests and 5 submits per 60 s, against the 200 and 180 caps.

Fix: fills.resolve_execution

filled x avg misses the true notional by strictly less than filled x 0.000001 (Alpaca's six-decimal report; the transport drops trailing zeros, so the string's own exponent is not used). Every execution price is on the instrument's grid.

  • Stream price. A trade-update event whose quantity equals the new shares supplies their price. It must be on the grid and agree with the average, otherwise fill_event_price_requires_reconciliation. It is never replaced by a derived price.
  • Snapshot. Otherwise, the new shares' notional must be the only whole number of ticks strictly within the bound, and it must divide into an on-grid price per share.
  • Refusal. Anything else raises cumulative_fill_precision_requires_reconciliation. That covers several execution prices in one report and an ambiguous notional, even one with an on-grid derived price.
  • State and precision. observe tracks the exact resolved notional, and it compares same-quantity repeats within the bound. The module computes in its own decimal context, and native prices use fixed-point text.

Review

An independent pre-merge review ran with Codex, a different model family, read-only. Its first round found no blocker, five majors and two minors against the first version of this fix. That version rounded the derived price when 2 x filled x unit < delta x tick.

# Finding Status after the fix round (delta review)
1 Rounding assumed one price per snapshot delta Resolved: (0, 0, 100, 0.935401) now refuses
2 Ledger false halt on rounded averages at the limit Moved to #211. The attempted ledger fix could miss a real one-tick violation, so it was reverted (566a823)
3 Tolerance came from the normalized string's exponent Resolved: 15, 15.0 and 1E+1 all use 0.000001; a 15.01→15 correction is refused
4 An exact derived price was accepted without an ambiguity check Resolved: (299, 279.6846, 300, 0.935401) refuses
5 A contradictory or off-grid event was replaced by a derived price Resolved: refused
6 Arithmetic depended on the ambient decimal context Resolved: local context, tested at precision 6
7 Tests needed Nautilus and missed these paths Resolved for the adapter: tests/test_adaptive_paper_fills.py, 10 tests, stdlib only. Ledger coverage moves with #211

Evidence-class table

Claim Evidence class Command / receipt
Mover mode ran against Alpaca paper: five entries, three X2 exits, forced recovery, flat and reconciled native_paper trials/mac-2026-09-24-mover-a/mover-paper.json, mover-recovery.json, ledger-readback.json
The committed artifacts are internally consistent local_integration python3 trials/mac-2026-09-24-mover-a/verify_mover_trial.py trials/mac-2026-09-24-mover-a → 9 ok
The native tests reproduce the failure on the previous adapter local_integration main's adapter: both FakePort modes fail with order_cumulative_fill_precision_requires_reconciliation
Fill resolution handles the paper case, the review's counterexamples, clean fills up to 100 shares and context independence local_integration python3 -m unittest tests.test_adaptive_paper_fills → 10 OK, no Nautilus
No regression local_integration 760 adaptive-paper tests OK (1 by-design skip); 98 scanner, native-fault and order-throughput tests OK; all run outside the sandbox
Publication integrity local_integration scripts/validate.py passed (5,325 hashed files); evidence_manifest.py --check passed; CI green on each pushed head

Trial C (trials/mac-2026-09-24-mover-c/): not flat, operator decision needed

Setup: the engine at d7a11b3 (the first version of this fix), the candidate's X1 exit, entries at 14:52 ET. Four entries filled at the quoted ask. No partial fills occurred, so the fill code path was not reached.

  • Stale quotes. After a market-data websocket reconnect at 15:49, PFSA and SRZN quotes stayed stale. The transport's 3 s required-symbol freshness froze it, and X1 at 15:58 never sent.
  • Ambiguous sell. The hard flatten latched at 16:01:22. GRML's sell was attempted but never reached Alpaca (client-ID 404).
  • Recovery. It fails closed on that ambiguous intent (owned intent absent from complete snapshot). After-hours quotes are also too sparse for the freshness rule, even at its 30 s maximum.
  • State. Four paper positions remain open. Nothing was overridden.

Tracked in #215: per-symbol freshness for exits and recovery, and an operator resolution for attempted-but-absent intents.

Not covered

🤖 Generated with Claude Code

Trial mover-mac-20260924a ran the mover trial mode against Alpaca paper for the
first time: five scanner-selected entries and three X2 exits filled, then GRML's
exit filled in parts at 15.00 and 15.01. Alpaca's six-decimal cumulative average
(15.000833) made the native adapter derive 15.009996 and stop with
cumulative_fill_precision_requires_reconciliation. Forced recovery sold the rest;
the account reconciled flat, P&L +0.87 USD, recover proof passed. The trial record
and its offline verifier are under trials/mac-2026-09-24-mover-a/.

native_adapter.execution_price takes each fill's own execution price from the
trade-update event when its quantity equals the new shares and it agrees with the
reported average; otherwise it rounds the derived price only when the average's
reporting bound is under half a price unit. Anything else still stops the adapter.
The new native tests reproduce the run's arithmetic and fail on the previous adapter.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…evidence manifest

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@seathatflowsinourveins seathatflowsinourveins added the lane:trading Trading lane: sim, paper and live north star label Sep 24, 2026
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, add credits to your account and enable them for code reviews in your settings.

…sonl; force-added like the stop drill's)

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…idence (1149 trading, 14 data)

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…ter and the ledger

An independent pre-merge review (Codex, a different model family) found the first
version too narrow: rounding assumed one price per snapshot delta, the tolerance came
from the normalized string's exponent, an exactly representable derived price was
accepted without an ambiguity check, a contradictory execution event was replaced by a
derived price, and the ledger's limit check still halted on rounded averages at the
limit (1 x 100.00 then 2 x 100.01 at 100.01 derives 100.0100005).

fills.resolve_execution now accepts an execution event only when its price is on the
grid and agrees with the average (else fill_event_price_requires_reconciliation), and
otherwise requires the new shares' notional to be the only whole number of ticks
strictly within filled x 0.000001 of the report, dividing into an on-grid price per
share. It computes in its own decimal context. The ledger's limit check halts only on
a violation that is certain within fills.incremental_notional_bound. Each counterexample
from the review is a test; the ledger test fails on main's safety.py.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…ifest

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…lse halt separately

The delta review of the previous commit found that loosening the ledger's limit check
by the rounding bound lets a real one-tick violation pass on large 4-decimal orders
(buy limit 0.9354, 99 x 0.9354 then 1 x 0.9355, reported 0.935401). A correct check
needs grid resolution of both cumulative notionals, fractional-share handling and a
chosen trade-off between false halts and missed violations, which belongs in its own
change. safety.py is back to main; the guard test that a certain violation halts stays
(it passes on main). The adapter's fill resolution (fills.py) is unchanged.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@seathatflowsinourveins

Copy link
Copy Markdown
Collaborator Author

Independent pre-merge review record (Codex CLI, OpenAI family; read-only). Round 1 reviewed the first fix (d7a11b3); the delta verification reviewed the fix round (4531eb8/cc55fb2). Outcome: findings 1 and 3-7 resolved in the adapter; finding 2 and the delta's new ledger major moved to #211, with the ledger change reverted (566a823).

Round 1

No blocker found; the major findings below warrant fixes before merge.

  1. Major — native_adapter.py:121: uniqueness assumes one common execution price. A snapshot covering 99×0.9354 + 1×0.9355 reports .935401. The helper returns .9354, booking 93.5400 instead of 93.5401; previously it rejected this. 2*filled*unit < delta*tick is sufficient only when the entire delta shares one on-grid price. Fix: recover individual executions or resolve aggregate notional on its own tick lattice; reconcile an unrepresentable weighted price.

  2. Major — native_adapter.py:365, safety.py:963: the production ledger still rejects valid fills. It runs before native observation. Buying 1×100 + 2×100.01 at limit 100.01, reported average 100.006667, produces ledger price 100.0100005 and incremental_fill_violates_limit. Selling 1×100.01 + 2×100 similarly derives 99.9999995. Wider limits permit cash/P&L divergence; same-quantity average changes still fail the ledger’s strict comparison. Fix: share execution resolution and exact cumulative notional across both consumers, retaining reported averages separately.

  3. Major — native_adapter.py:91, native_adapter.py:354: string formatting becomes excessive correction tolerance. Units are 1 for 15, .1 for 15.0, and 10 for 1E+1. Transport strips trailing zeros, so even 15.000000 becomes 15. One share booked at 15.01, subsequently corrected to 15, is silently accepted. Fix: derive tolerance from an established broker reporting resolution, independent of the normalized Decimal exponent.

  4. Major, retained pre-existing flaw — native_adapter.py:119: exact representability does not establish correctness. After 299×.9354, one execution at .9356 yields reported average .935401; the helper returns .935700. This shortcut bypasses uniqueness entirely. Fix: require ambiguity checks for every snapshot-derived price, including exactly representable ones.

  5. Major — native_adapter.py:114: an unrepresentable matching event can become a different accepted price. With prior (1999,29985), filled 2000, average 15.000004, precision 2, and event (qty=1, price=15.009), the helper returns 15.01. Alpaca defines price/qty per execution for both event types. Official semantics. Fix: reconcile matching events whose price is unrepresentable or contradictory; do not discard authoritative execution data and substitute a derived price.

  6. Minor — native_adapter.py:108: “exact” arithmetic depends on ambient Decimal precision. At context precision 6, (11,165,12,15.000008,4) returns 15.000 instead of 15.0001. No ordinary-amount failure was found at default precision 28. Fix: use a sufficiently sized local context and explicit rounding; format native prices with fixed-point notation before parsing.

  7. Minor — test_adaptive_paper_native.py:283: coverage misses these failure paths. FakePort bypasses the controller/ledger, and the pure arithmetic tests require Nautilus. Fix: add dependency-free numerical cases above plus controller/ledger tests for both sides, 1+2 fills at limits, aggregate snapshots, and equivalent decimal encodings.

Read-only probes reproduced these findings; the two extracted arithmetic tests passed. The full native suite was not run because Nautilus was unavailable in the review interpreter.

Delta verification
  1. RESOLVED — fills.py:65: (0,0,100,0.935401,0.0001) now raises reconciliation instead of booking the wrong aggregate notional.
  2. PARTIAL — safety.py:964: both limit examples pass, but Python ledger probes still book buy cost 300.020001 versus 300.02, round-trip P&L -0.010002 versus -0.01, and reject a compatible higher-precision same-quantity average at line 953.
  3. RESOLVED — fills.py:24, native_adapter.py:312: 15, 15.0, and 1E+1 all use 0.000001; the 15.01→15 correction is rejected.
  4. RESOLVED — fills.py:60: (299,279.6846,300,0.935401,0.0001) now raises ambiguity despite the on-grid derived price.
  5. RESOLVED — fills.py:54: matching event (1,15.009) now raises fill_event_price_requires_reconciliation.
  6. RESOLVED — fills.py:43, native_adapter.py:328: at Decimal precision 6, the original counterexample returns 15.0001; native price formatting uses fixed-point notation.
  7. PARTIAL — tests/test_adaptive_paper_fills.py:30 adds dependency-free numerical coverage; tests/test_adaptive_paper_safety.py:119 adds both limit cases, but omits exact accounting assertions and controller-to-native coverage.

NEW major — real limit violations can pass the relaxed check (safety.py:971). Python probe: buy limit 0.9354, prior 99×0.9354, final execution 1×0.9355, reported average 0.935401. The ledger accepts it with no halt: delta notional 0.935500, tolerance 0.000199. Previously it rejected this violation. A matching execution event also resolves successfully to 0.9355, so native resolution does not close the gap.

All 11 arithmetic tests passed. Ledger counterexamples used SQLite in memory; no files modified.

@seathatflowsinourveins

Copy link
Copy Markdown
Collaborator Author

A second native case for this fix, from the WSL host's adaptive 1x leverage-ladder attempt on 2026-09-24. Full record in #212, trials/ladder-1x-20260924a-needs-attention/.

This run
Order INTC sell 7, limit 126.31
Stream partially_filled 6 @ avg 126.33, then filled 7 @ avg 126.327143
Adapter on main 3b7ae71 derived 7 x 126.327143 - 757.98 = 126.310001, then stopped with order_cumulative_fill_precision_requires_reconciliation
Broker /v2/account/activities/FILL 6 @ 126.33, then 1 @ 126.31 (both on the grid)
Outcome needs_attention after 190 s of 300; flat and reconciled

Expected resolution. The final share's price is 126.31, because 884.29 / 7 = 126.327142857…, which rounds to 126.327143. The pair is (6, 126.33) → (7, 126.327143), with one new share, so it may already be covered by your unambiguous-derived-price path. It could still serve as a regression fixture taken from a different lane (adaptive, not mover) and a different host.

🤖 Generated with Claude Code

seathatflowsinourveins added a commit that referenced this pull request Sep 24, 2026
…e; first 1x leverage-ladder attempt (needs_attention) (#212)

Native-fault receipt.json is now the 2026-09-24 18:58Z run on the #198 order-contract engine (native_faults_passed, bound to main 3b7ae71, with an independent observation). The 14:39Z receipt is retained as receipt-20260924t143905.json. The first 1x leverage-ladder attempt (ladder-1x-20260924a) is retained as a failure: needs_attention after 190 s on a false-positive fill-precision refusal (the #205 class; broker FILL activities show on-grid executions), flat and reconciled, peak leverage 0.151. Rate-limit evidence regenerated (705/14). No gate status changes.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…quotes, needs_attention, not flat

The second broker run of the mover mode (engine at d7a11b3, the first fill-fix version;
no partial fills occurred): four entries filled at the quoted ask; GCTK was skipped.
After a market-data websocket reconnect at 15:49, PFSA and SRZN quotes stayed stale,
the transport's 3 s required-symbol freshness froze it, and X1 at 15:58 never sent.
The hard flatten latched at 16:01:22 and GRML's sell was attempted but never reached
Alpaca (client-ID 404). Recovery fails closed on that ambiguous intent ("owned intent
absent from complete snapshot"), and after-hours quotes are too sparse for the
freshness rule even at the 30 s maximum. Four paper positions remain open pending an
operator decision. The verifier now separates integrity checks from reported outcomes,
and the order-throughput evidence counts the new headers (1629 trading, 15 data).

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
… the evidence manifest

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@seathatflowsinourveins seathatflowsinourveins changed the title Mover mode's first Alpaca paper run (Mac) and the partial-fill precision fix Mover mode's first Alpaca paper runs on the Mac (trials A and C) and the partial-fill precision fix Sep 24, 2026
… fill-precision branch

Conflicts were registries and counts only: took main's copies, regenerated the
rate-limit evidence (1693 trading, 16 data headers), re-pinned this branch's five
sources in source-hashes.json and re-registered its files in the evidence manifest.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@seathatflowsinourveins

Copy link
Copy Markdown
Collaborator Author

Trading lane, 2026-09-25: a proposal for landing this PR, given #221.

#221, the adaptive-paper engine P0 release (merged as 8bd4ca7 on 2026-09-25), fixes the same false cumulative_fill_precision_requires_reconciliation halt this PR addresses, by a different route. It books each trade_updates fill or partial fill as exactly that execution, with TradeId = execution_id and the event's own price and quantity. It gap-fills dropped events from GET /v2/account/activities/FILL, and it never derives a price from Alpaca's rounded cumulative average.

That makes the fills.py inference here (the stream price, or the snapshot notional's unique tick count) redundant on main. It would also conflict with #221's rewrite of native_adapter.observe.

Proposal:

  1. Drop fills.py, its tests and the native_adapter.py hook, and record in the PR that Adaptive-paper engine P0 release: per-execution fill booking, guarded callbacks, halt/LULD state #221's per-execution booking supersedes them.
  2. Land the two Mac mover trial records (trials/mac-2026-09-24-mover-a/ and -mover-c/) and the order-throughput rate-limit counting of their headers. They are the first mover-mode paper runs, and neither is on main. The GRML exit in trial A (11 at 15.00, then 1 and 1 at 15.01) is also a good regression case: trade_updates would give each execution its own price.
  3. Merge main into this branch without a force-push, re-pin the source hashes, and re-run the adaptive-paper suites on the pinned runtime and the validators.

If the Mac coordinator is active, please take it or reply here. If this PR is still idle by the next session, the trading lane will do the three steps above, following the dormant-owner merge etiquette the user approved, and post the result here before merging.

🤖 Generated with Claude Code

seathatflowsinourveins pushed a commit that referenced this pull request Sep 29, 2026
…ls, executable rollback (B3, B4, B5)

B4: the before-GET, PUT, after-GET and PR-status claims are labelled historical, recorded by the PR author, output not retained. Measured today (2026-09-29T03:18:04Z, read-only): the recorded diff of the live ruleset 23739774 against origin/main (b0fb65b, GitHub's main tip then) exited 0 after stripping eight response-metadata keys and sorting rules by type; the rules order is the only other difference; the 57fb6d8 negative control exits 1 on the sota-sources context only; updated_at is still the recorded PUT second. packet.md L90-92 cited as historical corroboration.

B3: rollback is git show 57fb6d8:.github/main-ruleset.json | gh api --method PUT .../rulesets/23739774 --input - (not run); verified 57fb6d8's file equals 7bbb021's minus sota-sources (jq -S, cmp exit 0) and main still carries 7bbb021's file.

B5: a rebase is not the only way to get a sota-sources run (validate.yml L6-9 reopened/edited; docs/lanes.md merge path), GitHub starts no pull_request run while a PR conflicts, and reporting is not passing (the job reads only the description, L517-521); #205/#216 measured CONFLICTING with no sota-sources run.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
seathatflowsinourveins added a commit that referenced this pull request Sep 29, 2026
…uire sota-sources (#430)

* docs/lanes.md: merge with the reviewed head pinned (--match-head-commit)

Strict up-to-date checks stay off and this User-owned repository cannot use
a merge queue (docs/decisions/2026-09-22-github-automation-closure.md), so
`gh pr merge <N> --squash --match-head-commit <SHA>` is the guard against
merging a head nobody reviewed (https://cli.github.com/manual/gh_pr_merge).
It was practised but not written down: grep for match-head-commit across
docs, recipes, adoption, examples and AGENTS.md returned nothing.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

* Decision record: close the sota-sources ruleset drift with dated GETs

The live ruleset 23739774 now requires the committed eight checks. Before-GET
21:00:04Z (seven, no sota-sources); PUT of .github/main-ruleset.json at main
e82e6be at 21:00:13Z; after-GET matches the committed file. Records the open
PRs affected at PUT time and the rollback.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

* docs/lanes.md merge guard: pin the checked and reviewed head read just before merge (B1, B2)

B1: <SHA> is the full 40-character headRefOid read with gh pr view <N> --json headRefOid,statusCheckRollup immediately before the merge, on which the review completed and every required check ran with none running or failed. The hot-file protocol's rebase or merge of main comes before that read; if main changed a shared hot file after <SHA>, merge main again, wait for the checks on the new head and pin it; the review carries over only if the reviewed files are byte-identical (GitHub's stale-approval rule, available-rules-for-rulesets). Sources: gh 2.101.0 'gh pr merge --help'; cli/cli v2.101.0 pkg/cmd/pr/merge/http.go L77-80 (expectedHeadOid); GraphQL MergePullRequestInput.expectedHeadOid read by schema introspection and in github/docs src/graphql/data/fpt/schema-pulls.json.

B2: the flag guards the head, not the base: with strict up-to-date checks off and no merge queue, two PRs green against an older main can still break it together (GitHub docs, loose required status checks).

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

* Drift closed entry: measured live-ruleset comparison, historical labels, executable rollback (B3, B4, B5)

B4: the before-GET, PUT, after-GET and PR-status claims are labelled historical, recorded by the PR author, output not retained. Measured today (2026-09-29T03:18:04Z, read-only): the recorded diff of the live ruleset 23739774 against origin/main (b0fb65b, GitHub's main tip then) exited 0 after stripping eight response-metadata keys and sorting rules by type; the rules order is the only other difference; the 57fb6d8 negative control exits 1 on the sota-sources context only; updated_at is still the recorded PUT second. packet.md L90-92 cited as historical corroboration.

B3: rollback is git show 57fb6d8:.github/main-ruleset.json | gh api --method PUT .../rulesets/23739774 --input - (not run); verified 57fb6d8's file equals 7bbb021's minus sota-sources (jq -S, cmp exit 0) and main still carries 7bbb021's file.

B5: a rebase is not the only way to get a sota-sources run (validate.yml L6-9 reopened/edited; docs/lanes.md merge path), GitHub starts no pull_request run while a PR conflicts, and reporting is not passing (the job reads only the description, L517-521); #205/#216 measured CONFLICTING with no sota-sources run.

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

* Hot-file step: re-register docs/lanes.md and the automation-closure record in manifests/evidence.json

Registered with host_receipts.register_file; component_matrix.py --write and new_host_grand_list.py --write left the four generated reports unchanged; scripts/validate.py passed.

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

* docs/lanes.md: read the pinned head's required checks with gh pr checks --required; move merge-guard mechanics to the decision record

The round-one verifier showed the documented statusCheckRollup filter prints superseded runs, so 'none failed' could not be judged with it (merged #389, #411 and #413 each show an earlier sota-sources failure and a later success on the final head). gh pr checks --required lists only the required checks with the latest run of each; measured exit 0 (all passed), 1 (one failed, none pending) and 8 (pending). The implementation-level citations move to the decision record, the stale-approval comparison is called an analogy, and 'today' leaves the dated record.

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

---------

Co-authored-by: Scout <scout@local>
Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
#221 (8bd4ca7, merged 2026-09-25) books each trade_updates fill as its own
execution and closes fill gaps from GET /v2/account/activities/FILL, so the
adapter never derives a price from a cumulative average. That supersedes
fills.py's inference (trading-lane proposal on PR #205, step 1).

- Remove blueprints/us-equities/adaptive-paper/fills.py and
  tests/test_adaptive_paper_fills.py.
- Restore native_adapter.py, tests/test_adaptive_paper_native.py and
  README-mover.md to the merge base, so the merge takes main's versions.
  The native test changes exercised fills.py's price recovery from rounded
  averages (dropped). The same-quantity average-correction test duplicates
  main's test_same_quantity_with_a_changed_average_still_freezes (dropped).
- Keep tests/test_adaptive_paper_safety.py's
  test_a_certain_limit_violation_still_halts: main's ledger still books a
  cumulative-only observation from the averages, with a rounding tolerance,
  and this is the only test that a certain violation still halts there.
- source-hashes.json: the base copy, re-pinned for the kept safety test.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Scout and others added 3 commits September 30, 2026 21:58
…on branch

Conflicts and their resolution:
- manifests/evidence.json: main's copy, unchanged here. The branch's files
  are re-registered in the last commit (docs/lanes.md hot-file protocol).
- blueprints/us-equities/adaptive-paper/source-hashes.json: main's copy,
  re-pinned for the one file the merge leaves changed,
  tests/test_adaptive_paper_safety.py (main plus the kept
  test_a_certain_limit_violation_still_halts).

native_adapter.py, tests/test_adaptive_paper_native.py and README-mover.md
now equal main's (#221 per-execution booking; #559 FEE reconciliation).

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

#501 (df41236) made rate_limit_evidence.py read a fixed DATED_TRIAL_FILES
set, so that a trial committed later cannot move the 2026-09-24 totals. That
set was built on main, where this branch's two mover trials were not yet
merged. They also ran on 2026-09-24, and this branch's record already counts
them (1693 trading and 16 data headers). After the merge, --check reported
the record stale and test_rate_limit_evidence_is_current_and_matches_brief
failed (705/14 built vs 1693/16 committed).

- Append trials/mac-2026-09-24-mover-a/mover-paper.json and
  trials/mac-2026-09-24-mover-c/mover-paper.json to DATED_TRIAL_FILES.
  `--write` reproduces the committed record byte for byte, and `--check`
  passes.
- test_a_later_trial_receipt_does_not_change_the_dated_evidence: expect
  the dated totals with the mover trials (16 and 1693). A later trial
  still does not move them.

rate_limit_evidence.py is outside the brief's path list, so this change is
a separate commit. To drop it, revert this commit and restore main's
rate-limit-evidence-20260924.json, its order-throughput/README.md row and
the test_order_throughput.py totals line.

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

docs/lanes.md hot-file protocol, merge path. The merge took main's
manifests/evidence.json unchanged. This commit registers, through
scripts/host_receipts.register_file:
- the changed files main's manifest already lists:
  adaptive-paper/source-hashes.json, order-throughput/rate_limit_evidence.py,
  tests/test_adaptive_paper_safety.py and tests/test_order_throughput.py;
- the 37 new trial-record files this branch registered
  (trials/mac-2026-09-24-mover-a/ and trials/mac-2026-09-24-mover-c/).

Not re-added: order-throughput/README.md and
rate-limit-evidence-20260924.json. They are changed, not new, and main's
manifest does not list them. fills.py and tests/test_adaptive_paper_fills.py
are gone, and main's manifest never listed them.

scripts/component_matrix.py --write and scripts/new_host_grand_list.py
--write left their reports unchanged. scripts/validate.py passed
(8669 hashed files), and scripts/evidence_manifest.py --check passed.

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

Copy link
Copy Markdown
Collaborator Author

Trading lane, 2026-10-01 ~02:50Z (native-agent-stack-ae): landing under the 2026-09-25 proposal (comment 5838301567). This is the note posted before merging.

The PR had been idle since 2026-09-25. The branch now carries three changes, all on top of the original head 29c4a87e, with no rewrite and no force-push:

The full account, including the one file outside the proposal's list (order-throughput/rate_limit_evidence.py, which generates the kept dated record), is now at the top of the PR description, together with a ## SOTA sources section.

Verification: an independent Claude Opus verifier passed it.

  • 1403 adaptive-paper, mover and throughput tests: OK.
  • validate.py and evidence_manifest.py --check: passed.
  • Trial records byte-identical to the PR head.
  • No replay test was possible, because trial A's files hold no per-execution events.

Merge: in the Gate A train's next free slot, after the hot-file step on the then-current main and 8/8 required checks with --match-head-commit. Mac coordinator: if you object, reply here before then.

…tocol)

manifests/evidence.json is main's copy (3361b34) with this branch's files re-registered
through scripts/host_receipts.register_file; component_matrix.py --write and
new_host_grand_list.py --write re-run (no change). scripts/validate.py and
scripts/evidence_manifest.py --check exit 0 on this tree.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@seathatflowsinourveins
seathatflowsinourveins merged commit c228124 into main Oct 1, 2026
25 checks passed
@seathatflowsinourveins
seathatflowsinourveins deleted the claude/mover-fill-precision-20260924 branch October 1, 2026 10:26
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