Repository navigation
Conversation
Pin read-only FuseControl main engine (46a86eed) by content digest 12e9b502367a4993d0c36e75ac5c8d24acaee2d1247c5b594796d5adda04ca45 with spec/bundle/freeze metadata, provenance, and SH-1 entry-gate record.
- Add VendoredFuseEvaluator with runtime hash, spec_version, __pycache__ verification, and V2 boolean hwm_adjusted gate - Enforce structural StubEvaluator quarantine and OA-SH2-2 default lock - Add atomic state_snapshots/ restart continuity across runs - Isolate US 23/5 16:00 ET close and post-21:00 ET boundary (Item 13) - Add secret-free GCP Cloud Run Jobs us-east1 entrypoint (Item 18) - Add D1-D10 demo, SH2-A01..A14 acceptance suite, and full unit tests
- Remove unlock_production_override and forbid fixtures_dir in prod. - Require strict booleans and yahoo_symbol_map XSOX in prod config. - Lock check_forward_clock_credit defaults for SH-2 production chains. - Drop fabricated sources/returns in build_fuse_validated_inputs; wire live corporate_action events into FUSE-1 V2 and enforce NO-NEW-RISK and per-fund sizing isolation. - Persist pending O1/O2 rejected-day row state and fuse_context for bit-for-bit replay across rejected and normal sessions. - Reject Tiingo row.timestamp midnight markers, non-daily Yahoo charts, and mismatched calendar spec_digest overrides. - Stage state snapshots inside atomic ledger commit hooks with rollback and deterministic reconciliation, and add .chain.lease.json cross-instance fencing (CLI exit 4, Cloud Run maxRetries: 0).
|
@codex review |
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
Security findingsAdvisory findings (12)
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 6691b07910
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
🛡️ Codex Security Review · Automatically triggered
Here are some automated security review suggestions for this pull request.
Reviewed commit: 6691b07910
ℹ️ About Codex security reviews in GitHub
This is an experimental Codex feature. Security reviews are triggered when:
- You comment "@codex security review"
- A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review
Once complete, Codex will leave suggestions, or a comment if no findings are found.
- Require exact immediately preceding trading session close via resolve_previous_trading_date and target_prior_date. - Allow same-session O1 clearing_period retries without double advancing counters while preserving base_prior_row_state. - Reject non-production or missing config_path in check_forward_clock_credit. - Switch Cloud Run CSI driver to gcsfuse.run.googleapis.com. - Bind evaluator.next_row_state_sha256 into canonical ledger records and enforce ledger-digest + monotonic latch checks on snapshots.
Pin pending_rejected_state.json base_prior_row_state strictly to the committed seq-1 state across 2+ consecutive O1/O2-rejected days so intervening rejected runs do not overwrite base_prior_row_state with uncommitted intermediate state. Pass expected_base_session_date into load_pending_rejected_state_snapshot and bound monotonic counter steps (L5, O1, V4, V5) by elapsed calendar days from the committed baseline while keeping un-committed latch downgrades and arbitrary counter jumps fail-closed. Refresh pinned production code/policy hashes in docs/sh2-acceptance-pack.md and add multi-day V4 clearing regression coverage in tests/test_sh2_pipeline.py.
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 0dc148a208
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
🛡️ Codex Security Review · Automatically triggered
Here are some automated security review suggestions for this pull request.
Reviewed commit: 0dc148a208
ℹ️ About Codex security reviews in GitHub
This is an experimental Codex feature. Security reviews are triggered when:
- You comment "@codex security review"
- A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review
Once complete, Codex will leave suggestions, or a comment if no findings are found.
Address all four Codex review findings on ShadowResearch#7: - ledger: allow valid 10th-session V4 clearing inside pending_rejected_state.json when elapsed days reach >=10 while blocking premature clearing and invalid counter >=10. - scheduler: add _retire_superseded_pending_rejected_state and call it across every return path of committed snapshot reconciliation so interrupted post-commit unlinks clean up on retry. - feeder: share _validate_tiingo_official_close_row between select_tiingo_row and extract_prior_close_from_tiingo_bytes to reject extended/overnight markers and off-close session_time values. - scheduler/cloudrun_job/docs: require external history authentication (expected_prior_head_sha256 / SHADOW_TRUSTED_HEAD_SHA256 or bitcoin_merkle_roots / SHADOW_BITCOIN_MERKLE_ROOTS_PATH) before reusing non-empty production ledger history (CLI exit 3 on failure). - docs/tests: refresh pinned production code/policy hashes and add positive and negative regression tests across all four fixes.
|
@codex review |
|
Codex Review: Didn't find any major issues. 👍 Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
There was a problem hiding this comment.
🛡️ Codex Security Review · Automatically triggered
Here are some automated security review suggestions for this pull request.
Reviewed commit: a5599c5af8
ℹ️ About Codex security reviews in GitHub
This is an experimental Codex feature. Security reviews are triggered when:
- You comment "@codex security review"
- A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review
Once complete, Codex will leave suggestions, or a comment if no findings are found.
Fail closed with production_genesis_unauthenticated on empty SHADOW_DATA_DIR unless expected_prior_head_sha256 matches GENESIS_PREV_HASH (Codex Security PRRT_kwDOV2RNAc67knPD), blocking wiped-bucket replay and updating acceptance hashes and tests.
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 0800291e30
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
🛡️ Codex Security Review · Automatically triggered
Here are some automated security review suggestions for this pull request.
Reviewed commit: 0800291e30
ℹ️ About Codex security reviews in GitHub
This is an experimental Codex feature. Security reviews are triggered when:
- You comment "@codex security review"
- A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review
Once complete, Codex will leave suggestions, or a comment if no findings are found.
AI Code Review (opencode /
|
Require explicit current record_sha256 or external BTC roots on same-session retries, fetch prior trading close via live Tiingo lookback for FUSE genesis, reconcile uncommitted staged state snapshots, and narrow native FUSE input detection.
|
@codex review |
|
Codex Review: Didn't find any major issues. Breezy! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
There was a problem hiding this comment.
🛡️ Codex Security Review · Automatically triggered
Here are some automated security review suggestions for this pull request.
Reviewed commit: 2639145d8b
ℹ️ About Codex security reviews in GitHub
This is an experimental Codex feature. Security reviews are triggered when:
- You comment "@codex security review"
- A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review
Once complete, Codex will leave suggestions, or a comment if no findings are found.
Require SHADOW_TRUSTED_HEAD_SHA256 on all recurring and retry production runs (even when BTC roots are provided, closing PRRT_kwDOV2RNAc67m4A-), and pin pending_rejected_state.json with SHADOW_TRUSTED_PENDING_STATE_SHA256 (closing PRRT_kwDOV2RNAc67m4BM).
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: cedaf69e3b
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
🛡️ Codex Security Review · Automatically triggered
Here are some automated security review suggestions for this pull request.
Reviewed commit: cedaf69e3b
ℹ️ About Codex security reviews in GitHub
This is an experimental Codex feature. Security reviews are triggered when:
- You comment "@codex security review"
- A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review
Once complete, Codex will leave suggestions, or a comment if no findings are found.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 3bc694f600
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
🛡️ Codex Security Review · Automatically triggeredSecurity review completed. No security issues were found in this pull request. Reviewed commit: Only the user who started this review can view the report in Codex. ℹ️ About Codex security reviews in GitHubThis is an experimental Codex feature. Security reviews are triggered when:
Once complete, Codex will leave suggestions, or a comment if no findings are found. |
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e1dd173b0f
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
🛡️ Codex Security Review · Automatically triggeredSecurity review completed. No security issues were found in this pull request. Reviewed commit: Only the user who started this review can view the report in Codex. ℹ️ About Codex security reviews in GitHubThis is an experimental Codex feature. Security reviews are triggered when:
Once complete, Codex will leave suggestions, or a comment if no findings are found. |
|
@codex review |
🛡️ Codex Security Review · Automatically triggeredSecurity review completed. No security issues were found in this pull request. Reviewed commit: Only the user who started this review can view the report in Codex. ℹ️ About Codex security reviews in GitHubThis is an experimental Codex feature. Security reviews are triggered when:
Once complete, Codex will leave suggestions, or a comment if no findings are found. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 36ecc1a946
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex review |
|
Codex Review: Didn't find any major issues. Delightful! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
🛡️ Codex Security Review · Automatically triggeredSecurity review completed. No security issues were found in this pull request. Reviewed commit: Only the user who started this review can view the report in Codex. ℹ️ About Codex security reviews in GitHubThis is an experimental Codex feature. Security reviews are triggered when:
Once complete, Codex will leave suggestions, or a comment if no findings are found. |
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ddb89b0b6b
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
🛡️ Codex Security Review · Automatically triggered
Here are some automated security review suggestions for this pull request.
Reviewed commit: ddb89b0b6b
ℹ️ About Codex security reviews in GitHub
This is an experimental Codex feature. Security reviews are triggered when:
- You comment "@codex security review"
- A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review
Once complete, Codex will leave suggestions, or a comment if no findings are found.
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ca05cbef3a
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
🛡️ Codex Security Review · Automatically triggered
Here are some automated security review suggestions for this pull request.
Reviewed commit: ca05cbef3a
ℹ️ About Codex security reviews in GitHub
This is an experimental Codex feature. Security reviews are triggered when:
- You comment "@codex security review"
- A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review
Once complete, Codex will leave suggestions, or a comment if no findings are found.
|
@codex review |
|
Codex Review: Didn't find any major issues. Nice work! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
🛡️ Codex Security Review · Automatically triggeredSecurity review completed. No security issues were found in this pull request. Reviewed commit: Only the user who started this review can view the report in Codex. ℹ️ About Codex security reviews in GitHubThis is an experimental Codex feature. Security reviews are triggered when:
Once complete, Codex will leave suggestions, or a comment if no findings are found. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a45f764406
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a45f764406
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 7ef5f910aa
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| except FileExistsError as mexc: | ||
| raise ChainConcurrencyConflictError( | ||
| "Expired reclamation claim recovery already claimed by peer writer" | ||
| ) from mexc |
There was a problem hiding this comment.
Recover expired meta-claims during lease reclamation
If a worker terminates after creating meta_path but before unlinking the original expired reclamation claim, subsequent acquisitions remain blocked even after both claims expire. Fresh evidence beyond the earlier reclamation finding is that the added recovery path creates a deterministic second-level claim but unconditionally rejects its existence here without checking expiration. Reproduced by interrupting the original claim's unlink, expiring the meta-claim, and retrying twice: both attempts raise Expired reclamation claim recovery already claimed by peer writer. Cleanup in _release_cross_instance_lease() cannot help because acquisition never succeeds. Make orphaned meta-claims recoverable without sacrificing exclusive reclamation.
Useful? React with 👍 / 👎.
AI assistance
Assisted by OpenAI Codex CLI (
gpt-6.2-astrareasoning high pre-push blocker review) and Coordinator/subagent orchestration (shadow-sh2-engineer); all vendored checksums, unit/integration suites (163/163), design demos (SH2-D1..D10),sh2_acceptance, andgitleakswere independently verified on exact HEAD7ef5f910aaf54df5bdfe6efe73b93c79cc03f758.What changed
Implements
SHADOW-N SH-2offline software slices onShadowResearchmain(20412087), integrating digest-pinnedFuseControlfuse-eval-spec/v1(46a86eed),csa22-v22026 XNYS calendar + US 23/516:00 ETclose isolation (Roadmap v2.0 Item 13), and secret-free GCP Cloud Run Jobs (us-east1) runtime containerization (Item 18), with zero production unlock (production_chain_locked: true,clk01_active: false) and zero orders (orders_placed: 0,kelly_applied: false,H = "0",B0 = "50000"):FUSE-1Vendoring & Entry Gates:.pyfiles fromQuantStrategyLab/FuseControl46a86eed(0444, zero__pycache__/) undervendor/fuse_engine/fuse-eval-spec-v1/12e9b502367a4993d0c36e75ac5c8d24acaee2d1247c5b594796d5adda04ca45/fuse_engine/plusmetadata/, verified againstF1-A01/A03/A04/A10/A11(docs/sh2-entry-gates.md).src/shadow/fuse_adapter.py,src/shadow/ledger.py,src/shadow/replay.py,src/shadow/sizing.py,src/shadow/scheduler.py):VendoredFuseEvaluatorre-verifies source SHA-256 digests, framedengine_hash,spec_version, and__pycache__bytecode before load and before everyevaluate(..., mode="shadow", ...)call with zero conformance shims.hwm_adjustedon V2 reconciliation payloads (adjustment_complete is True), wiresmarket_records[].corporate_action(split_ratio/cash_per_share_usd) intoV2, preserves fund-levelhwm_adjusted, fractionalq_pre/broker_positionquantities forO3, missing/invalidV1modelled_fee/modelled_financing,V4long_run_volatility,V5shortfall_observed/shortfall_predicted,V6carrying_cost_measured/excess_return_shrunk, andV7quote_staleness/spread_width/trading_pauseobservations asNone(emitting explicitmissing_inputinstead of fabricating defaults; explicitlong_run_vol_by_instsupported viascheduler.py/fuse_context/replay.py), derivesL6benchmark returns independently of missing fund returns (while still gatingsource_records["market_data"]on complete fund returns),five_session_history/sessions_window, O5 pre-trade order evidence, O7 explicit silence flags (o7_runtime_silent/o7_monitor_silent), andO9change signals (tier_change_event/o9_change_descriptors), preserves list-formauthorized_events, validates caller-suppliedmarket_data/session_calendarsource_records, rejects stale mismatchedcalendar_session["trade_date"], removes silent synthesis of missingbroker_reconciliationor zeroindex_one_session_returns, scales derivedjoint_exposure/proposed_exposureinto U-013x * beta / (1 + H/E*)units, derives split-adjusted returns &L4one_session_loss, evaluates per-tier FUSE controls independently before sizing each tier (evaluator.by_tier&_by_tier, including explicitfuse_inputs/ direct FUSE payloads via_apply_explicit_payload_tier), and structurally quarantinesStubEvaluator/ synthetic observations inproductionmode.resolve_previous_trading_date()andtarget_prior_date(no stale-session fallback across skipped/rejected days), enforces_validate_tiingo_official_close_rowacross both current and prior-close Tiingo extraction (rejectingextended_overnight_openand off-closesession_time), forwards non-empty partialindex_one_session_returnsinto vendoredFUSE-1so single-benchmarkL6-10%crash latches still trigger even when another benchmark is missing/ineligible (O1still enforces benchmark completeness), and requires complete fund returns beforeevaluate().NO-NEW-RISKexposure clamping (q_ideal <= q_pre_i) and per-fund / per-tier control scopes insizing.py&ledger.py.src/shadow/ledger.py,src/shadow/scheduler.py,src/shadow/cloudrun_job.py):evaluator.next_row_state_sha256inside RFC 8785 canonicalrecord_body(bound byrecord_sha256/ OTS receipt) for all non-stub evaluators, and enforcesload_row_state_snapshot(..., expected_state_sha256=...)verification with deterministic rebuild from OTS-verifiedreplay_bundle.jsonon mid-commit crash recovery._authenticate_production_history) before reusing any persisted production ledger:expected_prior_head_sha256(SHADOW_TRUSTED_HEAD_SHA256, verified viahmac.compare_digest) is mandatory on all advancing runs ("0" * 64for one-time empty-bucket genesis) and same-session retries (bitcoin_merkle_rootscorroborates only viaassess_receipt_creditability(...), fail-closed exit3,0writes), enforces external monotonictrusted_head_anchor_path(SHADOW_TRUSTED_HEAD_ANCHOR_PATH/--trusted-head-anchor-path, required outsideSHADOW_DATA_DIR, updated underflockCAS with monotonicsequence/anchor_version,pending_rejected_session_date+pending_rejected_revision/pending_revisionsame-day anti-rollback ordering, plus authenticated forward interrupted-commit and interrupted-pending catch-up) to defeat synchronized ledger+head rollback attacks, hashes in-memorypending_payloaddirectly (zero post-write TOCTOU re-read), and enforces mandatorySHADOW_TRUSTED_PENDING_STATE_SHA256/expected_pending_state_sha256(NO_PENDING_REJECTED_STATE_SHA256 = GENESIS_PREV_HASHwhen absent) continuity verification across all production cycles and post-evaluation OTS/deadline rejections._reconcile_uncommitted_staged_snapshots), preserves unlatched cross-sessionO5resets &exact_reconciliation_auto_clearon unlatchedV2.pending_adjustmentswhile locking latchedV2/O5states, allows verified terminal-statusO4order resolution (o4_resolved_symbols) and Q4-validatedauthorized_eventslatch clearing (normalize_pending_authorized_events,_has_authorized_pending_clearwith scope isolation, session windowing, and L3 30-day cooling-off enforcement; forwarded throughrun_daily_drill_cycle,run_production_cycle,_persist_pending_rejected_state,fuse_context, andreplay_window) in pending rejected snapshots, narrows native FUSE input detection cleanly without swallowing optional SHADOWhigh_water_mark/source_records, and passes prior-sessionlookback_daysin live Tiingo fetches forseq=0FUSE bootstrapping.O1/O2rejections (includingO1 clearing_periodtransitions underNO-NEW-RISKand legitimate 10th-sessionV4clearing) without double-advancing counters, pinspending_rejected_state.json["base_prior_row_state"]strictly to the committedseq - 1baseline across 2+ consecutive rejected sessions, enforces monotonic latch/counter bounds, and cleanly retires supersededpending_rejected_state.jsonon committed-session recovery (_retire_superseded_pending_rejected_state).23/5Isolation & Cloud Run Jobsus-east1(config/production-scheduler.json,src/shadow/calendar_consumer.py,src/shadow/feeder.py,src/shadow/feeder_live.py,src/shadow/ots.py,src/shadow/http_limits.py,src/shadow/manifest.py,src/shadow/cloudrun_job.py,Dockerfile,deploy/cloudrun/job-spec.example.yaml,docs/sh2-cloudrun-runbook.md):config/production-scheduler.jsonships locked (production_chain_locked: true,clk01_active: false), switchestreasury_endpointtodaily_treasury_yield_curvepar yield dataset, validates strict booleans, checks loadedspec["spec_digest"] == cfg.calendar_spec_digest, forbids offlinefixtures_dirinproductionmode, and rejects missing or non-productionconfig_pathoverrides insidecheck_forward_clock_credit().23/516:00 ET(13:00 EThalf-day) Official Close isolation, rejects Tiingo bartimestampmidnight markers & Yahoo non-dailydataGranularity, separatescore_session_openvsextended_overnight_openinO2, bounds text length, significant digits, exponents, and market-close value ranges ((0, 1e9]) in_parse_finite_decimal/canonical_decimal_str(fast-pathing0without fixed-point expansion and converting rejected numeric values into missing market records insideemit_market_records_from_payloads), and enforces bounded streaming +Content-Length+ error-body byte caps across all upstream market (feeder_live.py: Tiingo/Yahoo2 MiB, NYFed SOFR1 MiB, Treasury/default4 MiB) and OTS (ots.py:256 KiB) HTTP fetches viasrc/shadow/http_limits.py(registered inRUNTIME_MODULE_FILES).us-east1) entrypoint usingdriver: gcsfuse.run.googleapis.comand.chain.lease.jsonatomicos.linkpublication + 0-byte initializing guard + CAS stale-reclamation cross-instance mutex (ChainConcurrencyConflictError, exclusiveO_EXCLreclaim claim + secondaryexp_reclaim:recovery +dev/ino/digest verification,maxRetries: 0template,--expected-pending-state-sha256/SHADOW_TRUSTED_PENDING_STATE_SHA256,--trusted-head-anchor-path/SHADOW_TRUSTED_HEAD_ANCHOR_PATH) while preservingSH-1drills/tests.D1–D10), Acceptance & Regression Tests (demo/run_sh2_demo.py,src/shadow/sh2_acceptance.py,docs/sh2-acceptance-pack.md,tests/test_*.py):SH2-D1..D10,SH2-A01..A14, and full regression coverage (163total tests).How verified
Independently verified on exact HEAD
7ef5f910aaf54df5bdfe6efe73b93c79cc03f758(production_chain_locked=true,clk01_active=false,engine_hash=12e9b502367a4993d0c36e75ac5c8d24acaee2d1247c5b594796d5adda04ca45,csa22_v2_spec_digest=2ba8cd7684c361209df68bfa2e10004c1f9922a645c7ec55d421fda520561798,production_code_version_sha=8cf0318ce7b4b2f2646526a76c483337aa82aa9002616496acf3a28aa2a7a66c,production_policy_config_hash=b5782a89994947bbf3a33d56b591a42ee447ba52ca7a0c6d8dd9f9984ac01e4):PYTHONPATH=src python3 -m unittest discover -s tests: PASS (163/163 OKin260.377s)PYTHONPATH=src python3 -m shadow.sh2_acceptance: PASS (overall_status="PASS_OFFLINE",demo_cases_passed="10/10",oa_sh2_2_locked=true,hygiene_violations=[])gitleaks(69 commits,0leaks),git diff --check; vendored files0444with zero__pycache__/.6691b079..cedaf69e,d43db216(PRRT_kwDOV2RNAc67nx2K/Q/U/Z),57a442db(PRRT_kwDOV2RNAc67n1S7),f1423a13(PRRT_kwDOV2RNAc67oei4/i_/jF/jO),7c153394(PRRT_kwDOV2RNAc67o8zW/d/j),88ff3282(PRRT_kwDOV2RNAc67pU3Y/e/m/q),be0a9317(PRRT_kwDOV2RNAc67pqv1,PRRT_kwDOV2RNAc67pqv7),8136ff76(PRRT_kwDOV2RNAc67qGz1),c4bb9d95(PRRT_kwDOV2RNAc67qYmN/S/U,PRRT_kwDOV2RNAc67qas6),2e8d559c(PRRT_kwDOV2RNAc67rQES,PRRT_kwDOV2RNAc67rRKq,PRRT_kwDOV2RNAc67rRKY,PRRT_kwDOV2RNAc67rRKc,PRRT_kwDOV2RNAc67rRKh,PRRT_kwDOV2RNAc67rRKk),3bc694f6(PRRT_kwDOV2RNAc67sDWf,PRRT_kwDOV2RNAc67sDWs),e1dd173b(PRRT_kwDOV2RNAc67sgT5),36ecc1a9(PRRT_kwDOV2RNAc67tITU),ddb89b0b(PRRT_kwDOV2RNAc67tin_,PRRT_kwDOV2RNAc67tioE,PRRT_kwDOV2RNAc67uDPn),ca05cbef(PRRT_kwDOV2RNAc67t_7Y,PRRT_kwDOV2RNAc67t_7d),8c8ae695,a45f7644(PRRT_kwDOV2RNAc67uZos,PRRT_kwDOV2RNAc67uZxP), and7ef5f910(PRRT_kwDOV2RNAc67u2Rh,PRRT_kwDOV2RNAc67u6aV).docker builddid not run locally (no Docker daemon in local environment; Dockerfile and Cloud Run job spec verified statically + direct module execution).Why
Delivers the complete
SHADOW-N SH-2offline software layer onShadowResearchmainbindingFuseControlFUSE-1,csa22-v2, US23/5close isolation, ledger-bound state & authenticated production history integrity, and secret-free Cloud Run Jobs containerization ahead of owner-gated cloud deployment (OA-3) andCLK-01unlock (OA-SH2-2).Risk
Tier: R2 / High-rigor shadow risk-engine integration & fail-closed forward-clock scaffolding (
production_chain_locked=true,orders_placed=0,live=OFF,kelly=OFF,H="0").config/production-scheduler.jsonkeepsproduction_chain_locked: trueandclk01_active: false, guaranteeing zero production ledger writes or clock activation until explicit ownerOA-SH2-2sign-off in a separate gated change.main; existingSH-1drill chains andcsa22-v1/csa22-v2specs remain unchanged and backward-compatible.