Context
A previously observed operational failure allowed a resident kleos watch process from an older binary to rewrite index.json in an older shape, causing newer PR reverse-lookup fields to disappear. The current recovery is a manual daemon restart after upgrading.
Acceptance criteria
- Define a backward-compatible writer compatibility signal for the resident watch/index path.
- Detect an incompatible or stale index writer before newer fields can disappear silently, and emit an actionable English message.
- Add a synthetic regression test that models an old-shape rewrite after a newer index has been produced.
- Preserve schema-v1 read compatibility and existing incremental indexing behavior.
- Document the detected condition and safe recovery path.
- Do not terminate user processes automatically or rewrite private archive content destructively.
- Pass targeted race tests and the repository-wide validation suite.
First safe step
Write a synthetic compatibility test that reproduces the field-loss sequence without touching a real archive or daemon.
Non-goals
- Process termination, deployment, or service-manager integration.
- Publishing archive data or inspecting real user sessions.
Context
A previously observed operational failure allowed a resident
kleos watchprocess from an older binary to rewriteindex.jsonin an older shape, causing newer PR reverse-lookup fields to disappear. The current recovery is a manual daemon restart after upgrading.Acceptance criteria
First safe step
Write a synthetic compatibility test that reproduces the field-loss sequence without touching a real archive or daemon.
Non-goals