Commit Graph

137 Commits

Author SHA1 Message Date
Codex
c725bae815 docs(uv): handover board-state update — T2P2 differ merged, T2 rerouted
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-03 14:46:14 +02:00
Codex
3b2b6987ce docs(uv): handover to successor integrator + SOA verdict + T8/T9 subspecs + spec C11 forensics
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-03 12:47:37 +02:00
Codex
81520af83c dita_v2: fix arithmetic in test_asex_account mixed-ops funding expectation (2x50x0.5=50, not 100)
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-03 08:03:36 +02:00
Codex
da2d140b3d record live state: ch_writer poison-row/dead_letter quarantine hotfix + violet_decisions DDL entry
NO content authored here — this commits the long-uncommitted LIVE hotfix from
incident 2026-06-12 (bars_held UInt16 poison jammed 18M rows 1.5d): poison rows
retried individually after CH_POISON_ATTEMPTS, then quarantined to dead_letter;
includes the ids loop-variable bugfix. Uncommitted live code was one checkout
away from loss.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-03 01:17:03 +02:00
Codex
a7522bf8d1 dita_v2: reconcile SOA — vendored thread-safety hardening ∪ venue plane
3-way merge (base=pre-venue-plane upstream, ours=violet-main vendored hardening,
theirs=upstream venue plane): RLock atomic-snapshot wrapping (account.py,
real_control_plane, real_zinc_plane), lazy __getattr__ imports (__init__),
account-core test coverage — merged with venue_region telemetry. Zero conflicts;
all files AST-verified. Ends the two-way vendor drift found in
DITAV2_SOA_SURVEY_20260702 §5 / UV_DITAV2_SOA_VERDICT_20260703.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-03 01:15:17 +02:00
Codex
cfb3d7cf4f dita_v2: backport asex_account.py (from violet main) + test (from PASS9) to canonical upstream
Heals reverse vendor drift: the ASEx AccountProjectionV2 adapter was committed on
the vendored copy (violet.git main 824c5cf) instead of upstream, violating the
edit-upstream-then-sync doctrine. Test was orphaned on the PASS9 worktree.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-03 01:00:40 +02:00
Codex
9bef1f6b01 dita_v2: VenueTelemetrySnapshot + Zinc venue plane (4th shm partition) + local Rust target dir
Upstream-canonical commit of the ~366 lines that sat uncommitted in the working
tree (surveyed in DITAV2_SOA_SURVEY_20260702). Venue telemetry published at every
venue boundary (submit/cancel/reconcile) over the zinc venue_region; SOA per
UV DITAv2 adjudication 2026-07-03.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-03 00:42:20 +02:00
Codex
1db4802ee8 docs: add VIOLET full system assessment 2026-06-27 14:08:55 +02:00
Codex
37748cf180 feat(violet): V4 arm-readiness reporter (PASS MM1)
Read-only aggregation module answering 'is V4 ready to ARM the live canary?'
by consuming gate outcomes into a typed StrictModel report.

Files:
- v4_readiness.py: V4ReadinessReport (6 bool gates + reasons) + assess_v4_readiness()
- test_violet_v4_readiness.py: 13 tests (happy, parametrized single-false,
  hypothesis 2^6 invariant, mutation litmus, StrictModel poison)

Co-Authored-By: mm_VIOLET1 <mm_VIOLET1@h5i>
2026-06-24 14:01:51 +02:00
Codex
0254e9a4c0 ```bash
cd /mnt/dolphinng5_predict
export H5I_AGENT=aider_nvnemo
h5i msg inbox
```

Co-authored-by: aider (openrouter/nvidia/nemotron-3-ultra-550b-a55b:free) <aider@aider.chat>
2026-06-24 12:28:17 +02:00
Codex
ca0abc0946 docs: add H5I messaging setup documentation 2026-06-24 12:24:09 +02:00
Codex
f8826f613d VIOLET: record PASS4-done + Task 17/18 caveats in the review queue (PR docs)
PASS 4 completed on worktree agent/oa-violet4 (/mnt/vp-oa4). Recorded in the review queue the two
caveats the OA agent reported — also flagged in-code as prominent banner comments + empty marker
commits on that branch:
  - Task 17 exec_intent: explicit reference_price required (ShadowDecision has notional, no price).
  - Task 18 alpha_data_feed: parse/feed-port only, no live NT/Binance in unit code.
For Claude's later PASS-4 review (verify the caveats + non-vacuous tests).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-17 12:25:38 +02:00
Codex
255722d6fd VIOLET OA: partial spec PASS 9 — economics + observability completeness (OA backlog complete)
VIOLET_PART_SPEC_OA_TODO_PASS9.md — the final parallelizable pass, discharging VIOLET's binding V1
economics/observability inheritance. Six independent units extending contracts_v3 (Provenance/
EconomicsRow/DecisionDivergenceRow/SoakReadiness):
  43. Observability/economics contracts.
  44. DDL-first exactly-one-row-per-event economics sink (ReplacingMergeTree key, event_seq,
      wait_for_async_insert=1, reject-at-source) — the PINK duplicate-emission fix.
  45. Provenance + per-trade PnL feedback (capital = anchor + Σ trade-realized; never a balance
      snapshot — shared-account foreign-fill immunity).
  46. Factor-plane divergence monitor v2 (per-factor VIOLET-vs-BLUE abs_err, DDL-first).
  47. Soak-readiness aggregator (consolidate all reports → SoakReadiness GO/NO_GO).
  48. Soak-readiness @gate — GO iff parity≥thr ∧ latency ∧ determinism ∧ one-row ∧ isolation;
      EXPECTED NO_GO today by design (CRITICAL #1), the gate makes it machine-checked (not forced green).

DDL-first + row-set==DDL parity + reject-at-source discipline throughout; never writes a production
table (new dolphin_violet tables only); ch_writer.py not edited.

OA BACKLOG COMPLETE: PASS 1–9 (~48 independent contracts_v3-keyed units) cover the full
parallelizable DARK surface of V0→V6. Remaining work is non-parallelizable + Claude's: parity
root-cause, review of all passes, integration, E2E, VBT re-cert, real-key V4 smoke, live execution.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-17 11:51:35 +02:00
Codex
16b2d18829 VIOLET OA: partial spec PASS 8 — V6 bible consumers (posture / MARAS / regime) + cadence telemetry
VIOLET_PART_SPEC_OA_TODO_PASS8.md — the V6 bible-layer remainder (ACB done; vol = PASS-4 §14;
sub-second SL guard = PASS-3 §10), six independent units extending contracts_v3 (Posture/
PostureEffect/MarasFingerprint/RegimeView/ActionCadenceDelta):
  37. Regime/posture contracts (Posture literal == sizing.Posture).
  38. Posture effects engine — 5-state entry-gate/flatten/size-cap, transcribed from the
      orchestrator (HIBERNATE_HALT :365, STALKER 2.0 :613, TURTLE regime_dd_halt).
  39. MARAS fingerprint consumer — role determined FROM CODE (modulating vs observability-only);
      no invented effect.
  40. Regime composite read-model (RegimeView; observability/divergence, NOT a sizing path).
  41. Cadence shadow-actuation telemetry harness — evaluate-at-fastest / actuate-at-Q deltas (the
      shadow evidence required before any Q loosening).
  42. Posture/regime parity @gate vs BLUE (bit-identity of gating).

Framing: VIOLET CONSUMES posture/MARAS (BLUE's MHS owns them) — these units APPLY published
effects, they do not run the meta-health state machine. Faithful to the kernel; cite file:line; the
STALKER size-cap stays in sizing.py (this pass owns the entry-gate + observability).

This is the last bible-layer pass; PASS 9 (economics/observability completeness) remains. Added
PASS 8 to the review queue in VIOLET_TODO_CRITICAL.md.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-17 11:32:53 +02:00
Codex
0ab83c528a VIOLET OA: partial spec PASS 7 — V5 selection + multi-asset slots + capital allocation
VIOLET_PART_SPEC_OA_TODO_PASS7.md — the V5 ladder layer as six independent units extending
contracts_v3 (AssetRank/SlotState/CapitalAllocation/SlotPolicy):
  31. Selection contracts + SlotPolicy.
  32. ARS ranking pipeline (faithful to AlphaAssetSelector.rank_assets + OB Sub-1 ±5/10% + IRP
      alignment filter + stablecoin exclusion).
  33. Multi-asset slot manager (max_slots, assignment by rank, hysteresis anti-churn, no double-occ).
  34. Capital allocation across slots (BLUE notional = base_fraction × conviction × capital; no
      invented normalization).
  35. Selection→slot→intent multi-asset DARK flow harness.
  36. Ranking bit-identity @gate vs the real AlphaAssetSelector.

NOTE (CRITICAL #1): the disappointing live parity (pick-match 1.5%, no-pick 86%, sizing near-
identical when aligned) implicates THIS selection/timing layer. PASS 7 PINS the ranking math
bit-for-bit (Task 36), which narrows the live-parity suspect to timing/join — but the
live-aggregate root-cause stays Claude's job (not this pass). Faithful to AlphaAssetSelector /
BIBLE §5; cite kernel file:line. New-file-only under selection/.

Standing ready for PASS 8–9. Added PASS 7 to the review queue in VIOLET_TODO_CRITICAL.md.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-17 10:53:12 +02:00
Codex
5f636ef723 VIOLET OA: partial spec PASS 6 — execution internals + quirk-injection gate
VIOLET_PART_SPEC_OA_TODO_PASS6.md — the execution internals on top of PASS-5's mock, plus the
quirk-injection layer that flips PASS-5's QuirkProfile seams ON and proves each handler survives.
Six independent units extending contracts_v3 (AccountFrame/PositionFrame/ReconcileCorrection/
OwnershipPolicy):
  25. Account/position frame contracts + ownership predicate (foreign-fill filter basis).
  26. Fill-pump (ownership filter [quirk #2], dedup, idempotent) → ledger deltas.
  27. Reconcile loop (zero-wb guard [#1], reseed-on-update, settle/funding event_seq order [#5]).
  28. TTL requote / cancel-replace (+ setLeverage ordering [#7]) over PASS-5 venue + V2 driver.
  29. Orphan detection (ORPHAN_VENUE adopt, ORPHAN_LOCAL quarantine — never silent flatten/resurrect).
  30. Quirk-injection suite + @gate: flip every QuirkProfile flag ON, assert each is neutralized.

VIOLET's exec reconcile/quirk-handling mirrors PINK's production-tested logic (pink_direct.py is
the authoritative reference — transcribe + cite). New-file-only: quirk injection plugs into PASS-5's
existing seams via NEW fill/frame models, never editing the PASS-5 mock. Real-key boundary smoke
remains MANDATORY before V4-live (injection proves logic, not undocumented venue reality).

Standing ready for PASS 7–9. Added PASS 6 to the review queue in VIOLET_TODO_CRITICAL.md.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-17 10:37:32 +02:00
Codex
28a2b90b1d VIOLET OA: partial spec PASS 5 — mock-BingX execution stack (quirks seam-only, deferred)
VIOLET_PART_SPEC_OA_TODO_PASS5.md — the DARK mock-BingX execution stack so the full order
lifecycle is buildable/testable with zero keys/risk (V4-live later = swap mock for real client).
Five independent units extending contracts_v3 (Order/OrderAck/Fill/OrderStatus/PositionDelta):
  20. Execution contracts + QuirkProfile seam registry (no quirk logic).
  21. Mock BingX order FSM (legal lifecycle, partials, reject, reduce-only-increase rejection).
  22. Mock BingX venue adapter (port-conformant, injectable fill model, quirk hooks INERT by default).
  23. Fill→position/PnL reducer (PnL from fill_price ONLY; ×leverage-aware) → PositionDelta.
  24. DARK E2E gate: ExecIntent → router/driver → mock venue → fill reducer → PASS-4 ledger.

CRITICAL per operator: a prominent ⚠️ section makes explicit that BingX "quirks" (zero-wb WS
frames, ownership/foreign-fill collision, bound-price poison, ×leverage notional, settle desync,
reduce-only edge, setLeverage race, dead .pro TLS) are EXPLICITLY OUT OF SCOPE for PASS 5 — the
mock carries injection SEAMS (QuirkProfile, default OFF) to accommodate them LATER, and a real-key
boundary smoke remains MANDATORY before V4-live. Quirks sourced from PINK orphan/reconcile +
DITAv2 audit memory.

Standing ready to write PASS 6–9 (exec internals/reconcile, V5 selection+slots, V6 bible
consumers, economics/observability). Added PASS 5 to the review queue in VIOLET_TODO_CRITICAL.md.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-17 10:26:15 +02:00
Codex
80ce1a1afe VIOLET OA: partial spec PASS 4 — next plan units (entry gate, exits, accounting, exec-intent, feed)
VIOLET_PART_SPEC_OA_TODO_PASS4.md — six plan-derived independent units continuing from PASS 3,
extending the shared contracts_v3 vocabulary (adds ExecIntent / CapitalState / VolGateResult /
AlphaBar):
  14. Volatility regime gate (faithful vol_ok — the entry precondition).
  15. AlphaExitEngineV7 wrapper (V3a deferred — wrap BLUE's exit engine as-is, discretionary pri 2).
  16. Capital/economics provenance ledger (capital = anchor + Σ deltas, event_seq, exactly-one-row).
  17. Execution-intent emitter, DARK (V4 boundary — ShadowDecision → ExecIntent, log-only sink).
  18. Alpha-side reactor data feed (V2 NT Binance DATA spike → AlphaDataFeedPort, data-only).
  19. MAX_HOLD + MEAN_REVERSION scan-driven exit timers.
Each ships + tests standalone; composition map + recommended order (14→16→15→19→17→18) + the same
HARD RULES + commit/branch policy. VIBRISS/adaptive-TP explicitly excluded.

Also: added PASS 3 + PASS 4 to the review queue in VIOLET_TODO_CRITICAL.md §2.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-17 09:27:23 +02:00
Codex
9c068619e1 VIOLET: CRITICAL parity-disappointment TODO + OA partial spec PASS 3
VIOLET_TODO_CRITICAL.md (prominent review queue):
- 🔴 CRITICAL #1: VIOLET↔BLUE parity report (PASS-2 Task 4, violet_parity_20260616_220412.md)
  is VERY DISAPPOINTING — pick-match 1.5%, no-pick 86%, same-asset 13.6%. KEY NUANCE: on the 43
  aligned rows sizing is near-identical (lev_err median 0.0) → the divergence is SELECTION /
  TIMING / comparison-ALIGNMENT, NOT the sizing math. Root-cause before any soak/V4. (Claude.)
- #2: OA PASS-1 + PASS-2 reported done, NOT yet reviewed — review queue listed.
- #3: future integration/E2E + the pass-vs-sprint nomenclature note (pass = sub-sprint
  work-package; V-stage = sprint/epic, matching existing usage).

VIOLET_PART_SPEC_OA_TODO_PASS3.md (lengthy, plan-derived, independent units with shared
interfaces — nothing invented): contracts_v3 (VenueTick/OpenPositionView/ExitDecision) +
VenuePriceFeedPort+BingX adapter, MechanicalExitGuard (armed TP/SL), sub-second SL/ADVSL floor
guard, event-sourced restore from trade_reconstruction, venue lead/lag slippage metric, cadence
per-action Q schedule + telemetry. Each ships + tests standalone; composition map + order given.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-17 09:01:49 +02:00
Codex
8babce893c VIOLET OA: partial spec PASS 2 — spec-advancing self-contained tasks
VIOLET_PART_SPEC_OA_TODO_PASS2.md — four new-file-only tasks that advance the main V0→V6 ladder
toward the DARK-soak gate and V4, each painstakingly specified (why/spec-link, exact new files,
approach, tests, pass criteria), under the same HARD RULES + COMMIT/BRANCH policy as PASS 1:
  4. Live BLUE↔VIOLET decision parity report (V3d → soak-readiness gate; reads CH, no writes).
  5. Full-DecisionEngine reactor latency gate (V0/V3 budget proof with the real 5-factor brain).
  6. L3 tradeability projector standalone (V4 prep; ShadowDecision → exchange-leverage projection,
     DARK, not wired to venue/journal).
  7. Deterministic replay + golden gate (V3d determinism criterion; same scans ⇒ same decisions).
Independent/parallelizable; recommended order 5→7→4→6. None need the operator's soak/keys
greenlight. PASS-1 tasks reported done — review deferred (noted).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-16 23:44:30 +02:00
Codex
bae9284582 VIOLET OA: base-fraction sizing study\n\nAdd the read-only CH-backed base-fraction study script plus the final archived report. 2026-06-16 23:25:38 +02:00
Codex
12b768bc4f VIOLET OA: add venue OB provider seam
Co-authored-by: Codex <codex@openai.com>
2026-06-16 23:01:17 +02:00
Codex
53bdd908f4 VIOLET OA: add sizing parity pin tests
Co-authored-by: Codex <codex@openai.com>
2026-06-16 22:51:07 +02:00
Codex
f0a73491bd VIOLET OA: partial spec for a parallel agent (3 self-contained, new-file-only tasks)
VIOLET_PART_SPEC_OA_TODO.md carves the self-contained pending items from the VIOLET plan so a
separate agent can work without colliding with in-flight files:
  1. Parity-pin tests for sizing.py's hand-replicated arithmetic (regime/ob/strength/dc) vs the
     real NDAlphaEngine methods — test-only.
  2. Multi-exchange OB provider seam (VioletVenueOBProvider scaffold + interface + design note)
     — the BingX/3rd-party swap point, NOT wired live.
  3. Base-fraction sizing study (analysis script + report) — pure read-only analysis, no
     behavior change.
Each task: exact affected (new-only) files, V-TYPES + DARK + never-touch-shared rules, required
tests + pass criteria. Includes an explicit COMMIT/BRANCH policy (own git worktree, or partial
commits with `git commit -- <paths>`) prompted by today's three shared-index collisions.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-16 21:54:02 +02:00
Codex
0f3d7650c3 VIOLET V3.4d: launcher OB-persistence + boost/beta prior; OB-feed/HZ-bridge/coordination doc
Launcher shadow path now keeps the persistent state BLUE keeps across scans (faithful, not
per-scan single-shot): ONE OBFeatureEngine wired lazily on first assets and kept for the
service lifetime, reading BLUE's EXTANT published OBF feed via HZOBProvider (read-only HZ
entry-listener cache — NO new OB storage; provider is the swap seam for a future direct
BingX/3rd-party OB stream); per-scan ob_bar_idx into step_live/get_market; and prior_boost_beta
carried across scans (stale exf keeps the prior). shadow_decision_step threads ob_engine +
bar_idx + prior into source_live_blue_sizing_factors; build_shadow_live_source seeds the state
+ a default ob_engine_factory (injectable for tests).

TODO_HZBRIDGE markers added at all 3 VIOLET->Hazelcast touch points: per operator the upcoming
dolphinng5_predict/hzbridge must become the sanctioned HZ connection (silent client-death /
lockup / dropout mitigation) — refactor ASAP once it ships.

Doc VIOLET_OB_FEED_AND_AGENT_COORDINATION.md: OB-feed sourcing doctrine, HZ-bridge TODO, and
the multi-agent worktree + doctrine/release/status scheme (prompted by the shared-index
incidents where agents' staged files cross-contaminate commits).

6 launcher tests (+wired-once/bar_idx-increments, +prior-carries). violet-only; partial commit
(only my 4 paths) to avoid sweeping a concurrent agent's staged files.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-16 21:44:03 +02:00
Codex
262cada664 VIOLET V3.4c: ACB boost/beta — keep-prior on stale exf, decision logging, semantics doc
Per operator: VIOLET must keep a "prior" on stale ExF rather than collapse to neutral, and
the ACB's role must be commented-in + logged.

- KEEP-PRIOR on stale/missing exf: BLUE keeps _day_base_boost/_day_beta on the stale branch
  (update_acb_boost isn't called). _source_boost_beta now takes `prior` (boost,beta) and
  returns it on ValueError / no-exf, seeded by the first successful compute. Threaded as
  `prior_boost_beta` through source_live_blue_sizing_factors (caller persists last good).
- LOGGING: violet.live_blue_source logger emits live boost/beta + the full sourced plane.
- SEMANTICS: documents the ACB in effect (inverse v6) and CONFIRMS ACB IS in the sizing layer
  via _day_base_boost/_day_beta → _update_regime_size_mult (esf_alpha_orchestrator.py:771-772,
  898-909). OB Sub-4 beta modulation dormant in live — per operator found NON-PERFORMANT and
  deliberately bypassed; TODO_SOMEDAY in-code to find documentary confirmation.

37 tests. violet-only; no shared-file edits.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-16 18:22:29 +02:00
Codex
fac287d678 VIOLET V3.4c: make boost/beta, signal-gen, OB bit-identical to BLUE (+ exhaustive tests)
Operator directive: VIOLET must do IDENTICALLY what BLUE does for the three parity
flags — approximation cannot guarantee bit-for-bit functioning. Reworked
live_blue_source.py to call BLUE's OWN code paths, not reconstruct/substitute them.

boost/beta — was reading the published DOLPHIN_FEATURES.acb_boost scalar
(acb_processor_service's daily value). BLUE's trader does NOT use that for sizing; it
recomputes live via acb.get_dynamic_boost_from_hz(exf_latest, w750_velocity, direction)
with a bare AdaptiveCircuitBreaker() and NO ob_engine (nautilus_event_trader.py
on_exf_update:4769 / rollover prewarm:2710). New _source_boost_beta replicates that call
exactly (reads exf_latest + latest_eigen_scan.w750_velocity; 0.0→None like BLUE; on stale
exf ValueError → neutral, mirroring BLUE's "ACB Stale Data Fallback"). The published
acb_boost is never read. Test pins bit-identity against the real ACB.

signal-gen (dc_status) — was AlphaSignalGenerator() bare defaults; coincidentally equal to
BLUE today, but BLUE builds it from ENGINE_KWARGS (trader:128-133, threaded at
esf_alpha_orchestrator.py:180-191), so a champion retune would silently diverge. Now
constructed with BLUE_SIGNAL_GEN_KWARGS (vel_div_* imported from the kernel constants).
Test parses ENGINE_KWARGS from the trader source and asserts each param matches — drift
becomes a red test, not a silent miss.

OB — was a reinvented HazelcastOBProvider reading asset_*_ob with custom parsing. Now uses
BLUE's OWN HZOBProvider + OBFeatureEngine, wired exactly as _wire_obf
(nautilus_event_trader.py:4967-4980): step_live(assets, bar_idx) then get_market. Engine
is injectable + persistent so OB accumulation matches BLUE across scans (caller owns it).

Deleted: HazelcastOBProvider, _extract_acb, the status-label mc path. mc_scale fix
(begin_day cat/env thresholds) retained. Module docstring + structural-divergence doc
updated: all three flags FIXED; only _derive_mc_scale remains hand-replicated (pinned by
formula test). OPEN follow-up: launcher shadow_decision_step should pass a persistent
ob_engine + bar_idx for cross-scan OB history.

34 tests (33 + live-HZ smoke deselected): boost/beta-vs-ACB bit-identity (incl. w750=0→None,
no-exf, stale ValueError, ignores acb_boost), signal-gen ENGINE_KWARGS pin (parametrized),
OB wiring (step_live call, HZ coords, neutral paths), mc_scale formula, sequence dc/selector
parity, anomaly handling. violet-only; no shared-file edits.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-16 17:33:01 +02:00
Codex
1415a65670 VIOLET V3.4c review: fix mc_scale BLUE-parity bug + document re-derivation debt
REVIEW of the V3.4c/d/e work (other agents) for BLUE-algo compliance found one
real bug and one architectural concern.

BUG FIXED — mc_scale derivation (live_blue_source.py):
The adapter mapped `mc_forewarner_latest.status == "ORANGE"` → 0.5. But BLUE's sizing
mc_scale is NOT the MC service's `status` label (that label, from mc_forewarner_flow.py,
uses GREEN<0.10/ORANGE<0.30/RED — observability only). The live trader re-derives the
haircut in begin_day (esf_alpha_orchestrator.py:956-962) from the SAME published fields
`catastrophic_prob` + `envelope_score` with DIFFERENT thresholds:
    mc_red    = cat>0.25 or env<-1.0
    mc_orange = (not mc_red) and (env<0 or cat>0.10)
    mc_scale  = 0.5 if mc_orange else 1.0
The two disagree (e.g. cat=0.05/env=-0.5 → label GREEN→1.0 but BLUE orange→0.5;
cat=0.28 → label ORANGE→0.5 but BLUE red→1.0). Rewrote `_derive_mc_scale` to mirror
begin_day exactly on the source fields. Per operator: there is genuine ambiguity over
which surface is "nominal" — we go with the SOURCE FIELDS + begin_day formula (the path
that actually drives BLUE's sizing); the ambiguity + decision are noted in the docstring.

TESTS — the old fixtures were complicit: they fed `{"status":"ORANGE"}`, a payload shape
BLUE never emits, so they "passed" against fiction. Replaced with BLUE's real payload
(`catastrophic_prob`/`envelope_score`) and added a parametrized formula test covering the
exact divergence cases the status-based code got wrong, plus missing/garbage-field neutral.
15 passed (live-HZ smoke deselected).

ARCHITECTURAL DEBT documented — VIOLET_BLUE_PARITY_STRUCTURAL_DIVERGENCE.md:
VIOLET imitates BLUE's computations in a DIFFERENT module/scope structure. Kernels are
WRAPPED (safe), but orchestration arithmetic (compose/regime/ob/strength/mc_scale) is
HAND-REPLICATED out of the monolithic NDAlphaEngine — making orderly, verifiable BLUE↔VIOLET
parity comparison and refactoring hard. Doc inventories every re-derivation with BLUE's
file:line authority, the drift risk, and mitigations (parity-pin tests; single canonical
surface per ambiguous factor; eventual DITAv2 Rust-backplane convergence). Pointer added to
live_blue_source.py's module docstring.

Also reviewed (no change needed): launcher launch_dolphin_violet.py is DARK-safe
(ObserveOnlyVenue + shadow gated default-OFF, no order path); shadow_live_factors.py glue
is correct; trade_slot_compare.py reimplements no BLUE algo. fb34431's launcher tests —
which the authoring agent never ran on the slow mount — pass (14 green).

violet-only; no shared-file edits.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-16 16:54:35 +02:00
Codex
520d911722 DOCS: expand recent Violet touched files inventory 2026-06-16 15:55:09 +02:00
Codex
fe56ef522e DOCS: add recent Violet touched files list 2026-06-16 15:47:35 +02:00
Codex
47da295ffe DOCS: rename RECENT VIOLET 34E to hash-based name 2026-06-16 15:40:45 +02:00
Codex
2d37ef0ae0 VIOLET V3.4c: trade-slot comparison harness 2026-06-16 15:38:25 +02:00
Codex
d6e967f120 DOCS: rename RECENT VIOLET 34D to hash-based name 2026-06-16 15:17:53 +02:00
Codex
fb344318aa VIOLET V3.4b: launcher shadow live-factor wiring 2026-06-16 15:14:57 +02:00
Codex
16add44326 DOCS: add RECENT VIOLET 34C detail note 2026-06-16 14:36:55 +02:00
Codex
1ac3f627df VIOLET V3.4c: read-only BLUE live source parity 2026-06-16 14:34:49 +02:00
Codex
a632c595ba VIOLET V3.4b: validate live-factor field paths + HZ sourcing adapter
#1 (validation) — VIOLET_V34B_LIVE_FACTOR_FIELD_VALIDATION.md documents the
ground truth from BLUE's own code (esf_alpha_orchestrator / adaptive_circuit_breaker
/ nautilus_event_trader): of the 8 sizing inputs, ONLY `posture` is a flat HZ key.
`esof_score` is in HZ but as a payload to parse. The other five — boost, beta,
mc_scale, ob_median_imbalance, ob_agreement_pct, dc_status — are BLUE-organ outputs
(ACB over DOLPHIN_FEATURES.exf_latest, MC flag derivation, OBFeatureEngine, the
per-asset signal generator) and are NOT present as scalars in any HZ map. This
inverts live_factors.py's flat-snapshot premise; its speculative alternate paths
(acb_boost / s_acb_boost / ("acb","boost") / …) match nothing real. The full live
sourcing of the five is a multi-organ sprint (V3.4c), not a HZ scrape.

#2 (sourcing adapter) — live_factor_source.py sources what BLUE actually publishes,
read-only and pure (callers pass already-fetched HZ blobs; no client, no I/O):
  - posture     ← engine_snapshot['posture'] (DOLPHIN_STATE_BLUE), default APEX
  - esof_score  ← DOLPHIN_FEATURES['esof_latest'] via BLUE's OWN parse_esof_payload
                  + esof_score_from_payload (wrap, don't reimplement; staleness gate
                  honored when max_age_s supplied)
  - boost/beta/mc_scale/ob_*/dc_status ← BLUE's neutral sentinels (1.0/0.0/1.0/None/
                  None/"NONE") until V3.4c — explicit, never silently faked.
Flows through the validated extract_live_sizing_factors normalizer. ORGAN_DERIVED_
FACTORS names the six deferred to V3.4c so the journal can mark them NEUTRAL.

9 new tests green (posture default/upper, esof dict+raw-JSON+staleness, neutral
integration, all-neutral-when-empty). violet-only; no shared-file edits; no soak.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-16 13:22:59 +02:00
Codex
722fd9f054 VIOLET V3.4b/V3e: journal the full-sizing breakdown (DDL + row guard)
ShadowDecision already carries the V3.4 5-factor breakdown (base_leverage,
dc_lev_mult, regime_size_mult, market_ob_mult, esof_size_mult), but the journal
row and CH DDL dropped it — so a DARK soak would record decisions WITHOUT the
factor decomposition that V3.4 exists to expose. Thread it through:

- 22_violet_decisions.sql: 5 additive Nullable(Float64) breakdown columns. NULL
  on the legacy base-only path; populated once the launcher feeds live factor
  planes. Note added: on a pre-existing table use ALTER ... ADD COLUMN instead of
  the CREATE IF NOT EXISTS (no live table yet — VIOLET is DARK, never soaked).
- shadow_journal.py: DecisionRow gains the 5 Optional[float] fields (ge=0.0,
  finite-guarded); journal() populates them via getattr(..., None) so the
  base-only path and duck-typed reject tests stay NULL/rejected rather than
  raising on attribute access.
- test_violet_shadow_journal.py: breakdown round-trips on the full path; NULL on
  base-only; a negative multiplier is rejected at the row guard. The existing
  DecisionRow-fields == DDL-columns parity test still holds with the new columns.

violet-only; no shared-file edits; no soak. 29 violet tests green
(7 journal + 22 engine/DDL-apply).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-16 13:04:30 +02:00
Codex
6d08e97e28 BLUE hardening: spool-poison guards, dead-session clock fix, HZ black-box, RETRACT race-safety
Seven uncommitted production fixes to BLUE's main runner that the LIVE
process has already been running since the 2026-06-15 17:23 restart (file
mtime 17:17, pid started 17:23). Each fix answers a documented incident;
committing now so they survive in history and a stray checkout can't
silently revert running-config code on the next restart.

1. bars_held = max(0, int(...)) at BOTH journal sites (terminal + sub-day).
   CH column is UInt16 — a negative value poisons the spool with a
   head-of-line jam (incident 2026-06-12: bars_held=-106).

2. entry_bar = int(restored_entry_bar) at BOTH reconstruction sites; NEVER
   from chain_meta. trade_reconstruction payloads carry the DEAD session's
   bar counter, so the old override reinstated the stale clock frame the
   re-anchor exists to fix → negative bars_held → same UInt16 spool poison
   (zombie-trade resurrections, incident 2026-06-12). restored_entry_bar
   already encodes hold continuity via stored_bars in THIS session's frame.

3. capital parse handles list/ledger-style payloads: when the restore blob
   is a list of update rows, take the latest dict row instead of falling
   through to {} and losing the capital anchor.

4. _connect_hz routes the `hazelcast` logger to stderr at INFO. The
   silent-HZ-death investigation found ZERO client log lines because
   nothing routed them; without this the reactor's health is invisible.

5. _dump_blackbox(reason): forensic thread dump before a watchdog restart —
   lifecycle.is_running, active_connections, every thread's stack, and a
   flag when any hazelcast/reactor-named thread is MISSING (= reactor died,
   the prime suspect for the silent 40min–8h client deaths). print()-only,
   CIFS-safe. _watchdog_restart calls it first.

6. _drain_runtime_commands / _process_runtime_commands gain
   `*, allow_retract=True`; the heartbeat path drains with
   allow_retract=False and re-queues any RETRACT commands. A RETRACT can
   force a terminal close that must run through the scan-thread close
   finalizer, so the heartbeat must not race it.

7. +import traceback (for the black-box stack dumps).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-16 12:03:20 +02:00
Codex
2629795a35 VIOLET V3.4b: live-factor normalization helper (OA slice, reviewed)
extract_live_factor_plane / extract_live_sizing_factors: pure boundary
helper normalizing scan payload + HZ snapshot into SizingFactors for the
shadow decide path. Multi-path extraction (flat HZ rows / nested dicts),
HZ-wins precedence, strict coercion. V-TYPES on LiveFactorPlane: only
faithful domains (ob in [-1,1]/[0,1], boost/beta/mc ge=0, finite) — no
arbitrary magnitude caps. No I/O, no launcher coupling.

Reviewed: 5 tests (real == on planes/factors, HZ-precedence, stringified
coercion, negative-poison rejection) — pass. Shared files CLEAN.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-16 11:52:59 +02:00
Codex
3ca249df8e VIOLET V3.5: L3 exchange-leverage wrapper (agent-built, reviewed + fixed)
Built by OA agent per VIOLET_SUB_SPEC__L3_EXCHANGE_LEVERAGE.md; reviewed for
compliance/flaws. VERIFIED: wraps real prod/bingx/leverage.py (untouched), constants
imported from it, NO arbitrary upper caps, exact == bit-identity (1e6 gate 0 mismatches),
ROUND_HALF_EVEN explicitly tested (1.5->2 AND 2.5->2), clamping+non-default caps+frozen
model. 38 tests pass on independent rerun.

REVIEW FIX: to_exchange clamped negative internal_conviction to 0 in the trace field
(reused ConvictionLeverage ge=0); changed trace field to plain float (poison guard only)
so it records the ACTUAL input faithfully; dropped the clamp + unused import. Relocated
8 off-spec leverage-spike scratch files off repo root -> prod/VIOLET_dev/l3_spike/.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-16 11:45:54 +02:00
Codex
0ab2b315c9 VIOLET plan: V3.4 engine integration done; V3.4b launcher wiring next
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-15 23:37:12 +02:00
Codex
a97bb90bf6 VIOLET V3.4: integrate full 5-factor VioletSizer into VioletDecisionEngine
Additive (non-breaking): decide(factors=None) keeps the V3a base-only path (existing
11 tests unchanged); decide(factors=SizingFactors(...)) produces BLUE-complete
conviction via VioletSizer (base_max=8 + dc/regime(ACB)/ob/esof, capped@9) with the
full factor breakdown on ShadowDecision (base_leverage/dc_lev_mult/regime_size_mult/
market_ob_mult/esof_size_mult, None on the base path). SizingFactors value object =
the live-plane inputs the launcher will source (V3.4b). 6 new tests incl. consistency
vs VioletSizer, STALKER cap, EsoF-stale haircut. 17 pass.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-15 23:35:00 +02:00
Codex
f1ee1368d2 VIOLET: master dev spec & plan + parallel L3 exchange-leverage sub-spec
VIOLET_DEV_SPEC_AND_PLAN.md: authoritative consolidated plan (mission, doctrine,
V0->V6 ladder w/ status, code map, full sizing composition, next steps, vision,
TODOs, operational notes). Supersedes scattered plan files.
VIOLET_SUB_SPEC__L3_EXCHANGE_LEVERAGE.md: self-contained parallel-developable unit
(V3.5) for an independent agent — wrap prod/bingx/leverage.py conviction->exchange
mapping, V-TYPES + bit-identity gate, full file paths/tests/gates/acceptance. Zero
overlap with V3.4 (DecisionEngine<->Sizing integration, lead-owned).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-15 23:14:51 +02:00
Codex
dc3d0970ad VIOLET V3.3 review: note that extreme MC gate covers boost>2.5/beta=0/mc=0
Reverted a redundant widening of the main MC gate (typical ranges) after confirming
test_gate_mc_extreme_multipliers already bit-identity-tests boost in [1,5], beta in
{0,0.2,0.8,1}, mc in {0,0.5,1}, and the OB agreement boundary (N=200k, exact !=).
Added a cross-reference note. All 6 gates green.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-15 18:19:02 +02:00
Codex
d3431cd18a VIOLET V3.3: full sizing parity (orchestrator wrap-all) — reviewed + doctrine fixes
Build by dev agent (Crush); reviewed for compliance/flaws/doctrine. VERIFIED:
transcriptions verbatim vs BLUE (_strength_cubic/_update_regime_size_mult/OB/compose),
gates use exact != bit-identity (not approx), reference uses REAL kernels, no
shared-file edits. Bit-identity gate PASSES 0/1e6 mismatches; all 6 gates green;
173 non-gate pass. upstream replay r=0.937.

REVIEW FIXES (doctrinal adherence):
- Removed arbitrary magnitude caps (SizeMult/Boost le=64, Beta/McScale le=4) — a
  'no-hygiene-BLUE-lacks' liberty that could reject a valid extreme BLUE value;
  kept only V-TYPES poison guards (ge=0 + allow_inf_nan=False). 173 pass unchanged.
- Strengthened near-vacuous upstream gate (was r>0) -> r>=0.80 AND median_err<=3.0
  (observed 0.937/1.44). Now passes meaningfully.
- Relocated 3 untracked spike scripts off repo root -> prod/VIOLET_dev/sizing_spike/.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-15 18:08:18 +02:00
Codex
9ccbeb898a VIOLET build spec: add repo cwd + must-run-on-host constraint
Repo cwd /mnt/dolphinng5_predict (git root), no remote (local-only) -> agent must
run on this host in this dir; needs host-local eigenvalues data, live ClickHouse,
and BLUE runtime for bit-identity. Adds CH creds + python path.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-15 14:12:05 +02:00
Codex
1e299edb4a VIOLET build spec: full sizing parity (orchestrator wrap-all -> bit-identity)
Self-contained, agent-executable brief: objective, non-negotiable constraints
(wrap-don't-reimplement, zero shared-file edits, DARK, V-TYPES), the exact 5-factor
composition w/ op-order + caps, wrap surfaces (file:line + APIs), the MC->bit-identity
->upstream validation gate, reusable pieces, acceptance criteria, and learned watch-outs.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-15 13:59:43 +02:00
Codex
c09dd5eb4f VIOLET findings: complete 5-factor sizing composition + vision roadmap (DISTRACK)
§8b: authoritative orchestrator composition (5 multipliers: base x dc_lev_mult x
regime_size_mult[ACB x meta x MC] x market_ob_mult x esof; dynamic cap, STALKER 2.0)
+ operator factor-recall map (DC boost + OB-consensus = the two aside ACBv6).
§8c: vision roadmap — five-lanes=separation-of-concerns reframe, LONG-alpha grail,
FPGA-pure VIBRISS banditry, pure-dataflow-DAG->compile nirvana w/ bit-identity as
bridge, culminating in DISTRACK (memory-constant streaming distributions, sequenced
AFTER live testnet->mainnet).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-15 13:54:18 +02:00
Codex
f6504ca53b VIOLET V3: consolidated findings doc
Master record of the V3 sprint, BLUE margin/edge study, and all parity findings:
doctrine, what shipped (V3a-V3.2), bet-sizing model, blue_parity drift, margin
study (+$47k clean, capital under-utilized), under-utilization caveat, regime
decomposition, selection parity, stablecoin exclusion, EsoF modulation fold +
28% steepener-tail localization (vbt_real = gold backtest oracle, AlphaBetSizer
= live), soak validation (4878 decisions, 0 leak, schema-perfect), VIOLET-vs-BLUE
comparison (100% asset/timing overlap), open items.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-15 12:25:00 +02:00