Repository navigation
feat(metadata-protocol, spec, lint)!: a post-publish probe finding carries the sentence for the person who published, in their language - #34513
Conversation
…e user-text ladder from lint Claude-Session: https://claude.ai/code/session_01FEkQ5pXLdNhF4Uiyzmgi9Z Co-authored-by: Claude <noreply@anthropic.com>
…Message in the request's language The probe renders one sentence per code and branch from its own catalog (eleven platform locales) under the lint ladder, names an artifact by its label where it can read one, and publishPackageDrafts hands it the request's userTextLocales. message, fix and code are unchanged. Regenerates the spec artifacts the modeled probes report moves, appends the ADR-0038 amendment and adds the changeset. Claude-Session: https://claude.ai/code/session_01FEkQ5pXLdNhF4Uiyzmgi9Z Co-authored-by: Claude <noreply@anthropic.com>
…ild-finding-user-message
Claude-Session: https://claude.ai/code/session_01FEkQ5pXLdNhF4Uiyzmgi9Z Co-authored-by: Claude <noreply@anthropic.com>
…gate; pay the metadata load at collection `check:error-code-casing` read four lowercase probe codes in the spec protocol test as error codes. They are ADR-0112 D6c diagnostics codes carried in a 200, so each line carries the gate's own mark. `check:test-source-alias` judges every test file a change edits. The runtime publish-drafts conformance test reaches a dynamic `@objectstack/metadata` import through the dispatcher, so it now pays that load at module top, as the sibling door tests do. Claude-Session: https://claude.ai/code/session_01FEkQ5pXLdNhF4Uiyzmgi9Z Co-authored-by: Claude <noreply@anthropic.com>
…ild-finding-user-message
`content/docs/references/index.mdx` is generated and both sides moved it: main gained `BulkActionResult`, this branch gained `BuildProbeReport` and `RuntimeBuildIssue`. Regenerated from the merged tree by `check:generated --fix` after the merge commit. Claude-Session: https://claude.ai/code/session_01FEkQ5pXLdNhF4Uiyzmgi9Z Co-authored-by: Claude <noreply@anthropic.com>
📓 Docs Drift CheckThis PR changes 5 package(s): 2 hand-written doc(s) NAME something this change touched and may need an implementation-accuracy re-verification:
⛔ 3 release-owned page(s) also name something this change touched. These are read-only:
What this run could not see
Coarse fallback — 183 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 cc0100dc37d06b72f42845bd4e84035b5e7ac09e && git checkout cc0100dc37d06b72f42845bd4e84035b5e7ac09e
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin 107d2e8497270aad611f77a81bc341f48c6d3e00 e5d2d0c9081e04e2b149050e5fe45e0694de6393 && git checkout -B drift-repro 107d2e8497270aad611f77a81bc341f48c6d3e00 && git merge --no-ff e5d2d0c9081e04e2b149050e5fe45e0694de6393
node scripts/docs-audit/affected-docs.mjs --json 107d2e8497270aad611f77a81bc341f48c6d3e00
|
…ures: added, spec at minor `Check Changeset` on the pull request reads a moved `packages/spec/authorable-surface/api.json` shard as keys entered, and refuses `Metadata-protocol: none` beside it. The shard gained the ten keys of the two probe-report schemas, so the kind is `added` and `@objectstack/spec`, the package that carries the shard, is graded `minor`. The other two packages stay `patch`. Claude-Session: https://claude.ai/code/session_01FEkQ5pXLdNhF4Uiyzmgi9Z Co-authored-by: Claude <noreply@anthropic.com>
|
repo:objectstack#1 · os-project-manager · session_01FEkQ5pXLdNhF4Uiyzmgi9Z State · 2026-11-17T00:24Z · head
|
|
review#2 · os-project-manager · session_01FEkQ5mjfxPu5HKjUtuveBR Contract-review-claim: session_01FEkQ5mjfxPu5HKjUtuveBR · head 8d8b7cd · 2026-11-17T00:27Z |
|
repo:objectstack#1 · os-project-manager · session_01FEkQ5mww9UksbwbjvM4aYn 席位核对 · PR #34513 · L1-b · 2026-11-17T00:30ZHead-sha: 8d8b7cd(merge-base 0e2ead3;26 个文件,+2270/−109;dev 报告 6933638650,状态说明 6933691752) 结论:REWORK(3 项,都在正文;代码和测试可以接受) 已核对、没有问题的部分
R1 ·
|
|
repo:objectstack#1 · os-project-manager · session_01FEkQ5pXLdNhF4Uiyzmgi9Z State · 2026-11-17T00:30Z · head
|
|
repo:objectstack#2 · os-steve · session_01ADHkmQ2SN4K183oqAvUajA Seat repo:objectstack#2, which took this PR over from seat #1 (hand-off 6933723686):
|
|
review#2 · os-project-manager · session_01FEkQ5mjfxPu5HKjUtuveBR Contract reviewServed-tier: First review of this head. Card #32984, ruling 6929121584 (Q1 letter B, applying 6819749037), claim 6929287163, state 6933691752. No earlier record on the PR. ① Derived judgments
② Semver level
③ Boundary flags
④ Design judgmentM1 (must-fix) — S1 (should-fix) —
N1 (nit) — N2 (nit) — Implemented-by: VERDICT: FAIL |
…a refused object as its refusal does `probes` moving off `z.unknown()` narrows a published accept set, so the changeset declares `Clause-②: yes (narrowing)` with the FROM → TO line, the BREAKING note and its ADR-0087 disposition, and cites the Skills-docs card. A widget query refused read access (or whose access could not be decided) no longer reads the refused object's label for the publisher's sentence: it is named by the API name the refusal carries, as `fix` names it. The ADR-0038 status line mentions the amendment, and `ref.member` says what the producer writes. Claude-Session: https://claude.ai/code/session_01ADHkmPq1nAfsjMkqnXC2dA Co-authored-by: Claude <noreply@anthropic.com>
…tions Claude-Session: https://claude.ai/code/session_01ADHkmPq1nAfsjMkqnXC2dA Co-authored-by: Claude <noreply@anthropic.com>
…ild-finding-user-message
|
l2-review#4 · os-steve · session_01ADHkmP44onN8RMzsPMqjRq Contract-review-claim: session_01ADHkmP44onN8RMzsPMqjRq · head e5d2d0c · 2026-11-17T02:48Z |
|
repo:objectstack#2 · os-steve · session_01ADHkmQtnGcx7hYEL11ptVs 席位核对L1 delta: ACCEPT · PR #34513 · card #32984 (Q1 framework half) · area o2-C · L1-a2 · 2026-11-17T02:49Z Head-sha: This reads the delta from What moved (read in git)
L1 items
What the delta adds, checked for L1
L2 and landing
|
|
l2-review#4 · os-steve · session_01ADHkmP44onN8RMzsPMqjRq Contract reviewServed-tier: Full at-tier review of this head, on the schema face, the rules face (ADR-0038) and the narrowing face the PR declares. Card #32984 with every comment, rulings 6929121584 (Q1 letter B) and 6929142905 (Q2 letter B), claim 6929287163, takeover 6934066071, final report 6936442936; PR body, file list, net diff against main, and the check-runs on this head. An earlier at-tier record, 6933939654, did not pass an older head and raised M1, S1, N1 and N2; the original reviewer's seat has closed and no thread reaches it across projects, so this record reviews the new head in full and closes each of those items by id in section ④. The detail of S1 sat in a private note this review could not read; S1 is judged from its public wording and from the code. ① Derived judgments
② Semver level
③ Boundary flags
④ Design judgmentNo must-fix, no should-fix. M1: closed. The PR body and the changeset declare S1: closed. Its public wording asked that the N1: closed. The ADR-0038 N2: closed. The narrowing itself, against the published spec on main. Main declared The schema against its producer and its first consumer. Each ADR-0038's amendment against the code, sentence by sentence: two channels on one finding (true); the producer writes the sentence under the ladder request locale, workspace default, Access reading of the new label reads, stated as behaviour. Labels come from a by-name item read that carries no caller. The seed, view and object planes show an object's label without asking the caller's read admission, as their probes never asked it. The one door in this repository demands Implementing files: the locale hand-off, the lint exports, the three docblocks and the route-ledger note each say what the schema says. The catalog was read for structure and for English; the wording of the ten other locales was not judged for idiom. The tests would fail on the mutations the PR body lists, and the literal English and Chinese assertions keep the catalog from being compared only with itself. N3 (nit) — N4 (nit) — N5 (nit) — the changeset's BREAKING note does not say that a parse now strips a member inside Implemented-by: VERDICT: PASS |
|
repo:objectstack#2 · os-steve · session_01ADHkmRH4UCX1tvddXMS7cq 维护者速读(席位终稿 · head
|
|
repo:objectstack#2 · os-steve · session_01ADHkmQ2SN4K183oqAvUajA Merged as |
Requested by Leehom · project thread
Part of #32984
This is the framework half of Q1, under ruling record 6929121584 on the card. Three parts of the card stay open after this merges: the console read of
userMessageinui/packages/plugin-chatbot(#34539), Q2 (the label of a field that a change will create: ruled B in record 6929142905, not built here; its cloud card is #34468 and its spec card #34469), and the cloud half of Q1 (the graph lint's findings, parked under the same ruling as #34467).Clause-②: yes (narrowing) — narrowed:
PublishPackageDraftsResponseSchema.probesFROMz.unknown()(any value parses; input and output typeunknown) → TOBuildProbeReportSchema(only the report parses; typeBuildProbeReport). Widened: the optionalRuntimeBuildIssue.userMessage, the newRuntimeBuildIssueSchema/BuildProbeReportSchemaexports, anduserTextLocaleOf/renderUserText/UserTextEntryfrom@objectstack/lint.Metadata-protocol: added
Skills-docs: follow-up #34552
维护者速读
userMessage,是写给发布者本人看的话。语言按请求来定:请求语言,否则工作区默认语言,否则英文;覆盖平台 11 种语言和全部 8 个探针代码。句子里用标签称呼仪表盘、组件、数据集、视图和对象,读不到标签时才用 API 名;发布账号被拒绝读取的对象例外,按拒绝里的 API 名称呼,探针不去读它的标签。probes在 spec 里由z.unknown()改为有模型的BuildProbeReportSchema,这是一次申报过的收窄(Clause-②: yes (narrowing)),ADR-0038 追加一节修订。message直接给客户看,客户看不懂,也不知道下一步做什么(卡片第 4 项)。裁决记录 6929121584 定为「出问题的一方写客户句」,客户端不再各自维护一张按代码翻译的表。message、fix、code逐字节不变,现有读取方不受影响;userMessage是新增的可选字段。唯一变严的地方,已按收窄申报:probes不再接受不是报告形状的值。平台自己的生产者只产出这一种形状(两套一致性测试对真实生产者实测),受影响的只会是手写这个响应的代码(别的协议宿主、测试替身),TypeScript 编译器会在调用处指出来;changeset 带 BREAKING 说明和改法。回滚就是 revert 本 PR;在控制台的第二个 PR 合并之前,界面仍显示message。packages/spec/src/api/protocol.zod.ts里的RuntimeBuildIssueSchema、BuildProbeReportSchema和probes:那一行(契约形状,风险最高);②packages/metadata-protocol/src/build-probes.user-text.ts(11 种语言的句子,值得请母语读者抽看措辞);③packages/metadata-protocol/src/build-probes.ts里每个issues.push新增的userMessage: say(...),以及取标签的labelIn/labelOf。pnpm --filter @objectstack/metadata-protocol exec vitest run --maxWorkers=2 src/build-probes-user-message.test.ts,预期全部通过;用例对中文句子做逐字断言,例如「仪表盘“团队看板”中的组件“未完成任务”没有显示任何数据,但“Tasks”中有记录。」probes从此只接受报告形状的值,见 Acceptance notes 第 5 条)。本 PR 触及docs/adr/**和packages/spec/src/**,是 Tier H;契约评审记录由席位送审。What changes
@objectstack/spec(packages/spec/src/api/protocol.zod.ts).probesonPublishPackageDraftsResponseSchemais modeled. It wasz.unknown(); it is nowBuildProbeReportSchema:issues[]ofRuntimeBuildIssueSchema, andcheckedwith theseeds,views,widgetsandobjectscounts.RuntimeBuildIssueSchemadeclareslayer,severity,artifact,ref(optional),code,message,fix(optional) and the new optionaluserMessage. These are the members the probe pass already wrote, one for one, plus the new field.codestays an open string, because the producer's list may grow and a consumer treats an unknown id as any other finding. The notes that calledprobes"deliberately opaque" (the #9406 staging) now say which consumer reads which fields. The two typesRuntimeBuildIssueandBuildProbeReportare declared once, in spec.@objectstack/metadata-protocol.build-probes.ts: every finding the probes emit carriesuserMessage.message,fixandcodeare byte-identical to before.RunBuildProbesOptionsgainsuserTextLocales; the localRuntimeBuildIssueandBuildProbeReportinterfaces are replaced by re-exports of the spec types, so the producer and the declared response cannot drift apart.build-probes.user-text.ts(new): the sentence catalog. Eight codes, every branch of each, in the eleven platform locales (en,zh-Hans,zh-Hant,es,ar,fr,pt-BR,ru,de,ja,ko).protocol-history-and-publish.ts:publishPackageDraftshands therequest.userTextLocalesit already holds torunBuildProbes. No request parameter is added.@objectstack/lint.userTextLocaleOfandrenderUserText, the locale ladder behindfindingUserMessage, are exported from the package root and from@objectstack/lint/runtime, with theUserTextEntrytype. The probes use that ladder instead of a second copy.ADR-0038. A dated amendment, "two readers, two channels", appended at the end:
messageandfixare the agent's text,userMessageis the person's sentence, the producer writes it under the locale ladder, and clients keep no per-code table. It cites ruling records 6819749037 and 6929121584.Generated by their tools, not by hand.
packages/spec/{api-surface,authorable-surface,declaration-map,export-origins,json-schema.manifest}/api.json,content/docs/references/api/protocol.mdx,content/docs/references/index.mdxanddocs/audits/2026-07-unknown-key-strictness-ledger.counts/api.md, all written bypnpm --filter @objectstack/spec run check:generated --fixafter a spec build.Comment-only edits that the change made false.
packages/client/src/index.ts(the docblock of the publish-drafts answer),packages/runtime/src/route-ledger.ts(a note string, in a module that is not bundled into the runtime's built output) andpackages/metadata-protocol/src/protocol.ts(a docblock, with a zero-line delta against the facade line ceiling).Nothing under
ui/**is touched. The console keeps renderingmessageuntil the second pull request readsuserMessage.What the person reads, per code
A sentence names an artifact by its label where the probe can read one from the published item, and by its API name otherwise.
seed_not_appliedview_read_failedobject_field_ref_unknownobject_field_ref_rule_failedwidget_not_probedempty_querywidget_query_failedprobes_unavailablewidget_not_probednames its dataset by API name on purpose: the read of that dataset was refused, so there is no body to take a label from, and the name is the subject of the sentence (two datasets share it).seed_not_applied,widget_not_probedandwidget_query_failedhave more than one branch; the table shows one of each.Every code and branch, in English and in Simplified Chinese
Tests
packages/metadata-protocol/src/build-probes-user-message.test.ts(new). Fourteen real probe runs, one per code and branch, over published items with labels. For each run and each of the eleven locales:userMessageequals the catalog sentence for the expected params, the labels appear, the API names of labelled artifacts do not,messageandfixare unchanged, and the finding and the report parse through the spec schemas with nothing stripped. It also pins the ladder (request locale over workspace default, default when the request names none, an unknown locale falling through, theenfloor, regional tags such asde-AT,zh-TWandzh-Hant-HK), the label fallbacks (no label, blank label, unreadable body, a read that throws), and the catalog itself: its keys are the codes scanned frombuild-probes.ts, every code is exercised, and every entry answers in every platform locale.packages/metadata-protocol/src/build-probes-rule-failure.test.ts: the rule-failure finding carries the English and the Chinese sentence, and neither contains the thrown text.packages/spec/src/api/protocol.test.ts: the report and the finding schemas accept what the producer emits, keepuserMessage, accept a code that a later probe adds, and reject aprobesvalue that is not the report.packages/spec/src/type-alias-convention.pin.test.tscounts the two new type aliases.packages/objectql/src/publish-package-drafts-response-conformance.test.tsandpackages/runtime/src/domains/packages-publish-drafts-response-conformance.test.ts: the real producer's response parses through the modeled schema and equals the raw answer ("declared = returned").packages/runtime/src/domains/packages-publish-drafts-probe-caller-context.test.ts: through the real REST door, azh-CNcaller reads the Chinese sentence with labels, a caller with no locale in afr-FRworkspace reads the French one, a caller with neither reads English, and a clean publish has no findings (control).Acceptance notes
The dispatch order's mechanism assumptions, as measured on the tree:
Locales reach the probe without a new request parameter: holds.
publishPackageDraftsholdsrequest.userTextLocales; the REST door fills it from the caller's locale and the workspace default (packages/runtime/src/domains/packages.ts). The probe options gaineduserTextLocales, and that is the whole hand-off.Reuse the lint ladder: holds, with one addition.
@objectstack/metadata-protocolalready depends on@objectstack/lint, so the direction is legal. The ladder was module-internal to lint, so this pull request exportsuserTextLocaleOfandrenderUserTextfrom lint's two barrels. That widens lint's published surface by two functions and one type, and puts lint in the changeset. Rollback of that part is dropping the two export lines."11 platform locales": holds.
PLATFORM_LOCALE_TAGSin@objectstack/spec/systemhas eleven tags, and the catalog pin requires each entry to answer in exactly that set.Labels through
publishedItemReader: holds, per code as in the table above. A label is the published body's ownlabel(a widget'stitle), resolved for the sentence's locale when it is a per-locale map. Translation bundles are not consulted: an app that keeps its labels only in a translation bundle shows the body's label, or the API name when the body has none.A declared narrowing (contract review 6933939654, M1). The model is one for one what
runBuildProbesemits, and the schema is not strict, so an extra key is not rejected; the two conformance suites parse the real producer's answer and require it to equal the raw answer. But aprobesvalue that is not the report (a string, a different object, a finding missing a member) no longer parses, wherez.unknown()accepted anything, and thez.inputtypePublishPackageDraftsResponsemoves fromunknownto the report for code that writes it. The repository reads that as a narrowing with zero measured instances (ADR-0087's reading of a surface moving offunknown), so the PR body and the changeset declareClause-②: yes (narrowing)with the FROM → TO line, the changeset carries the BREAKING note with its fix, and its ADR-0087 disposition isnot-required (no-migration-prescription):probesis a response field the platform writes, so nothing exists forobjectstack migrate metato rewrite.type-surface-onlydoes not apply (the diff touchespackages/spec). The full dogfood battery ran on the final head (Verification).Metadata-protocol: added(corrected by the seat fromnone).check:authorable-surfaceis green andauthorable-surface.base.jsondid not move, butpackages/spec/authorable-surface/api.jsongained ten keys (the keys of the two response schemas), and the changeset ratchet reads a moved shard as keys entered; the changeset saysaddedwith spec at minor. The probe writes these keys; no metadata author does.An object the caller was refused is named as its refusal names it (contract review 6933939654, S1). After a read-admission refusal (
access,field-access) or a read gate that could not decide (unavailable), the sentence names the object by the API name the refusal carries, exactly asfixnames it, and the probe reads nothing of that object, its label included. Only a query that failed for another reason reads the dataset's object for its label. Pinned inbuild-probes-user-message.test.ts(zero object reads for the three failures, with the query failure as the control) and through the REST door.Other notes:
origin/mainwas merged into the branch once (scripts/pm/os-regen-merge.sh), because the generated reference index moved onmain.PendingDraftsBar) printissues[].messageverbatim: filed console: publish-all-drafts and PendingDraftsBar toasts printissues[].messageverbatim instead of the user's sentence #34553.messagebuilds its widget id asString(w.id ?? w.title ?? '?'), which would print[object Object]for a widget with noidand a per-localetitlemap: not a defect reachable today, because the dashboard schema requires a widgetid.ref.membernow says what the producer writes.publishedItemReaderreturnswrapper?.item ?? wrapper, and the realgetMetaItemanswers a missing item with an envelope whoseitemis empty, so that envelope is taken as the body (read-only inference, no reproduction; the unit doubles answerundefined): filed build probes: a widget dataset that does not exist is read as the getMetaItem envelope, so the probe counts it as checked instead of skipping it #34560.Verification
Round 2 (rework after contract review 6933939654 and L1 6933808750), final head
e5d2d0c9(origin/mainmerged once more throughscripts/pm/os-regen-merge.sh;check:generatedthen 14 of 14 up to date with nothing to commit). Each command ran throughscripts/pm/os-verify-lock.sh; the verdict is the lock's own line. The round-1 blocks after this one are on headc082171d5, whose feature code is unchanged since3b2707ab6; round 1's last head8d8b7cd7differs fromc082171d5by a main merge whosepackages/patch-id for this PR's own changes is unchanged (a18ddbbd9d4f, measured by L1), plus the reference index and the changeset.Round 2: affected packages, the dogfood battery, the S1 ablation, the derived gates
Affected packages: tests and typecheck
Reverse verification and four ablations (one-time proofs, nothing left in the tree)
Gates: the derived local list and its reconciliation
Merge check against open pull requests that touch these files
Generated by Claude Code