Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

readiness: count clauses that applied, so a clause's unmet share has a denominator

Aperta
#259 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
42/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
javascript

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

enhancement

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.

  1. No denominator per clause. render_readiness records verdict once per governed variant and unmet once per failing clause. A clause that a guard skipped is not counted at all. So unmet for 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.
  2. The drift threshold comment is wrong for guarded clauses. ReadinessDriftPolicy.threshold says 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 readinessFailing for 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_readiness series applied (contract, clause) from readiness.require[] where !skipped. unmet / applied is then the clause's failure share, on the same denominator as the drift detector. Document it in metrics.js and METRICS.md.
  • Browser: reword the threshold doc. 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 / applied per clause is readable from analytics, with a test.
  • The METRICS.md entry and the readinessDrift.ts comment match.
Lingua principale
JavaScript
Stelle
0
Fork
0
Merge medio
3h 1m
PR unite (30g)
70

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di HarperFast/prerender-plugin

Tutte le issue di HarperFast/prerender-plugin

Issue simili

Altre issue su JavaScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.