v0.20260818.1905
Repairs a managed context file that lost one of its two <!-- origin-managed --> marker lines.
A CLAUDE.md / AGENTS.md in that state was never refreshed again, and nothing reported it: the pair regex matched nothing, the resulting text was byte-identical to the input, and the write returned false — which the refresh loop treats as "nothing to do", since it only logs when a write actually happened. That file's Origin context was frozen permanently while every session reported success and the agent kept reading stale memory.
Half a block is easy to produce: a user tidying the file and deleting one line, or a torn write (the file is written whole, not atomically).
The repair never deletes text it can't prove is ours. The region after an orphan marker is reclaimed only when it carries Origin's own preamble; otherwise only the orphan line is dropped and a fresh block is appended below. Over-marked files now collapse to exactly one well-formed block as well, rather than carrying a stray third marker through every future refresh — which left them one edit away from the same freeze.
188 test files, 1658 tests green. (cli-docs-parity is excluded from the mirror — it imports a monorepo-root script.)
npm i -g https://getorigin.io/cli/origin-cli-latest.tgz