feat(knowledge): retain completed write history - #200
Conversation
|
I am preparing a separate compatibility patch from current main: Knowledge 15.0.3 will admit the published Eval 0.180.0 after packed-consumer and official optimizer checks. The shared metadata overlap is |
|
Probed this branch for Discovery's collaboration research (discovery#169): retained history keeps the bytes a concurrent overwrite destroys, and it names neither the writer nor the conflict. What was run. A throwaway vitest file in a worktree at this PR's head What that shows. The retention works: B's counterexample survives under The manifest keys are the whole story for the rest: no actor, and nothing that marks the third transaction as an overwrite of a version its writer never read. So the history answers "what changed" and not "who changed it" or "was this a conflict". Two asks, filed at their own issues rather than as scope on this PR.
Neither is a request to change this PR's implementation. Retained history without them is still strictly better than deletion; with them, a Findings and the full probe source: https://github.com/tangle-network/discovery/blob/195852cc3a723511d13e6302791f08da08eeb7fb/docs/research/169-collaboration-primitives.md |
Knowledge writes currently delete before/after snapshots when a transaction finishes. This loses the evidence needed to recover consolidated pages. This opt-in API preserves terminal transaction manifests and existing snapshots under a symlink-safe .agent-knowledge/history/ path and makes a lost finish acknowledgement idempotent. Default callers retain existing cleanup behavior. The Lab can opt in for its persistent research namespace without imposing a curator, merge policy, or per-note optimizer workflow.
Verification: focused file-transaction suite 25 passed / 2 skipped; typecheck src and contracts passed; lint passed; check-version-bump passed with major 16.0.0; API surface regenerated and current. No research data or credentials changed.