mirror of
https://github.com/penpot/penpot.git
synced 2026-11-21 01:22:01 +00:00
📎 Require no share of changes from kinds only grid worlds offer
The coverage control requires each kind to supply 0.5% of a program set's changes. Grid cell and grid direction steps exist only in grid worlds, a share of the programs, so with 50 programs a seed with few grid worlds left them under the share, and the swap and library programs failed on random seeds. These kinds must still change state, but need no share of the changes. Harness only; the benchmark is not run. AI-assisted-by: claude-opus-5-5
This commit is contained in:
parent
e0e5966b7e
commit
5f8eeed69e
@ -1415,10 +1415,16 @@
|
||||
(throw error)
|
||||
:else true)))))
|
||||
|
||||
(def ^:private world-dependent-kinds
|
||||
"Kinds that only grid worlds offer, a share of the programs: they must
|
||||
change state, but need no share of the changes."
|
||||
#{:grid-cell :grid-direction})
|
||||
|
||||
(defn coverage-errors
|
||||
"Coverage comes only from random steps. Stable syncs count as checks;
|
||||
mutations must change state and each required kind must supply at least
|
||||
0.5% of meaningful changes. Setup, skips and no-ops cannot satisfy it."
|
||||
0.5% of meaningful changes, but those only some worlds offer. Setup,
|
||||
skips and no-ops cannot satisfy it."
|
||||
([coverage kinds] (coverage-errors coverage kinds #{:sync :library-sync}))
|
||||
([coverage kinds checks]
|
||||
(let [random (:random coverage)
|
||||
@ -1431,7 +1437,8 @@
|
||||
(when (if (contains? checks kind)
|
||||
(zero? (+ changed no-op))
|
||||
(or (zero? changed)
|
||||
(< changed (* 0.005 total-changed))))
|
||||
(and (not (contains? world-dependent-kinds kind))
|
||||
(< changed (* 0.005 total-changed)))))
|
||||
{:kind kind :reason :insufficient-random-coverage
|
||||
:counts (get random kind)}))))
|
||||
kinds)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user