Repository navigation
Commit b1b153a
<!-- claude-projects-attribution: {"github_login":"os-steve"} -->
_Requested by **Steve** · [project
thread](https://claude.ai/code/project/chan_01FdL1XeUyvVNxLreh3F4Qi9?thread=cmsg_01FdL1XeUyvVNxLreh3F4Qi9T13SmMGaz8cQkchZBGh7J2)_
Fixes #26633
Clause-②: no
Metadata-protocol: none
## 维护者速读
- 改了什么:`objectstack-ui` 技能新增第三个 eval 文件
`evals/report-period-export.json`,只含一条报表编写题:要求报表在 `type: 'date'`
的数据集维度上声明 `dateRange`(沿用仪表盘的预设名),并用 `exportOptions` 声明 csv / xlsx 下载;禁止
`joined` 容器、手写 `runtimeFilter` 日期窗、第二张预设表和自造的导出权限键。`evals/README.md`
列出该文件;token 棘轮两行按实测钉住;`@objectstack/skills` 补丁 changeset。
- 为什么改:#26628 给报表加了这两个键,但两个既有 eval 文件都在 token 上限(余量 0),没有任何 eval 检查
agent 会用这两个键;本卡是它欠下的 eval。
- 风险与回滚:只加一个 JSON 夹具、三行 README 和两行棘轮;不改任何 schema、键或运行时行为。回滚即 revert 本
PR。
-
先看:`skills/objectstack-ui/evals/report-period-export.json`(题面与断言)、`scripts/check-skills-token-ratchet.mjs`(README
行 289 → 335、新文件行 457,算式在注释里)、`skills/objectstack-ui/evals/README.md`。
- 两分钟验证:`node scripts/check-skills-token-ratchet.mjs`,预期四个
`objectstack-ui/evals` 文件全部 ✓ 且余量 0;`node -e
"JSON.parse(require('fs').readFileSync('skills/objectstack-ui/evals/report-period-export.json','utf8'))"`
无输出即解析通过。
- 需要你做的:批准本 PR(`skills/**` 受管面,Tier H)。
## What changes
- **New eval file**
`skills/objectstack-ui/evals/report-period-export.json` (same fixture
shape as its two siblings, one eval). The prompt names a dataset with a
`type: 'date'` `close_date` dimension and asks for a summary report that
opens on the current quarter, lets the viewer pick another period, and
lets users who may already export the base object download the table as
CSV or Excel. The assertions require `defineReport`, `dateRange`,
`dimension: 'close_date'`, `defaultRange: 'this_quarter'`,
`exportOptions`, `'csv'`, `'xlsx'` and `allowExport` (the existing
permission-set axis, named in words), and refuse `type: 'joined'` /
`blocks:` (either key on a joined container), `close_date: {` (a
hand-rolled `runtimeFilter` window on the date column), `presets:` (a
second preset table), `permissions.export` / `canExport` / `allowExport:
true` (an invented report permission key) and `'pdf'`. Every key in the
prompt, the expected output and the assertions is read off
`packages/spec/src/ui/report.zod.ts` and `list-view-export-options.ts`
on `origin/main` dc9d1ff (`dateRange: { dimension?, defaultRange,
allowCustomRange }`, `exportOptions: { formats?, includeHeaders?,
fileNamePrefix? }`, formats `csv` / `xlsx`, preset `this_quarter` from
`DATE_RANGE_PRESETS`); none is invented.
- **Why a third file.** Both sibling eval files sit at headroom 0, and
the open draft PR #26739 (another lane) edits
`analytics-inline-vs-dataset.json` and its ratchet row, so the prompt
gets a new file and a new row instead of a serial conflict.
- **`skills/objectstack-ui/evals/README.md`** lists the new file in one
three-line entry, between its two siblings.
- **`scripts/check-skills-token-ratchet.mjs`**: a new row for the eval
file pinned AT the measurement (1828 bytes → 457 tokens, headroom 0) and
the README row moved 289 → 335 (1143 → 1339 bytes), each with its
arithmetic comment and the standing maintainer ruling quoted verbatim
beside the sibling row: 「A:先削重复,余额按实测提高」. Paid down first as the ruling
asks: the new file is fixtures and restates nothing; the README's four
sections share no sentence; so 0 bytes were available to cut and the
whole addition is raised to the measurement, not past it. No other row
moves.
- **Changeset** `.changeset/26633-report-period-export-eval.md`:
`@objectstack/skills` patch, both declaration lines at line start (the
published skills bundle is built from `skills/**`).
**Skills readings** (`skills/**` touched; before = `origin/main`
dc9d1ff, after = head):
| Reading | Before | After |
| --- | --- | --- |
| `skills/objectstack-ui/evals/report-period-export.json` lines / tokens
| — (new) | 16 / 457 (ceiling 457, headroom 0) |
| `skills/objectstack-ui/evals/README.md` lines / tokens | 31 / 286
(ceiling 289, headroom 3) | 34 / 335 (ceiling 335, headroom 0) |
| `skills/objectstack-ui/**` lines | 2259 | 2278 |
| all `SKILL.md` lines | 4600 | 4600 |
| whole `skills/**` tree lines | 19191 | 19210 |
| bundle total tokens (ratchet report) | 213404 | 213910 |
## Why
A report can now declare its period and its export (`dateRange` /
`exportOptions`, PR #26628), and the skill's rule example shows
`dateRange`, but no eval scored an agent that hand-rolls a
`runtimeFilter` date window, invents a `permissions.export` bit,
redeclares the preset table, or puts either key on a `joined` container.
This file is the instrument that makes those wrong answers fail at
scoring.
## Tests
- `node scripts/check-skills-token-ratchet.mjs` at head: `82 authored
bundle file(s) within their ceilings; 10 generator-owned file(s)
measured, not ratcheted`, exit 0; the four `objectstack-ui/evals` rows
each ✓ at headroom 0.
- `node scripts/check-skills-token-ratchet.mjs --self-test`: `79 cases
pass`, exit 0.
- The eval file parses (`JSON.parse`, no output).
- No test file edited; no forced test edit.
## Acceptance notes
- **The skill text teaches `dateRange` but not `exportOptions`.**
`skills/objectstack-ui/rules/dashboards.md` § Report Configuration
carries the `dateRange` example from PR #26628; `exportOptions` is
taught only on the docs page `content/docs/ui/reports.mdx` § Period and
export. This eval therefore asserts a key the published skill does not
yet teach in its rules. Noted, not filed — the card's file surface is
the eval, its README line, the ratchet rows and the changeset; the
teaching line is the skills lane's call (that file sits at headroom 0
too).
- The `allowExport` must-contain is a review cue as much as a scorer: an
answer that explains the export gate as "the base object's export
permission" without the key name scores as a miss and deserves a read,
the way eval 2 of `analytics-inline-vs-dataset.json` documents its
strict `dateGranularity`.
- The eval is not run by any gate: the repo has no eval runner;
`check:skill-docs` / `check:skill-refs` / `check:skill-examples` read
`SKILL.md`, `references/` and the rules' code fences, none the eval
JSON. The gates this diff does reach are listed under Verification.
## Verification
- `node scripts/pm/dispatch-gates.mjs --commands --repo
objectstack-ai/objectstack` at head `78362c8b` (the final commit)
derived 61 commands (51 matched by path, 2 by change kind, 8
whole-tree). All 61 ran in the worktree after that commit, each exit 0
captured before any pipe — among them `node
scripts/check-skills-token-ratchet.mjs` and its `--self-test` (79
cases), `pnpm check:pm-governed-merges`, `pnpm check:pm-dispatch-gates`,
`pnpm check:published-files`, `node scripts/check-empty-changeset.mjs
--base origin/main`, `node scripts/check-adr-0087-registration.mjs
--base origin/main`, `node scripts/check-changeset-no-major.mjs --base
origin/main`, `pnpm check:skill-identifier-liveness`, `pnpm
check:skill-frame-sync`, `pnpm check:skill-compatibility`, `pnpm
check:doc-authoring`, `pnpm check:ratchet-remedy-authority`, `pnpm
check:nul-bytes`.
- `dispatch-gates --ran`: `61 derived famil(ies) accounted for — 61 run,
0 NOT-MEASURED (a DERIVED zero — all 61 recorded an exit code and none
of them is 3)`.
- Three families take a value from the workflow and are NOT MEASURED
locally (the two shard attestations and `check-test-completeness`); the
11 wide-population families and the repo-wide `pnpm lint` are CI's runs.
- Build closure before the gates: `turbo run build --concurrency=2
--filter='./packages/**'` under `scripts/pm/os-verify-lock.sh`, `VERDICT
command-exit 0` (held 8m42s).
- The edited gate script's own test suite is its `--self-test` (no other
test file names `check-skills-token-ratchet`); no package source is
touched, so no package `test` / `typecheck` is owed.
## Human Minimum
- [x] 1. Schemas start as Zod; `packages/spec` holds no runtime logic.
(No schema touched.)
- [x] 2. Every name I added uses the casing for its kind.
- [x] 3. No formatter ran; `pnpm lint` passes (the repo-wide run is
CI's; no source file edited).
- [x] 4. One issue, one branch off an up-to-date `main`, one pull
request.
- [x] 5. A change that publishes carries a changeset, and both
declaration lines are filled in here and in the changeset.
- [x] 6. `packages/spec` touched: n/a, not touched.
- [x] 7. No hand edits to `content/docs/references/`,
`packages/*/CHANGELOG.md` or `content/docs/releases/`.
- [x] 8. Title, body and comments are in English.
- [x] The *Before Submitting* list in CONTRIBUTING.md is done.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
https://claude.ai/code/session_01ADHkmSMxfTnb6u1AsKaTcU
---
_Generated by [Claude
Code](https://claude.ai/code/session_01ADHkmSMxfTnb6u1AsKaTcU)_
Co-authored-by: Claude <noreply@anthropic.com>
1 parent 4ae66a2 commit b1b153a
4 files changed
Lines changed: 52 additions & 2 deletions
File tree
- .changeset
- scripts
- skills/objectstack-ui/evals
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
679 | 679 | | |
680 | 680 | | |
681 | 681 | | |
682 | | - | |
| 682 | + | |
683 | 683 | | |
684 | 684 | | |
685 | | - | |
| 685 | + | |
| 686 | + | |
| 687 | + | |
| 688 | + | |
| 689 | + | |
| 690 | + | |
| 691 | + | |
| 692 | + | |
| 693 | + | |
686 | 694 | | |
687 | 695 | | |
688 | 696 | | |
| |||
710 | 718 | | |
711 | 719 | | |
712 | 720 | | |
| 721 | + | |
| 722 | + | |
| 723 | + | |
| 724 | + | |
| 725 | + | |
| 726 | + | |
| 727 | + | |
| 728 | + | |
| 729 | + | |
| 730 | + | |
| 731 | + | |
713 | 732 | | |
714 | 733 | | |
715 | 734 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
12 | 15 | | |
13 | 16 | | |
14 | 17 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
0 commit comments