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
-
docs
難度 2/5 1-3 小時 新手友好度 82/100
idean3885/claude-ops-agent#765 ·
維護者通常 1 天內回覆
-
check:failed feeds:edit
難度 2/5 1-3 小時 新手友好度 62/100
iptv-org/database#38385 · 1 則留言 ·
維護者通常 6 天內回覆
-
release-followup
難度 2/5 1-3 小時 新手友好度 82/100
維護者通常 1 天內回覆
-
bug
難度 2/5 1-3 小時 新手友好度 84/100
維護者通常 1 天內回覆
-
[BUG]: percentTotal not shown as percentage可能已有人在做 @ORITOMI 今天認領。 未關閉bug
難度 1/5 1 小時以內 新手友好度 93/100
維護者通常 2 天內回覆