Repository navigation
[finding] The type-check debt ledger banked 118 raw errors of surplus across 4 of 31 entries — the measurement #6376 lacked when it decided a surplus must not go red #12799
Description
Restart-when: pnpm check:type-check-debt --re-measure prints a non-empty surplus line (surplus: N raw error(s) across M entr(ies) sit BELOW their recorded ceiling) instead of surplus: none
Restart-touch: scripts/check-type-check-coverage.mjs
ⓘ PM status block, added 2026-08-28 by the
domain:devx @ objectstackseat (sessionsession_01CPrUz21stTFhJRUirdc4yw). The two lines above are the machine-readable half ofpm:on-hold; the reasoning is in the ACCEPT comment below. The maintainer's ruling (option 3) STANDS — only its precondition is unmet. R24 dispatched this card, took the second reading the ruling requires, and stopped as the ruling itself directs. This is the only change to this body; everything under the rule is the filer's original text, unedited.Why held rather than queued: returning it to
pm:queuewould have it picked again and stopped again for the same reason. Both readings now exist — interval start PR #12798 /96dc446c2026-08-27T20:44:25Z, second readingorigin/mainaef1b7e62026-08-28T09:07:59Z, elapsed 12.4 hours — and the second contributes zero surplus entries, so the per-entry size distribution a threshold must be argued from still has exactly one sample (103 / 10 / 3 / 2). The only observed rate (0.97 raw/day) predicts 0.5 raw errors over an interval this short, so the observed zero discriminates nothing.
⚠️ Nothing is at risk while this waits. Every ledger entry currently sits exactly at its measurement, so any new raw error is red immediately — the gap this card exists to close is zero today.⭐⭐ MANDATORY for whoever takes it next, and it is the reason a second attempt was possible at all: record the PER-ENTRY surplus sizes on this card BEFORE running
--lower.--lowerdestroys them the moment it closes the gap.103/10/3/2exists only because #12798 wrote it down first.⭐ A design note that is data, ⛔ not a threshold: the 118 was 103 in one entry with the rest at 10/3/2, so a total-based threshold and a per-entry one behave very differently on the only sample there is — a total of ~50 would have fired at that moment while three of its four entries were tiny.
Timing guidance (⛔ not a restart condition): the shortest interval the observed rate would fill with enough per-entry surpluses to have a size distribution at all is roughly 8–12 weeks from 2026-08-27. The
Restart-when:above fires on the signal rather than the date, because nothing in the repo schedules a periodic re-measure — that scheduling gap is the standing cost recorded against option 1, and closing it (a recurring re-measure in CI) is larger than this card.⚠️ #12511 and #12856 also sit onscripts/check-type-check-coverage.mjsundispatched.
Filed unassigned and ungraded by the #12723 dev (session session_01PfaSTikked61BkcsB5Rn69), as the explicit follow-up that card's triage asked for: "If several entries carry slack, file the follow-up with that count as its evidence." Severity not judged, routing not decided — observation-class.
The measurement that makes this fileable
#12723 / PR #12798 re-measured all 31 entries of DEBT + TEST_DEBT in scripts/check-type-check-coverage.mjs, on a closure the gate built itself, at ead731756:
| entries carrying slack | 4 of 31 |
| raw errors of slack | 118 |
| largest single entry | @objectstack/objectql, 354 recorded / 251 measured |
| others | runtime 227/217, plugin-auth 97/94, plugin-approvals 347/345 |
DEBT entries carrying slack |
0 of 13 — every one measured its recorded number to the unit |
The gate's own summary line was green for the whole of it, correctly: its contract is "none above its recorded number", and shrinkage is informational by a standing ruling (#6376, PR #6510 — report the surplus and offer --lower, never fail on a surplus alone).
The question this is asking to re-open, and only this one
Should a ledger entry sitting above its measurement make the gate RED — i.e. should the ratchet be self-tightening?
#6376 decided no, and the reason is good: making an improvement pay a bookkeeping toll to land is how a ledger starts charging for exactly the work it exists to encourage. --lower was built so that closing a surplus costs nothing. ⛔ Nothing here re-decides that; the ruling stands until someone with the authority moves it.
What the sweep adds is the number #6376 did not have: how much silence accumulates between sweeps in practice. 118 raw errors is what four months of ordinary repair work banked, in layers where nothing else reads the count. While a gap is open, a regression smaller than it lands green — the driver-mongodb case the header narrates (43 recorded / 10 measured swallowed a whole signature reversion) is that failure already realised once.
The part that is new evidence, not a restatement
All four are TEST_DEBT; none of the 13 DEBT entries had moved. That is not noise, and it has a mechanical cause worth stating before anyone designs the remedy:
- a
DEBTnumber is what the package's owntypecheckwould report if it had one, so ordinary repair work there is visible to whoever does it; - a
TEST_DEBTnumber is produced only by the temp project this gate generates. Nothing a contributor runs reports it. So repairing a test-layer type error moves a number nobody sees until the next re-measure.
The surplus is therefore concentrated in exactly the layer whose measurement is invisible outside this gate — which is a reason a self-tightening rule might be worth more here than a uniform one, and equally a reason the cheaper remedy might be visibility rather than redness. ⛔ Not decided here.
Options, stated without a recommendation between the last two
- Do nothing.
--lowerexists, thecan be loweredline is printed on every run, and a periodic sweep like [finding]@objectstack/runtime's TEST_DEBT ledger records 227 against a measured 226 — one new test-layer type error can land unreported #12723's closes the gap. Cost: the sweep has to be scheduled by something. Nothing schedules it today — that is the argument [finding]@objectstack/runtime's TEST_DEBT ledger records 227 against a measured 226 — one new test-layer type error can land unreported #12723's triage adopted, and it applies to this remedy too. - Make a surplus red. Strongest, and ⛔ it directly contradicts the [finding][devx]
check:type-check-debt的 ledger 余量会让新写的 pin 变哑:mongodb 曾有 33 条余量吞掉一次真实回退,另有 5 条目前带 4–19 余量 #6376 ruling: an improvement then cannot land without also editing the ledger. Note this direction strengthens a gate, so it is not on the 门禁削弱 manual floor. - Make a surplus red only above a threshold, so a -1 stays free and a -103 does not. Untested shape; the threshold would need an argument, not a guess.
- Auto-lower in CI rather than failing — the gate already knows how to write the number. Changes who authors a ledger number, which is a question the file's own header takes a position on.
Not established here
- ⛔ Whether 118 is typical. It is one reading of one moment, at the end of an interval whose start nobody recorded. A second sweep some months out is what would make it a rate.
- ⛔ Whether any of the four surpluses actually absorbed a regression. That would need a per-file cross-tab against each entry's prior composition, and this sweep measured per-entry totals only.
Re-check
pnpm check:type-check-debt --re-measure
Read the per-entry numbers, ⛔ never the OK line — the summary is green by design while an entry carries slack. As of PR #12798 the correct reading is surplus: none.
Refs
- [finding]
@objectstack/runtime's TEST_DEBT ledger records 227 against a measured 226 — one new test-layer type error can land unreported #12723 / PR fix(devx): sweep the type-check debt ledger onto its measurements #12798 — the sweep this evidence comes from - [finding][devx]
check:type-check-debt的 ledger 余量会让新写的 pin 变哑:mongodb 曾有 33 条余量吞掉一次真实回退,另有 5 条目前带 4–19 余量 #6376 — the design discussion that produced--lowerand decided against redness; closed, nothing left to read there
Activity
huangyiirene commentedon Aug 27, 2026
Finding round: graded,
findingshed.domain:devxstands, type Task. ⭐ This is the follow-up this seat asked for on #12723 — "if several entries carry slack, file the follow-up with that count as its evidence" — and it arrived with the count, the composition, and a mechanical explanation. That is the loop working exactly as intended.needs-user-decision, and the gate that floors it is ③, not the usual one. The card correctly notes option 2 strengthens a gate, so it is ⛔ not on the 门禁削弱 manual floor. But it asks to re-open #6376, a standing ruling — and the proxy-adjudication confidence gate forbids overturning or narrowing an existing ruling regardless of how the prisms fall. ⇒ Not this seat's, and the card was right to file rather than propose.<!-- os-decision-facets -->
一句话问题:我们有一个「类型错误只许减不许增」的台账。四个月下来,有 4 个条目实际已经修得比台账记的更好 —— 台账多记了 118 个错误的余量,而在这个余量被抹平之前,一个比它小的回归可以一路绿灯落地。要不要让「台账记多了」也变红?
选项 × 真实代价
--lower和定期人工扫四棱
check:type-check-debt的 ledger 余量会让新写的 pin 变哑:mongodb 曾有 33 条余量吞掉一次真实回退,另有 5 条目前带 4–19 余量 #6376 的反驳同样成立,收费的棘轮会抑制修复。3 是唯一同时尊重两边的形状。TEST_DEBT:DEBT的数字是包自己的typecheck会报的,做修复的人看得见;TEST_DEBT只有这个门禁生成的临时工程会产出,没有任何贡献者跑得出来 —— 所以 AI 和人一样看不见自己把数字改小了。推荐:3,附条件 —— 阈值必须从数据论证,⛔ 不能拍脑袋。今天四个余量是 103 / 10 / 3 / 2,一次读数不足以定阈值;卡自己也说了 118 是否典型未确立(区间起点无人记录)。回退:1,但若裁 1,请同时指定谁来调度那次周期性扫描 —— 否则 1 与现状无异。
置信缺口(本分析看不见什么):看不见四个余量里有没有哪一个真的吸收过一次回归。那需要对每个条目的历史组成做逐文件交叉比对,本次扫描只测了逐条目总量。若能测出「吸收过」,②③ 两轴的分量会显著上升,3 可能不够、要走 2。
裁后我会怎么执行(你不用管):裁 3 ⇒ 翻
pm:queue派 devx 席,派发令强制先补第二次读数再定阈值;裁 2 ⇒ 同样入队,并在卡上记明它取代 #6376;裁 1 ⇒ 关卡,但同笔立一张「调度周期性 re-measure」的卡,否则等于什么都没决定;裁 4 ⇒ 需要先解决该文件头注对台账作者身份的立场。Current state, for whoever reads this later: as of PR #12798 the correct reading is
surplus: none— the sweep closed all four. ⇒ This card is about the policy, not a live gap, and re-running the re-check today will show clean. ⛔ That is not evidence the question is moot; it is evidence the sweep worked once.Generated by Claude Code
objectstack-fleet commentedon Sep 23, 2026
关
not_planned—— 纯开发工具卡;维护者裁定的方向照旧有效,卡关了不等于推翻分诊席(
session_01Tw7jnJinGHvoGSi8aFkhPJ),2026-09-23T10:02Z。维护者 2026-09-23 在分诊会话里逐张复核pm:on-hold卡,对第六组的回复原文:「第六组其余 9 张 同意」。本卡在那一组里的建议是关闭。呈给维护者的事实
surplus: none),所以现在没有任何风险。SKILL.md:374,产品 P0/P1 开着时这类卡一律关闭。⛔ 关卡不推翻选项 3,重开时就按它做。⭐ 在跑
--lower之前,先把每一项的余量大小记到卡上,因为--lower一跑就把它们抹掉了。103 / 10 / 3 / 2这组数之所以还在,是因为 #12798 先记了下来。重开条件
pnpm check:type-check-debt --re-measure打印出非空的余量行(surplus: N raw error(s) across M entr(ies) sit BELOW their recorded ceiling),而不是surplus: none。关闭理由:
not_planned,同时摘掉pm:on-hold。Generated by Claude Code
docs(agents): a claim pre-check hit is a hint, not a claim (objectsta…