Skip to content

feat: SQLite busy retry, ops reports, and security/acceptance closures - #4

Merged
jamiesun merged 2 commits into
mainfrom
feat/gate3-limit-orders
Aug 12, 2026
Merged

feat: SQLite busy retry, ops reports, and security/acceptance closures#4
jamiesun merged 2 commits into
mainfrom
feat/gate3-limit-orders

Conversation

@jamiesun

@jamiesun jamiesun commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

Summary

Two commits closing out pure-code acceptance items from the matrix (no demo keys / soak required).

949d7e9 — SQLite busy retry + ops reports

  • FD6: stepCritical busy retry on critical write paths
  • Ops disk / LLM report fields in system JSON

4b2d2d5 — Security hardening & acceptance closures

  • AC-SEC5: fixed-capacity HTTP response sinks (OKX 512KB, LLM 1MB, egress probe 4KB) + security/limits.zig structural JSON scan (depth bomb / breakout / truncation covered by unit tests)
  • AC-SEC6: security/isolation.zig@embedFile source-scan tests enforcing agent module isolation (no http/net/fs/process/credential reach; openai.zig whitelisted for std.http only)
  • AC-SEC7: formatObservation neutralizes structurally unsafe tool data_json to null; fault-matrix injection tests prove injected prose stays inert inside the data field and breakout/depth-bomb payloads are neutralized
  • AC-FR04: proposal fuzz — every prefix truncation and 4000 rounds of random byte flips never crash the parser; surviving mutants uphold all schema invariants
  • AC-GO3: property tests for fee/slippage/shock monotonicity, max_drawdown tightening monotonicity, and partial-fill replan convergence (qty monotone decreasing, side never flips)
  • AC-OPS3/9: hourly (keep 24) / daily (keep 30) rotated backup snapshots + retention sweep (tool_calls 30d, equity 1s 7d) wired into the hourly backup cycle, best-effort and never blocking the trading path
  • AC-NFR01: risk-apply latency histogram (2048-sample ring, nearest-rank percentiles) exposed as latency_us{p50,p99,max,samples} in system JSON
  • Docs: ACCEPTANCE_MATRIX.md / NEXT.md status updates with evidence notes

Validation

zig build test --summary all
# Build Summary: 7/7 steps succeeded; 173/173 tests passed

All 173 tests green (was 151 before this branch; +22 new tests across limits/isolation/retention/latency/fuzz/property/injection).

jamiesun and others added 2 commits August 12, 2026 11:34
Add Stmt.stepCritical for events/orders/fills/equity/agent_runs/tools/
memories writers (AC-FD6). gate2-report and check-remote now surface
system.status.disk and llm health for soak ops.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
…OPS3/9, NFR01)

- AC-SEC5: fixed-capacity HTTP response sinks (OKX 512KB, LLM 1MB,
  egress probe 4KB) + security/limits.zig structural JSON scan
- AC-SEC6: security/isolation.zig source-scan tests enforcing agent
  module isolation (no http/net/fs/process/credential reach)
- AC-SEC7: formatObservation neutralizes structurally unsafe tool
  data_json to null; fault-matrix injection tests (prose stays inert
  data, breakout/depth-bomb payloads neutralized)
- AC-FR04: proposal fuzz tests (prefix truncation, 4000-round byte
  flips; parse never crashes, surviving mutants keep invariants)
- AC-GO3: property tests for cost/shock monotonicity, drawdown
  tightening, and partial-fill replan convergence
- AC-OPS3/9: hourly(24)/daily(30) rotated backups + retention sweep
  (tool_calls 30d, equity 1s 7d) wired into backup cycle
- AC-NFR01: risk-apply latency histogram exposed in system JSON
- docs: acceptance matrix and NEXT status updates

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@jamiesun jamiesun changed the title feat: SQLite busy retry and ops disk/llm reports feat: SQLite busy retry, ops reports, and security/acceptance closures Aug 12, 2026
@jamiesun
jamiesun merged commit 7974be6 into main Aug 12, 2026
2 of 3 checks passed
@jamiesun
jamiesun deleted the feat/gate3-limit-orders branch August 12, 2026 04:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant