adopt-coverage 0.4.0__tar.gz → 0.4.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {adopt_coverage-0.4.0 → adopt_coverage-0.4.2}/PKG-INFO +1 -1
- {adopt_coverage-0.4.0 → adopt_coverage-0.4.2}/pyproject.toml +1 -1
- {adopt_coverage-0.4.0 → adopt_coverage-0.4.2}/src/adopt_coverage/recompute.py +9 -1
- {adopt_coverage-0.4.0 → adopt_coverage-0.4.2}/.gitignore +0 -0
- {adopt_coverage-0.4.0 → adopt_coverage-0.4.2}/LICENSE +0 -0
- {adopt_coverage-0.4.0 → adopt_coverage-0.4.2}/NOTICE +0 -0
- {adopt_coverage-0.4.0 → adopt_coverage-0.4.2}/src/adopt_coverage/__init__.py +0 -0
- {adopt_coverage-0.4.0 → adopt_coverage-0.4.2}/src/adopt_coverage/cache.py +0 -0
- {adopt_coverage-0.4.0 → adopt_coverage-0.4.2}/src/adopt_coverage/py.typed +0 -0
- {adopt_coverage-0.4.0 → adopt_coverage-0.4.2}/src/adopt_coverage/records.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: adopt-coverage
|
|
3
|
-
Version: 0.4.
|
|
3
|
+
Version: 0.4.2
|
|
4
4
|
Summary: recompute_coverage and the cache-disagreement alarm. Implemented in S4.
|
|
5
5
|
Project-URL: Homepage, https://github.com/onboardux/onboard-core
|
|
6
6
|
Project-URL: Source, https://github.com/onboardux/onboard-core
|
|
@@ -317,6 +317,7 @@ def recompute_coverage(
|
|
|
317
317
|
environment_id: str | None = None,
|
|
318
318
|
*,
|
|
319
319
|
clock: Clock | None = None,
|
|
320
|
+
compare_cache: bool = True,
|
|
320
321
|
) -> CoverageResult:
|
|
321
322
|
"""Evaluate coverage for every identity in scope. **The authority.**
|
|
322
323
|
|
|
@@ -328,6 +329,13 @@ def recompute_coverage(
|
|
|
328
329
|
environment_id: One environment, or `None` for every environment of the
|
|
329
330
|
system.
|
|
330
331
|
clock: Injected clock; tests pass `ManualClock`.
|
|
332
|
+
compare_cache: `False` only for the rebuild that immediately follows a
|
|
333
|
+
command's *own* change to coverage, after that command checked the
|
|
334
|
+
cache agreed before it wrote (`adopt_cli.commands._coverage_support`).
|
|
335
|
+
The comparison is then meaningless -- the command just moved the
|
|
336
|
+
truth on purpose -- and an alarm for it would be the false page that
|
|
337
|
+
teaches an operator to ignore the real one. Every other caller keeps
|
|
338
|
+
the default, because the comparison is the alarm.
|
|
331
339
|
|
|
332
340
|
Returns:
|
|
333
341
|
Per-identity coverage plus a `disagreements` list against
|
|
@@ -385,7 +393,7 @@ def recompute_coverage(
|
|
|
385
393
|
recomputed=verdict.covered,
|
|
386
394
|
)
|
|
387
395
|
for verdict in verdicts
|
|
388
|
-
if cached[verdict.identity_id] != verdict.covered
|
|
396
|
+
if compare_cache and cached[verdict.identity_id] != verdict.covered
|
|
389
397
|
)
|
|
390
398
|
|
|
391
399
|
if disagreements:
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|