Skip to content

fix(knowledge): preserve authors and reject stale page edits - #229

Merged
drewstone merged 2 commits into
mainfrom
fix/attributed-conditional-writes-20261001
Oct 1, 2026
Merged

drewstone merged 2 commits into
mainfrom
fix/attributed-conditional-writes-20261001

Conversation

@drewstone

Copy link
Copy Markdown
Contributor

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.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, add credits to your account and enable them for code reviews in your settings.

tangletools
tangletools previously approved these changes Oct 1, 2026

@tangletools tangletools left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ 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 tangletools left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ 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

@drewstone
drewstone merged commit 603032c into main Oct 1, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants