fix(plugin-audit): describe sys_comment reactions and mentions by the shape they store (#20558) - #20605
Conversation
… shape their producer stores (#20558) reactions is a JSON object mapping each emoji to the user ids who reacted (objectui RecordDetailView reads and writes exactly that map); mentions is a JSON array of user id strings (the same producer writes JSON.stringify of an id list, and writeCommentMentions consumes it). Translations regenerate in the next commit. Claude-Session: https://claude.ai/code/session_01XY5uCwTjZj7884yYtyur4H Co-authored-by: Claude <noreply@anthropic.com>
…or the sys_comment description fix (#20558) Claude-Session: https://claude.ai/code/session_01XY5uCwTjZj7884yYtyur4H Co-authored-by: Claude <noreply@anthropic.com>
…ot ping an at-mention (#20558) Claude-Session: https://claude.ai/code/session_01XY5uCwTjZj7884yYtyur4H Co-authored-by: Claude <noreply@anthropic.com>
📓 Docs Drift CheckThis PR changes 1 package(s): 2 hand-written doc(s) NAME something this change touched and may need an implementation-accuracy re-verification:
⛔ 4 release-owned page(s) also name something this change touched. These are read-only:
What this run could not see
Coarse fallback — 9 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 e6499353f06068d031df2e5e77c5f9b2a4a78292 && git checkout e6499353f06068d031df2e5e77c5f9b2a4a78292
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin 7a1faf1a5d213cd3fb3c71320d1fb2f9f25f50d5 0cebc286c3d8fa70e82969f203d774d334a2d589 && git checkout -B drift-repro 7a1faf1a5d213cd3fb3c71320d1fb2f9f25f50d5 && git merge --no-ff 0cebc286c3d8fa70e82969f203d774d334a2d589
node scripts/docs-audit/affected-docs.mjs --json 7a1faf1a5d213cd3fb3c71320d1fb2f9f25f50d5
|
…ns help into zh-CN, ja-JP and es-ES (#20558) Values only: the six help strings that still named an array of objects now follow the English descriptions. No key added or dropped, no label touched. Claude-Session: https://claude.ai/code/session_01XY5uCwTjZj7884yYtyur4H Co-authored-by: Claude <noreply@anthropic.com>
…cription (#20558) Claude-Session: https://claude.ai/code/session_01XY5uCwTjZj7884yYtyur4H Co-authored-by: Claude <noreply@anthropic.com>
Contract reviewServed-tier: Inputs read: card #20558 (body and all five comments, the triage 5883386484, the claim 5884359350, the two ① Derived judgmentsAccept-set changes: none — right. The diff edits two Public-surface changes: the served help text for two fields, in five bundles — right, and non-breaking. The source description, the regenerated
② Semver level
The PR body's declaration reads ③ Boundary flagsRound 0 report (5884888328):
Round 1 report (5885081080):
Check-runs on the head as read for this record: 41 check-runs, 36 success, 5 skipped ( Implemented-by: VERDICT: PASS Generated by Claude Code |
Fixes #20558
Clause-②: no
The
descriptionof twosys_commentfields is served metadata (field help, and what an AI client reads before it seeds a comment). Both named a shape no producer writes. They now name the stored shape, and theentranslation bundle is regenerated from the source.reactionsJSON array of emoji reaction objectsJSON object mapping each emoji to the list of user ids who reactedmentionsJSON array of @mention objectsJSON array of the user ids @mentioned in the commentFiles:
packages/plugins/plugin-audit/src/objects/sys-comment.object.ts(2 lines),packages/plugins/plugin-audit/src/translations/en.objects.generated.ts(regenerated),.changeset/20558-comment-reactions-mentions-description.md(patch on@objectstack/plugin-audit). Landing point is the one the card names; no producer lives in another package of this repository.Measurement (premise check, before the edit)
Trees read: objectstack
c876a742(this PR's base) and objectuibf7ab35c(a read-only shallow clone made through the session git proxy; the REST API answers 403 for that repository, plain git does not).reactions, this repository: no producer or reader.git grep -i reactionsover the tree, minus CHANGELOGs and generated bundles, finds only the field declaration, ADR and docs prose, and unrelatedenableReactionsUI props.reactions, objectuipackages/app-shell/src/views/RecordDetailView.tsx:parseReactionsreads a JSON object ofemoji -> string[], and the click handler writesJSON.stringify(storedReactions(...)), the same map (storedReactionsreturns a string-keyed map of string arrays).packages/collaboration/src/CommentThread.tsxtypes it as a string-keyed map of string arrays. The card's premise holds.mentions, producer: the same file'shandleAddCommentandhandleAddReply(the only twosys_commentcreates in objectui) writementions: JSON.stringify(mentionIds), andextractMentionsinpackages/plugin-detail/src/extractMentions.tsreturns a de-duplicatedstring[]of user ids. No objects. This disagrees with the old sentence, so per the triage rulementionsrides in this PR.mentions, consumer in this repository:writeCommentMentionsinpackages/plugins/plugin-audit/src/audit-writers.tsreads the JSON and accepts an array of id strings or an array of objects with anidkey. Every in-repo test value is an id string ('["user-2"]'). The description names only the one shape the producer writes; the consumer's object tolerance is not advertised (one strict contract, not two dialects).cloudrepository was not read); a runtime probe of what the console shows for the old array shape (the card marks that step as read inference, and it stays so).Translations
node scripts/check-i18n-bundles.mjs --writerewrote onlyen.objects.generated.ts. The other eight packages regenerated with no diff. Thezh-CN,ja-JPandes-ESbundles keep their hand-written values (merge mode), andpnpm check:i18nandpnpm check:i18n-stale-fillare green without touching them, so per the dispatch they are not hand-translated here. Six strings therefore still say "array of ... objects" and now contradict the English:mentionsandreactionshelpin each of the three locales (zh-CNlines 218 and 222,ja-JPlines 218 and 222,es-ESlines 218 and 222). This is listed in the report as an open question for the PM seat.Verification (final head e83328b)
node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstackgives 57 commands (the seat's 50 plus 7 that the changeset file adds). All 57 were run one by one with the exit code captured first; all exit 0 ate83328b6.--ranreconciliation with exit codes: 57 derived, 57 run, 0 NOT-MEASURED, 0 UNRUN. One first attempt ofpnpm check:dual-build-cjs-loadsexited 3 (PREREQUISITE NOT MET: nine unrelated packages had nodist/); after building those nine it exited 0 (104 entry points, 66 packages).pnpm --filter @objectstack/plugin-audit test: 25 files, 363 tests passed.pnpm --filter @objectstack/plugin-audit typecheck: exit 0 (both run at236bae38; the one later commit changes only the changeset text).enbundle put back to the base text, on-disk mutation confirmed by grep (old text 1, new text 0),node scripts/check-i18n-bundles.mjs --filter=auditexits 1 withplugins/plugin-audit DRIFTED (1). Restored withgit checkout HEAD -- path; the blob hash matches HEAD (7c457527...) andgit diff HEADis empty. Direction observed: red, as expected.skills/**file touched.Acceptance notes
Seat append — patch round 1 (head
0cebc286, the dev's text, appended by thedomain:servicesseat)The seat answered the open question above with option A, so the six translated help strings are rewritten on this branch. This section supersedes the Translations and Acceptance notes paragraphs above where they call the three locales stale.
Values only: no key added or dropped, no
labeland no other string touched. Exactly sixhelpvalues changed (two per file, 6 additions and 6 deletions):mentionshelpreactionshelpzh-CN评论中被 @ 提及的用户 ID 的 JSON 数组将每个表情映射到对其做出回应的用户 ID 列表的 JSON 对象ja-JPコメント内で @メンションされたユーザー ID の JSON 配列各絵文字を、リアクションしたユーザー ID のリストに対応付ける JSON オブジェクトes-ESMatriz JSON de los id de usuario mencionados con @ en el comentario.Objeto JSON que asigna cada emoji a la lista de id de usuario de quienes reaccionaron.Wording follows each bundle's own habits: the terms for a user id match the existing
user_idhelp in the same file,es-ESkeeps its trailing period as 20 of its 23 help strings do, andzh-CNandja-JPstay period-free. The faithfulness of the translations was read by the author only, with no native-speaker review.The changeset gains one clause saying the translated help texts follow; the level stays
patch.Proof the tool keeps them: after the edit was committed,
node scripts/check-i18n-bundles.mjs --writeregenerated all nine packages and leftgit status --porcelainempty andgit diff HEADat zero lines. Against the previous head, the diff of the three translation files is those sixhelplines and nothing else.At head
0cebc286:pnpm check:i18n,pnpm check:i18n-stale-fillandpnpm check:nul-bytesexit 0,pnpm --filter @objectstack/plugin-audit testpasses (25 files, 363 tests), and all 57 derived gate commands exit 0 (the derived list is unchanged by this round;--ranreconciliation: 57 run, 0 NOT-MEASURED). Whole-PR diff: 6 files, 26 additions, 10 deletions.Seat append — Acceptance notes (added at the at-tier review's request, record
5885205176)writeCommentMentions(plugin-auditaudit-writers.ts) also accepts array entries that are objects with anidkey, a lenient-consumer tolerance that no producer in this repository writes. This PR deliberately does not advertise it: the new description names only the id-string array. No public door answers wrong today, so it is not a card. Dedupe words:writeCommentMentions object entries·sys_comment mentions id objects tolerance·collab.mention parse leniency.Generated by Claude Code