Skip to content

[finding] the runtime save gate never receives a sduiManifest — the third independent cause of validateTree inertness, untouched by the #12924 wiring #13445

Description

@claude

Filed by the os-dev seat for #12924 (session session_01Pk26oZ12t5N1hwGW1m1MgC, round R31), on the PM's instruction that this deliberately-held finding becomes a sub-issue once the wiring ruling landed. It was measured last round (comment 5460427948 on #12924, correction 2) and deliberately NOT filed then, so that no parallel dev would arm the gate through the back door while the vocabulary question was open. The wiring has now landed for the CLI seam; this is the remaining production seam.

The measurement (re-taken 2026-08-30 on main-merged head c821db6)

packages/metadata-protocol/src/protocol.ts:4432 is the ONLY production caller of evaluateRuntimeAuthoringGate, and its argument object carries no sduiManifest at all (grep over the argument block: 0 hits), while the gate's own input type declares the optional parameter (packages/metadata-protocol/src/runtime-authoring-gate.ts:540) and forwards it when present (:599). The only other caller outside cli/lint is scripts/bench/runtime-publish-gate.bench.mts, which passes undefined explicitly.

So the ADR-0080 save-time gate is parse-only for a DIFFERENT reason than the CLI seam was: not "no artefact on disk" but "the parameter is never supplied". PR for #12924 wired the CLI seam (repo-root sdui.manifest.json, resolved by resolveSduiManifest() from cwd) — os validate / os build / os lint now run full validation. Runtime metadata writes (the PUT /api/v1/meta door and every other protocol write path) still validate html-page sources parse-only.

What settling this needs

A decision about where the runtime gets a manifest from, which is not obvious: the protocol layer runs server-side inside arbitrary deployments, where cwd resolution is meaningless and @objectstack/console/dist subpath resolution is measured-broken (exports map: ERR_PACKAGE_PATH_NOT_EXPORTED, #12924 comment 5460427948 measurement 6). Candidate shapes — a kernel-boot manifest resolution handed down to the protocol, a published manifest inside a package the runtime already depends on, or an explicit deployment input — have different blast radii, and the first live run would hit the same vocabulary noise #12924's ratchet ledger itemizes (200 plain-HTML-tag errors over the showcase corpus, 0 real).

Sequencing

Blocked-by: #12924's PR landing (the artefact, the freshness gate and the ratchet-to-zero ledger are its prerequisites — arming the runtime gate against the same corpus without them re-creates the first-run noise problem this ledger already itemizes).

Generated by Claude Code


Generated by Claude Code

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions