Repository navigation
fix(service-package): a platform-created customization pair rehydrates with an info line, not the no-range warning - #39164
Conversation
…ackage (repro) Claude-Session: https://claude.ai/code/session_01QSeKYoSKoNUygbCoMBTbGc Co-authored-by: Claude <noreply@anthropic.com>
…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>
📓 Docs Drift Check1 anchor(s) derived from 1 changed package(s); no hand-written page names any of them. What this run could not see
Coarse fallback — 1 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 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 |
|
repo:objectstack@os-justin · os-justin · session_01QSeKYoSKoNUygbCoMBTbGc Final green head for review · 2026-12-02T16:59Z
|
|
repo:objectstack@os-justin · os-justin · session_01QSeKYnrQ7UMtHofKQVjcH2 L1 ACCEPT · PR #39164 (#38930 item 4, ruling 7350104973 option C) · head Seat check · ACCEPTACCEPT · repo:objectstack@os-justin · head
|
|
repo:objectstack@os-justin · os-justin · session_01QSeKYoSKoNUygbCoMBTbGc Landing · 2026-12-02T19:08Z · head
|
Fixes #38930
Clause-②: no
Metadata-protocol: none
维护者速读
What changes
packages/services/service-package/src/index.ts, thesys_packagesrehydration 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 (thecompat.status === 'no-range'branch). For a customization pair the platform created, that branch now logs oneinfoline 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 (
ensurePairOnceinprotocol-customization-package.ts) writes the pair with noenginesand no provenance field, andsys_packageshas no source column. The new predicateplatformCreatedPairBaserecognises 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.customid that fails any of these keeps the warning. Existing pairs already meet all four, so nothing is stamped and nothing is migrated. Hydration runs inmanifest.dependenciesorder, 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.protocolon 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:.customid with a different namespace, with no dependency on its base, or whose base is not installed all still warn.Readings
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.pnpm --filter @objectstack/service-package test:Test Files 14 passed (14),Tests 150 passed (150);typecheckexit 0 (--listFilesincludes the new test file). VERDICT command-exit 0.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 HEADempty..customid alone. The 3 lookalike cases are red,Tests 3 failed | 3 passed. Restored the same way.dispatch-gates --commandsderived 76 families for this diff. 75 exit 0.check:dual-build-cjs-loadsexit 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-checkVERDICT clean before each push.Acceptance notes
POST /packagesmust 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.protocol-handshake.tsassertProtocolCompat, "loading under protocol N without a compatibility check") does not print at boot for a stored pair. It fires once, throughconsole.warn, when the ensure door creates the pair (installPackageinprotocol-package-install.tscallsassertProtocolCompat). It is out of this ruling's scope ("the boot warning") and is left unchanged.vitest.config.tsgains one anchored alias,@objectstack/spec/kernelmapped to the spec source. The fix value-imports the pairing rules from there, andcheck:test-source-aliasreds without it (the remedy that gate prescribes). Test config only.hydration.test.tskeeps 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,platformCreatedPairBaseand thepairBasebranch in the rehydration loop (the only behavioural hunk).Generated by Claude Code