Repository navigation
feat(spec): register PACKAGE_DISABLE_RESTRICTED_BY_VALIDATION_RULE, the package disable door's 409 when an enabled package's validation rule reads a field the package adds - #30775
Conversation
…r the package disable door's dependent-rule refusal One ERROR_CODE_LEDGER row under @objectstack/runtime: the 409 the package disable door answers when a validation rule of a package that stays enabled reads a field the package being disabled adds through objectExtensions. The refusal names each package, object and rule; the remedy is to disable or change the reading rule first, or keep the package enabled. Registered ahead of its producer: the door's dependent scan stamps it and asserts the string by value. Pins: the ledger admission suite and the ApiError.code type test both name the code. Co-authored-by: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L6bhgVugtCCwBs98FeR27P
… vocabulary Generated by `pnpm --filter @objectstack/spec check:generated --fix`, which proved only content/docs/references/** stale after the new ledger row. Co-authored-by: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L6bhgVugtCCwBs98FeR27P
…ule-code Co-authored-by: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L6bhgVugtCCwBs98FeR27P
📓 Docs Drift CheckThis PR changes 1 package(s): 6 hand-written doc(s) NAME something this change touched and may need an implementation-accuracy re-verification:
⛔ 3 release-owned page(s) also name something this change touched. These are read-only:
What this run could not see
Coarse fallback — 170 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 aee0ec42e824fc6ce330c5bb16a8ce91956a7a1a && git checkout aee0ec42e824fc6ce330c5bb16a8ce91956a7a1a
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin b3098661cd3ad78634dd77a31ae68530ab9a3a83 2efc7b56d9b756146e70ba928f2d3a4b0d8d61c5 && git checkout -B drift-repro b3098661cd3ad78634dd77a31ae68530ab9a3a83 && git merge --no-ff 2efc7b56d9b756146e70ba928f2d3a4b0d8d61c5
node scripts/docs-audit/affected-docs.mjs --json b3098661cd3ad78634dd77a31ae68530ab9a3a83
|
|
domain:spec#2 · os-sales · session_01L6bhgVugtCCwBs98FeR27P Contract reviewServed-tier: Inputs read: card #30724 (body; comments 6672694111, 6673430391, 6674977179), the ruling 6670643454 on #30379 and the #30379 body, PR #30775 (body, file list, net diff ① Derived judgments
② Semver level
③ Boundary flags
④ Design judgment
Check-runs on the head at review time: 42 runs — 13 Implemented-by: VERDICT: PASS Generated by Claude Code |
|
domain:spec#2 · os-sales · session_01L6bhgVugtCCwBs98FeR27P 维护者速读
席位核对ACCEPT · head
Generated by Claude Code |
Requested by Sales · project thread
domain:spec#2 · os-sales · session_01L6bhgVugtCCwBs98FeR27P
Fixes #30724
Clause-②: yes (widening)
Metadata-protocol: none
维护者速读
@objectstack/runtime码PACKAGE_DISABLE_RESTRICTED_BY_VALIDATION_RULE。管理员停用一个包时,如果另一个仍启用的包的校验规则读了这个包通过objectExtensions加的字段,停用会被409拒绝,并列出包 · 对象 · 规则。packages/spec/src/api/error-code-ledger.zod.ts中PACKAGE_DELETE_PARTIAL下方新增的那一行及其注释。pnpm --filter @objectstack/spec exec vitest run --project local src/api/error-code-ledger.test.ts src/api/api-error-code-type.test.ts,预期 2 个测试文件、28 个测试全部通过。What changes
ERROR_CODE_LEDGERrow under@objectstack/runtime, in its alphabetical place afterPACKAGE_DELETE_PARTIAL:PACKAGE_DISABLE_RESTRICTED_BY_VALIDATION_RULE. The row comment says when it is answered (409,PATCH /packages/:id/disable), what the refusal names (each package · object · rule triple, one or several) and the remedy (disable or change the reading rule first, or keep the package enabled). It is registered ahead of its producer: the disable door's dependent scan stamps it and asserts the string by value.error-code-ledger.test.tsgains one case:ErrorCodeaccepts the code, the runtime owner key lists it,REGISTERED_ERROR_CODEScontains it, the synonym detector does not flag it and no waiver names it (with a control leg showing the detector still reads the RESTRICTED token).api-error-code-type.test.tsassigns the literal toApiError['code'](judged bytsc -p tsconfig.test.json) and parses it throughApiErrorSchema(judged by vitest).ErrorCodevocabulary (content/docs/references/api/error-code-ledger.mdx,contract.mdx,automation-api.mdx), regenerated bycheck:generated --fix, which proved onlycontent/docs/references/**stale.@objectstack/spec: patch, carrying both declaration lines.Verification
All readings below are at head
2efc7b56d9(the branch's two commits plus a merge oforigin/main3214615d7a, afterpnpm install --frozen-lockfile, a fullpnpm buildat 118/118 and removal ofpackages/runtime/.objectstack).Spec build, generated artifacts, tests, typecheck, lint
dispatch-gates --commands on this diff (105 commands) and --ran reconciliation
node scripts/pm/dispatch-gates.mjs --repo objectstack-ai/objectstack --ran ran.list: exit 0 — "105 derived famil(ies) accounted for — 105 run, 0 NOT-MEASURED (a DERIVED zero — all 105 recorded an exit code and none of them is 3)"Local-only families:
pnpm check:dev-prereqs:: exit 0 ·pnpm check:skill-frame-freshness:: exit 0Ablation (taken on the pre-merge head 48bb8d5, whose ledger file is byte-identical to this head's)
node scripts/ablation-replace.mjs --file packages/spec/src/api/error-code-ledger.zod.ts --anchor " 'PACKAGE_DISABLE_RESTRICTED_BY_VALIDATION_RULE'," --delete -- …Acceptance notes
/packagesdoor'sPACKAGE_VERB_OUTCOMErows (PACKAGE_DELETE_PARTIAL,PACKAGE_DELETE_FAILED,PACKAGE_PUBLISH_FAILED); the standard catalog'sDELETE_RESTRICTED, its own word for a lifecycle verb refused over a dependent at the same409; and the_BY_CAUSEtail ofORGANIZATION_SLUG_LOCKED_BY_ACTIVE_ENVIRONMENTS. It names why the disable is refused and the thing the operator acts on (the rule), so it is not a*_DISABLEDre-spelling, andVALIDATION_RULEkeeps it apart from the ledger's sharing-ruleRULE_*rows and frommanifest.dependencies.patch, notminor. The dispatch expectedminorfor a new public code.check-changeset-no-major's level axis grades by the metadata-protocol kind alone, and a declaredMetadata-protocol: nonemust grade every entrypatch; driven offline with this body's two lines, it passes atpatch. The seat accepted the deviation.Clause-②: yes (widening)stays: registering a code widens the published face.origin/mainthe disable branch ofpackages/runtime/src/domains/packages.tsruns no dependent scan and stamps no such code, and the spelling has no hit outsidepackages/specand the generated pages. That is why the row is registered ahead of its producer.domain:server#4). Its disable-door scan inpackages/runtime/src/domains/packages.tsanswers this code once this lands. Provenance is already satisfied (the stamp will sit under@objectstack/runtime, which lists the code). If that PR also publishes a409status for the code incontent/docs/api/error-catalog.mdx, that page's guard then wants a heading for it.STANDARD_SYNONYM_WAIVERS(not flagged),PROVENANCE_WAIVERSandcheck:error-code-provenance(no stamp site yet),HttpStatusErrorCodeMap/HTTP_REASON_PHRASE_STATUS(standard catalog only),retired-error-codes.ts(no collision),content/docs/api/error-catalog.mdx(its guard covers codes a doc publishes a status for), the dispatcher vocabulary'sUNREGISTERED_CODE_SITES(no pending row), the disable row inpackages/runtime/src/route-ledger.ts(lists no codes) andcheck-error-code-casing.mjs(no table).scripts/pm/relay.🤖 Generated with Claude Code
https://claude.ai/code/session_01L6bhgVugtCCwBs98FeR27P