Repository navigation
docs(spec,skills): object-metric polarity reads the aggregate before invert; pages.md points at compareTo - #28348
Conversation
…invert; pages.md points at compareTo Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L9qibyvwrLkwf1kTpdV1Qc
…metric polarity prose Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L9qibyvwrLkwf1kTpdV1Qc
📓 Docs Drift Check1 anchor(s) derived from 1 changed package(s); no hand-written page names any of them, so this run has nothing to list — not a clean bill of health. This check sees only pages that NAME a derived anchor: one that documents this change in prose, or enumerates it in an authoring dialect, names none and stays invisible to it on every run. What this run could not see
Coarse fallback — 168 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 4ebf7adadaf7c70641cfceb67ac03c136c61baf9 && git checkout 4ebf7adadaf7c70641cfceb67ac03c136c61baf9
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin 3fd803379817e495cd0011627c8b4a347f9dcc6a ebeb778357c244efe0aa3e7d540cfc767875df3b && git checkout -B drift-repro 3fd803379817e495cd0011627c8b4a347f9dcc6a && git merge --no-ff ebeb778357c244efe0aa3e7d540cfc767875df3b
node scripts/docs-audit/affected-docs.mjs --json 3fd803379817e495cd0011627c8b4a347f9dcc6a |
|
domain:spec#1 · os-tesla · session_01L9qibw58ehQ2gRHP2h2Puz Contract-review-claim: |
|
domain:spec#1 · os-tesla · session_01L9qibw58ehQ2gRHP2h2Puz Contract reviewServed-tier: Inputs: card #27375 (body: S1 and S2 from record 6487637026 on #27361; the retriage request 6538256731, triage's answer 6538712945 relabelling the card ① Derived judgments
② Semver level
③ Boundary flags
Verdict reasoning. One true sentence about the renderer, placed where the key is declared and in the page generated from it; one pointer in the skill paid for by three exact duplicates in the same file with the token ceiling untouched; patch entries for both shipped surfaces; the head is clean against Implemented-by: VERDICT: PASS |
|
domain:spec#1 · os-tesla · session_01L9qibwb6hBqszPTYJobitm 维护者速读
席位核对 · ACCEPT ·
|
Requested by Tesla · project thread
Fixes #27375
Refs #27347
Clause-②: no
Metadata-protocol: none
Skills-docs: updated here
维护者速读
object-metric的polarity说明补一句——徽标箭头和polarity都读invert之前的聚合值,所以polarity按原始值声明(错误率显示成可用率时写lower);objectstack-ui技能的rules/pages.md在object-metric那一行加上指向dashboards.md的compareTo/polarity小节的链接。invert的指标卡上有两个数(原始值和1 - 值),原文没说箭头读哪个,作者可能把好坏方向写反;从pages.md搭内联 KPI 的作者原先找不到polarity这个键。pages.md的新增由同文件删掉三处重复表述抵付,token 数不变,天花板不动。回滚即 revert 本 PR。packages/spec/src/ui/component.zod.ts的polaritydescribe、skills/objectstack-ui/rules/pages.md第 56 行与三处删减。node scripts/check-skills-token-ratchet.mjs,预期全绿,pages.md为 5689 / 5692。skills/**(Tier H),需要 os-zhuang 或 hotlong 的 APPROVED 评审,之后由席位落地。What changes
S1: the
polarityprose says which number it reads (packages/spec/src/ui/component.zod.ts).ObjectMetricWidgetcomputes the derived trend from the rawfetchedValue/previousValue, while the number it shows is1 - valueunderinvert: true(read at501c864d:ui/packages/plugin-dashboard/src/ObjectMetricWidget.tsx, theinvertbranch near L590 andderivedTrendnear L684). Thepolaritydescribe now ends with one sentence: the badge and polarity read the aggregate beforeinvert, so polarity is declared against the raw value, and an error rate shown as uptime islower. The TSDoc above it says the same in one sentence.content/docs/references/ui/component.mdxis regenerated (check:generatednamed onlycheck:docs). The SDUI manifest does not carry this describe (0 hits for the old text insdui.manifest.json), so it is not regenerated.S2:
rules/pages.mdpoints at the polarity rule. Theobject-metricrow of the component catalogue now readsSingle KPI widget (count/sum/avg); trend colour = polarity, see compareTo, with the link going todashboards.md#period-over-period--compareto(the anchor the file's own table of contents uses). The pointer is paid for by deleting three restatements in the same file:(the CSS is scoped to it)after "needs a stableid": the paragraph above already says the renderer compiles each node to id-scoped CSS.// responsive via the modelcomment in the styling example: the rule "Responsive lives in the breakpoint maps" above it says this.(it is real JS, not constrained JSX)after "os builddoes NOT lint react source": the tier table at the top of the section says this.Standing ruling (2026-10-27, tap A, verbatim and untranslated): 「A:先削重复,余额按实测提高」; recognised path per ruling record 6513306068. The cuts cover the whole pointer, so there is no remainder and the
pages.mdrow inscripts/check-skills-token-ratchet.mjsis not touched.Skill bundle readings (
skills/**touched)501c864d)skills/objectstack-ui/rules/pages.mdSKILL.mdinskills/skills/objectstack-ui/**/*.md(evals excluded)Changeset:
.changeset/27375-object-metric-polarity-before-invert.md,@objectstack/specpatch and@objectstack/skillspatch, with both declaration lines. The spec patch is measured, not assumed: afterpnpm --filter @objectstack/spec build, the new describe text is inpackages/spec/dist/chunk-*.{js,mjs}andjson-schema/ui/ObjectMetricProps.json, and bothdistandjson-schemaare in the package'sfiles[].Tests
No behaviour changes, so there is no new test and no ablation. The derived-gate set ran locally on the head named under Verification; see that section.
Acceptance notes
invertandcompareToare both set. Nothing in this PR changes it.Verification
Head
ebeb7783, merge base501c864d. Derived withnode scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstack(4 paths, 30 changed lines), each line run with stdin from /dev/null and its exit code written to disk before any pipe.pnpm --filter @objectstack/spec build: VERDICT command-exit 0.check:generatednamed onlycheck:docsstale (13 of 14 up to date);check:generated --fixrewrotecontent/docs/references/ui/component.mdxand nothing else.dispatch-gates.mjs --repo objectstack-ai/objectstack --ran: "104 derived, 103 run, 1 NOT-MEASURED, 0 UNRUN".@objectstack/lint,@objectstack/client-reactand@objectstack/objectqlclosures, six of them re-ran green.pnpm check:dual-build-cjs-loads, reason: it loads the built CJS entry of every package and 34 had nodist/; a full workspace build was not run for a prose-only diff. CI'sLint & Repo Gatesruns it.Derived gates, with exit codes
Generated by Claude Code