Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
b51b6b1
chore(vendor): vendor FUSE-1 fuse-eval-spec/v1 and entry gates
Pigbibi Nov 24, 2026
7ca70a1
feat(sh2): integrate FUSE-1 engine, 23/5 isolation, and Cloud Run job
Pigbibi Nov 24, 2026
6691b07
fix(sh2): enforce fail-closed guards across SH-2 blockers 1-12
Pigbibi Nov 24, 2026
26a50a7
fix(sh2): bind persisted state to ledger and address PR review
Pigbibi Nov 24, 2026
0dc148a
fix(shadow): preserve committed base state across multi-day rejections
Pigbibi Nov 24, 2026
a5599c5
fix(shadow): remediate Codex code and security findings on SH-2
Pigbibi Nov 24, 2026
0800291
fix(shadow): require genesis marker on empty production ledger
Pigbibi Nov 24, 2026
2639145
fix(shadow): resolve Codex code and security findings on 0800291
Pigbibi Nov 24, 2026
cedaf69
fix(shadow): require external head and pending-state digests
Pigbibi Nov 24, 2026
d43db21
fix(sh2): fix Step 3 cap, tier q_pre, HWM, and OTS pending state
Pigbibi Nov 24, 2026
57a442d
fix(sh2): require explicit pending-state auth and report cross-check
Pigbibi Nov 24, 2026
f1423a1
fix(sh2): fix Treasury URL, split returns, L4 loss, and HALT reserve
Pigbibi Nov 24, 2026
7c15339
fix(sh2): preserve O9/rearm inputs and unlatched V2 clearing
Pigbibi Nov 24, 2026
88ff328
fix(sh2): fix joint exposure units, O7 silence, stale cal, O5 reset
Pigbibi Nov 24, 2026
be0a931
fix(sh2): forward O5 order evidence and V1 session history
Pigbibi Nov 25, 2026
8136ff7
fix(sh2): use CAS claim for stale chain lease reclamation
Pigbibi Nov 25, 2026
c4bb9d9
fix(sh2): enforce external trusted head anchor and numeric parity
Pigbibi Nov 25, 2026
2e8d559
fix(sh2): atomic lease, per-tier FUSE controls, and anchor catch-up
Pigbibi Nov 25, 2026
3bc694f
fix(sh2): catch up pending anchor and align explicit fuse_inputs
Pigbibi Nov 25, 2026
e1dd173
fix(shadow): retain authorized clear evidence in pending snapshots
Pigbibi Nov 25, 2026
36ecc1a
fix(fuse): preserve missing long_run_volatility for V4 check
Pigbibi Nov 25, 2026
ddb89b0
fix(shadow): preserve V5/V7 missing inputs and pending revisions
Pigbibi Nov 25, 2026
ca05cbe
fix(fuse): preserve V1 missing costs and derive L6 benchmark returns
Pigbibi Nov 25, 2026
8c8ae69
fix(shadow): bound upstream HTTP response and error body reads
Pigbibi Nov 25, 2026
a45f764
fix(shadow): preserve partial L6 returns and bound decimal exponents
Pigbibi Nov 25, 2026
7ef5f91
fix(shadow): convert rejected numeric values into missing records
Pigbibi Nov 25, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Secret-free Cloud Run Jobs (us-east1) container image for SHADOW-N SH-2
FROM python:3.13-slim-bookworm

ENV PYTHONDONTWRITEBYTECODE=1 \
PYTHONUNBUFFERED=1 \
PYTHONPATH=/app/src \
TZ=UTC \
SHADOW_DATA_DIR=/var/lib/shadow/data \
SHADOW_CONFIG_PATH=/app/config/production-scheduler.json

RUN groupadd --gid 10001 shadow \
&& useradd --uid 10001 --gid 10001 --create-home --shell /usr/sbin/nologin shadow \
&& mkdir -p /app /var/lib/shadow/data \
&& chown -R shadow:shadow /var/lib/shadow

WORKDIR /app

COPY --chown=root:root src/ /app/src/
COPY --chown=root:root vendor/ /app/vendor/
COPY --chown=root:root specs/ /app/specs/
COPY --chown=root:root config/ /app/config/

# Enforce read-only vendored engine permissions (0444 files / 0555 directories)
RUN find /app/vendor/fuse_engine -type f -exec chmod 0444 {} + \
&& find /app/vendor/fuse_engine -type d -exec chmod 0555 {} +

USER shadow

ENTRYPOINT ["python3", "-B", "-m", "shadow.cloudrun_job"]
53 changes: 53 additions & 0 deletions config/production-scheduler.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
{
"schema_version": "sh2-production-scheduler-v1",
"chain_id": "prod-sh2-v1",
"mode": "production",
"production_chain_locked": true,
"clk01_active": false,
"production_mode_forbidden": false,
"deployment_target": "cloudrun-job",
"cloudrun_region": "us-east1",
"venue": "XNYS",
"calendar_version": "csa22-v2",
"calendar_spec_digest": "2ba8cd7684c361209df68bfa2e10004c1f9922a645c7ec55d421fda520561798",
"fuse_spec_version": "fuse-eval-spec/v1",
"fuse_engine_hash": "12e9b502367a4993d0c36e75ac5c8d24acaee2d1247c5b594796d5adda04ca45",
"decision_instant_et": "17:30",
"half_day_run_time_et": "14:30",
"decision_cutoff_et": "18:00",
"decision_cutoff_half_day_et": "15:00",
"commitment_deadline_et": "23:30",
"treasury_endpoint": "https://home.treasury.gov/resource-center/data-chart-center/interest-rates/daily-treasury-rates.csv/{year}/all?type=daily_treasury_yield_curve&field_tdr_date_value={year}&page&_format=csv",
"yahoo_symbol_map": {
"XNDX": "^XNDX",
"XSOX": "XSOX"
},
"ots_calendars": [
"https://a.pool.opentimestamps.org",
"https://b.pool.opentimestamps.org",
"https://alice.btc.calendar.opentimestamps.org"
],
"ots_timeout_seconds": 10.0,
"max_footprint_bytes": 2147483648,
"log_retention_days": 30,
"log_max_bytes": 52428800,
"resource_caps": {
"cpu": "1",
"memory_mib": 512,
"memory_high_mib": 384,
"max_rss_bytes": 536870912,
"task_timeout_seconds": 300
},
"standing_safety_locks": {
"live": "OFF",
"kelly": "OFF",
"kelly_applied": false,
"orders_placed": 0,
"loss_breakers_armed": false,
"enforcement_mode": "shadow_would_have_tripped",
"H": "0",
"B0": "50000",
"stop_loss_return_rule": "OFF",
"production_chain_locked": true
}
}
Loading
Loading