fix(knowledge): preserve authors and reject stale page edits - #229
Conversation
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
tangletools
left a comment
There was a problem hiding this comment.
✅ Auto-approved PR — 4d82adac
Blanket team auto-approval is intentional. The merge gates are CI and codex-p1.
No automated review runs on this PR. This approval rests on the rule above alone.
tangletools · auto-approval · reason: blanket_auto_approve · 2026-10-01T02:35:34Z
tangletools
left a comment
There was a problem hiding this comment.
✅ Auto-approved PR — 7824d3fc
Blanket team auto-approval is intentional. The merge gates are CI and codex-p1.
No automated review runs on this PR. This approval rests on the rule above alone.
tangletools · auto-approval · reason: blanket_auto_approve · 2026-10-01T02:43:33Z
Change
Close the confirmed stale-write and unattributed-write defects in the existing Knowledge transaction path.
Read returns pageDigest. Tool updates require that digest, checked under the shared lock.
Transactions retain host actorId/runId and exact before/after bytes by default.
Explicit null requires a new path. An identical completed edit can be retried safely.
Lower-level writers can select the same conditional-write contract.
Prepare Knowledge 19 because default tool update semantics change.
Consumer proof on drew-gtr-pro
Used built public createKnowledgeTools and createRunScopedStores against real disk stores.
Before: Alice's refutation was overwritten by Bob's stale edit; read returned no digest and all three retained transactions had no actor.
After: stale and blind edits refused; conflicting batch left no partial page; reopen retained Alice's refutation; history named Alice and the run.
Two independent Node writer processes: exactly one accepted edit and one stale-edit refusal; retained winning author.
An explicit null refused an existing path. An identical retry succeeded.
Build, complete typecheck, lint, and packed-package clean-install verification passed.
No new unit tests. The consumer proof did not invoke a model.
Closes #205.
Closes #206.
Limits
This prepares source/package behavior; research execution still uses Knowledge 18.
Applications can explicitly disable history.
No claim of complete provider/harness trace capture.