readiness: count clauses that applied, so a clause's unmet share has a denominator
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 新手友好度
- 42/100
- Issue 类型
- 功能
- 描述清晰度
- 基本清楚
- 活跃度
- 活跃
- 技术栈
- javascript
调研方向
Start where render_readiness records verdict and unmet per clause, and see how clauses with skipped set are handled, using readiness.require[] as the source. Add an applied series per (contract, clause) in metrics.js and document it in METRICS.md. Then reword the threshold comment in packages/browser/src/readinessDrift.ts. Done when a test shows unmet / applied for a guarded clause and the two docs agree.
由索引模型根据 Issue 内容生成。
描述
Problem
A clause's failure share is not readable from the plugin's metrics, and one browser comment understates how often a healthy clause fails.
- No denominator per clause.
render_readinessrecordsverdictonce per governed variant andunmetonce per failing clause. A clause that a guard skipped is not counted at all. Sounmetfor a clause can only be read against all the contract's renders, not against the renders where that clause applied. The fleet's drift detector (packages/browser/src/readinessDrift.ts) measures the other way: failures over applicable renders. The two disagree whenever a clause is guarded. - The drift threshold comment is wrong for guarded clauses.
ReadinessDriftPolicy.thresholdsays healthy clauses fail on "a few percent of renders". A clause guarded on a third-party slot can fail on about a quarter of the renders it applies to and still be healthy, because the slot mounts with nothing to show.
Evidence (2026-10-16, one production cluster)
- One product contract had a review-summary clause guarded on the slot's presence. The slot mounts on products with enough ratings. On about 25% of those, the vendor has no summary, so the clause can never hold. The stored pages are correct.
- Plugin: 159,162 verdicts, 4,428 unsatisfied, with that clause unmet on 3,001. The share of renders where it applied isn't recoverable from
render_readiness. - Fleet: up to 7 of 60 workers latched that clause in
readinessFailingfor hours. They measured about 40% failure where the slot applied, against the 50% threshold and 25% recovery.
The clause itself is being fixed in the consumer's contract; that is not this issue.
Proposed
- Plugin: record, per clause, whether it applied: for example
render_readinessseriesapplied(contract, clause) fromreadiness.require[]where!skipped.unmet / appliedis then the clause's failure share, on the same denominator as the drift detector. Document it inmetrics.jsand METRICS.md. - Browser: reword the
thresholddoc. A guarded clause's legitimate failure share depends on how often its guard's slot is empty; don't promise "a few percent".
Done when
-
unmet / appliedper clause is readable from analytics, with a test. - The METRICS.md entry and the
readinessDrift.tscomment match.
- 主要语言
- JavaScript
- 星标
- 0
- 派生
- 0
- 平均合并
- 3 小时 1 分钟
- 30 天内合并 PR
- 70
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
HarperFast/prerender-plugin 的其他 Issue
-
enhancement
难度 5/5 一周以上 新手友好度 25/100
HarperFast/prerender-plugin#244 ·
维护者通常 1 天内回复
-
enhancement
难度 5/5 一周以上 新手友好度 30/100
HarperFast/prerender-plugin#242 · 1 条评论 ·
维护者通常 1 天内回复
-
enhancement performance
难度 5/5 一周以上 新手友好度 38/100
HarperFast/prerender-plugin#235 ·
维护者通常 1 天内回复
-
enhancement performance
难度 5/5 一周以上 新手友好度 38/100
HarperFast/prerender-plugin#233 ·
维护者通常 1 天内回复
-
bug
难度 3/5 1-2 天 新手友好度 74/100
HarperFast/prerender-plugin#218 ·
维护者通常 1 天内回复
查看 HarperFast/prerender-plugin 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 78/100
Spomky-Labs/pwa-bundle#476 ·
-
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 69/100
c1overzz/dsh-bili-scroll#35 ·
维护者通常 1 天内回复
-
needs triage
难度 2/5 1-3 小时 新手友好度 68/100
pbakaus/impeccable#1077 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 1 天内回复