fix: reconcile final control panel coverage UX
This commit is contained in:
@@ -21,15 +21,32 @@ Technical health describes Agent/installation availability and processing
|
||||
failures. Fiscal status and fiscal completion are separate: safe-blocked fiscal
|
||||
work does not make an otherwise healthy Agent technically degraded or failed.
|
||||
Agent views show product total, fiscally complete count, safe-blocked count,
|
||||
failed count, and fiscal completion percentage. The percentage is
|
||||
technical-failure count, unclassified residual, and fiscal completion percentage.
|
||||
At installation/snapshot grain, coverage is reconciled as:
|
||||
|
||||
```text
|
||||
TOTAL_PRODUCTS = COMPLETE + SAFE_BLOCKED + FAILED_PRODUCTS + UNCLASSIFIED
|
||||
```
|
||||
|
||||
`UNCLASSIFIED` is the positive residual `TOTAL_PRODUCTS - COMPLETE -
|
||||
SAFE_BLOCKED - FAILED_PRODUCTS`: the snapshot did not assign those products to
|
||||
one of its explicit states. It is an observability bucket, not a newly inferred
|
||||
fiscal state. If explicit category counts exceed the total or contain negative
|
||||
values, the panel shows an inconsistency instead of clamping it away. Fixture
|
||||
snapshots assign all products explicitly and therefore reconcile to zero
|
||||
unclassified products. The fiscal completion percentage is
|
||||
`fiscally_complete / total_products * 100`, rounded to one decimal place and
|
||||
bounded to 0–100; when the total is zero, the stored coverage percentage is
|
||||
used. The fiscal status badge is `BLOCKED` when safe-blocked work exists,
|
||||
`COMPLETE` when all products are complete, and otherwise `INCOMPLETE`.
|
||||
|
||||
Two blocker counts must remain distinct:
|
||||
Coverage-state counts and blocker-registry counts have different sources and
|
||||
must remain distinct:
|
||||
|
||||
- **Safe-blocked products**: distinct open `(tenant_id, product_code)` pairs.
|
||||
- **Safe-blocked coverage products**: sum of the Agent snapshot safe-blocked
|
||||
count at installation grain; this participates in the coverage invariant.
|
||||
- **Products with open blockers**: distinct open `(tenant_id, product_code)`
|
||||
pairs in the blocker registry.
|
||||
- **Open blockers**: open blocker rows; one product can have multiple rows for
|
||||
different fields or evidence.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user