Repository navigation
Separate extended-hours paper startup readiness from order freshness - #1097
Merged
seathatflowsinourveins merged 4 commits intoOct 14, 2026
Merged
seathatflowsinourveins merged 4 commits into
seathatflowsinourveins merged 4 commits into
Conversation
This was referenced Oct 13, 2026
seathatflowsinourveins
deleted the
foundation/paper-extended-hours-start-readiness
branch
October 14, 2026 03:09
This was referenced Oct 14, 2026
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.
Scope
Extended-hours paper starts can fail at the REST benchmark gate or pause on
sparse benchmark quotes despite a ready preceding preflight. Add a strict
opt-in
extended_hours_start_readinessblock: a 30-second startup window andfive-second selected-benchmark health threshold throughout the extended-hours
stage, while strategy/ledger/order
wire freshness keeps the shipped three-second bound. Defaults, RTH starts,
standalone preflight and recovery retain their existing behavior.
329985de1c8dccf0df7491373d0d9932eaa723d4lane:tradingvalidation helper, focused tests, README/decision and hash registrations.
unit. New PRE operating bindings use the landed code, never an edit to the
protected frozen runtime.
SOTA sources
Evidence-class table
Local commands run
Round-1 tests (all idle scope, scratch outside operating roots):
An initial system interpreter attempt lacked the required exchange-calendars
package (two import errors); the SDK-free result above uses the configured
Python with CI calendar dependencies and no broker/native SDKs.
Initial implementation evidence retained below:
The initial test import aliased existing TestCase classes, adding seven unrelated
tests to discovery; that harness counting issue was corrected before production
edits. The final base/head counts above are from the isolated module. Test HTTP
and submit boundaries are mocked; no broker, credential, GO, unit or shared-state
call. All scratch and logs are outside protected operating roots.
Decision record
docs/decisions/2026-10-13-extended-hours-paper-start-readiness.mdThe exact 30/5 integer block requires the coordinated extended-hours session
flags and applies to actual PRE/POST paper only. Read-only REST polling is
bounded and re-establishes account/flat proof after waiting; every GET retains
the existing request ceiling and observers. Selected benchmark stream readiness
uses five seconds with vendor-time aging; asset quotes and final order pricing
retain their shipped bounds. The native outer connection cap becomes40 only
for this registered30-second transport so it cannot truncate the inner wait.
Defaults remain10. The REST and stream readiness phases each have their own
30-second bound; no throughput or guaranteed entry is claimed.
Round-1 corrects the CC's P2-1..P2-5 and P3-1 plus the local request-budget P2.
The readiness block is omitted from the next-trial frozen trading signature;
exact-byte recovery remains strict. Opted PRE starts refuse when their duration,
cleanup and existing60-second allowance cross09:30ET. Five-second health and
watchdog behavior is stage-long. Poll cadence reserves five final snapshot GETs
within the unchanged50-request ceiling, including a30-symbol universe ready at22s.
A request-bound SafetyError yields not_started with zero orders. Deadline/STOP,
polling and final snapshot refresh have SDK-free CI tests; optional real SDK/native
tests retain their declared runtime requirements. Assets are read once before polling.
Round-2 resolves Astra's durable-window blocker. Opted readiness broker and
data GETs reserve through existing Ledger.request_budget before HTTP in a
retained root-local request-only journal. The same configured total request cap
governs its trailing60s window; refused starts and retries retain reservations.
Successful startup replays opted data_read rows into the trading ledger too.
Default broker/data accounting is unchanged; no trial, order or position is
created in the request-only journal. Synthetic/real-SDK fixtures assert all12
requests (read9/data_read3) in both windows. Exhausted-window and main-wiring
tests require zero additional GETs on each retry.
Fail-before at9cc5c204: adopted review probe's three-test selection rc1 with
two failures (read9 instead of read9/data_read3; exhausted window permitted
GETs), default-policy case passed. Separate actual previous-main source control
fails at the final HTTP boundary with exhausted-window GET assertion. Fixed
five-module carry413 OK; final readiness/continuity/exploratory-admission43 OK;
SDK-free readiness18 OK/skipped2 declared integration tests. All tests are bounded
idle-scope synthetic/local integration, no broker or operating-state calls.
Current-date validation after UTC midnight reports rc1 solely for the unchanged
claude-fable-5-1 currency record: its landscape check is older than7 days while
the model release is older than42 days. The currency bytes are identical at
9cc5c20 and this fix, and the actual model_currency_problems predicate reproduces
the same refusal for both. No date override or currency edit is part of this fix.
Host evidence
Private operating receipts are summarized in the decision with their limits;
their local paths/digests stay in coordination. No new paper execution,
broker acceptance or qualification result is claimed. Readiness does not turn
an old quote into an executable price and can still end with no signals.
Checklist
Follow-ups
The final test-only correction pins the request-bound/no-state fixture to RTH.
At87bc349f that test fails under PRE/POST and passes under RTH/CLOSED; at9cc5c204
it passes all four sessions. With the pin it passes under all four outer-session
controls. This fixture targets the invocation-bound receipt, not opted durable
journal creation, whose separate tests retain PRE coverage. Runtime code is unchanged.