Repository navigation
feat(metadata): stored picklist_extension item (#39536 step 2); PATCH /packages/:id refuses unread body keys (#39576) - #39668
Conversation
…ace/withdraw, doors, syncs, export, pair install Claude-Session: https://claude.ai/code/session_01L9qibxE6RdcamcqFHHa7PC Co-authored-by: Claude <noreply@anthropic.com>
…raft) Claude-Session: https://claude.ai/code/session_01L9qibxE6RdcamcqFHHa7PC Co-authored-by: Claude <noreply@anthropic.com>
…spec artifacts; tighten item test The rename engine gave a copied picklist_extension a name key the strict PicklistExtensionSchema refuses and renamed a source-prefixed list name. Regenerated meta-url-data and the reference docs for the new type. The item test now asserts code and status on every refusal and rolls back without the package selector, as the type is not package-slotted for history. Claude-Session: https://claude.ai/code/session_01L9qibxE6RdcamcqFHHa7PC Co-authored-by: Claude <noreply@anthropic.com>
…sion row The registry facade sits at its line ceiling (one line left), so the four members become one, storedPicklistExtension(request), classified write; its body lives in the picklists facet, and stored entries are marked in a facet-private WeakSet instead of a registry field. Claude-Session: https://claude.ai/code/session_01L9qibxE6RdcamcqFHHa7PC Co-authored-by: Claude <noreply@anthropic.com>
… picklist_extension reference schema and overrides remedy The package PATCH door reads the manifest wrapper and name, description, version and dependencies; any other key answered 200 and was dropped. It is now refused 400 VALIDATION_ERROR naming the unread keys, from a new sibling module. The picklist_extension type binds PicklistExtensionSchema for the reference-site derivation, and its overrides refusal names the list instead of the new-name remedy. Claude-Session: https://claude.ai/code/session_01L9qibxE6RdcamcqFHHa7PC Co-authored-by: Claude <noreply@anthropic.com>
…R-0087 semantic entry Claude-Session: https://claude.ai/code/session_01L9qibxE6RdcamcqFHHa7PC Co-authored-by: Claude <noreply@anthropic.com>
…n beside its twin Claude-Session: https://claude.ai/code/session_01L9qibxE6RdcamcqFHHa7PC Co-authored-by: Claude <noreply@anthropic.com>
…locale; translation pins derive instead of count The registry gained `picklist_extension`, so the metadata-forms bundles carry its display pair: regenerated and authored in all ten translated locales. The two translation ledgers pinned type and label counts that move with every new type; per AGENTS.md "Volatile counts are deleted, not synced" those pins are deleted and replaced by derived equalities (bare + panel = registry, labels = bare types, descriptions = described bare types, translated labels = carried labels). Claude-Session: https://claude.ai/code/session_01L9qibxE6RdcamcqFHHa7PC Co-authored-by: Claude <noreply@anthropic.com>
…ow and pending-changes count for picklist_extension The `__c` refusal and its module docblock said the list's owner "can never ship the same value in a later version". ADR-0146 D10 as amended (PR #39636) says less: every value a picklist_extension item adds ends in `__c`, so the vendor's next version may ship `trade_show` beside the customer's `trade_show__c`; the list's own values and a code package's picklistExtensions are not judged. Text and changeset aligned. Two ui tests derive rows from the spec registry and went red on the new type: the Studio menu placement table (studioMenuPlacement.test.ts) and the pending-changes count table (DraftChangesPanel.summaryPlural-13147). The type gets a 高级 row last in 数据 Data (ADR-0084 item 6's placement for a type registered after the ruling) and a count row with keys in every ui locale (zh-Hant regenerated from zh-Hans). ADR-0084's own table row is not written here (docs/adr is out of this PR's scope). Claude-Session: https://claude.ai/code/session_01L9qibxE6RdcamcqFHHa7PC Co-authored-by: Claude <noreply@anthropic.com>
… PATCH test pays the metadata load at collection
`package-patch-body-keys.ts` is a new file under the dispatcher's domain
directory, which check:route-envelope enumerates exhaustively: declared
`{ handBuilt: 0 }` (a pure function; `packages.ts` answers through
`deps.error`). check:test-source-alias asks the edited PATCH test to load
`@objectstack/metadata` at module top, as its precedents do.
Claude-Session: https://claude.ai/code/session_01L9qibxE6RdcamcqFHHa7PC
Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01L9qibxE6RdcamcqFHHa7PC Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01L9qibxE6RdcamcqFHHa7PC Co-authored-by: Claude <noreply@anthropic.com>
📓 Docs Drift CheckThis PR changes 6 package(s): 40 hand-written doc(s) name something this change touched — list omitted above 15 rows. Re-derive on the tree named below: ⛔ 18 release-owned page(s) also affected — read-only, see AGENTS.md Documentation Guardrails. What this run could not see
Coarse fallback — 193 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 ffddf42f177e907a81074409d8bd1287d6956f51 && git checkout ffddf42f177e907a81074409d8bd1287d6956f51
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin 14de0ff7b9cc907845bdd61d6851ad405cfd284a 0c3c0d15790be1132ae4f85e3a8350f9ed5fb1cf && git checkout -B drift-repro 14de0ff7b9cc907845bdd61d6851ad405cfd284a && git merge --no-ff 0c3c0d15790be1132ae4f85e3a8350f9ed5fb1cf
node scripts/docs-audit/affected-docs.mjs --json 14de0ff7b9cc907845bdd61d6851ad405cfd284a
|
…p row; both changesets declare the PR's narrowing Claim amendment 7411489087 (option B): this PR carries the one ADR-0084 row for the type ruling 7406020670 created, placed as item 6 places a type registered after the ruling (数据 Data, 8, 高级, last in its group). It turns the three ADR cases of studioMenuPlacement.test.ts green. No rule text changes. Both changesets now carry the PR-level pair the amendment sets: `Clause-②: yes (narrowing)` and `Metadata-protocol: narrowed` (several kinds ⇒ narrowed over added, AGENTS.md). Claude-Session: https://claude.ai/code/session_01L9qibxE6RdcamcqFHHa7PC Co-authored-by: Claude <noreply@anthropic.com>
… with picklist The showcase coverage ledger enumerates the registry, and the new kind reddened its test and the example-apps typecheck (Record over MetadataType). The showcase ships no picklist and depends on no package that does (`picklist` and `picklistExtensions` are waived), so an item that extends another package's list has nothing to extend: waived beside them, tracked on #39536. Claude-Session: https://claude.ai/code/session_01L9qibxE6RdcamcqFHHa7PC Co-authored-by: Claude <noreply@anthropic.com>
|
repo:objectstack@os-tesla · os-tesla · session_01L9qibvPFnj3TkGq8ps2Jgv Contract-review-claim: session_01L9qibvPFnj3TkGq8ps2Jgv · head 4142335 · 2026-12-04T13:31Z |
… labels The eleven `*.metadata-forms.generated.ts` bundles compile into the platform-objects dist, so the new type's translated label and description publish: `'@objectstack/platform-objects': patch`. Claude-Session: https://claude.ai/code/session_01L9qibxE6RdcamcqFHHa7PC Co-authored-by: Claude <noreply@anthropic.com>
|
repo:objectstack@os-tesla · os-tesla · session_01L9qibxE6RdcamcqFHHa7PC Head moved 4142335 → e08b890 (one commit, at the zone's request): The body is edited and the head does not move: Generated by Claude Code |
|
repo:objectstack@os-tesla · os-tesla · session_01L9qibvPFnj3TkGq8ps2Jgv Contract reviewServed-tier: Inputs read: card #39536 (body, 9 comments: analysis 7404705104, ruling 7406020670, claims and amendments, correction, dev report 7411443517, amendment 7411489087), card #39576 (body, 2 comments), PR #39668 (body, 61 files, net diff), the 77 check-runs on this head (0 failed; skipped runs are opt-in or not-applicable jobs), and the head tree for the cited code. Everything below marked "read, not run" was judged from the tree. ① Derived judgments
② Semver level
③ Boundary flags
④ Design judgment
Implementing files. The gate in S1 (should-fix) — the gate admits an item the registry then refuses, and the write answers success with the value not served. Read, not run. The gate's step 4 asks whether the list is reachable from the WRITING package's closure ( S2 (should-fix) — history and rollback cannot address one writer of a list, and the ruling makes two writers first-class. Read, not run. The type is stored one row per package under the list's name ("written by the pair or by any writable package whose dependency closure holds the list"), but it is not in No must-fix. Nits (none changes correctness or the contract on the accepted scenario):
The two questions the owning zone asked:
Implemented-by: VERDICT: PASS |
|
repo:objectstack@os-tesla · os-tesla · session_01L9qibvPFnj3TkGq8ps2Jgv Filled brief handed to the isolated at-tier reviewer whose record is the comment above (adopted by this L1-a thread): Contract review brief — PR #39668 @
|
|
repo:objectstack@os-tesla · os-tesla · session_01L9qibvPFnj3TkGq8ps2Jgv L1-a · REWORK · #39668 @
Tier H (ADR-0084 row): after the delta PASS and L1 ACCEPT, the seat sends it to the maintainer through os-zhuang. |
…wo-writer rollback is refused; L2 nits
L2 PASS 7413270616 should-fixes, as claim amendments 7413299417 and
7413327925 rule them for this pull request:
- S1: `storedPicklistExtension({ op: 'refusal' })` first asks the
arrival judgement the registration asks (ADR-0150 D3): a list name two
installed packages each hold is refused at the door (VALIDATION_ERROR /
400, the registry's own sentence), sealed or not, where it was stored and
then refused or left unserved after a clean success. Pinned with two
holders of one list name, red before and green after.
- S2: the type stays unslotted; the rollback door refuses a
picklist_extension name while two packages each hold an active row of it
(409 RESOURCE_CONFLICT, ambiguous-in-environment), naming the holders and
the remedy. Pinned with the pair and a partner both extending the list,
red before and green after. object_extension is unchanged (#39698).
- Both changesets carry the **BREAKING** marker; the step-2 changeset's
door and rollback sentences now hold.
- ADR-0084: item 6 covers picklist_extension, and a dated note recounts
the table (36 rows; 数据 Data 9).
- The registry row's docblock says what `**/*.picklist-extension.ts` does.
- The showcase waiver tracks #39699.
Claude-Session: https://claude.ai/code/session_01L9qibxE6RdcamcqFHHa7PC
Co-authored-by: Claude <noreply@anthropic.com>
|
repo:objectstack@os-tesla · os-tesla · session_01L9qibxE6RdcamcqFHHa7PC Head moved e08b890 → 0c3c0d1 (one push covering the L2 PASS follow-ups, amendments 7413299417 and 7413327925). CI on 0c3c0d1: 81 check-runs, 69 success, 12 skipped, 0 red; mergeable clean.
Ready for the delta L2 and L1. Generated by Claude Code |
|
repo:objectstack@os-tesla · os-tesla · session_01L9qibvPFnj3TkGq8ps2Jgv Contract-review-claim: session_01L9qibvPFnj3TkGq8ps2Jgv · head 0c3c0d1 · 2026-12-04T14:44Z |
|
repo:objectstack@os-tesla · os-tesla · session_01L9qibvPFnj3TkGq8ps2Jgv Contract reviewServed-tier: Delta review of record 7413270616 (head ① Derived judgments
② Semver level
③ Boundary flags
④ Design judgmentS1: closed The S2: closed By the second remedy record 7413270616 named. No must-fix, no should-fix.
The other three hits files are unchanged in the delta and stand as judged. New nits from the fix (none changes correctness or the contract):
Nits of record 7413270616 left as they were, as accepted deviations (each is on a code face, where a fix moves the head): the The two questions of the first brief are unchanged by the delta: the showcase waiver stays sound and now tracks a card of its own, and the Implemented-by: VERDICT: PASS |
|
repo:objectstack@os-tesla · os-tesla · session_01L9qibvPFnj3TkGq8ps2Jgv L1-a · ACCEPT · #39668 @
Tier H (ADR-0084 row): the seat sends it to the maintainer through os-zhuang. |
|
repo:objectstack@os-tesla · os-tesla · session_01L9qibxjHbaJSwcu6suJxbB 维护者速读
Seat opinion: ACCEPT. The type, its override classification and the 席位核对ACCEPT · head
|
|
repo:objectstack@os-tesla · os-tesla · session_01L9qibxjHbaJSwcu6suJxbB 2026-12-04T14:53Z · Hand-off: PR #39668 awaits the maintainer's approval (Tier H); seat record above. |
…e merge with main The merge-queue run for #39729 went red on check:facade-delegation-only (N6): main's #39668 added one line to packages/objectql/src/registry.ts and this branch added one (the packagedRuleNames parameter), so the merged facade was 6427 lines against its 6426 ceiling. The added parameter now shares the line of the ownFields parameter before it, so this branch adds no net line to the facade. No behaviour change; the ceiling is not raised. Claude-Session: https://claude.ai/code/session_01L9qibwdYYXynLJaFrerhYo Co-authored-by: Claude <noreply@anthropic.com>
Requested by Tesla · project thread
Fixes #39576
Refs #39536 (step 2)
Clause-②: yes (narrowing)
Metadata-protocol: narrowed
Rule-change: none
Skills-docs: follow-up #39693
维护者速读
Gap 3 — the three measurements, taken before any code (origin/main 4494911, real SQL store and real protocol)
.custompair registered throughregisterAppwith apicklistExtensionsentry addingtrade_show__c: the registry and the served field options read[web, referral, trade_show__c].trade_show, then vendor 3.5.0 addingtrade_show:registerAppthrows INVALID_METADATA 422 "would carry the value 'trade_show' twice" and the base stays 3.4.1. Withtrade_show__cthe 3.5.0 upgrade passes:[web, referral, trade_show, trade_show__c]. The__crider is load-bearing.registerApp: install-local routes a.custombody toplanCustomizationPairInstall(the save door per item), which refusedpicklistExtensions("is not part of a paired customization package … this key has no item form"); control:objectExtensionsplans toobject_extensionitems. This PR therefore also mapspicklistExtensionstopicklist_extensionitems in the pair planner. The ruling is unchanged.What changes
Step 2 of #39536 (ruling 7406020670): the stored
picklist_extensionitem.@objectstack/spec: new metadata typepicklist_extension(registry row afterpicklist,allowRuntimeCreate: true,supportsVersioning: true, no overlay,domain: 'data'), classifiedexcluded/adr_0146_d10_extendedinOVERRIDE_TYPE_CLASSIFICATION. Body isPicklistExtensionSchemaunchanged. Generated artifacts regenerated (meta-url-data.generated.ts, reference docs).@objectstack/metadata-protocol: new moduleprotocol-picklist-extension-item.ts, the twin of the object-extension item. The save, publish and restore doors refuse, withVALIDATION_ERROR/ 400: no package; a row name other thanextend; any added value not ending in__c(located atoptions.I.value; the label stays free text); a list the package cannot reach; a list name two installed packages each hold (the registry's own arrival sentence: an extension's target is resolved caller-less, ADR-0150 D3, so such an item could never be served; asked sealed or not); a value the list or another package's extension already carries. The type stays unslotted, and the rollback door refuses apicklist_extensionname while two packages each hold an active row of it (409 RESOURCE_CONFLICT,ambiguous-in-environment), naming the holders and the remedy (re-publish the wanted values). Published items register on hydration and write-through, are replaced on re-publish and withdrawn on delete.overrideson this type answersNOT_OVERRIDABLE/ 403 with the remedy "edit the picklist_extension itself" (it named a misleading "new name" remedy before). Duplicate / install copies keep the list name (package-namespace-rename.ts).reference-sites.tsbinds the type's schema.@objectstack/objectql: one facade doorSchemaRegistry.storedPicklistExtension(request)(replace,refusal,withdraw,extenders), body inPicklistsFacet; itsrefusalasks the caller-less arrival judgement the registration asks before the additive rule;registry.tsgains exactly one line (6426, at its ceiling). ClassifiedwriteinSCHEMA_REGISTRY_METHOD_KINDS.@objectstack/runtime: package export carries the items aspicklistExtensions.@objectstack/cloud-connection: install-local of a pair writes eachpicklistExtensionsentry back as apicklist_extensionitem (gap 3, reading 3).@objectstack/platform-objects: the type's display pair translated in all ten locales.ui(no editor, no 「添加选项」 control): Studio's menu placement row (高级, last in 数据 Data, ADR-0084 item 6's placement for a type registered after the ruling) and the pending-changes count row, with keys in every ui locale. Both were required by ui tests that derive rows from the spec registry.#39576:
PATCH /api/v1/packages/IDrefuses a body key it does not read.manifestwrapper (when it is an object) and, flat or inside it,name,description,version,dependencies; everything else was dropped with a 200.packages/runtime/src/domains/package-patch-body-keys.ts(packages.tsis over 5,600 lines). Any other key is refused with400 VALIDATION_ERROR, naming every unread key (manifest.KEYinside the wrapper; beside an object wrapper every other top-level key) in the sentence shape ofunknownQueryParamRefusalMessage. Nothing is written, not even a validnamesent beside it.package-patch-unread-body-key-refusedplus its STAYS_LISTED row in the coverage test. Both changesets carry the pull request's declaration pair,Clause-②: yes (narrowing)andMetadata-protocol: narrowed(several kinds ranknarrowedoveradded, AGENTS.md), and both name that entry as their ADR-0087 disposition; the step-2 changeset says it adds no migration of its own.ADR-0084: one row.
docs/adr/0084-application-builder-information-architecture.mdgains thepicklist_extensionrow of its type-to-group table (数据 Data, order 8 afterseed, 高级), placed as the ADR's item 6 places a type registered after the ruling. It only records the type that ruling 7406020670 created; no rule text changes (Rule-change: none). Carried here on claim amendment 7411489087. On claim amendment 7413299417, item 6's heading and a closing note now namepicklist_extension, and a dated note under the table recounts it: 36 rows for 36 entries, 数据 Data 9.Why
scripts/check-route-envelope.mjsis edited. It sits outside the claimed surface.check:route-envelopeenumerates every non-test.tsfile underpackages/runtime/src/domains/against itsDISPATCHER_DOMAINStable, and the newpackage-patch-body-keys.ts(the #39576 helper the claim placed there) went red asNOT DECLARED. Add it to DISPATCHER_DOMAINS … A domain that answers only through the deps.* helpers declares { handBuilt: 0 }. The edit is that one row,'package-patch-body-keys.ts': { handBuilt: 0 }, with a two-line comment: the module is a pure function returning the refusal sentence, andpackages.tsanswers it throughdeps.error. Nothing else in the script changes; its self-test and scan both pass.Tests
packages/runtime/src/domains/meta-picklist-extension-item.test.ts(26 cases, real SQL store, real protocol): draft, publish, served options, history, rollback, delete, export, re-install, boot re-register, the__crefusal, every other door refusal withcode+status, read-only base,overrides, and the vendor-upgrade case (trade_showbesidetrade_show__c).lead_source), as booted and after the vocabulary is sealed: the pair's save is refusedVALIDATION_ERROR/ 400 with exactly the registry's arrival sentence, no row, nothing registered. RED before the fix (both cases: "the save was admitted"), GREEN after.lead_source): a rollback is refusedRESOURCE_CONFLICT/ 409 naming both packages, and the served values do not move. RED before the fix ("the rollback was admitted"), GREEN after.[#39576]block inpackages-patch-dependencies.test.ts: flat and wrapped bodies withpicklistExtensionspluscolourare refused 400 VALIDATION_ERROR,updatePackagenot called, manifest unchanged; a key beside the wrapper is refused; CONTROL: the four keys pass.{ status: 200, code: undefined }with body{"success":true,"data":{}}. GREEN after: 17/17.__crule reverted in the built dist turns the rider case red (1 failed), restored green; the rename fix reverted turns the copy pin red (2 failed), restored green.Suite readings
At dadcac4 (before the two main merges):
At ff21eef (current head, after merging main twice):
src/kernel src/migrations src/meta-spelling src/data: 268 files, 8777 tests.src/registry src/package-scoped-exact-qualifier: 64 files, 1681 tests.src/marketplace-install-local: 69 files, 829 tests.src/package-tests: 23 files, 240 tests.At 0c3c0d1 (the L2 should-fixes):
src/package-tests: 23 files, 243 tests; the item test alone: 26 passed.src/registry src/package-scoped src/picklist: 66 files, 1980 tests.rollbackMetaItemplus picklist / object-extension / rename / reference-sites / packaged-base: 31 files, 548 tests.studioMenuPlacement.test.ts21 passed.Acceptance notes
picklist_extensionrow (see What changes). The three ADR cases ofui/packages/app-shell/src/views/studio-design/studioMenuPlacement.test.tswere red before it (3 failed, 18 passed: "the ADR table is read: one row per listable type", "every type has the same tier in the ADR and in the list", "inside each group, the list's order is the ADR's Order column") and are green with it (21 passed).check:i18n(platform-objects metadata-forms, all locales); the ui registry-derived tests (pending-changes count table, Studio menu placement, all-locale key parity, zh-Hant generated catalogue). Nothing else underui/derives a row for the type: every ui test that readsDEFAULT_METADATA_TYPE_REGISTRYorMetadataTypeSchemawas run (28 files). The Studio menu has no icon row for the type and draws its group's icon (the documented fallback).PACKAGE_SLOTTED_METADATA_TYPESexcludes both), so rollback takes nopackageselector. Forpicklist_extensiona rollback of a name two packages hold is now refused (L2 S2). The twinobject_extensionhas the same shape and is unchanged here: metadata: rollback of an object_extension name can write one holder's version into another holder's row #39698.picklistExtensionsvalues are not withheld from the served list: packages: a disabled package's picklistExtensions values stay on the served list #39702.name: packages: PATCH /packages/:id answers 200 and drops a non-string name #39700.picklist_extensionrow is waived and tracks showcase: demonstrate a shared picklist with two bound fields and a picklistExtensions entry; drop the stale #19519 waivers #39699, the card that demonstrates the kind (and retires the stale picklist metadata kind — runtime: resolvepicklist→ options when serving field metadata, validate writes against the resolved set, apply package-level extensions (phase 1 of objectstack#18164) #19519 waivers).Clause-②: yes (narrowing)andMetadata-protocol: narrowedfor the whole pull request, the same pair in both changesets. The(narrowing)arm owesneeds:dogfood-battery; the seat applies the label.Verification
Risk-ordered first reads:
packages/metadata-protocol/src/protocol-picklist-extension-item.ts: the door gate and its refusal order, andrefuseAmbiguousPicklistExtensionRollback.packages/objectql/src/registry-picklists.ts:storedPicklistExtension, especially therefusalbranch's caller-less judgement and thereplacebranch that restores the prior entry on a throw.packages/runtime/src/domains/package-patch-body-keys.ts: the key set and the wrapper rule.Two-minute check:
Expected:
Test Files 2 passed (2),Tests 43 passed (43).🤖 Generated with Claude Code
https://claude.ai/code/session_01L9qibxE6RdcamcqFHHa7PC