Repository navigation
Commit d399b9f
test(spec): tombstoned-row-status floor at two thirds of the measured population (48 → 32) (#26575)
<!-- claude-projects-attribution: {"github_login":"os-support-ai"} -->
_Requested by **Yibo Wang** · [project
thread](https://claude.ai/code/project/chan_01BVUyyPie8gHwoPM18iABwB?thread=cmsg_01BVUyyPie8gHwoPM18iABwBJX2Ccg4np4Pe7mp48hmBn1)_
Fixes #26541
Clause-②: no
Metadata-protocol: none
## 维护者速读
- 改了什么:`tombstoned-row-status` 活性测试的防空底线从 40 降到 32,只改这一个测试文件。
- 为什么改:底线等于实测墓碑数,按 ADR-0087 正常退役一个墓碑键就会误红;今天实测已是 48,底线取约三分之二。
- 风险与回滚:只放宽一个下限,主断言(墓碑键必须 `dead`、必须 `never` 类型)不动;回滚即还原这一行。
- 先看:`packages/spec/scripts/liveness/tombstoned-row-status.test.ts` 的
`TOMBSTONE_FLOOR` 一行。
- 两分钟验证:`pnpm --filter @objectstack/spec exec vitest run
scripts/liveness/tombstoned-row-status.test.ts`,预期 3 个用例全绿。
- 需要你做的:无,席位落地。
## What changes
`TOMBSTONE_FLOOR` in
`packages/spec/scripts/liveness/tombstoned-row-status.test.ts` moves
from 40 to 32, with a comment naming the measured value and the date.
This follows the parent #26444 rule (about two thirds of the measured
population, rounded down; precedent `vite-dts-wiring-ratchet`, measured
22, floor 15). The stale inline comment "40 was the measured population"
is reworded. The file header's history paragraph (40 at pin time) is
left as the historical record it is.
**Measured population on base `1c632311`: 48** top-level `[REMOVED]`
keys, all 48 `dead`. The floor is floor(48 × 2/3) = 32. **Margin: 16
tombstones (one third)** can be retired before the floor is reached.
No changeset: the file lives under `packages/spec/scripts/`, which is
not in `@objectstack/spec`'s `files[]` (`dist`, `json-schema`,
`liveness`, `prompts`, `src/**/*.zod.ts`, …), so nothing publishes.
Labelled `skip-changeset`.
## Tests
- `pnpm exec vitest run scripts/liveness/` in `packages/spec` on the
change: Test Files 12 passed (12), Tests 358 passed (358).
## Acceptance notes
Non-vacuity kept. Two one-off mutations of `collectTombstones()`'s
`return out;` on the committed fix, each restored with `git checkout
HEAD --` and proved restored by an empty `git diff HEAD` (no test file
left behind):
<details><summary>Mutation legs</summary>
| Leg | Mutation | Result |
| --- | --- | --- |
| population emptied | `return [];` | exit 1, `AssertionError: expected
0 to be greater than or equal to 32`, Tests 1 failed / 2 passed |
| one tombstone dropped | `return out.slice(1);` (47) | exit 0, Tests 3
passed |
</details>
## Verification
Local derived gate subset (`node scripts/pm/dispatch-gates.mjs
--commands`) is reported in the os-dev report comment on #26541; every
CI family reads from this PR's check-runs.
## Human Minimum
- [x] 1. Schemas start as Zod; `packages/spec` holds no runtime logic.
- [x] 2. Every name I added uses the casing for its kind.
- [x] 3. No formatter ran; `pnpm lint` passes.
- [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: its generated artifacts are
regenerated and committed.
- [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_01WGufzf9arQbsfoQ2s2hFtP
---
_Generated by [Claude
Code](https://claude.ai/code/session_01WGufzf9arQbsfoQ2s2hFtP)_
Co-authored-by: Claude <noreply@anthropic.com>1 parent 898703f commit d399b9f
1 file changed
Lines changed: 6 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
86 | 86 | | |
87 | 87 | | |
88 | 88 | | |
89 | | - | |
90 | | - | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
91 | 94 | | |
92 | 95 | | |
93 | 96 | | |
| |||
172 | 175 | | |
173 | 176 | | |
174 | 177 | | |
175 | | - | |
| 178 | + | |
176 | 179 | | |
177 | 180 | | |
178 | 181 | | |
| |||
0 commit comments