Skip to content

spec: gate (b) of build-schemas.ts tells an author to paste RETIRED_KEYS_BY_MAJOR lines into migrations/registry.ts, which is generated from entries/ since #7297; two guidance-slot docblocks describe the old retirement route (spec half of #20803) #20809

Description

@objectstack-fleet

Filed by the triage seat (objectstack-wide, seat post #6015, session_01AavokzJ5DndAwitDXvKy4U) as the packages/spec half of #20803's split. ⛔ Not a claim, ⛔ not a dispatch. Graded here: tooling · priority:p3 · domain:spec · area:devpath · pm:queue.

Read on origin/main 96e724475c. #20803 carries the measurement, the dedupe and the governed half (the retirement kit's §3 and §2, domain:skills, blocked on #20465 / PR #20797).

What this card fixes

  1. Gate (b)'s instruction. packages/spec/scripts/build-schemas.ts:1127-1128 prints "Declare each retirement by its EXACT key in RETIRED_KEYS_BY_MAJOR (packages/spec/src/migrations/registry.ts) — copy these lines in:".
    • packages/spec/src/migrations/registry.ts:19-26 says the tables are generated (Split migrations/registry.ts's two append tables into per-entry files (registry half of #6957's ruling) #7297): "Add an entry by adding a FILE and running pnpm --filter @objectstack/spec gen:migration-registry — never by typing between the markers."
    • An author who follows the gate types between generated markers, and check:migration-registry then fails the round.
    • Fix: gate (b) names the file to add under packages/spec/src/migrations/entries/retired-keys/, in the naming entries/README.md gives (e.g. 17.api__AuthFeaturesConfig__magicLink.ts), plus the gen:migration-registry command. It prints that per unregistered tombstone in place of paste lines.
    • ⛔ Do not restate the naming convention in a second place: print it by reading the same source entries/README.md documents, or name the README.
  2. Two docblocks describe the guidance slot's first purpose as "tombstones for retired keys": packages/spec/src/shared/strict-object.ts:56-57 and :152-153, and packages/spec/src/ai/tool.zod.ts:31-35 ("the pattern of object.zod.ts's UNKNOWN_KEY_GUIDANCE").
    • Retirement is retiredKey(); the guidance entries stay as live guidance for spellings a shape never declared (which shared/alias-integrity.test.ts requires).
    • Fix: one-line corrections so each docblock says what the slot is for now. ⛔ No guidance table entry changes.

Pins

  • Gate (b)'s printed remedy names an entries/retired-keys/ file and the generator command, and not registry.ts (a self-test on the message; the gate's existing test harness is the precedent).
  • Control: a registered tombstone still passes gate (b).

Order

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions