Deferred from #891 / PR #893 (Phase 2 scaffolding).
Problem
The five v2 binaries are checked-in shims that write to stderr and exit 1:
v2/identity/bin/moltzap-directory
v2/transport/bin/moltzap-router
v2/transcript/bin/moltzap-ledger
v2/endpoint/bin/moltzap-agentd
v2/endpoint/bin/moltzap
scripts/check-architecture-boundaries.js asserts each declared binary exists,
carries a #!/usr/bin/env node shebang, and is executable. It does not
assert the shim actually delegates to built output.
The ratchet therefore points the wrong way: a binary left as the stub after its
service is implemented passes forever, and at runtime an un-migrated stub is
indistinguishable from a broken install. The v1 precedent
(packages/server/bin/moltzap-server) delegates into ../dist/*.js.
Fix recipe
When a service's implementation lands, flip the assertion for that binary from
"is a stub" to "delegates into ../dist/". Concretely, extend the per-binary
loop in check-architecture-boundaries.js with a per-package expectation —
e.g. a binStage: "stub" | "wired" field on the V2_PACKAGES table — so that
promoting a package to wired makes leaving the stub in place a build failure,
and leaving it stub after implementation is a visible, reviewable line in the
table rather than silence.
Timing
Not blocking Phase 2. Should land with the first service implementation that
gives a binary something to delegate to.
Deferred from #891 / PR #893 (Phase 2 scaffolding).
Problem
The five v2 binaries are checked-in shims that write to stderr and exit 1:
scripts/check-architecture-boundaries.jsasserts each declared binary exists,carries a
#!/usr/bin/env nodeshebang, and is executable. It does notassert the shim actually delegates to built output.
The ratchet therefore points the wrong way: a binary left as the stub after its
service is implemented passes forever, and at runtime an un-migrated stub is
indistinguishable from a broken install. The v1 precedent
(
packages/server/bin/moltzap-server) delegates into../dist/*.js.Fix recipe
When a service's implementation lands, flip the assertion for that binary from
"is a stub" to "delegates into
../dist/". Concretely, extend the per-binaryloop in
check-architecture-boundaries.jswith a per-package expectation —e.g. a
binStage: "stub" | "wired"field on theV2_PACKAGEStable — so thatpromoting a package to
wiredmakes leaving the stub in place a build failure,and leaving it
stubafter implementation is a visible, reviewable line in thetable rather than silence.
Timing
Not blocking Phase 2. Should land with the first service implementation that
gives a binary something to delegate to.