Skip to content

fix(service-package): a platform-created customization pair rehydrates with an info line, not the no-range warning - #39164

Merged
objectstack-fleet[bot] merged 3 commits into
mainfrom
claude/issue-38930-custom-pair-info
Dec 2, 2026
Merged

objectstack-fleet[bot] merged 3 commits into
mainfrom
claude/issue-38930-custom-pair-info

Conversation

@objectstack-fleet

Copy link
Copy Markdown
Contributor

Fixes #38930
Clause-②: no
Metadata-protocol: none

维护者速读

  • 用户能看到什么变化:平台在 Studio 里为应用建的定制包,重启时不再报一条看似出错的警告,改为一条说明“这是平台建的”的普通信息;用户自己写的包照旧警告。
  • 为什么做:v19 升级文档那张卡的第 4 项,你选了方案 C:不改数据,只把平台自建定制包的启动日志降级。
  • 出错会怎样:最坏是某个包本该警告却只打了信息行(或反之),只影响启动日志,不影响加载与数据;直接撤回本改动即可恢复。
  • 要你做什么:无。

What changes

packages/services/service-package/src/index.ts, the sys_packages rehydration loop at boot. The boot line this card's item 4 quotes, [protocol] package 'APP.custom' declares no engines.protocol range; rehydrating without a compatibility check (ADR-0087)., is emitted there (the compat.status === 'no-range' branch). For a customization pair the platform created, that branch now logs one info line instead:

[protocol] package 'crm.custom' is the customization package the platform created for 'crm' (ADR-0146 D3), which declares no engines.protocol range; rehydrating it without a compatibility check (ADR-0087). Nothing to act on.

Every other no-range package keeps the warn, byte for byte. Ruling of record: 7350104973 (option C, maintainer 「同意」).

The marker is the App relation, not the name. The ensure door (ensurePairOnce in protocol-customization-package.ts) writes the pair with no engines and no provenance field, and sys_packages has no source column. The new predicate platformCreatedPairBase recognises the pair by what the door writes, and by what the door itself uses to judge an existing pair (customizationPairEnsureRefusal): the id is pair-shaped (customizationBasePackageId), the base is installed in the registry, the package declares the base's pair namespace (customizationNamespace), and it declares a dependency on the base. A .custom id that fails any of these keeps the warning. Existing pairs already meet all four, so nothing is stamped and nothing is migrated. Hydration runs in manifest.dependencies order, so a pair's App is registered before the pair is judged.

Not changed: protocol-handshake.ts (its judgement and its own copy of the sentence), protocol-customization-package.ts, stored rows, engines.protocol on pairs (option B is not ruled).

Tests

New packages/services/service-package/src/hydration-platform-pair-log-level.test.ts, 6 cases covering both arms of the ruling:

  • platform arm: a door-shaped pair with a code-registered App gets one info line and no warning; a pair whose App is itself a stored row (stored after the pair) gets the same.
  • user arm: a user package with no range warns with the exact old sentence; a .custom id with a different namespace, with no dependency on its base, or whose base is not installed all still warn.
Readings
  • Repro on the unfixed code (test file committed first, 36b51ca): Tests 2 failed | 4 passed (6). The two platform cases are red (expected [ Array(1) ] to deeply equal []: the warning fires), and the four user cases are green.
  • At fe698fe (final head): pnpm --filter @objectstack/service-package test: Test Files 14 passed (14), Tests 150 passed (150); typecheck exit 0 (--listFiles includes the new test file). VERDICT command-exit 0.
  • Ablation 1 (scripts/ablation-replace.mjs): the info branch is disabled, so every no-range package warns. The 2 platform cases are red, Tests 2 failed | 4 passed. Restored: blob == HEAD, git diff HEAD empty.
  • Ablation 2: the predicate answers on the .custom id alone. The 3 lookalike cases are red, Tests 3 failed | 3 passed. Restored the same way.
  • Gates: dispatch-gates --commands derived 76 families for this diff. 75 exit 0. check:dual-build-cjs-loads exit 3 PREREQUISITE NOT MET (it needs every package's dist), so it is NOT MEASURED and left to CI. dispatch-gates --ran: 76 derived, 75 run, 1 NOT-MEASURED, 0 UNRUN. overlap-check VERDICT clean before each push.

Acceptance notes

  • Boundary of "platform-created". An exported pair re-installed through POST /packages must already declare the same namespace and dependency (the install door's pair predicate refuses one that does not). So it is indistinguishable from a door-created pair and also gets the info line. Without a provenance field nothing can tell the two apart, and adding one would be a write-shape change that the ruling's no-migration clause rules out for existing pairs.
  • The second copy of the sentence (protocol-handshake.ts assertProtocolCompat, "loading under protocol N without a compatibility check") does not print at boot for a stored pair. It fires once, through console.warn, when the ensure door creates the pair (installPackage in protocol-package-install.ts calls assertProtocolCompat). It is out of this ruling's scope ("the boot warning") and is left unchanged.
  • vitest.config.ts gains one anchored alias, @objectstack/spec/kernel mapped to the spec source. The fix value-imports the pairing rules from there, and check:test-source-alias reds without it (the remedy that gate prescribes). Test config only.
  • The new test lives in its own per-card file, as the dispatch ordered; hydration.test.ts keeps its file-local harness.

Verification

Two-minute check: pnpm --filter @objectstack/service-package exec vitest run src/hydration-platform-pair-log-level.test.ts. Expected: 6 passed.

Read first: packages/services/service-package/src/index.ts, platformCreatedPairBase and the pairBase branch in the rehydration loop (the only behavioural hunk).


Generated by Claude Code

…s with an info line, not the no-range warning

Claude-Session: https://claude.ai/code/session_01QSeKYoSKoNUygbCoMBTbGc
Co-authored-by: Claude <noreply@anthropic.com>
…n the unit suite

Claude-Session: https://claude.ai/code/session_01QSeKYoSKoNUygbCoMBTbGc
Co-authored-by: Claude <noreply@anthropic.com>
@github-actions github-actions Bot added size/m 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 2, 2026
@github-actions

github-actions Bot commented Dec 2, 2026

Copy link
Copy Markdown
Contributor

📓 Docs Drift Check

1 anchor(s) derived from 1 changed package(s); no hand-written page names any of them. ⚠️ 1 changed file(s) yielded no anchor (packages/services/service-package/vitest.config.ts), so the pages documenting them are NOT COVERED by this run — this is not a clean bill of health for those files.

What this run could not see
  • 1 changed file(s) yielded no anchor (packages/services/service-package/vitest.config.ts) — pages documenting those are invisible to this run
  • 1 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 — 1 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 a50269ae52930f34eefb727809a589a46dbcdd8f → packageMentionDocs.

Which tree this was computed on

This run read content/docs from 213da128bfe2bad3f26dee77df6c837a48f3382d — the merge of head fe698fe9ebe90675d77e856554bffb1c6e8ba305 into base a50269ae52930f34eefb727809a589a46dbcdd8f, 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 213da128bfe2bad3f26dee77df6c837a48f3382d && git checkout 213da128bfe2bad3f26dee77df6c837a48f3382d
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin a50269ae52930f34eefb727809a589a46dbcdd8f fe698fe9ebe90675d77e856554bffb1c6e8ba305 && git checkout -B drift-repro a50269ae52930f34eefb727809a589a46dbcdd8f && git merge --no-ff fe698fe9ebe90675d77e856554bffb1c6e8ba305

node scripts/docs-audit/affected-docs.mjs --json a50269ae52930f34eefb727809a589a46dbcdd8f

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

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack@os-justin · os-justin · session_01QSeKYoSKoNUygbCoMBTbGc

Final green head for review · 2026-12-02T16:59Z
Head-sha: fe698fe9eb
Check-runs at this head: 39 success · 18 skipped · 0 failure · 0 pending.
Files: 4 (~210 lines), all inside claim 7350189589 and its amendment. Note: the relay answered UNCONFIRMED and the amendment landed twice with identical text; both copies carry the same surface.
Owed: L1 (seat session). Landing: zone build after ACCEPT, if not governed.
Card #38930 item 4 · ruling 7350104973 (option C) · dev report 7352158428 · Fixes #38930 (#39151 delivered the rest).
Points for the reader:

  • The marker is derived from the App relation the ensure door writes, not from the .custom id. Ablation: an id-only predicate turns 3 lookalike arms red.
  • protocol-handshake.ts's creation-time console.warn (when the ensure door creates a pair) is unchanged. It is out of the ruling's scope and noted in Acceptance notes.
  • A re-installed exported pair with the same namespace and dependency also gets the info line. Telling it apart would need a provenance field, which the no-migration clause rules out. Noted in Acceptance notes.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack@os-justin · os-justin · session_01QSeKYnrQ7UMtHofKQVjcH2

L1 ACCEPT · PR #39164 (#38930 item 4, ruling 7350104973 option C) · head fe698fe9eb · read 2026-12-02T19:03Z

Seat check · ACCEPT

ACCEPT · repo:objectstack@os-justin · head fe698fe9eb

  1. Shape. l1-face --pr 39164 is CLEAN: 13 items, none flagged. Fixes #38930 is right. Item 4 was the card's only remainder after PR docs(v19, upgrading): the 18 → 19 path, as it ships — next.3 status, the handshake refusal, the access-matrix and stored steps, Change Owner, Studio, --yes and npm 10 #39151 (ACCEPT 7349486371 names it as the one item left to the maintainer), and this PR delivers it.
  2. Review route. No contract face is touched. Clause-②: no, there is no narrowing declaration, no packages/spec/src/** file, and no governed rule text. The change is a boot log level in service-package plus its test, a vitest alias and a changeset. So there is no L2: CI plus the seat's own read.
  3. Against the ruling. Option C demotes the boot no-range warning to info for platform-created .custom pairs only, with no migration. platformCreatedPairBase (service-package/src/index.ts) does exactly that:
    • It answers a base only when all four hold: the id is a pair id (customizationBasePackageId), the base is installed, the package declares the base's pair namespace (customizationNamespace), and it declares a non-empty dependency on the base.
    • That is the same manifest judgement the ensure door's install gate makes (customizationPairManifestRefusal, protocol-customization-package.ts: namespace plus declaredRangeOn). The marker is the door's own, not the .custom id. Nothing is stamped and no data moves.
    • The info line is reached only on compat.status === 'no-range'. Every other status keeps its branch, and every non-pair no-range package keeps the warn byte for byte.
  4. Tests (hydration-platform-pair-log-level.test.ts):
    • The positive case: a door-shaped pair gets one info naming the base, with no warn or error.
    • The base is itself a stored row: hydration order is honoured.
    • Four controls, each still emitting the exact old warning: a user package, a .custom without the pair namespace, one without the dependency, and one whose base is not installed.
    • The zone reports an id-only ablation turning three lookalike arms red (7352928957).
  5. Dependency. @objectstack/spec is already a runtime dependencies entry of service-package, so the new value import from @objectstack/spec/kernel adds no edge. The vitest alias mirrors the existing spec/api one.
  6. Changeset, read sentence by sentence. True at this head: the old warning text is quoted verbatim from the removed branch, the info line and its marker are described as built, and "every other package … keeps the warning" holds.
  7. Gates at this head.
    • CI: 39 success, 18 expected skip, 0 failed, 0 pending.
    • landing-k: K = 2 < 15.
    • check-governed-merges: NOT governed, 0 of 4 paths, +201 / −1.
  8. Nit (not REWORK). A re-installed exported pair that keeps the namespace and dependency also gets the info line. The zone disclosed this in Acceptance notes, and it is within the ruling's "no provenance stamp" clause. The changeset's "platform-created pairs only" reads it as a pair the door originally wrote, which holds.
  9. Landing. Tier S, so the zone lands it. On merge, docs(v19, upgrading): the 18 → 19 path cannot be followed from the docs alone — stale next.2 status, a false "one major behind still runs", and six missing upgrade steps and changes #38930 closes through Fixes. The zone then sweeps and clears pm:dispatched.

Clause-②: no · Metadata-protocol: none

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack@os-justin · os-justin · session_01QSeKYoSKoNUygbCoMBTbGc

Landing · 2026-12-02T19:08Z · head fe698fe9eb

@objectstack-fleet
objectstack-fleet Bot marked this pull request as ready for review December 2, 2026 19:09
@objectstack-fleet
objectstack-fleet Bot added this pull request to the merge queue Dec 2, 2026
Merged via the queue into main with commit 355e8e3 Dec 2, 2026
58 checks passed
@objectstack-fleet
objectstack-fleet Bot deleted the claude/issue-38930-custom-pair-info branch December 2, 2026 19:37
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/m 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