feat(devx): add the ruled vendor-wire state to check-route-envelope's surface-3 grammar (#10554) - #10562
Merged
Merged
Conversation
… surface-3 grammar (#10554) Maintainer ruling 2026-08-21 (#10554, option A of the PR #10352 escalation): surface 3 gains a fourth state, vendorWire, for a body this repo builds whose shape is a vendor's wire format required by that vendor's client library — surface 2's kind 3, met as a built literal instead of a relay. - stays counted like this surface's exempt: closed at exactly N bodies - note mandatory, labelled vendor: / reader: / partner: - pairwise exclusive with ratchet and exempt - widening/adding is ⛔ MAINTAINER-ONLY (#8435 marker discipline) - the const-hoisting evasion is named in the gate's prose as a forbidden move - self-test: accept-with-note, reject-without-note, reject beside ratchet and exempt, authority marker on widening, shrink direction, empty declaration Machinery + prose + self-test only: zero entries on main — the adjudicated entry lands with its file on PR #10352, under the ruling that authorized it. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XLSPyJTC8HwTFr1i6hj3rK
os-elon
marked this pull request as ready for review
August 21, 2026 03:59
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #10554
Maintainer ruling implemented (2026-08-21, verbatim, untranslated)
Full escalation that produced the fork: PR #10352, comment 5364581437.
What landed —
scripts/check-route-envelope.mjsonly, machinery + prose + self-test, zero entriesNew surface-3 state
vendorWirein the shared surface-3/4 grammar (auditPluginRouteModuleserves both tables — one grammar, two receiver dialects, per the gate's own #9937 argument, so the state is available toEXPRESS_RESPONSE_MODULESunder the same rules):exempt: same counters, closed at exactly N bodies in exactly these files; a new vendor-shaped body fails until declared (widening diagnostic), and a vanished one fails in the shrink direction ("fewer than pinned").notemandatory and structured: must carry the labelled fieldsvendor:/reader:/partner:. Labels rather than free prose so the triple stays greppable and re-verifiable; a missing note and a label-less note are distinct diagnostics.ratchet(a conversion that can never happen is not tracked drift) and withexempt(one body sits on exactly one ruled boundary), each with its own diagnostic.⛔ MAINTAINER-ONLY— sameRATCHET_AUTHORITY_MARKERpath as exempt-widening (check:engine-double-contractfires at CI time, not authoring time — four independent PRs tripped it on brand-new test files in one shift, and a pre-warning in the brief did not prevent it #8435), asserted by self-test.vendorWiredeclaration over nothing is refused, mirroring the empty-exempt refusal (no standing waivers).Const-hoisting evasion named in prose (ruling clause): a new header section "The
consthoist is the named forbidden move, not a fix" records that hoisting a built body literal into aconstturns the gate green with zero wire change and is the exact state the gate exists to prevent; the honest paths arevendorWire(maintainer's) or a byte-clean stop-and-report. The NOT-DECLARED and vendor-widening diagnostics both point at it, so the next agent hitting this class of red finds the prohibition before rediscovering the evasion.Boundary prose keeps the three ruled directions distinct in one block: #9389
exempt(pre-auth, our own shells, no credential — opposite population), #9436 (SDK-read discovery bodies, repo-owned shape, one-key migration → enveloped),vendorWire(vendor owns the shape, vendor client reads it). WHO owns and WHO reads decide.Self-test (existing idiom, driven through the pure
auditPluginRouteModule): accepted with conforming note · rejected without note · rejected with label-less note · rejected besideratchet· rejected besideexempt·⛔ MAINTAINER-ONLY+ hoist-naming asserted on widening · shrink direction red · empty declaration refused · negative control that #9389 exempt diagnostics are unchanged.Mechanism assumption measured (PM question)
A dormant table entry for an undiscovered file is a hard ERROR, not tolerated. Probe: injected a
vendorWireentry forpackages/plugins/plugin-auth/src/DORMANT-PROBE-does-not-exist.ts(injection confirmed on disk:grep -c= 1), ran the audit → exit 1, diagnostic "declared in PLUGIN_ROUTE_MODULES but no longer writes a Hono response — moved, deleted, or converted? Update the table." Restored from the committed branch (grep = 0,git statusclean, audit exit 0). So this PR ships zero entries, and PR #10352's branch adds theadmin-impersonate-endpoint.tsentry after mergingmain— the ruling authorizes exactly that one entry. A placeholder comment section inPLUGIN_ROUTE_MODULESrecords this so the empty state reads as deliberate.Gates (all at 41ba7bf, the head this PR proposes; exit codes captured before any pipe)
node scripts/check-route-envelope.mjs --self-test→ exit 0, "✓ check-route-envelope self-test passed"node scripts/check-route-envelope.mjs→ exit 0; main's population unmoved — 7/2/1 on surface 1, dispatcher domains unchanged, surface 3 "8 conformant, 0 ratcheted, 3 exempt, 0 vendor-wire", surface 4 "2 conformant, 2 ratcheted, 0 exempt, 0 vendor-wire"pnpm check:route-envelope(the lint.yml family entry) → exit 0node scripts/check-ratchet-remedy-authority.mjs→ exit 0, "OK … 105 scripts swept … 7 mark … 3 turn it down … Control corpus: 19 hand-classified scripts";--listconfirmscheck-route-envelope.mjsstays in the excluded set (no new offer-with-testimony reach, so the sibling's CONTROL corpus needs no edit)node scripts/check-nul-bytes.mjs→ exit 0 ("no raw ASCII control bytes"), plus a targeted control-byte grep of the edited file (0 hits — the ⛔ marker is multi-byte UTF-8, not a control byte)pnpm check:cross-package-test-inputs→ exit 0, "All 60 self-test cases passed. OK: 12 package(s)…"node scripts/pm/dispatch-gates.mjs(no paths — change set derived from merge base) → exit 0; named exactlycheck:route-envelopeandcheck:cross-package-test-inputsfor this diff, both run aboveCI-tooling-only change (no published package touched) →
skip-changesetlabel, per repo convention (measured: scripts-only #10506 landed the same way).⛔ Draft on purpose: landing order and review are the PM's. Do not flip ready; do not arm auto-merge.
🤖 Generated with Claude Code
Generated by Claude Code
Generated by Claude Code