diff --git a/.github/workflows/ui-smoke.yml b/.github/workflows/ui-smoke.yml index 97a671947..dd8280a99 100644 --- a/.github/workflows/ui-smoke.yml +++ b/.github/workflows/ui-smoke.yml @@ -70,8 +70,10 @@ jobs: run: python tests/gui_baseline_lock_test.py - name: Validate smart audio architecture handoff contract run: node --test tests/smart_audio_ard_contract_test.mjs - - name: WIRE A canonical graph transaction/DAG unit contract - run: node tests/wire_graph_canonical_model.test.cjs + - name: WIRE A canonical graph and v8 GUI-to-native handoff contract + run: | + node tests/wire_graph_canonical_model.test.cjs + node tests/wire_main_native_handoff_contract.test.cjs - name: Install Chromium testing dependencies run: | python -m pip install --upgrade pip diff --git a/AGENTS.md b/AGENTS.md index 1502cb8e4..762616dc8 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -1,3 +1,5 @@ +> **LATEST MAIN SYNC · GUI V59 → ENGINE (2026-11-04):** [WIRE_V59_MAIN_NATIVE_ENGINE_RECONCILIATION_20261104.md](docs/workstreams/WIRE_V59_MAIN_NATIVE_ENGINE_RECONCILIATION_20261104.md). `main@f182e676` includes merged GUI #383 selected-only cables, silent folded MAIN and custom-only OUT. The older Packet A direction to show a MAIN cable at **every** unselected strip is superseded. ENGINE #266/C1 #384 and native GUI #271/FAT #270 must bridge accepted v8 ChannelId/EdgeId snapshots (not numeric demo IDs). Native C1 producer vs GUI snapshot-shape/LIVE-flag mismatch is an unresolved integration blocker. **Do not bulk-merge an old engine/GUI PR into main or advertise WIRE audio LIVE.** + > **CODING AGENT FAST START (2026-11-04, latest):** Execute [WIRE-FIRST 4-PACKET RUNBOOK](docs/workstreams/START_HERE_WIRE_FIRST_20261104.md) **before** reading lengthy historical plans. It names the current merged V52/V53/V54 GUI checkpoint, exact source functions, four code/test packets, owners, and the one-Windows-mixer exit. Read PRD/ARD only for an actual unresolved code question. Do not re-plan, reopen completed GUI polish, implement redundant engine paths or claim real PCM from Pages. > **NEW 2026-11-04 USER RELEASE-PRIORITY LOCK — READ BEFORE CODING:** [WIRE-FIRST PRD](docs/PRD_WIRE_FIRST_LIVE_ROUTING_20261104.md) · [WIRE-FIRST ARD](docs/ARD_WIRE_FIRST_ZERO_ADDED_LATENCY_20261104.md) · [GUI/ENGINE/FAT EXECUTION HANDOFF](docs/workstreams/HANDOFF_WIRE_FIRST_GUI_ENGINE_FAT_20261104.md). **Current release priority:** FL Studio-style canonical WIRE routing on universal channels; default connected-to-MAIN **real graph edge** with MAIN-colored short hanging cable at each source and matching cable rising to pinned MAIN IN; direct drag-to-disconnect/replug exact focused edge, one Guardian and one native callback. Source-colored channel-to-channel cables preserved. **Dedicated new +BUS and +FX RETURN workflow deferred** (preserve existing AUX/FX/Show compatibility and VST3 inserts). **Zero additional samples from pure internal WIRE graph**, not 0ms physical audio. No new badges/cards/text-heavy GUI, no layout/approved meter/fader regression. This is an overlay on release scope/priority; v8 socket, single-owner #266/#271/#270 and all realtime/safety/FAT contracts remain mandatory. GUI Pages cannot claim PCM. This instruction supersedes older sections below *only where they require dedicated Group/FX Return in the first release*. diff --git a/contracts/console-puzzle-v8.json b/contracts/console-puzzle-v8.json index 51acbca84..924b56838 100644 --- a/contracts/console-puzzle-v8.json +++ b/contracts/console-puzzle-v8.json @@ -22,5 +22,28 @@ "invalid source and stale epoch -> rejected with accepted graph and sound preserved", "Show save/restore -> stable ChannelId plus plugin vendor state" ], - "userUATGate": "only after complete integrated Windows application, exact SHA tests, internal hardware qualification or explicit pending disclosure" + "userUATGate": "only after complete integrated Windows application, exact SHA tests, internal hardware qualification or explicit pending disclosure", + "wireAcceptedProjection": { + "status": "additive conditional wire graph contract; reference GUI alone is simulation", + "operation": "APPLY_WIRE_TRANSACTION", + "requiredNativeReadback": { + "graph": ["mainChannelId","channels","edges","revision","rosterRevision"], + "channel": ["id","role","name","processingFormat","inserts","sends"], + "edge": ["edgeId","from","to","tap","gainLinear","enabled","signalKind"], + "ids": "canonical decimal uint64 strings, never Number", + "signalKind": "AUDIO" + }, + "publicationGate": "Expose operation only when installed ChannelId PCM owns accepted graph at current device epoch and revisions; never fabricate from legacyM4 or site preview", + "display": { + "cables": "only a single uniquely selected channel; accepted incoming and outgoing; never ALL unselected paths", + "mainFragments": "paired one-edgeId source/MAIN inner-dot only when one selected channel and expanded", + "collapsed": "no MAIN physical cable or pseudo-tail", + "outConnected": "enabled outgoing edges where to!=mainChannelId", + "inConnected": "enabled incoming non-MAIN edges", + "selection": "UI-only, must never change audio graph" + }, + "stagePolicy": "Keep productionCallbackLive false until full parity; staged native readback must explicitly reconcile #384 producer with #271 consumer; never change LIVE flag to bypass validation", + "consistency": "ACK accepted + matching deviceEpoch, graphRevision and rosterRevision on later native snapshot before repaint", + "owner": "ENGINE #266/C1 #384 -> GUI #271 -> FAT #270; main GUI V59 #383 is approved visual behavior" + } } diff --git a/docs/ARD_WIRE_FIRST_ZERO_ADDED_LATENCY_20261104.md b/docs/ARD_WIRE_FIRST_ZERO_ADDED_LATENCY_20261104.md index 92493af14..5e8146500 100644 --- a/docs/ARD_WIRE_FIRST_ZERO_ADDED_LATENCY_20261104.md +++ b/docs/ARD_WIRE_FIRST_ZERO_ADDED_LATENCY_20261104.md @@ -1,3 +1,5 @@ +> **Merged V59 display vs native engine reconciliation (2026-11-04):** [Current main-native WIRE handoff](workstreams/WIRE_V59_MAIN_NATIVE_ENGINE_RECONCILIATION_20261104.md) controls any conflicting display examples below. Default CH→MAIN stays a real accepted edge, but physical cable fragments paint only for one selected expanded channel; collapsed paints none, and OUT color counts only custom non-MAIN connections. Engine PR #266/C1 #384 and production GUI #271 still need accepted v8 producer/consumer schema and non-LIVE readiness alignment; this ARD is not evidence of native audio completion. + # ARD — WIRE-First Canonical Routing, MAIN Patch and Zero-Added-Latency Engine **Date:** 2026-11-04. **Status:** normative target, not PCM completion evidence. Companion [PRD](PRD_WIRE_FIRST_LIVE_ROUTING_20261104.md) and [execution handoff](workstreams/HANDOFF_WIRE_FIRST_GUI_ENGINE_FAT_20261104.md). This overrides dedicated BUS/FX creation as a *first-release priority*, not the existing v8 ABI, native ownership, VST3 leases, Show/legacy AUX compatibility, approved GUI layout, or release/safety gates. diff --git a/docs/PRD_WIRE_FIRST_LIVE_ROUTING_20261104.md b/docs/PRD_WIRE_FIRST_LIVE_ROUTING_20261104.md index 537225462..759f51f4a 100644 --- a/docs/PRD_WIRE_FIRST_LIVE_ROUTING_20261104.md +++ b/docs/PRD_WIRE_FIRST_LIVE_ROUTING_20261104.md @@ -1,3 +1,5 @@ +> **ACCEPTED GUI DISPLAY OVERRIDE · V59 merged #383 (2026-11-04):** See [main→native reconciliation](workstreams/WIRE_V59_MAIN_NATIVE_ENGINE_RECONCILIATION_20261104.md). The canonical CH→MAIN **edge still exists for each connected channel**, but its visible fragments appear only for **one selected channel in expanded WIRE**. Collapsed WIRE shows **no** physical MAIN tails; OUT color means non-MAIN custom sends. This supersedes earlier paragraphs suggesting every unselected channel continuously paints a MAIN cable. Native PCM remains unqualified. + # ArSonMix PRD — WIRE-First Live Routing (2026-11-04) **Status:** APPROVED USER PRODUCT DIRECTION / SPECIFICATION, NOT IMPLEMENTATION OR AUDIO QUALIFICATION. **Target release:** first integrated, reliable Windows live mixer. **Priority:** overrides older PRD v5.2 clauses prescribing dedicated Group Bus / FX Return creation in the *first* release, without deleting existing native-compatible AUX/Show/FX code or relaxing safety. **Companions:** [ARD WIRE First](ARD_WIRE_FIRST_ZERO_ADDED_LATENCY_20261104.md), [owner execution handoff](workstreams/HANDOFF_WIRE_FIRST_GUI_ENGINE_FAT_20261104.md). Existing [PRD v5.2](PRD_ARSONMIX_OPERATOR_FIRST_LIVE_MIXER_V5_20261101.md) and [ARD v5.2](ARD_ARSONMIX_UNIVERSAL_REALTIME_CONSOLE_V5_20261101.md) remain in force where not superseded. @@ -31,19 +33,19 @@ Official references: ## 3. Visual and interaction contract — no routing explanations disguised as new UI **Preserve** the selected machined graphite/chassis visual, genuine existing 3D/recessed jacks, meter/fader geometry, icon/color/identity, FX Rack, compact rail and pinned equal-width MAIN. Routing identity is conveyed by *physical geometry*, material and cable color, not by new text labels, cards, arrows, buttons, tooltips floating permanently or badges. -**Paired MAIN cable design:** every channel with an active direct-to-MAIN edge visibly has a short cable colored from the existing MAIN channel palette emerging from its OUT jack, hanging downward into the hidden chassis. The pinned MAIN has a matching short cable emerging upward from below into its IN socket. Both fragments represent **the same logical edge** (not two sends or extra DSP), and no full-width MAIN cable spans channels. Short hanging curves must have restrained realistic wire sheath, smooth tangent/weight, subtle shading and precise plug/metal tip geometry; no neon/glow/filter/everlasting bounce. Existing channel-to-channel WIRE remains source-channel colored. Nothing encroaches on PAN/MUTE/fader or expands strip height. +**Paired MAIN cable design (V59 accepted):** only a uniquely selected channel with an active direct-to-MAIN edge displays a short cable colored from the existing MAIN channel palette emerging from its OUT jack, hanging downward into the hidden chassis. The pinned MAIN has a matching short cable emerging upward from below into its IN socket. Both fragments represent **the same logical edge** (not two sends or extra DSP), and no full-width MAIN cable spans channels. Short hanging curves must have restrained realistic wire sheath, smooth tangent/weight, subtle shading and precise plug/metal tip geometry; no neon/glow/filter/everlasting bounce. Existing channel-to-channel WIRE remains source-channel colored. Nothing encroaches on PAN/MUTE/fader or expands strip height. **Focused MAIN edge semantics:** MAIN receives many channel feeds; its single visible physical jack is a context-sensitive inspector for the specifically focused/selected source edge. Selecting CH7 must make MAIN jack operate on CH7->MAIN, not on all feeds. Without a uniquely identified source, clicking/dragging MAIN must NOT disconnect all channels: offer existing unobtrusive route selection through Navigator/Matrix or require selecting one channel. The unselected aggregated state may remain physically plugged if >=1 MAIN feed exists; do not imply a specific source without selection. **Physical gestures:** -- New audio channel: direct MAIN audio edge ON by default; both cable fragments immediately exist in GUI simulation and accepted native projection when capability live. +- New audio channel: direct MAIN audio edge ON by default; the selected channel shows both cable fragments only when WIRE is expanded. Unselected or collapsed cables are hidden without changing native routing. - Select channel: see its direct MAIN cable state, plus all selected-source WIRE paths; off-bank route remains valid. - Drag plug out of MAIN IN: thresholded drag candidate, live moving plug physics only; release in intended empty WIRE bay disconnects **only focused source->MAIN**. No accidental global mute. Escape, pointercancel, invalid drop or unchanged selection restore original exact graph + tip position. Reconnect by OUT->MAIN IN snap. Drag back onto origin cancels disconnect. Keyboard and touchscreen-safe alternative via pre-existing Matrix/Navigator. - A short click on connected MAIN socket inspects/selects the edge; explicit click toggle can be supported when deliberate/not confused with drag. It must never silently toggle when the user intended drag. - Drag CH1 OUT -> CH3 IN normally adds a parallel post-fader route and retains CH1->MAIN. Route-only is an explicit command/macro: atomic create CH1->CH3 and remove CH1->MAIN; other unrelated existing sends preserved. - Disconnect CH1->MAIN while CH1->CH3->MAIN still exists: audio may continue through CH3; do not falsely report silence. The WIRE graph, not last edited control, determines audible reachability. - Selected cable maps to exact stable edge ID for gain, unplug, replug, Undo. Multiple edges arriving at one jack never imply 'disconnect all'. Replug retains gain/tap when valid. -- Viewing/banking/filtering/collapsing/reducing motion does not change any routing edge or audio. In collapsed WIRE space show only minimal physical stub/dot; no resizing approved meter/fader/chassis. +- Viewing/banking/filtering/collapsing/reducing motion does not change any routing edge or audio. In collapsed WIRE space show only flat IN/OUT dots for committed custom routes, **no physical MAIN stub/cable**; no resizing approved meter/fader/chassis. - WIRE displayed colors and connections derive from accepted graph / GUI candidate state only, not CSS guesses or hard-coded CH indices. ## 4. Single connected control surface diff --git a/docs/workstreams/START_HERE_WIRE_FIRST_20261104.md b/docs/workstreams/START_HERE_WIRE_FIRST_20261104.md index 330112617..a44443bd2 100644 --- a/docs/workstreams/START_HERE_WIRE_FIRST_20261104.md +++ b/docs/workstreams/START_HERE_WIRE_FIRST_20261104.md @@ -1,3 +1,5 @@ +> **V59 MAIN RECONCILIATION (2026-11-04):** GUI Packet A merged as #376 + #383 (`main@f182e676`), including selected-only MAIN/CH wires and quiet collapsed bays. This runbook's older `1789000` baseline and all-CH default cable display are superseded by the [current native integration handoff](WIRE_V59_MAIN_NATIVE_ENGINE_RECONCILIATION_20261104.md). Native #266 + stacked C1 #384, GUI #271 and FAT #270 remain separate draft owners; see v8 snapshot-shape/non-LIVE handshake blocker. Never start Packet A from scratch or force-merge #377/#381. + # START HERE — ArSonMix WIRE-First FAST EXECUTION RUNBOOK **2026-11-04 | EXECUTE, DON'T RE-PLAN | user-approved release objective | NOT proof of shipped features** @@ -14,7 +16,7 @@ Read **this file first**. Refer to [PRD](../PRD_WIRE_FIRST_LIVE_ROUTING_20261104 - Ordinary channel on creation → **one real active POST_FADER unity CH→MAIN edge** even with no physical input. Existing saved intentionally disconnected state stays disconnected. - CH→CH WIRE: one audible enabled edge per ordered pair in MVP, default post-fader. Multiple incoming and outgoing routes allowed, acyclic only. Normal send **retains MAIN**; explicit ROUTE ONLY atomically creates CH→target and removes CH→MAIN; other sends unchanged. - No separate BUS/FX Return creation workflow now; **any universal channel receiving multiple wires IS a bus** and an insert-reverb channel receiving sends IS an FX return. Preserve current VST3 INSERT rack, existing native AUX/Show sessions and compatibility. Hide the new BUS/FX shortcut buttons in first-release UI, not their runtime legacy data. -- Every real CH→MAIN edge shows a **short MAIN-color cable dangling DOWN from channel OUT into the chassis**, and a matching **MAIN-color cable rising from below into pinned MAIN IN**. These are TWO visual fragments of ONE edge, NOT two PCM feeds. No full-width line, badges, cards, labels/CTAs, extra height or changing approved console geometry. CH→CH wires keep source channel colors. +- Every accepted CH→MAIN edge remains a **real graph edge**, regardless of display focus. Only the **one uniquely selected channel** may show a short MAIN-color source OUT + pinned MAIN IN fragment pair **while expanded**; both represent ONE edge, not two feeds. In collapsed mode no physical MAIN tail, plug fragment or noisy cable is shown; OUT LED is only for non-MAIN custom sends. Selected CH→CH wires keep source colors; all other cable paths stay hidden. No full-width MAIN line, badges, extra height or changes to approved geometry. - Focused channel selects exactly its CH→MAIN edge for MAIN jack interaction. MAIN sums N sources, but drag from MAIN jack must never disconnect all. No unique focus: only inspect via the existing Navigator/Matrix. Drag occupied MAIN plug >~10px, release in legitimate empty WIRE bay → disconnect that edge; drop on socket reconnect/replug; Escape/cancel/invalid drop → restore original edge/plug. Click and drag are distinct; a drop on already-connected MAIN cannot accidentally toggle sound off. Everything bound by edgeId. - WIRE, OUT selector, MAIN, Matrix, Navigator, Scenes/Undo and sockets must derive from **ONE graph**, not unrelated `wireEdges` + `track.output` + `sendSlots` + split-input claims. Physical capture/output patches remain separate from internal routing. During GUI-only work status = SIMULATION; production LIVE only via native accepted graph snapshot + same-revision ACK. diff --git a/docs/workstreams/WIRE_V59_MAIN_NATIVE_ENGINE_RECONCILIATION_20261104.md b/docs/workstreams/WIRE_V59_MAIN_NATIVE_ENGINE_RECONCILIATION_20261104.md new file mode 100644 index 000000000..1079e5a5b --- /dev/null +++ b/docs/workstreams/WIRE_V59_MAIN_NATIVE_ENGINE_RECONCILIATION_20261104.md @@ -0,0 +1,48 @@ +# WIRE GUI V59 → Native ENGINE handoff — reconciled main + +**2026-11-04 · owner synchronization / integration contract · NOT native-audio release proof** + +## 1. Exact state and single owners + +- **Reference GUI source of truth:** `main@f182e676bdfb520a4f9fc521fa4748f3046df262` from merged [#383](https://github.com/masarray/arsonmix/pull/383). [#376](https://github.com/masarray/arsonmix/pull/376) installed the reference Guardian, accepted graph and paired MAIN fragments; V59 adjusted focus, collapse and OUT. GitHub Pages [published this SHA](https://github.com/masarray/arsonmix/actions/runs/41811077047). Reference code: `site/preview-v2/index.html` and `assets/mixer-wire-dots.css`. +- **Native ENGINE sole owner:** draft [#266](https://github.com/masarray/arsonmix/pull/266), `milestone/m5-universal-channelid-vst3-lease-migration-20261101`; B1 [#375] and B2 [#379] were absorbed into ENGINE ownership. C1 [#384](https://github.com/masarray/arsonmix/pull/384) is stacked on #266, **not yet merged to main**. +- **Production WebView/GUI owner:** draft [#271](https://github.com/masarray/arsonmix/pull/271), `work/operator-console-v6`, particularly `web/mixer-layout.js`. This is **not** the same file as `site/preview-v2/index.html`. +- **Joined FAT/release owner:** draft [#270](https://github.com/masarray/arsonmix/pull/270); hardware crackle [#15](https://github.com/masarray/arsonmix/issues/15) remains open. Do not promote universal/CH11/physical silence without evidence. + +**Main is the visual/UX baseline, NOT a native engine cutover.** Reconcile #266/#271/#270 at a single qualified integration SHA. Engine #266 currently diverges from main; do not fast-forward or bulk-merge a 100+ commit native branch into approved GUI source. Retain the already merged `#383` UI and existing fader/meter/FX checkpoints. Superseded draft GUI [#377](https://github.com/masarray/arsonmix/pull/377) and [#381](https://github.com/masarray/arsonmix/pull/381) must not overwrite V59 with their stale full-tree changes. + +## 2. UI behavior that the native accepted graph must drive + +| User-visible invariant (V59 approved) | Native accepted-graph projection | +|---|---| +| `CH → MAIN` exists by default and remains a real accepted graph edge | One enabled `graph.edges[]` per channel→MAIN; never synthesize/duplicate PCM from a CSS fragment | +| Wire paths appear only for **exactly one selected channel** | Local selection filters accepted edges with `from === selectedId` OR `to === selectedId`; unrelated paths hidden; no `ALL wires` mode | +| MAIN source+receiver short curved fragments are visible only for uniquely selected CH and only when expanded | Both physical fragments project **the same** accepted `edgeId`; MAIN IN docks at inner dot; no full-cross-mixer MAIN path | +| Collapsed/folded WIRE is quiet | No visible MAIN fragment, tail/pseudo-cable or animated wire; flat low-key IN/OUT contacts only | +| OUT lights only for a real **non-MAIN** outgoing edge | `connectedOut = edges.some(e => e.enabled && e.from===id && e.to!==mainChannelId)`; default MAIN alone MUST NOT light OUT, expanded **or** collapsed | +| IN marks real accepted incoming (non-MAIN for channel strips) | Never infer connection from an unused legacy SEND, `track.output`, or CSS-only `data-wire-main-edge` | +| Selected cable, unplug/retarget/Undo retain exact edge identity | Use accepted decimal-string `edgeId` (not JS `Number`, channel index or color). Non-selected routes remain valid but invisible | +| No unique focus | No active physical MAIN plug selection and no cross-strip wire painting; Navigator/Matrix can inspect graph | + +Source reference uses local numeric demo track IDs and `wireEdges` for browser simulation. **Never pass those IDs into native as ChannelId/EdgeId**, nor treat simulation's live graph as PCM evidence. Map the **behavior**, not its JavaScript object. + +## 3. One v8 socket, one accepted native source + +Use existing `contracts/console-puzzle-v8.json`, `schemaVersion=6` and events `arMixConsoleSubscribe`, `arMixConsoleSnapshot`, `arMixConsoleIntent`, `arMixConsoleAck`. A native WIRE intent uses `operation:"APPLY_WIRE_TRANSACTION"` and *the existing* `requestId`, `deviceEpoch`, `baseGraphRevision`, `baseRosterRevision`, `targetChannelId`, `payload:{reason,changes}`. The **only** target graph is the installed `LiveAudioEngine → LiveDryRoutingLab → DynamicNativeSessionPublisher` graph, not a browser route or second callback. All uint64 IDs/revisions are canonical decimal strings; use JS `BigInt` for comparisons. + +Contract alignment required at **native producer #384 and GUI consumer #271** before claiming joined integration: + +1. C1 `nativeBusStatus().channels[]` currently emits `format`, `primaryOutput`, `parallelSends` and sparse physical `source`; native `edges[]` emits `edgeId/from/to/tap/gainLinear/primaryOutput`. These are diagnostic/native-internal shapes, **not yet the v8 universal GUI shape**. +2. Production `web/mixer-layout.js::validSnapshot` currently expects each channel to have `processingFormat`, `inserts[]`, `sends[]`, a real `mainChannelId`, and each accepted AUDIO edge to have `enabled:boolean`, `signalKind:"AUDIO"`. Normalize from **real accepted native values** on the producer; do not fabricate physical pins, vendor parity or LIVE meter signals. The MAIN ID must come from a unique accepted native MAIN roster entry. `source.physicalPins[]` must come from the **verified** callback/device map if present. +3. C1 deliberately keeps `productionCallbackLive=false` pending full vendor FX/Show/monitor parity, but GUI `supported()` currently requires it to be true, while `validSnapshot()` rejects all nonempty graph rows/ops when it is false. This is a **real handshake blocker**, not fixed by green isolated native CTest. Agree explicitly on an interim, strictly gated **native WIRE accepted readback / NOT PRODUCT LIVE** state: actual installed PCM + native published graph + operation capability may be inspectable in joined FAT, while the product stays labeled NOT LIVE. No sample simulation or optimistic cable recolor. If producer cannot prove installed PCM, do not export active WIRE ops/channels. +4. `graph.capabilities.supportedOps` may expose `APPLY_WIRE_TRANSACTION` **only** when installed native routing and matching revisions are verifiably admitted. Unsupported legacy M4 must remain in its scoped `legacyM4` namespace. No synthetic `productionCallbackLive=true` to bypass the GUI's validator. +5. GUI only paints a new accepted cable after matching ACK `requestId/epoch/graphRevision/rosterRevision` **and subsequent native snapshot**. Rejection, stale request, device swap or pending keeps previous accepted graph. MAIN gesture removes only the selected edge. + +## 4. Integration and release gates + +- **Packet A (merged GUI reference):** #376 + #383; source, 1366/1680/1920 × density/drag/Undo/Scene/safety tests on main are qualified as **simulation** only. +- **Packet B (native owner):** #266 + #379, C1 #384 stacked; qualify PCM sample-exact direct and multi-hop fan-in/out, stable EdgeId, transaction rollback, one callback, real VST3 and no RT allocations/locks on exact Windows CTest SHA. **Do not force-merge #266 now**. +- **Packet C (native GUI #271):** consume the normalized v8 native producer snapshot and same-revision ACK; selected-only visible cables and MAIN custom OUT logic must use accepted `graph.edges[]`; no browser route mutation as authority. Add a **native-produced** successful WIRE snapshot/ACK + stale/REJECTED replay test; never handcraft a purported native fixture. +- **Packet D (#270):** build one exact joined Windows SHA, test original M4 10CH+4AUX/CH1 editor/VST leases/Show and new WIRE, verify hardware #15. Only then consider `productionCallbackLive=true` and product-ready status. + +No new CI workflow or duplicated audio engine is justified by this handoff. Use the existing fast contract test + owner-specific Windows/Chromium jobs, then one joined FAT gate. The next engine/GUI agent should start from **this exact current-main handoff**, not reopen stale GUI draft PRs. diff --git a/tests/wire_main_native_handoff_contract.test.cjs b/tests/wire_main_native_handoff_contract.test.cjs new file mode 100644 index 000000000..036be23a3 --- /dev/null +++ b/tests/wire_main_native_handoff_contract.test.cjs @@ -0,0 +1,50 @@ +"use strict"; +/* Zero-browser/zero-audio handoff guard; the native-produced fixture and + Windows joined FAT remain separately mandatory. This test verifies only + approved GUI display invariants + additive v8 contract, never PCM. */ +const assert=require("node:assert/strict"); +const fs=require("node:fs"); +const path=require("node:path"); +const root=path.resolve(__dirname,".."); +const read=p=>fs.readFileSync(path.join(root,p),"utf8"); +const contract=JSON.parse(read("contracts/console-puzzle-v8.json")); +const ui=read("site/preview-v2/index.html"); +const css=read("site/preview-v2/assets/mixer-wire-dots.css"); +const handoff=read("docs/workstreams/WIRE_V59_MAIN_NATIVE_ENGINE_RECONCILIATION_20261104.md"); + +assert.equal(contract.schemaVersion,6,"The installed Console v8 envelope must not be replaced"); +assert.equal(contract.wireAcceptedProjection.operation,"APPLY_WIRE_TRANSACTION"); +assert.equal(contract.wireAcceptedProjection.requiredNativeReadback.ids, + "canonical decimal uint64 strings, never Number"); +for(const f of ["mainChannelId","edges","revision","rosterRevision"]) + assert(contract.wireAcceptedProjection.requiredNativeReadback.graph.includes(f),f); +for(const f of ["edgeId","from","to","enabled","signalKind","tap","gainLinear"]) + assert(contract.wireAcceptedProjection.requiredNativeReadback.edge.includes(f),f); +for(const f of ["requestId","deviceEpoch","baseGraphRevision","baseRosterRevision", + "operation","targetChannelId","payload"]) + assert(contract.intentRequired.includes(f),f+" v8 envelope"); +for(const f of ["requestId","status","deviceEpoch","graphRevision","rosterRevision","errorCode"]) + assert(contract.ackRequired.includes(f),f+" v8 ACK"); +assert(contract.wireAcceptedProjection.consistency.includes("later native snapshot")); +assert(contract.wireAcceptedProjection.stagePolicy.includes("productionCallbackLive false")); + +assert(ui.includes("function syncMainWireFragments()")); +assert(ui.includes("const focus=selectedChannels.length===1?selectedChannels[0]:null;"), + "MAIN display must require exactly one selected channel"); +assert(ui.includes("paintMainWireFragment(lane,!folded&&focus?.id===t.id?edge:null,false);"), + "Unselected channels may not paint physical MAIN cables"); +assert(ui.includes("paintMainWireFragment(masterEl,!folded?chosenEdge:null,true);"), + "Folded MAIN must not paint a hanging receiver cable"); +assert(ui.includes("const custom=committed.filter(e=>e.destId!==master.id);"), + "Only custom non-MAIN edges may illuminate OUT"); +assert(ui.includes("function wireOutgoingCount(id){return outgoingWires(id).filter(e=>e.destId!==master.id).length;}"), + "OUT count must not include default MAIN"); +assert(ui.includes("const source=dragging?wireSourceTrack(wireGesture.sourceId):"), + "Physical cable display must not depend on the pinned control source"); +assert(!ui.includes("wireView==='all'"),"ALL cables display restores unrelated spaghetti"); +assert(!css.includes(".wire-fold-summary[data-wire-main-edge]::after"), + "Folded MAIN pseudo-tails must never reappear"); +assert(css.includes("collapsed-send .strip .wire-main-fragment"), + "CSS must hide physical fragments in collapsed WIRE"); +assert(handoff.includes("#384")&&handoff.includes("#271")&&handoff.includes("#266")); +console.log("PASS V59 main GUI / v8 native WIRE handoff contract (NOT live PCM FAT)");