split
Current to target
Preserve proven contracts, rewrite coordination bottlenecks, and delete nothing until a compatible replacement owns the behavior.
- Question
- What changes, and what evidence must exist before it changes?
- Binding decision
- Phase 0 classifies every current module and provisional behavior as preserve, intentionally change, or delete.
- Owner input
- The target Tradingview repository must confirm every current-state hypothesis from code and runtime evidence.
Preserve when proven
- Owned ports
- Wire fixtures
- Cursor and generation
- Correction behavior
Rewrite behind ports
- Per-viewer replay
- Unbounded watchers
- Per-page senders
- Single-replica ownership
Delete after rollback
- Superseded flags
- Dead coordination
- Duplicate schemas
- Expired compatibility paths
Provisional preserve candidates
Typed Rust and TypeScript contracts, provider ports, page identity, eligibility rules, partial-page behavior, cursor recovery, and bidirectional paging are candidates—not facts. Characterization tests must freeze the real behavior before architecture work depends on it.
- Keep owned ports even when adapters are replaced.
- Freeze generation and cursor semantics in cross-language fixtures.
- Preserve correction and exhaustion behavior only when executable tests confirm it.
EvidenceExecPlan: Provisional preserve candidates and Phase 0.
Rewrite candidates
The audit must specifically test for synchronous Redis replay per viewer, process-global watcher growth, per-page QuestDB senders, table-wide WAL waits, source-limit truncation, full-window frontend sorting, and single-replica ownership presented as scalable.
- A rewrite names the preserved port and compatibility test.
- Shadow reads and writes precede client cutover.
- Old paths remain independently switchable until rollback evidence passes.
EvidencePrompt: current-system audit hypotheses.
mise x -- task contracts:testAcceptance target: Characterization fixtures prove the accepted current behavior.