record()
record(\Drupal\strata\Health\Finding $finding) : void
Records one finding.
Parameters
| \Drupal\strata\Health\Finding | $finding | What a tripwire noticed. |
Where findings are kept, and where each code currently sits on the ladder.
The ledger is the memory a health system needs and a single sweep cannot have: whether this is the first time a code has fired or the fortieth, and how far up the ladder the response has already climbed. A tripwire answers "is this wrong now"; the ledger answers "how long has it been wrong, and what have we already tried".
Every implementation must be bounded. Scope is the field that grows without limit - a frame hash is a new scope every time - so an implementation caps what it retains per code rather than trusting a purge to run.
A ledger stores and answers. It never repairs, never escalates on its own, and never calls a tripwire; escalation is the caller's decision, made with RepairLadder, and recorded here.
resolve(string $code, string $scope) : int
Clears the findings for one code and scope.
Scoped rather than code-wide, because one frame being repaired says nothing about the next frame reporting the same code.
| string | $code | The finding code. |
| string | $scope | The exact scope that has been dealt with. |
How many findings were cleared.
summary() : list<array{code: string, severity: int, rung: string, scopes: int, newest: int}>
Open findings collapsed to one row per code.
What a dashboard and a metrics export both read: a code with four hundred scopes is one line an operator acts on rather than four hundred, and the scopes are only useful once they have decided to look at that code.
One entry per open code, worst severity first.