Repository navigation
fix(metadata-protocol)!: one reader of OS_METADATA_WRITABLE — the legacy OBJECTSTACK_METADATA_WRITABLE, removed in 11.0, no longer opens the hatch at the type listing - #22440
Conversation
…tocol stops honouring the spelling 11.0 removed The 11.0 removal of ObjectStack's own legacy env names edited the repository's reader of OS_METADATA_WRITABLE and missed the protocol's hand-copied one, which kept honouring OBJECTSTACK_METADATA_WRITABLE. Under the legacy spelling alone the type listing advertised the hatch for a type while a create of a new item of that type answered 403 NOT_CREATABLE. The protocol's envWritableTypes() now delegates to the repository's envWritableMetadataTypes(), the one reader, which reads only the preferred spelling; the two reset hooks clear its one cache. Claude-Session: https://claude.ai/code/session_01Bw3y2DWhT9RPnrmDsNqEVG Co-authored-by: Claude <noreply@anthropic.com>
…hut — listing and save door agree S2's dual-spelling seal pins keep their preferred-spelling legs; the legacy legs now assert the hatch is shut under OBJECTSTACK_METADATA_WRITABLE alone (listing reports no env override, every refusal equals the shut one), with the preferred spelling as the control. The dispatcher pin covers the card's two readings: under the legacy spelling alone the type listing and the save door both refuse, for a type the hatch would name (job) and one it would not (picklist). Claude-Session: https://claude.ai/code/session_01Bw3y2DWhT9RPnrmDsNqEVG Co-authored-by: Claude <noreply@anthropic.com>
…11"; breaking changeset for the one reader Claude-Session: https://claude.ai/code/session_01Bw3y2DWhT9RPnrmDsNqEVG Co-authored-by: Claude <noreply@anthropic.com>
…-environment rename Claude-Session: https://claude.ai/code/session_01Bw3y2DWhT9RPnrmDsNqEVG Co-authored-by: Claude <noreply@anthropic.com>
…lists Claude-Session: https://claude.ai/code/session_01Bw3y2DWhT9RPnrmDsNqEVG Co-authored-by: Claude <noreply@anthropic.com>
📓 Docs Drift CheckThis PR changes 1 package(s): 1 hand-written doc(s) NAME something this change touched and may need an implementation-accuracy re-verification:
⛔ 2 release-owned page(s) also name something this change touched. These are read-only:
What this run could not see
Coarse fallback — 11 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): Which tree this was computed onThis run read A worktree cut from an older # while this PR is open — GitHub drops the merge commit once it closes
git fetch origin ce566e1d92cc8eba750d89fdb5c7e75c0d78d6d3 && git checkout ce566e1d92cc8eba750d89fdb5c7e75c0d78d6d3
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin da159f74e60afdd1f9cfb87ce6405381354932e0 365186528e2f7a8b4e605b69d00b829de64e09d4 && git checkout -B drift-repro da159f74e60afdd1f9cfb87ce6405381354932e0 && git merge --no-ff 365186528e2f7a8b4e605b69d00b829de64e09d4
node scripts/docs-audit/affected-docs.mjs --json da159f74e60afdd1f9cfb87ce6405381354932e0
|
|
|
…tch-legacy-spelling
Fixes #22411
Clause-②: no (narrowing)
What
OS_METADATA_WRITABLEnow has one reader.ObjectStackProtocolImplementation.envWritableTypes()feedsGET /api/v1/meta/typesand the protocol's write gates (isOverlayAllowed: the code-only create gate and the org-scope gate). It now delegates to the repository'senvWritableMetadataTypes(), which readsOS_METADATA_WRITABLEonly.resetEnvWritableCache()andresetEnvWritableMetadataTypes()both clear that reader's single cache. Under the legacy spelling alone, the listing and the save door now agree, because both refuse.Why
The 11.0 release removed ObjectStack's own legacy env names as a published breaking change. That was fdb41c0 (PR #2383), with the
v11-remove-env-aliaseschangeset in the 11.1.0 CHANGELOG of@objectstack/cli,@objectstack/objectqland@objectstack/types, anddocs/upgrading-to-11.md:121. The change edited the repository's reader and missed the protocol's hand-copied one, which kept honouringOBJECTSTACK_METADATA_WRITABLE.Measured on
origin/maine02833c at the dispatcher/metadoor, on both kernel shapes, with onlyOBJECTSTACK_METADATA_WRITABLE=jobset:GET /meta/typeslistedjobwithallowOrgOverride: trueandoverrideSource: env;PUT /meta/job/NEWanswered403 NOT_CREATABLEand stored no row.The seat's ruling on the card (comment 6076328784) is option B: finish 11.0's removal at the reader it missed. That ruling supersedes the card's earlier "do not retire the alias on this card" line. Premise re-checked on
b9222dc70before building:git grep OBJECTSTACK_METADATA_WRITABLEfinds no non-test producer. The non-test hits are prose (docs, ADR-0010, the S2 changeset) plus the reader itself. The positive control,OS_AUTH_SECREToverdocker/,examples/andapps/, finds 5 hits.Changes
packages/metadata-protocol/src/sys-metadata-repository.ts:envWritableMetadataTypesis exported at module level and its TSDoc names it the one reader. The package index does not re-export it, so the public surface is unchanged.packages/metadata-protocol/src/protocol.ts:envWritableTypesdelegates to it,resetEnvWritableCacheclears the shared cache, and the now-unusedreadEnvWithDeprecationimport is removed.protocol.packaged-base-refusal.test.ts: the listing reportsflowandpageasallowOrgOverride: falsewithoverrideSource: registry, and every managed-item verdict equals the shut one.packages/restrest-meta-managed-seal-hatch.test.ts: the same listing reading viaGET /api/v1/meta/types, and every PUT (and DELETE, on an environment kernel) answers what it answers with nothing set.packages/runtimemeta-managed-content-seal.test.ts: the card's pins at the dispatcher door. Under the legacy spelling alone, bothjob(the type named) andpicklist(a type not named) are listed shut and saved403 NOT_CREATABLEwith no row. Control,OS_METADATA_WRITABLE=job:jobis listedenvand saved200with a row, andpicklistis still refused.content/docs/deployment/environment-variables.mdx: the alias row goes back into the "Removed in 11" note, which undoes the move made in PR docs: implementation-accuracy pass — retire deprecated titleFormat example + evidence-backed doc fixes #2640..changeset/22411-hatch-legacy-spelling.md: BREAKING on@objectstack/metadata-protocol, gradedminoron the v18 pre line. It names the FROM and TO spellings and the one-line operator fix, and says it finishes 11.0's removal at the reader that kept it. ADR-0087 disposition:not-required (no-migration-prescription).check:adr-0087-registrationexits 0.Verification (head adbb0a5)
pnpm --filter @objectstack/metadata-protocol test: 223 files passed, 3 skipped; 28330 tests passed, 19 skipped. Lock VERDICT command-exit 0.pnpm --filter @objectstack/metadata-protocol run typecheckexits 0. Therestandruntimerun typecheckruns also exit 0, and theircheck:test-typecheckpasses over each package'stsconfig.test.json.Those suites read
@objectstack/metadata-protocolthroughdist/, which was rebuilt from this branch first.node scripts/pm/dispatch-gates.mjs --repo objectstack-ai/objectstack --commandsderives 94 commands. All were run, plus the 4 roster gates whose roster sits under a changed directory (check-changeset-fixed,check:authz-resolver,check:error-code-casing,check:route-ledger-census).--ranreports 94 derived, 94 run, 0 NOT-MEASURED, 0 UNRUN. Two gates first answered PREREQUISITE NOT MET (exit 3) for unbuilt dists:check:skill-examplesandcheck:dual-build-cjs-loads. Both were re-run after the builds at the same head, and both exit 0.eslint --no-inline-config --format jsonover the 5 changed TS files reports 5 files, 0 errors and 0 warnings. eslint's own config ignores the.mdand.mdx("File ignored because no matching configuration"). The config enables no type-aware linting: noparserOptions.projectorprojectService, and 0 typed rules in--print-configforprotocol.ts. So this diff cannot move the verdict on any untouched file.managed-content-sealed.dogfood.test.tsmentions the legacy spelling only in a comment) and the fullrestandruntimesuites.Reverse verification of the one reader
scripts/ablation-replace.mjsput the protocol's second, legacy-honouring reader back insideenvWritableTypes. On disk: anchor 1 to 0, blob0cf53ab1toef809f30.protocol.packaged-base-refusal.test.tsgives 2 failed and 29 passed. The 2 failures are exactly the legacy-shut cases, on both kernels.@objectstack/metadata-protocol,ablation-dist-preflightfinds the marker indist/index.jsanddist/index.cjs.allowOrgOverride: true/envagain.git diff HEADis empty. After the rebuild, preflight--absentpasses on all 24 built files with a clean tree. The green legs come back at 31/31, 10/10 and 7/7.The result went the expected way: the pins turned red.
Acceptance notes
docs/adr/0010-metadata-protection-model.md(:42,:301,:540,:652) still describesOBJECTSTACK_METADATA_WRITABLEas the live variable. That file is Tier H and pre-11 history, and per the ruling it stays with the seat, outside this code PR.check:adr-0087-registrationrefusesnot-required (no-migration-prescription)(evidence: header-framed-table). Its closed vocabulary has no category for a deployment-environment rename:registeredwould put a prescription in the ledger thatos migrate metacannot project;unpublishedandalready-registereddo not apply;The marker says this in writing, following the precedent of plugin-auth's
OS_PLATFORM_OWNER_EMAILchangeset. Who takes up that vocabulary gap: nobody yet.403 NOT_CREATABLE). Nothing reads the legacy name any more, so its deprecation warning no longer prints.sys-metadata-repository.package-writability.test.tslegacy case comment ("this reader honours onlyOS_METADATA_WRITABLE").Generated by Claude Code