#!/usr/bin/env bash
# Board operations for the #331 intake — one script, sequential, each ack printed.
S="C:/Users/decid/AppData/Local/Temp/claude/C--Users-decid-Documents-projects-spt-core/77fdcae7-0e05-4072-99bf-aee3d7a77e06/scratchpad"
say() { echo "== $1"; }
send() { spt shell send alchemy-0 "$1" 2>&1 | tail -2; sleep 6; }
cmd()  { spt shell cmd alchemy-0 "$@" 2>&1 | tail -2; sleep 4; }

say "mint manifest fields"
send "$(cat "$S/req-manifest-changelog.txt")"

say "comment #332"
send "comment #332
Ruled shape (doyle, grill with operator 2026-09-24, pulled into releases#331). Build facts: docs = mdBook, nav static in docs-site/src/SUMMARY.md, daemon serves bytes verbatim; every page loads one toc.js — that is the seam. The daemon serves a per-node toc.js = static TOC + a generated part INSTALLED ON <NODE-NAME> placed before Reference. Cross-node proxying already shows the owning node's part. Six rulings: (1) always emit the three collapsibles Harness / Shell / Gateway Adapters, even empty, so Reference numbering is identical on every node; (2) spt-core itself is the part's first item (→ existing changelog page); (3) each adapter page header carries the update facts (version · installed HH:MMAM YYYY-MM-DD · via <source>), same data as releases#337; (4) every installed adapter gets a page; summary / changelog / docs link render only when declared, else one dim line; (5) manifest fields summary + changelog per the sibling request; changelog rendered at install time to a changelog.html sidecar, daemon stays a byte-server; (6) gateways are adapters and land under Gateway; shell instances are not listed. Header link to /a/<adapter>/docs/ only when docs_dir is declared (the tangential ask). -doyle@HFENDULEAM"

say "comment #329"
send "comment #329
Triage (doyle, 2026-09-24, main @ 11066dce). The field run is a 0.53.0 node updating to 0.72.0: the composite runs in the OLD process, and 0.53.0 predates the fix. REQ-ADAPTER-FLOOR-VS-STAGED-CORE (a47bcad4, shipped v0.60.0) already judges the adapters leg against the STAGED core's product_version (cli.rs ~9656, floor_basis), degrading to the running version only when nothing is staged. So any node ≥0.60.0 no longer reproduces this; a <0.60.0 node reproduces it once, on the hop that carries it past 0.60.0. Pulled into releases#331 for closure with evidence rather than a code lane: the background updater (releases#336) runs the adapters leg from the NEW brain after the swap, which makes the class structurally impossible on that path; the composite keeps the v0.60.0 fix. Acceptance arm: one composite from a pre-0.60 staged binary is not buildable, so the gate is the existing unit (floor vs staged) plus the #336 int. -doyle@HFENDULEAM"

say "comment #2"
send "comment #2
Rider on releases#331 (grill 2026-09-24): verify-first. Since this was filed, ADR-0025 / the CRC swap ship rename-aside for adapter binaries under a running process. Arm 1 measures whether spt adapter update of a LIVE shell/service exe (alchemy as ResidentService, PACER) converges without stand-down on Windows today; the ruled rename-then-replace step-aside is built only if that measurement says no. Bundled + auto-updated shells (releases#338, #336) make this the load-bearing case. -doyle@HFENDULEAM"

say "comment #62"
send "comment #62
Ruled (b) at the releases#331 grill, 2026-09-24: force the exec bit on the manifest-DECLARED entry binary only (never a blanket chmod), and print the packaging defect loud (ADAPTER_ENTRY_EXEC_FORCED:<adapter>: <path> extracted <mode> — packaging defect upstream). Reason: with unattended applies (releases#336) a faithful-extract brick is silent and fleet-wide; a forced bit keeps the node working and the loud line keeps the defect visible. Rides #331. -doyle@HFENDULEAM"

say "comment #64"
send "comment #64
Rides releases#331 (grill 2026-09-24): spt update status states loudly when identity/release-keys.json overrides the trust anchor — key id, channel, and its EXPIRY (an expired override = a node that can never update again, the loudest form). An unattended updater (releases#336) that silently never updates is this incident at fleet scale, so the status line is a milestone rider, not a nicety. -doyle@HFENDULEAM"

say "comment #334"
send "comment #334
Assessed at the releases#331 grill (doyle, 2026-09-24). Read against ADR-0004: this inverts the rejected whole-daemon FD-passing — the ConPTY/child handles never move, they live in a process too dumb to need updating, and the broker re-attaches to it the way the brain already re-attaches to the broker (cursors + bounded buffer, a proven pattern one level down). Costs identified: a new process kind + IPC; parent-death survivability (no KILL_ON_JOB_CLOSE on the membrane); Windows SERVICE hosting (the service process IS the broker — SCM reads a hot-swapped main as stopped, so the service host must become launcher/membrane); listening sockets (QUIC UDP: forward datagrams through the membrane, a hop per packet, or rebind + peers re-dial, a blip); membrane generation chains. Hard to reverse, surprising later, real trade-off → own milestone under an ADR + loopback spike, not a #331 rider. Operator ruled: #331 keeps the seam open — the auto-apply gate is a SET of classes in config (default brain_only + adapters), so a membrane later widens the set without re-plumbing (CONTEXT.md cadence/consent). Same defect family: releases#305 (webserver in the broker). Moving to eval. -doyle@HFENDULEAM"

say "flags + state"
cmd flag "#264 -needs-operator"
cmd flag "#332 -needs-operator"
cmd state "#334 eval"

say "milestone add"
cmd milestone "add #331 #330,#322,#264,#269,#278,#329,#259,#332,#2,#62,#64,#335,#336,#337,#338,#339"
say "done"
