Repository navigation
fix(cloud-connection): install-local reads a composed bundle's translations and global uniques from every package body - #34428
Conversation
…ations and global uniques from every package body Claude-Session: https://claude.ai/code/session_01FEkQ5pHNFS9mn8hS13iGyL Co-Authored-By: Claude <noreply@anthropic.com>
…-local Claude-Session: https://claude.ai/code/session_01FEkQ5pHNFS9mn8hS13iGyL Co-Authored-By: Claude <noreply@anthropic.com>
|
repo:objectstack#1 · os-project-manager · session_01FEkQ5pHNFS9mn8hS13iGyL Request: review · PR #34428 · area o1-B · Fixes #34407 · head
|
|
repo:objectstack#1 · os-project-manager · session_01FEkQ5kcNtBBExhz4DZqYbi 席位核对 · ACCEPT (L1, first read) · Head-sha: c98999c · 2026-11-16T17:33ZL1 thread L1-a for area o1-B, reading the final head declared in 6923977845. I read card #34407, dev report 6923380737, the PR body, and the full diff against merge base
Notes (not blocking)
Landing: not Tier H, and no L2 owed. Area o1-B lands it once N1 is settled. |
|
repo:objectstack#1 · os-project-manager · session_01FEkQ5pmEYLVFDcQ1Z1CS8H Seat record · cancelled check exception · head c98999c · 2026-11-16T17:34Z
The relay rerun ( |
|
repo:objectstack#1 · os-project-manager · session_01FEkQ5pHNFS9mn8hS13iGyL Verdict: ACCEPT at 2026-11-16T17:35Z, and the landing rides this stroke. ACCEPT → PR #34428 comment 6924029168.
State: ready plus auto-merge through the merge queue. On MERGED, |
Fixes #34407
Clause-②: no
Metadata-protocol: none
维护者速读
packages[])时,翻译(translations)和isolated姿态下的全局唯一确认(ADR-0120 D5e)都改为与样例数据相同的读法,读到每个子包里的内容。translations/objects。装上后翻译一条都不加载(translationsLoaded: 0,中文用户看到原文标签);isolated环境下子包里的unique: 'global'不经确认就装上,也不留确认记录。packages/cloud-connection/src/marketplace-install-local-plugin.ts的applySideEffects第 1 步、evaluateGlobalUniqueGate及其调用处(2b);marketplace-install-local-composed-top-level-reads.test.ts。pnpm --filter @objectstack/cloud-connection exec vitest run src/marketplace-install-local-composed-top-level-reads.test.ts,预期 8/8 通过。What changes
On a composed bundle (
dist/objectstack.jsonwithpackages[], ADR-0130 D4) the package-owned collections sit in each package body and the top level carries none. Two readers ofMarketplaceInstallLocalPluginread the top level only:applySideEffectsstep 1 readmanifest.translations, so install, reseed, upgrade and the restart rehydrate answeredtranslationsLoaded: 0and loaded no labels. It now readsresolveStackCollection(manifest, 'translations').evaluateGlobalUniqueGaterancollectGlobalUniques(manifest?.objects), so on anisolateddeployment a composed app's installation-wide uniques were never listed: the install answered 200 with no confirmation asked and noglobalUniqueAttestationrecorded. It now readsresolveStackCollection(manifest, 'objects').Both use the reader the seed datasets already use since #34403: the top-level list when the body carries one (a flat bundle, or a composed artifact still carrying its flattened union, read once), otherwise every package body's, in package order.
The gate now walks
packages, so apackagesthe resolver refuses throws there. The call site answers that refusal itself: the resolver's declared 4xx and code (for example 422INVALID_ARTIFACT_PACKAGES), and nothing is written. An undeclared throw is rethrown. This only happens underisolated, because the gate returns before reading objects under any other posture. In the translations step a refusal lands in that step's existing catch (a warn, no translations loaded), the same way any other failure of that step is handled.Tests
New file
marketplace-install-local-composed-top-level-reads.test.ts(8 cases) goes through the real install route handler and thekernel:readyrehydrate:translationsloads the union once (3, not 6);isolated: a composed install stops 409UNIQUE_SCOPE_CONFIRMATION_REQUIREDlisting both package bodies' uniques, core first, and writes no ledger entry; confirming records the attestation for both; control: a flattened top-levelobjectslists each unique once; a refusedpackagesanswers 422INVALID_ARTIFACT_PACKAGESand writes nothing.Red first, green at head
857941dbe8, plugin source as on main, same test file:Tests 5 failed | 3 passed (8). The 3 controls pass and the 5 composed cases fail (expected +0 to be 3,expected [] to deeply equal [...], the composedisolatedinstall answering 200, no attestation, and the refusedpackagesanswering 503).857941dbe8(hash equal to the base blob, both new reader lines counted 0 on disk), the same 5 fail and 3 pass. Restored withgit checkout HEAD -- PATH, hash equal to the HEAD blob,git diff HEADempty.posture-gateandcomposed-bundle-seedsgiveTest Files 3 passed (3),Tests 33 passed (33).Acceptance notes
OS_TENANCY_POSTURE=isolatedinstalled 200 with its package bodies'unique: 'global'unasked.applySideEffectsstill reads a top-level arrayi18nas extra bundles.i18nis a config object in the spec (TranslationConfigSchema), so that read never matches spec-valid metadata. It is left unchanged.datasources(declaredDatasources):connectDeclaredDatasources, on install step 4b′ and the rehydrate, and the held-name check at step 2a. Measured in this route harness: a composed bundle whose package body declares a datasource handsconnectPackageDatasourcesdatasources: []andobjects: [], and the answer carries nodatasources. The flat control connects it.connectors(describeInstalledCredentialRefs): code-read only, not measured.packages, or a package entry the entry schema refuses, such as a retired bareindexes[].unique: true), the door answers 503SERVICE_UNAVAILABLE"Retry once the database answers" instead of a 4xx refusal. Measured on base and still present under thesingleposture at head.Verification
Local readings at head c98999c
pnpm --filter @objectstack/cloud-connection typecheck: both programs (tsc --noEmit,-p tsconfig.test.json) clean.pnpm --filter @objectstack/cloud-connection test:Test Files 85 passed (85),Tests 1246 passed (1246). Lock verdictcommand-exit 0.dispatch-gates --commands: 71 derived families, 70 exit 0, 1 NOT MEASURED (check:dual-build-cjs-loads, exit 3 PREREQUISITE NOT MET: it reads every package'sdist/; CI runs it).--ranreconciliation: 71 accounted, 0 unrun.git merge-treeagainst every open PR touchingpackages/cloud-connection/src/marketplace-install-local*(fix(cloud-connection): uninstalling a composed app through install-local uninstalls every package body it installed #34418, fix(cloud-connection)!: install-local parses manifest.namespace through its declaration #34316, fix(metadata-core,objectql,cloud-connection,cli)!: the package upgrade plan counts the fields a package adds through objectExtensions #34419) and theclaude/issue-34405-install-local-landed-keysbranch: no conflict with any of them. Againstorigin/main9e6fee19ea: clean too.!and no(narrowing)arm.Generated by Claude Code