---
id: HSCP-T-013
titre: "Resource inventory: measured usage, non-production on demand, redundancy of critical components"
titre_court: "Check the resource inventory"
type: note
objet: test
langue: en
statut: brouillon
version: 0.1
verifie_le: 2026-12-02
traduit_de: LISEZ-MOI.md
traduit_de_version: 0.1
traduit_de_empreinte: 0d47ff97819280c0
traduction: modèle de langue, glossaire catalogue/glossaire-en.yaml
source: traduction de LISEZ-MOI.md, version 0.1
sensibilite: interne
licence: Apache-2.0
gestes: [HSCP-G-024]
recette: HSCP-R-026
piece: inventaire
---

# Resource inventory: measured usage, non-production on demand, redundancy of critical components

## What the test checks

The evidence is the resource inventory, one JSON object per component and per environment (JSON Lines), following the recipe's data model:

| Field | Required | Meaning |
|---|---|---|
| `composant` | yes | component name |
| `environnement` | yes | `production`, `preproduction` (staging), `test` or `developpement` (development) |
| `raison` | yes | purpose |
| `critique_soin` | yes | `true` if stopping it prevents access to care information |
| `utilisation` | yes | `moyenne` (average) and `pointe` (peak), shares between 0 and 1 |
| `mise_a_echelle` | yes | `automatique` (automatic), `manuelle` (manual) or `aucune` (none) |
| `horaires` | yes | `permanent`, `plage` (time window) or `a-la-demande` (on demand) |
| `instances` | yes | number of instances |
| `justification` | accepted gap | reason for a gap |
| `mesure_le` | yes | end of the measured period |

The test accepts the inventory if each component carries these fields with a recent measurement, if no non-production environment runs permanently, if no non-critical component keeps a peak usage below the threshold, and if each care-critical component is in production with at least two instances; a written justification lifts each of these three gaps.

It reports, without refusing, a variable load without automatic scaling.

## Running the test

```sh
python3 verifier.py inventaire.jsonl --date 2026-12-02 --seuil 0.2 --mesure-jours 100
```

`--date` sets the check date (today by default), `--seuil` the peak usage below which a non-critical component must be downsized (0.2 by default), `--mesure-jours` the maximum age of the measurement (100 days by default), `--json` returns the answer in JSON. Exit code: 0 evidence accepted, 1 evidence refused, 2 incorrect call. Python 3.10 or later, no dependencies.

## Examples

- `exemples/valide/`: the patient record application and database, critical and redundant; night-time exports; a staging environment started on demand. Accepted, with the exports' variable load reported.
- `exemples/refuse/`: a critical component without redundancy, a permanent and oversized test environment, inconsistent usage measured ten months ago, a critical component outside production with a scaling value outside the list, a missing purpose. Refused.

## What the test does not say

- It does not say that the inventory lists every component: the review compares it with the bill or the actual fleet.
- It does not say that care criticality is right, nor that the availability level suits the care provided.
- It does not say that no care processing was deferred: the review checks that.
