go: dedupe-and-types — shared stdio/store helpers, typed kinds #141
Labels
No labels
agent-blocked
agent-working
autopilot
bug
deferred
deploy-pending
enhancement
landing-pr
model-haiku
model-opus
model-sonnet
needs-design
needs-info
needs-triage
no-triage
out-of-scope
priority
ready-for-agent
ready-for-human
ready-for-session
rehearsal-183
snapshot-pending
standing-drive
wayfinder:grilling
wayfinder:map
wayfinder:prototype
wayfinder:research
wayfinder:task
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Depends on
Reference
Matou/idss#141
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Parent
Standards debt (duplicated code, primitive obsession). Filed from Ben's rulings 2026-07-26 after the review sweep of
6596977..9e946b7: integration-last was deliberate seam-first sequencing — now build the integration layer; and pay all standards debt now.What to build
The three verbatim NDJSON serve-stdio loops collapse into one shared helper; the four hand-rolled JSON load/mutate/save store shapes collapse into one; the access-kind bare string gains a proper type with named constants on the Go side and a string-literal union on the TS side (per the documented idiom), replacing the magic literals and switches.
Acceptance criteria
Blocked by
Task manifest
Done in
86b0297(onorigin/main). Duplication + primitive-obsession debt paid on three behaviour-preserving axes; wire frames unchanged, all suites green.1. One stdio serve helper. The three verbatim NDJSON serve-stdio loops (
founding,breakglass,clan) now delegate to one genericinternal/stdiobridge.Serve[Req,Resp]— the 4 MiB-line framing, blank-line skip, and one-response-per-line contract live once. Each bridge supplies only its request/response types, dispatch, andfailhelper.2. One JSON store helper. Seven hand-rolled load/mutate/save JSON round-trip stores collapse onto one generic
internal/jsonstore(Memory[T]+ atomicFile[T]). The refuse-or-migrate schema guard is passed as a per-consumerCheck[T]closure, sofounding/updatekeep their ownErrSchemaNewersentinels while the schema-less member/rescue ledgers passnil. Rebound consumers: foundingFileStore/MemoryStore, updateFileBackend/MemoryBackend, member ledger/invite/reset/audit, rescue share + operator-key ledgers. (The sweep found three more member stores beyond the four the ticket named — invite/reset/audit — all folded in, so no copy of the shape survives.)3. Typed access kinds at every boundary. The founding access/address kinds are now named Go types (
AccessKind/AddressKind+ constants) and TS string-literal unions (per CODING-STANDARDS.md). Every switch and comparison keys off a constant; no bare magic string remains; theinstallPathOwnVPSentanglement is decoupled from the access kind.Acceptance:
New packages carry direct tests. Evidence:
go build/vet/test/lintgreen on both modules; appvue-tsc+ 309 vitest green; dashboardvue-tscgreen.