# Observability compatibility deletion manifest

Version: `2026-07-18.v1`

This manifest is the versioned retirement inventory for observability compatibility.
Delete listed legacy-only branches and fixtures together; retain canonical enriched contracts.

## Legacy-only boundary (`src/observability.js`)

Retire these symbols/branches only after inventory reports zero active legacy runs:

| Symbol / branch | Purpose |
|---|---|
| `classifyAcceptance()` legacy-text path | preserves free-text `acceptance` strings |
| `normalizeTaskObservability()` `acceptanceMode: 'absent'|'legacy-text'|'unavailable'` | optional structured acceptance projection |
| `normalizeGateDetail()` `available: false` fallback | legacy `gate0.fail` message-only payloads |
| `normalizeReviewDetail()` `available: false` fallback | legacy review events without verdict/findings |
| `normalizeDurationDetail()` absent-path | events without `task.duration` enrichment |
| `normalizeDiffDetail()` absent-path | events without `task.diff` enrichment |
| `normalizeDecisionDetail()` legacy option strings | decisions without enriched option meanings |
| `observabilityCapabilities()` false/unavailable states | capability detection for absent fields |

## Canonical enriched contracts (MUST remain after retirement)

| Contract | Producer / consumer seam |
|---|---|
| `createAttemptContext()` | attempt lifecycle minting (`src/runner.js`, Task 2) |
| `attempt.started` payload `{ task, phase, ordinal, attemptId, leaseId, processGeneration }` | runner dispatch |
| `gate0.fail { task, message, failClass?, command?, cwd? }` | `src/engine/gates.js` |
| `review.complete { verdict?, findings? }` | runner review |
| `task.duration { task, attemptId, phase, durationMs }` | runner terminal metrics |
| `task.diff { task, attemptId, filesTouched, insertions, deletions }` | runner terminal metrics |
| `acceptance?: Array<{ id, text, kind:'auto'|'manual' }>` | plan parser + runner |
| `redactObservabilityValue()` | all API/SSE serializers |

## Capability keys

`observabilityCapabilities()` reports:

- `acceptance`: `absent | legacy-text | structured | unavailable`
- `attemptCorrelation`: boolean
- `gateDetail`: boolean
- `reviewFindings`: boolean
- `duration`: boolean
- `diff`: boolean
- `decisionDetail`: boolean
- `optionMeanings`: boolean
- `blastRadius`: boolean

## Legacy fixture inventory

Paths exercised by the compatibility gate (Task 9):

| Path | Role |
|---|---|
| `test/fixtures/observability-legacy/plan.jsonl` | plan with all new fields absent |
| `test/fixtures/observability-legacy/journal.jsonl` | journal without attempt enrichment |
| `test/fixtures/observability-legacy/run.log.jsonl` | run log without attempt enrichment |
| `test/fixtures/observability-legacy/config.json` | effective config without provenance enrichment |
| `test/fixtures/observability-legacy/expectations.json` | lifecycle assertions for pre-upgrade behavior |
| `test/observability-legacy.test.sh` | integration gate runner |

Unit fixtures for the compatibility boundary:

| Path | Role |
|---|---|
| `src/observability.test.js` | legacy-empty, enriched, partial, redaction, immutability, capability fixtures |

## Inventory proof format

Record active legacy inventory in JSON:

```json
{
  "asOf": "2026-07-18T00:00:00.000Z",
  "legacyRuns": 0,
  "legacyPlans": 0,
  "nonterminalLegacyRuns": 0,
  "proof": "command output excerpt"
}
```

Retirement is allowed only when `nonterminalLegacyRuns === 0` and `legacyPlans === 0`.

## Inventory command

```bash
node --test src/observability.test.js
bash test/observability-legacy.test.sh
```

Enriched-only verification after fixture exclusion:

```bash
node --test src/observability.test.js \
  src/test/observability-producers.test.js \
  src/event-feed.test.js \
  src/task-control.test.js \
  src/control-launch.test.js \
  src/control-config.test.js \
  src/plan-revisions.test.js \
  src/test/control-api.test.js
```

## Zero-active-legacy proof

1. Run the inventory command against production runstate catalogs.
2. Assert manifest fixture paths remain present and referenced by tests.
3. Assert `nonterminalLegacyRuns` and `legacyPlans` are zero in the recorded proof JSON.
4. Schedule explicit retirement plan to delete rows in **Legacy-only boundary** and **Legacy fixture inventory** together.
