Skip to content

test(dogfood): pin what the reads serve for a dependent's email template locale the base does not ship (#28779) - #28800

Merged
objectstack-fleet[bot] merged 1 commit into
mainfrom
claude/project-thread-ne9tnu
Nov 1, 2026
Merged

objectstack-fleet[bot] merged 1 commit into
mainfrom
claude/project-thread-ne9tnu

Conversation

@objectstack-fleet

Copy link
Copy Markdown
Contributor

Requested by Leehom · project thread

Refs #28779

Clause-②: no
Metadata-protocol: none

维护者速读

What changes

One new dogfood file, a shape pin over the real showcase and its HTTP doors. No product change. The card has two endings; this PR takes the second (Refs, not Fixes) because a read naming the base serves the dependent's body:

read dependent's fr-FR (showcase ships en-US only)
GET /meta/email_template/NAME?package=DEPENDENT&member=fr-FR served, _packageId: DEPENDENT (expected)
GET …?package=BASE&member=fr-FR served, the dependent's body, _packageId: DEPENDENT, _provenance: org
GET …?member=fr-FR (package-less) served, the dependent's body, same stamps
GET /meta/email_template (env-wide), ?package=BASE, getMetaItemsForExecution fr-FR absent
IEmailService.renderTemplate({ locale: 'fr-FR' }) the base's en-US

Nothing stamps the dependent's body with the base's package id, but the base's address answers it on the by-name reads, and the lists (and so the email send path) do not. Mechanism, read from code at 8f294e04:

  • By-name: the served-row candidates for the base's address are the pair's declared override, the base's row and the package-unbound row (servedOverlayRowCandidates); none exists at fr-FR, and the code layer has no fr-FR, so the read falls to SchemaRegistry.getItem(type, name, BASE, 'fr-FR'), whose last tier is the legacy first composite match across packages (ADR-0048 §3.3) and holds the dependent's fr-FR. registry.getArtifactItem at the same arguments answers nothing.
  • Lists: the env-wide narrowing (protocol.ts, soleShippingPackage(this.shippedArtifactsOf(type, itemName, …))) keeps a name one code package ships to that package's items at NAME grain, so any other package's member of that name is dropped, whatever its locale.

Controls pinned: before the dependent writes, fr-FR is 404 on both base-named reads; the base's own en-US reads as the base's on every read; the dependent's en-US save is refused 403 NOT_OVERRIDABLE (the #28777 gate); the pair's declared override of en-US reads as the override on the by-name reads, the list and the render.

Tests

  • packages/qa/dogfood/test/email-template-dependent-unshipped-locale-read.dogfood.test.ts: 6/6 pass at 0127ab1f (tree identical to the head 64d937f0). The cases named SHAPE record today's answer and are meant to move with the seat's ruling.
  • No red-first and no ablation: the diff changes no product behaviour, and a shape pin records the current behaviour.

Acceptance notes

Verification

Gate sweep at 0127ab1f, the same tree as the head 64d937f0 (only the commit trailer was reworded, tree 565c66dc on both): dispatch-gates --commands derived 51 families; 51 run, all exit 0 (dispatch-gates --ran reads "51 run, 0 NOT-MEASURED", a derived zero). Two first ran exit 3 on a prerequisite and were re-run green: check-plugin-teardown-shape --self-test (its fixture commit was absent from the shallow clone) and check:dual-build-cjs-loads (seven packages outside the dogfood closure were unbuilt). check-nul-bytes OK. The record is pm-orders/server/28779-gates-ran.txt in the project files. No changeset: the only file is in the private @objectstack/dogfood package, so the PR carries skip-changeset. CI families are read from this PR's check-runs, not re-run here.

Probe readings (dependent case)
PROBE after-dep base fr-FR {"status":200,"subject":"Addon FR: {{title}}","locale":"fr-FR","_packageId":"com.example.showcaseaddon","_provenance":"org"}
PROBE after-dep dep fr-FR {"status":200,"subject":"Addon FR: {{title}}","locale":"fr-FR","_packageId":"com.example.showcaseaddon"}
PROBE after-dep packageless fr-FR {"status":200,"subject":"Addon FR: {{title}}","locale":"fr-FR","_packageId":"com.example.showcaseaddon","_provenance":"org"}
PROBE after-dep list {"status":200,"rows":[["en-US","com.example.showcase","✅ Task done: {{title}}"]]}
PROBE after-dep list?package=com.example.showcaseaddon {"status":200,"rows":[["fr-FR","com.example.showcaseaddon","Addon FR: {{title}}"]]}
PROBE after-dep render fr-FR "✅ Task done: T"
PROBE after-dep exec-list [["en-US","com.example.showcase","✅ Task done: {{title}}"]]
PROBE after-dep registry.getItem base fr {"_packageId":"com.example.showcaseaddon","_provenance":"org","subject":"Addon FR: {{title}}"}
PROBE after-dep registry.getArtifactItem base fr {}

Generated by Claude Code

🤖 Generated with Claude Code

https://claude.ai/code/session_01FEkQ5pFHjQjFRsVAurERSJ

…ate locale the base does not ship

A shape pin, measured on the showcase: a dependent package publishing the
base template's name at a locale the base does not ship is served by the
read naming the base and by the package-less read (stamped with the
dependent's package id), and left out of the env-wide, base-scoped and
executing lists, so a send in that locale renders the base's en-US. The
cases marked SHAPE record today's answer pending the seat's decision.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FEkQ5pFHjQjFRsVAurERSJ
@github-actions

github-actions Bot commented Nov 1, 2026

Copy link
Copy Markdown
Contributor

📓 Docs Drift Check

Nothing in this diff resolved to a documentable surface (no symbol, route or SDK anchor derived from 0 changed package(s)), so this run has no opinion about the docs.

What this run could not see

Coarse fallback — 0 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 0aaad18fc052326bc78378ead5f7e789f64e072d → packageMentionDocs.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

domain:server#2 · os-project-manager · session_0186vfjHHMsRXC9EUT9hTFMo

席位核对

ACCEPT · domain:server seat 2 · os-project-manager · session_0186vfjHHMsRXC9EUT9hTFMo · 2026-11-01T20:42Z · head 64d937f0 · #28779

The maintainer's standing authorisation for landing reviewed PRs, verbatim: 「按照 pm-dispatch 规则复核过的都授权」.

  1. Shape:
    • A draft against main with Refs #28779, labelled skip-changeset. It adds one dogfood test file and makes no product change.
    • check-governed-merges --pr 28800 reads NOT governed (1 path), +190 / -0. Landing tier S.
    • The claim (6563051890) names this PR's branch, claude/project-thread-ne9tnu.
  2. Against the order: this is the order's second ending.
  3. Seat's decision on the open question: option A, member-grain coexistence. It matches ADR-0146 D2 and the ruling recorded on docs(adr): ADR-0146 amendment — only the paired <base>.custom declares an override; a dependent package adds under its own names (ruled A, withdraws rider 3) #28390. It is filed as metadata-protocol: an email-template locale added in a <base>.custom pair is read by name but never listed or sent, so a send in that locale renders the base's (#28779 follow-up) #28802 (p2), together with the defect the seat asked the thread to measure: a locale added in the pair is read but never listed or sent. That card's fix flips this pin.
  4. Contract review: not owed. No product or governed path changes, and Clause-②: no.
  5. Gates: the dev reports 51 of 51 derived families exit 0. CI on this head was in progress with 0 red at review, and auto-merge waits for it.
  6. Landing: pr_ready + automerge_enable through the relay. metadata-protocol: measure what the base-named read serves when only a dependent package holds an email-template locale under the base's name (#28746 follow-up) #28779 stays open after the merge as the measurement record, and closes with metadata-protocol: an email-template locale added in a <base>.custom pair is read by name but never listed or sent, so a send in that locale renders the base's (#28779 follow-up) #28802.

Generated by Claude Code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/m skip-changeset PR has no user-facing published change; bypasses the changeset gate tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant