# E-019 — Incremental discovery overwrote the global inventory

- Date: 2026-08-03
- Status: confirmed observability false negative, fixed and covered by regression.

## Objective hierarchy

- Main objective: detect deterministic drift with an early, traceable signal.
- Phase objective: maintain a sanitized global inventory of projects under observation.
- Round objective: preserve registered projects when discovering a new one.

## Observed trajectory

`schema-forge` had a round and hook activity registered. When `oguard inventory discover` was run again for `sonar-alt`, the command wrote a new `projects.json` containing only the root found in that invocation. Later, when schema-forge was explicitly registered, the sonar-alt entry disappeared. The JSONL events were not deleted, but the report only considers hashes of registered projects, so the omitted project's activity became invisible.

## Correction and evidence

`discoverProjects` now merges new roots with previously registered ones, also preserving their hash aliases. The operation is additive: forgetting or pruning a project will require a future explicit command, not a search over a narrower root. The regression runs two separate discoveries and requires `inventory status` to retain both projects.

## Impact on the thesis

An inventory that confuses "not scanned in this call" with "does not exist" biases the sample and can exaggerate or hide per-repository activity. The fix preserves exposure coverage; it does not turn existing `pass` events into evidence of causal effectiveness or detector sensitivity.

## Follow-up

The global report should retain and display the per-project count in a future improvement, so that a drop in activity is interpretable without inspecting the registry file.
