Skip to content

Commit 8a3b4b4

Browse files
committed
fix(runtime): discharge FLOW_CONVERSION_CONFLICT's pending-registration row (#9567)
#9460 landed on main (PR #9573) while this branch's registration PR was in the merge queue, adding a pending-registration row for FLOW_CONVERSION_CONFLICT to dispatcher-error-vocabulary.ts's UNREGISTERED_CODE_SITES. That collided with this branch's ledger admission of the same code -- a registered code with a pending-registration row still on file fails the #8087 conformance gate in the direction the row's own docs describe ("a pending-registration row whose code is registered fails the gate in the other direction"). Ratchets the row out following the #8846/#9246 precedent exactly: delete the discharged row, fold a one-line note into the running log at the top of UNREGISTERED_CODE_SITES. owd_widening_forbidden -- the #9460 batch's other new row -- stays pending; its lowercase spelling is a naming decision for the maintainer (#9567 half 2), not a plain admission, and is untouched. node scripts/check-dispatcher-error-vocabulary.mjs: PENDING_LEDGER_REGISTRATION 2 -> 1 (only owd_widening_forbidden remains). error-envelope.conformance.test.ts (the #8087 pin): 51/51 passing. error-code-ledger.test.ts: 17/17 passing. check:generated: all 13 artifacts still up to date after the merge. Part of #9567
1 parent fb0a442 commit 8a3b4b4

1 file changed

Lines changed: 14 additions & 20 deletions

File tree

‎packages/runtime/src/dispatcher-error-vocabulary.ts‎

Lines changed: 14 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,12 @@ export const UNREGISTERED_CODE_SITES: readonly UnregisteredCodeSite[] = [
216216
// UNIQUE_SCOPE_CONFIRMATION_REQUIRED at the marketplace install seam's
217217
// `plugin-route` door (stamped through a constant in an object literal, the
218218
// shape `objlit` could not see), and #9246 registered it under
219-
// `@objectstack/cloud-connection`, ratcheting that row out the same way. A
219+
// `@objectstack/cloud-connection`, ratcheting that row out the same way.
220+
// #9460's further-widened scan then reported two sites at once —
221+
// `FLOW_CONVERSION_CONFLICT` and `owd_widening_forbidden` — and #9567
222+
// registered the former under `@objectstack/metadata-protocol`, ratcheting
223+
// only that row out; `owd_widening_forbidden`'s lowercase spelling is a
224+
// naming decision, not a plain admission, so it stays pending below. A
220225
// future unswept producer lands here as an `unclassified-site` finding and
221226
// gets a new row (then a spec-lane registration, then the row comes out
222227
// again). ──
@@ -357,25 +362,14 @@ export const UNREGISTERED_CODE_SITES: readonly UnregisteredCodeSite[] = [
357362
},
358363

359364
// ── pending registration [#9460]: found by the widened scan ────────────
360-
// Both rows are the deliverable of #9460, not a regression: the scan could
361-
// not SEE either site before it learned the two stamp positions below, so
362-
// "no finding" meant "not looked at", which is the failure this gate
363-
// exists to prevent.
364-
{
365-
code: 'FLOW_CONVERSION_CONFLICT',
366-
file: 'packages/metadata-protocol/src/protocol.ts',
367-
shape: 'assign',
368-
door: 'rest',
369-
verdict: 'pending-registration',
370-
why:
371-
'A live 409 from the metadata write path: the conversion pass refuses a body whose token is a ' +
372-
"live name in the environment, and stamps `(err as any).code = 'FLOW_CONVERSION_CONFLICT'` " +
373-
'beside `status = 409` before throwing. [#9460] The `assign` shape demanded a BARE identifier ' +
374-
'to the left of `.code`, and this site writes a cast — `(err as any)` puts a `)` exactly where ' +
375-
'the anchor wanted a word character — so the single most common way this repo stamps a code ' +
376-
'onto a constructed error was invisible in the shape named for it. Registering it is the ' +
377-
"`packages/spec` lane's call (#8846's batch); this row records the measurement.",
378-
},
365+
// This row is the deliverable of #9460, not a regression: the scan could
366+
// not SEE the site before it learned the stamp shape below (a
367+
// code-carrying helper), so "no finding" meant "not looked at", which is
368+
// the failure this gate exists to prevent. Its sibling from the same
369+
// #9460 batch, `FLOW_CONVERSION_CONFLICT`, ratcheted out via #9567 (see
370+
// the running log above); this one stays pending because admitting it AS
371+
// SPELLED is what ADR-0112 D1 forbids — the rename-or-keep-the-#9106-demote
372+
// call is the spec lane's and is not resolved here.
379373
{
380374
code: 'owd_widening_forbidden',
381375
file: 'packages/plugins/plugin-security/src/object-posture-gate.ts',

0 commit comments

Comments
 (0)