Skip to content

fix(marketplace): the install confirm names the sample-data language, the install note agrees with the clear, and a reinstall offers no accepted grant - #39724

Merged
objectstack-fleet[bot] merged 4 commits into
mainfrom
claude/project-thread-o9cirh
Dec 4, 2026
Merged

objectstack-fleet[bot] merged 4 commits into
mainfrom
claude/project-thread-o9cirh

Conversation

@objectstack-fleet

@objectstack-fleet objectstack-fleet Bot commented Dec 4, 2026 •

Copy link
Copy Markdown
Contributor

Requested by Tesla · project thread

Fixes #39681
repo:objectstack@os-tesla · os-tesla · session_01L9qibzuc2GU96KTJbcqdg8

Clause-②: yes (widening)
Metadata-protocol: none

The widening: a new read-only route, GET /api/v1/marketplace/install-local/seed-locale, served to manage_metadata holders, and a new objects member on the install answer's seeded; nothing that was served before changes.

维护者速读

  • 管理员在中文界面里从应用市场安装带示例数据的应用时,确认框会写明示例数据将用哪种语言载入;如果和界面语言不同,会提示并给出「语言与区域」的入口。安装结果、清除确认和示例数据数量三处的条数现在一致,重新安装不会再建议已经接受的权限。
  • 解决新公司首次安装应用时拿到英文示例数据却毫不知情的问题(应用市场首装体验)。
  • 出错时只影响安装确认框和安装结果的说明文字,不改变安装本身、示例数据语言的选择顺序和写入的数据,撤回即恢复原样。
  • 无

What changes

Server (@objectstack/cloud-connection)

  • GET /api/v1/marketplace/install-local/seed-locale?appDefaultLocale= answers { locale, source } from resolveSeedLocaleForLoad, the install's own resolver, for the caller and the caller's active organization. Same gate as the install (manage_metadata), closed query set, ledgered and pinned in both auth-gate pin suites. A read that throws is a 500 naming no language.
  • The install answer's seeded gains objects: per object, inPackage, inserted, updated, and the skipped rows split into existing / withdrawn / noRowToUpdate, derived from the loader's own per-dataset results (landedIds, mode). The new code lives in marketplace-install-seed-report.ts; the 8.8k-line plugin only calls it. inserted / updated / skipped keep their meaning.

Console (@object-ui/app-shell, @object-ui/i18n)

  • Confirm: a "Sample data language" row when the datasets are locale-scoped, the mismatch notice when it is not the console's language, linking to Language & Region (/apps/setup/system/settings/localization, where localization.locale is set; the card said 公司信息, but the organization language lives on Language & Region).
  • Install note: sample records = the package's own objects' rows, so it agrees with the clear and GET …/sample-data. Rows written to objects the package does not define and updates that found no record are named. "Already here, or deleted after an earlier load" covers only existing + withdrawn. An older runtime without objects reads as before.
  • Reinstall: opens with reinstallIntro; suggested grants whose Everyone suggestion is confirmed are not offered again. fix(app-shell): an installed current version reads as up to date, and the reinstall confirm says customizations are kept #39683's customization line is untouched.
  • 12 new keys in all 11 marketplace namespace packs (zh-Hant regenerated).

Seed-locale fallback order: unchanged. The zone settled the design question by precedent as option A (reading 7414358295 on the card); analysis at /mnt/project-files/card-39681/seed-locale-fallback-analysis.md.

Tests

  • packages/cloud-connection: marketplace-install-seed-report.test.ts (new, 7), cloud-connection-auth-gate.pin.test.ts, marketplace-install-local-api-key-account-posture.pin.test.ts: 24 passed. tsc --noEmit clean.
  • ui: MarketplacePackagePage.installConfirm-39681.test.tsx (new, 7), sampleDataCounts-39681.test.ts (new, 4), plus the existing install-preview, sample-data notice and installed-suggestions suites: 84 passed in total.
  • check:i18n-keys, check:i18n-drift, check:i18n-dead-keys: green.

Acceptance notes

  • The 4 extra rows, read statically on hotcrm 3377e24: leadInteractionPointers in src/sales/data/activity.seed.ts seeds sys_activity pointers for held lead calls/meetings younger than 14 days; there are exactly 4. sys_activity is a platform object, so the purge matcher and the count never see them.
  • The 1 skipped row: NOT MEASURED. Most likely candidate: salesOrderQuoteLinks (mode: 'update', sales-order-quote.seed.ts) finding no order row on the install path, which would mean the Acme order has no Source Quote after a marketplace install. That would be an ordering defect in hotcrm or the loader, outside this card. After this PR the install note names the object, so a retest reads it directly.
  • Local ui app-shell typecheck NOT MEASURED: its @object-ui/* dependencies were not built in this container (all errors are TS2307 or callbacks typed through those unresolved modules, none on changed lines). Left to CI.

Verification

Two-minute check: on a fresh database with a 简体中文 console and no organization language, open HotCRM in 浏览应用市场 and press Install. The confirm shows 示例数据语言: 英语 and the amber notice with 打开「语言与区域」. After the install, the note says 482 sample records plus 4 other records (sys_activity (4)), and 清除示例数据 says up to 482.

🤖 Generated with Claude Code

https://claude.ai/code/session_01L9qibzuc2GU96KTJbcqdg8

… went, and a read names the language they load in

The install answer's `seeded` gains `objects`: the run split by object, which
objects the package defines, and why each skipped row was not written (a row
already there, one removed after an earlier load, or an update that found no
row). `GET /api/v1/marketplace/install-local/seed-locale` answers the language
an install now would load locale-scoped sample data in, from the install's own
resolver.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01L9qibzuc2GU96KTJbcqdg8
…uage, the install note agrees with the clear, and a reinstall offers no accepted grant

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01L9qibzuc2GU96KTJbcqdg8
@github-actions github-actions Bot added size/xl documentation Improvements or additions to documentation tests tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface labels Dec 4, 2026
@github-actions

github-actions Bot commented Dec 4, 2026 •

Copy link
Copy Markdown
Contributor

📓 Docs Drift Check

This PR changes 1 package(s): @objectstack/cloud-connection, touching 20 documentable anchor(s).

7 hand-written doc(s) NAME something this change touched and may need an implementation-accuracy re-verification:

  • content/docs/api/client-sdk.mdx (via INTERNAL_ERROR (literal, a string literal in handleSeedLocale))
  • content/docs/api/error-catalog.mdx (via INTERNAL_ERROR (literal, a string literal in handleSeedLocale))
  • content/docs/automation/hook-bodies.mdx (via INTERNAL_ERROR (literal, a string literal in handleSeedLocale))
  • content/docs/deployment/cli.mdx (via MarketplaceInstallLocalPlugin (symbol, a top-level class))
  • content/docs/permissions/system-context.mdx (via INTERNAL_ERROR (literal, a string literal in handleSeedLocale))
  • content/docs/plugins/development.mdx (via INTERNAL_ERROR (literal, a string literal in handleSeedLocale))
  • content/docs/protocol/kernel/error-handling.mdx (via INTERNAL_ERROR (literal, a string literal in handleSeedLocale))

⛔ 3 release-owned page(s) also name something this change touched. These are read-only:

  • content/docs/releases/v17/17-0.mdx (via INTERNAL_ERROR (literal, a string literal in handleSeedLocale))
  • content/docs/releases/v18/18-2.mdx (via INTERNAL_ERROR (literal, a string literal in handleSeedLocale))
  • content/docs/releases/v18/18-3.mdx (via INTERNAL_ERROR (literal, a string literal in handleSeedLocale))

content/docs/releases/ is RELEASE-OWNED (AGENTS.md "Documentation Guardrails"): release
notes are written centrally at release time, and a code PR that edits them is the exact PR
that guardrail exists to stop. They are still audited — read-only. If one of them is actually
wrong, file an issue or open a dedicated docs-only PR; do not edit it here.

What this run could not see
  • 1 anchor(s) matched too much of the corpus to be a work list: VALIDATION_ERROR (literal, 40 pages)
  • 13 name(s) were too generic to anchor anything (single lowercase words)
  • the SDK route bridge reached 71 of 255 client-bound route-ledger rows — the other 184 have no registrar path: tail to select them, so pages documenting THEIR client methods cannot appear above, on this or any run. Of those 184: 0 are remediable by widening that discovery convention (an in-repo file declares the path; the convention did not scan it); 60 are structural — on a ledger where NOT ONE row is declared in-repo, so no discovery change reaches them at any price; 124 are undecided (no in-repo declaration, on a ledger that has other in-repo registrars — absence and an unreadable spelling are not distinguishable here). The rows themselves: node scripts/docs-audit/affected-docs.mjs --bridge-coverage
  • a page that states a rule by its inputs shares no identifier with the emitter that implements the rule, so an emitter-only diff cannot list it — not on this run and not on any run. Measured on fix(driver-sql): emit varchar(maxLength) for a text field a declared index keys on #11430: content/docs/protocol/objectql/types.mdx documents the text-family column mapping by the ObjectQL type names it maps FROM (text / textarea / html) while the diff changed createColumn; it went unlisted, and it was the page that diff falsified, in four places. No shared token exists to detect this on, so a rule your change carries has to be re-read by hand in the pages that restate it.
  • a key NAME is not a key, so the hand re-read the line above prescribes can land on the wrong schema. The same spelling is authorable on one governed type and a [REMOVED] tombstone on another for each of active, aria, joins, objects, template, tools and version (censused on [finding] tools is a key on BOTH AgentSchema (tombstoned, dead) and SkillSchema (live, cloud-attested), so a name-based search attributes skill examples to the agent key — it produced a false stop-the-line alarm on PR #19059 #19093 over the liveness ledger's governed types, top-level keys); nothing in a search result distinguishes the two, so a grep hit on a LIVE example reads as evidence about the DEAD key. Measured on fix(spec): the agent.tools liveness row says dead — it claimed live on a key the schema tombstoned #19059: content/docs/ai/agents.mdx was reported as contradicting the agent.tools tombstone over its tools: example at :161, which is inside the defineSkill({ block opened at :155 — the page was already correct. Settle ownership by PARSING the value against both schemas, never by the name: that literal PASSES SkillSchema, and as an AgentSchema it FAILS at tools with the tombstone prescription. ⛔ These names are not the whole class — a key retired through a .strict() guidance map leaves no tombstone in the walked shape and none of them here (tool.category, live as AIToolDefinition.category).

Coarse fallback — 7 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): node scripts/docs-audit/affected-docs.mjs --json 758cd97a8d8eef6879760cf3d4102a109c90177b → packageMentionDocs.

Which tree this was computed on

This run read content/docs from a0c40054984dc064d990c9c93ba7bf8811fd4451 — the merge of head 7c119ca4af25f2fe238c3ac6f1df4aefa797a101 into base 758cd97a8d8eef6879760cf3d4102a109c90177b, which is what actions/checkout gives a pull_request run. Not the PR head.

A worktree cut from an older main holds a different content/docs, so re-deriving there can legitimately return a different list — that is a different tree, not a wrong row. To answer on the same tree:

# while this PR is open — GitHub drops the merge commit once it closes
git fetch origin a0c40054984dc064d990c9c93ba7bf8811fd4451 && git checkout a0c40054984dc064d990c9c93ba7bf8811fd4451
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin 758cd97a8d8eef6879760cf3d4102a109c90177b 7c119ca4af25f2fe238c3ac6f1df4aefa797a101 && git checkout -B drift-repro 758cd97a8d8eef6879760cf3d4102a109c90177b && git merge --no-ff 7c119ca4af25f2fe238c3ac6f1df4aefa797a101

node scripts/docs-audit/affected-docs.mjs --json 758cd97a8d8eef6879760cf3d4102a109c90177b

⚠️ That checkout carried uncommitted changes, so the commit above does not fully identify what was read.

Advisory only, and a precision-first one (#9192): a page is listed because it names a
symbol, wire route or SDK method this diff touched — not because it mentions a changed
package. Each row says which anchor put it there, so a wrong row is reportable rather than
merely annoying. To re-verify, run the docs-accuracy-audit workflow scoped to these files:
node scripts/docs-audit/affected-docs.mjs 758cd97a8d8eef6879760cf3d4102a109c90177b → pass the list as
args.docs, on the commit named under Which tree this was computed on.

…one, never a failed seed

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01L9qibzuc2GU96KTJbcqdg8
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack@os-tesla · os-tesla · session_01L9qibxZ1DSpavkJARmHCQF

席位核对

L1-c · PR #39724 · Head-sha: 6d6e9310dc5225d3d2898f42f90905fef72e0a00 · 2026-12-04T15:10Z

Verdict: REWORK (declaration only). The only owed change is one line in the changeset and the PR body. The rest of the L1 read is clean.

Clause-② is yes (widening), not no. The criterion (execution-duties.md〈认领〉: does the card widen an accept set or expand the public surface?) is not limited to packages/spec. This PR adds two pieces of public HTTP surface:

  • the new door GET /api/v1/marketplace/install-local/seed-locale, which answers { locale, source } and has a closed query set { appDefaultLocale };
  • a widened install answer, through the new optional seeded.objects (SeedObjectTally[]).

Both are additive. That is the same reading #39622 took for its new preview route (Clause-②: yes, L2 7409484450).

Owed:

This moves the head. After the push I write the L2 at TIER_DEFAULT on the declaration face myself, since there is no spec or governed path, and post the L1 delta.

The rest of the L1 read holds on this head:

  • The new route. It sits behind requireInstallCapability (manage_metadata, the install's gate), writes nothing, and refuses unknown query parameters with a 400 VALIDATION_ERROR. It resolves through the install's own resolveSeedLocaleForLoad inputs: the active org under a wall, the caller, and the app default. A read that throws answers 500 and never guesses a language. It is registered before the /:manifestId routes, recorded as server-only in the ledger, and both auth-gate pins are extended. The fallback order is unchanged, per reading 7414358295.
  • seeded.objects. tallySeedObjects splits the loader's per-dataset results by object. existing is read from landedIds, and the remaining skipped rows count as withdrawn (insert) or noRowToUpdate (update). inPackage comes from the package's own objects. An unreadable object list leaves the tally as loaded and never fails the run, and an older runtime without objects reads as before.
  • Console and copy. The note counts package objects only. The mismatch notice links Language & Region, where localization.locale lives; the body flags the card's 公司信息 wording as wrong. The 11 locales are updated.
  • Open measurement. The one skipped row on an empty DB is not measured, and the note now names its object. I accept this as reported.
  • Checks. check:dual-build-cjs-loads and check:query-options-erasure must conclude green in CI on the new head.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack@os-tesla · os-tesla · session_01L9qibxZ1DSpavkJARmHCQF

Contract review

Served-tier: TIER_DEFAULT
Head-sha: 7c119ca4af25f2fe238c3ac6f1df4aefa797a101
Local-runs: none
Security-touching: no
Rule-change-verified: none

Face: the review is owed by the Clause-②: yes (widening) declaration alone. The diff touches no packages/spec/src/** path and no governed path, and the declaration carries no narrowing arm, so the exact tier is TIER_DEFAULT. The seat's L1-c thread records it as the lane's own review.

① Derived judgments

  • New door: GET /api/v1/marketplace/install-local/seed-locale. It answers SeedLocalePreview: { locale: string | null, source: 'organization-setting' | 'user' | 'app-default' | null }.
    • Its query set is closed (SEED_LOCALE_QUERY_PARAMS = appDefaultLocale), and an unknown parameter is refused with 400 VALIDATION_ERROR through unknownQueryParamRefusalMessage.
    • It sits behind requireInstallCapability (manage_metadata, the install's own gate) and writes nothing.
    • It resolves from the same inputs the install's seed uses: the active organization under a wall, the admitted caller, and the declared default. A failed read answers 500 INTERNAL_ERROR rather than guessing a language.
    • It is mounted before the /:manifestId routes, so seed-locale is never read as an id. It is ledgered server-only in cloud-connection-route-ledger.ts, and both auth-gate pins now count seven doors.
    • The fallback order is unchanged (reading 7414358295, precedent A).
  • Widened answer: seeded.objects (SeedObjectTally[]). This is an optional, additive member of the local install's response.
    • inserted, updated and skipped keep their meaning, so a client that ignores objects reads exactly what it read before.
    • An unreadable package object list leaves the tally as the loader gave it, and the run never fails on it.
    • A runtime without the member is read as before (sampleDataNotice.ts).

② Semver level

Metadata-protocol: none takes patch (AGENTS.md Post-Task Checklist step 3). The changeset carries cloud-connection, app-shell and i18n at patch, and states both declaration lines plus a sentence naming the widening. No error code is new.

③ Boundary flags

  • The PR raised one open item: the single skipped row on an empty database is not measured. The note names the row's object instead of counting it, and I accept that as reported.
  • No SQL push-down question arises. The tally reads the loader's per-dataset results already in memory, and the locale read is one settings read and one user read.
  • Security-touching: no. The door is read-only and sits behind the install's existing gate. It reveals only the locale the gate-holder's own install would use.

Implemented-by: claude/project-thread-o9cirh
Reviewed-by: session_01L9qibxZ1DSpavkJARmHCQF

VERDICT: PASS

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack@os-tesla · os-tesla · session_01L9qibxZ1DSpavkJARmHCQF

席位核对

L1-c · PR #39724 · Head-sha: 7c119ca4af25f2fe238c3ac6f1df4aefa797a101 · 2026-12-04T15:13Z

Verdict: ACCEPT (delta), on green.

  • Landing: the zone lands this once every check on this head concludes with none failed, including check:dual-build-cjs-loads and check:query-options-erasure.
  • Card: Fixes #39681 closes the card at merge.

Delta. The only change since REWORK 7415452667 is the changeset:

  • it now reads Clause-②: yes (widening), followed by a sentence that names the new read-only route and seeded.objects;
  • Metadata-protocol: none and the patch levels are unchanged.

The PR body carries the same lines, and claim amendment 7415481313 records the declaration on the card.

L2. Record 7415523376 is a PASS at TIER_DEFAULT, on the declaration face.

L1. The rest of the read in 7415452667 still holds at this head, because no code moved.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack@os-tesla · os-tesla · session_01L9qibzVCaQPuEu6rGmqH8J

2026-12-04T15:38Z · Landing · head 7c119ca4af · L1-c ACCEPT (delta) 7415549879 and L2 PASS 7415523376 (TIER_DEFAULT, declaration face Clause-②: yes (widening)), both at this head.

Probe Reading
check-governed-merges.mjs --pr 39724 NOT governed; 1,305 lines (≤ 3000)
K (first-parent commits on origin/main since merge base) 10 (< 15)
CI at head 61 success, 14 expected skip, 0 failed. Build Core (hosts check:dual-build-cjs-loads): success. Lint · scoped · query-options erasure: success. Dogfood Regression Gate: success. PR-body guards: one run cancelled by the body edit, its rerun success.

Fallback order unchanged per reading 7414358295 (precedent A). The one skipped row on an empty database is unmeasured; the note now names its object, as accepted by L1-c 7415452667.

State: ready + auto-merge. Fixes #39681 closes the card on merge. Dispatched by the maintainer, 2026-12-04T14:11Z.

@objectstack-fleet
objectstack-fleet Bot marked this pull request as ready for review December 4, 2026 15:38
@objectstack-fleet
objectstack-fleet Bot added this pull request to the merge queue Dec 4, 2026
Merged via the queue into main with commit 04eba3d Dec 4, 2026
76 of 77 checks passed
@objectstack-fleet
objectstack-fleet Bot deleted the claude/project-thread-o9cirh branch December 4, 2026 16:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation size/xl tests tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface

Projects

None yet

2 participants