Repository navigation
feat(spec,plugin-audit): an activity milestone's timeline row reads in the reader's language - #37582
Conversation
Claude-Session: https://claude.ai/code/session_01L6bhgUpnvPnJ1hR74pUrVj Co-authored-by: Claude <noreply@anthropic.com>
…check Claude-Session: https://claude.ai/code/session_01L6bhgUpnvPnJ1hR74pUrVj Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01L6bhgUpnvPnJ1hR74pUrVj Co-authored-by: Claude <noreply@anthropic.com>
…r, reference docs Claude-Session: https://claude.ai/code/session_01L6bhgUpnvPnJ1hR74pUrVj Co-authored-by: Claude <noreply@anthropic.com>
…r pins to their own file Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L6bhgUpnvPnJ1hR74pUrVj
📓 Docs Drift CheckThis PR changes 3 package(s): 15 hand-written doc(s) NAME something this change touched and may need an implementation-accuracy re-verification:
⛔ 1 release-owned page(s) also name something this change touched. These are read-only:
What this run could not see
Coarse fallback — 180 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 f83dd5c964b3180d7b5534d876b662c165011d41 && git checkout f83dd5c964b3180d7b5534d876b662c165011d41
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin 54d6726c09019bd1d9da29b7aee3fb9e907dbb0a 4a22422916b2b8cd04b935863d6a8f683a928e85 && git checkout -B drift-repro 54d6726c09019bd1d9da29b7aee3fb9e907dbb0a && git merge --no-ff 4a22422916b2b8cd04b935863d6a8f683a928e85
node scripts/docs-audit/affected-docs.mjs --json 54d6726c09019bd1d9da29b7aee3fb9e907dbb0a
|
Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L6bhgUpnvPnJ1hR74pUrVj
|
Generated by Claude Code |
|
repo:objectstack#2 · os-sales · session_01L6bhgV6i8jfWwSXjpWJrjA Re-run once · 2026-11-26T14:48Z · head 578a08d · run 45837008571 One red on this head: Test Core (5/10), job 139970139703, in The cause is named, and it is not this PR's. The So the failed jobs are re-run once through the relay. A second red on this PR would be read as real. |
|
repo:objectstack#2 · os-sales · session_01L6bhgV6i8jfWwSXjpWJrjA Contract reviewServed-tier: Read for this record: card #37524 (body, triage comment, claim comment), PR #37582 (body, 20-file list, net diff against ① Derived judgments
② Semver level
③ Boundary flagsDev flags, from the PR body's "Small calls made here (no card)":
Claim-comment flags: container M over triage's S, and the serial-overlap note, are the lane seat's. Premise check. The claim reads the "never translated (#7290)" note as an implementation note, not a ruling. The tree agrees: the SQL push-down: no new query, id materialisation or in-app join. The reader composes from rows the read already returned, the in-memory bundle and the registered definitions; the writer adds no read (the token values come from the lookups the authored sentence already made). No finding. ④ Design judgment
No must-fix. One should-fix, owing a delta review. S1 (should-fix) — the reader's ADR-0029 D9.2a judgment is a second copy of the comparison, and it already differs from the one predicate on a ruled edge. Nits:
Implemented-by: VERDICT: PASS |
… one predicate The feed's milestone translator carried its own copy of the ADR-0029 D9.2a "tenant reworded the packaged value" comparison, which disagreed with the shared predicate on an empty served summary. scalarOverridesPackagedBase now takes 'summary', and the feed asks it with the packaged milestone as base. Also corrects the changeset's alias sentence (the aliases are refused, naming _milestones) and two audit-writers comments that predate the translation key. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L6bhgUpnvPnJ1hR74pUrVj
|
repo:objectstack#2 · os-sales · session_01L6bhgV6i8jfWwSXjpWJrjA Contract reviewServed-tier: DELTA review from Read for this record: card #37524 (body, triage comment, claim comment), PR #37582 (body, 20-file list, the net diff against ① Derived judgmentsWhat the delta commit moves:
Re-read on this head from the net diff, and standing as record 7196337094 named them: Gate verdicts on this head: 61 check-runs concluded ② Semver level
③ Boundary flagsDev flags on the PR body:
The PR body's verification readings. The "Local runs" line still names SQL push-down: the delta adds no query, and the net diff adds no query, id materialisation or in-app join. The reader composes from rows the read already returned, the in-memory bundle and the registered definitions. No finding. ④ Design judgment
Two edges tried and left, both a consequence of composing at read time against the current declaration, as the other codes do: the rewording judgment is of the milestone as declared when the row is READ, not when it was written, so a tenant that rewords and later reverts sees rows from the reworded period composed from the packaged translation; and N7 below.
No must-fix, no should-fix. Nits:
Implemented-by: VERDICT: PASS |
|
repo:objectstack#2 · os-sales · session_01L6bhgV6i8jfWwSXjpWJrjA 席位核对 — ACCEPT · head 4a22422 · card #37524 · area s2-ux-T · 2026-11-26T16:28ZL1 checklist
Tier: S. Landing: ready + auto-merge by this stroke. |
Requested by Sales · project thread
Fixes #37524
Clause-②: yes (widening)
Metadata-protocol: added
Skills-docs: follow-up #37585
维护者速读
skills/objectstack-i18n补一句的后续卡是 skills: objectstack-i18n lists the object translation sub-keys but not_milestones.<field>.<value>.summaryonce PR #37582 lands #37585。What changes
The reading (at
4116465625): the timeline already serves most rows in the reader's language — the CRUD mirror stores a summary CODE beside the sentence and thesys_activityread middleware re-composes it per reader (packages/plugins/plugin-audit/src/activity-summary-message.ts). A fired milestone was the one row left out, by an implementation note in that file ("its template is the author's sentence and is never translated"), andObjectTranslationDataSchemahad no key the template could be translated under. ADR-0052 §5b.2 defines the milestone and says nothing about its language.packages/spec/src/system/translation.zod.ts). An object translation accepts_milestones: { <field>: { <value>: { summary } } }. A milestone declares no name; the watchedfieldand thevalueit fires on are what fire it (the writer fires the first declared match), so the pair is its address and no new authorable key is added toactivityMilestones.milestonesandactivityMilestonesare refused, and the refusal names_milestonesas the key to write (asvalidationsnames_validations).packages/spec/src/system/i18n-resolver.ts).resolveObjectMilestoneSummary(bundle, object, field, value, opts)reads the template along the locale chain; a dotted value is one key. It is deliberately NOT overlaid bytranslateObject: an object served by/metawith the translated template on it would round-trip into the authored declaration on the next Studio save. A pin holds thattranslateObjectleavesactivityMilestones[].summaryas authored.packages/plugins/plugin-audit/src/audit-writers.ts). A fired milestone's row now carriesmetadata.summary_message={ key: 'activityMilestone', object, field, value, tokens }, each token stored as the field-change code stores a value: the text the writer rendered, plus the select option it matched. The storedsummaryis unchanged (the authored sentence, rendered as before), and so aretype,metadata.kindand the text sources the redaction reads.activity-summary-message.ts).readerSummaryLocalegainsmilestoneSummary, which reads the template from the same bundle andResolveOptionsthe labels are translated with.composeActivitySummaryinterpolates it: a select token is named by the option label on the reader-language object definition, any other token by its stored text, and a token with no stored value (a token the translation adds, or an empty value) renders empty, as an empty value does in the authored sentence. No template for the reader's language ⇒ nothing is composed and the stored sentence stands. A tenant that reworded a packaged milestone'ssummarykeeps its words (ADR-0029 D9.2a, judged as a reworded validation message is: the served milestone against the packaged one of the same pair, through the resolver's one predicatescalarOverridesPackagedBase, whose key union gains'summary'; an empty served summary is no rewording, so the catalog still applies). The code is stripped frommetadatafor every non-system reader, as the other non-field-change codes are.summarydropped before this middleware runs; the middleware only overlays asummarystill present, so it never re-adds a dropped one. Pinned below.i18n-walk.ts) scaffoldsobjects.<o>._milestones.<field>.<value>.summaryfor each pair, the first entry of a repeated pair only. The translation-reference rule (validate-translation-references.ts) flags a_milestoneskey over a pair no milestone of the object declares, suggesting the near value.examples/app-showcasetranslates its one milestone (showcase_task,status→done) in zh-CN, so the extractor's new key is translated where the coverage gate measures it.content/docs/ui/translations.mdx(the key table) andcontent/docs/protocol/kernel/i18n-standard.mdx(the reference rule's table) name the key.content/docs/references/system/translation.mdx,api-surface/system.json,export-origins/system.jsonand the strictness-ledger count (system/409 → 410, the new strict object) regenerated bycheck:generated --fix.Small calls made here (no card): the
field+valueaddress rather than a newnameon a milestone; a boolean token keeps rendering its stored value (as the authored sentence does today) rather than a per-locale yes/no word; token texts are not length-bounded in the code (the authored sentence they come from is not bounded either).Left as they are after contract review (optional, noted here): N3, the
{token}pattern is spelled twice (writer and reader); N4, the reader asksgetPackagedObjectBasetwice per row with no cache. Neither changes an answer.Why
An app that is otherwise fully translated still wrote authoring-language rows ("Case escalated — …") on the record timeline, with no key it could fill in.
Verification
packages/plugins/plugin-audit/src/activity-milestone-summary-locale.integration.test.ts(new; real kernel, real audit writer, SQLite, the engine middleware chain): a zh-CN reader reads商机赢单:Acme(赢单)from the zh-CN template with the{stage}token named by its zh-CN option label; the system, an en reader, a read with no locale and a ja-JP reader (no entry) read the storedDeal won: Acme (Won); the code is stored for the system and served to no other caller; a reader not served a token's field (note) gets the row with nosummary. Red first: with the composer's template lookup stubbed out, the zh-CN pin and the redaction pin's served half fail (2 of 4).activity-summary-message.test.ts, new describe: composes the translated template, an unstored token empty; nothing composed for a locale with no entry or on a locale with nomilestoneSummary; a tenant's rewording of the packaged milestone keeps its words while the untouched one translates, and an emptied one still translates (fails with the earlier local copy of the comparison); the stored code reads back and a malformed one is refused.packages/spec/src/system/i18n-milestone-summary.test.ts(new): the key is read by pair, a dotted value as one key, along the fallback chain,undefinedon misses; the schema accepts the group and refuses a key it does not declare;translateObjectleaves the authored summary.packages/lint/src/i18n-milestones-37524.test.ts(new): the extractor emits one key per fired pair seeded with the authored template; the reference rule resolves declared pairs and flags an undeclared value (with the suggestion) and an unwatched field.validate-translation-references.test.ts: the lint:validate-translation-referenceshas no_tabsleg — an authored key naming a filter-preset tab that does not exist warns nobody #13835 object-branch coverage ledger classifies_milestonesas reference-checked, backed by a ghost that reports, and the all-groups control bundle names the real pair.92e8e1bcf:@objectstack/plugin-auditvitest 110 files / 1,840 tests pass;@objectstack/lintvitest 237 files / 9,683 tests pass (the one red, the coverage ledger, fixed in the tip commit and re-run: 268/268);@objectstack/specvitestsrc/systempass;node scripts/check-i18n-bundles.mjsexit 0; eslint on the touched files exit 0;tsc --noEmitfor plugin-audit exit 0;pnpm --filter @objectstack/spec check:generatedexit 0;node scripts/pm/overlap-check.mjsexit 0.check:i18n-coverageneeds the built examples and is left to CI.Contract review (L2) is owed before landing: the diff changes
packages/spec/src/**and declaresClause-②: yes (widening).Human Minimum
packages/specholds no runtime logic.pnpm lintpasses.main, one pull request.packages/spectouched: its generated artifacts are regenerated and committed.content/docs/references/,packages/*/CHANGELOG.mdorcontent/docs/releases/.🤖 Generated with Claude Code
https://claude.ai/code/session_01L6bhgUpnvPnJ1hR74pUrVj
Generated by Claude Code