Outcome
Make Counter a revision-aware consumer of Kitchen's canonical Analysis state, remove all local Analysis graph reconstruction, and close the modernization iteration with operator-flow verification.
Depends on
Scope
- Fetch and apply a Pantry snapshot only after successful reconciliation, checking that its revision is at least the run's committed revision.
- Retry a temporarily stale snapshot with a bounded short policy; reject older snapshots and keep the last committed Counter Pantry.
- Treat an empty canonical snapshot as valid state.
- On reconciliation failure, keep the last committed Pantry and show a non-blocking operator notice with the safe failure and explicit rerun action.
- When a successful refresh removes the focused tree item, move focus to the nearest surviving ancestor and announce that confirmed-gone items were removed.
- Preserve newly obtained but unpersisted credentials in Counter memory and render them distinctly from persisted Loot.
- Keep progress, metadata-sync updates, and late messages correlated to their run/session.
- Remove local Analysis pruning, import, identity synthesis, and duplicate self-hosted-runner synchronization from Counter.
Deletion and test relocation
- Replace completion tests that assert local import mechanics with run-outcome and revisioned-snapshot state-transition tests.
- Delete the local importer/helper clusters in
internal/counter/tui/analysis.go and model.go.
- Delete local same-Repository prune and dedup paths and their implementation-coupled tests.
- Delete any remaining legacy request, response, status, observer, importer, or schema compatibility symbols found by a final repository search.
- Keep behavior tests for findings, tree state, credential visibility, focus recovery, and operator notices at the canonical model interfaces.
Verification
- Successful reconciliation refreshes to the required revision, including an empty graph.
- Temporarily stale and permanently stale snapshot responses follow the bounded retry and keep-last-state rules.
- Reconciliation failure never mutates Counter's committed graph.
- Confirmed-gone refresh removes tree items, moves focus safely, and explains the update without confirmation.
- Persisted Loot remains visible when source structure disappears.
- Newly obtained Loot remains visible and visibly unpersisted after an atomic Loot persistence failure.
- Late progress or completion from an older run cannot overwrite the active run.
- There is no Counter Analysis graph importer or local Analysis History writer left.
Run at minimum:
go test ./internal/counter/tui ./internal/counter ./internal/kitchen/db ./internal/kitchen
go test -race ./internal/pantry ./internal/kitchen ./internal/counter/tui
make test
make lint
make e2e-smoke
Run make e2e-goat when the environment needed for the full Whooli chain is available; otherwise record why it was not run.
Done when
Counter renders Kitchen's committed Analysis state and outcomes without reconstructing canonical graph state, and the final dead-code search finds none of the superseded paths.
Outcome
Make Counter a revision-aware consumer of Kitchen's canonical Analysis state, remove all local Analysis graph reconstruction, and close the modernization iteration with operator-flow verification.
Depends on
Scope
Deletion and test relocation
internal/counter/tui/analysis.goandmodel.go.Verification
Run at minimum:
Run
make e2e-goatwhen the environment needed for the full Whooli chain is available; otherwise record why it was not run.Done when
Counter renders Kitchen's committed Analysis state and outcomes without reconstructing canonical graph state, and the final dead-code search finds none of the superseded paths.