---
id: HSCP-T-024
titre: "Log of AI module deactivations and dependency alerts"
titre_court: "Check deactivations and dependency alerts"
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: 964e1262df43a5d8
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-029]
recette: HSCP-R-037
piece: journal
---

# Log of AI module deactivations and dependency alerts

## What the test checks

The artefact is the log, one JSON object per event (JSON Lines): `evenement` (`desactivation`, `reactivation`, `mesure`, `alerte_dependance`), `horodatage`, `utilisateur`, `module`; for a measurement or an alert: `periode_jours`, `propositions`, `acceptees_sans_modification`, `seuil`.

The test accepts the log if each event carries its fields; if each measurement whose rate of acceptance without change reaches the threshold, over at least the minimum number of proposals, is followed by an alert for the same user and the same module; and if no alert is raised below the threshold.

## Running the test

```sh
python3 verifier.py journal.jsonl --minimum 50
```

`--minimum` sets the number of proposals below which a measurement does not trigger an alert (50 by default), `--json` gives the answer in JSON. Exit code: 0 artefact accepted, 1 artefact rejected, 2 incorrect call. Python 3.10 or later, no dependencies.

## Examples

- `exemples/valide/`: a deactivation then a reactivation, a measurement above the threshold followed by its alert, a measurement over too few proposals without an alert. Accepted.
- `exemples/refuse/`: deactivation without a user, measurement above the threshold without an alert, alert below the threshold, inconsistent numbers, event outside the list. Rejected.

## What the test does not say

- It does not say that a user depends on the system: the alert opens the question.
- It does not say that deactivation is effective in the product, or that rejecting a proposal is as easy as accepting it: the review of the screenshots judges that.
- It does not say that the threshold is well chosen.
