Skip to content

worker: a claim rated wrong leaves the briefing until a later used clears it - #85

Merged
vu1n merged 4 commits into
mainfrom
claude/project-thread-ghkdsb
Nov 7, 2026
Merged

vu1n merged 4 commits into
mainfrom
claude/project-thread-ghkdsb

Conversation

@vu1n

@vu1n vu1n commented Nov 7, 2026 •

Copy link
Copy Markdown
Owner

Requested by Vu · project thread

A wrong rating used to change nothing but the rater's own confirmation, so an accepted claim an agent found wrong kept loading into every briefing. Now a claim is disputed while some session's newest writable verdict is wrong and no newest writable used came after it:

  • briefing queries (repo and room, every section) exclude it in SQL, before LIMIT;
  • recall marks it ⚠ a session rated this wrong; check it before relying on it;
  • expand returns rated_wrong: {at}. The rater's note is never shown to agents (it skips the write gate).

The rule is one SQL fragment (DISPUTED in store.ts) used by both the filter and the marking. Only writable ratings count, and unmarked rows are ignored when picking a session's newest. Read-side only, keyed on claim id: no status change, no migration, and a new version under the subject starts clean.

From the review of Anthropic's "components of agent memory" post (wrong notes re-injected every session are the costly failure).

Contracts touched: feedback tool description; D1Store.recall gains undisputed; expand output gains optional rated_wrong; recall line gains a suffix.

Verification: npm run typecheck; npm test 384/384; test/dispute.test.ts (8 cases, incl. 55 disputed claims ahead of one undisputed) fails with the filter removed; featuremap.py check clean.

@vu1n vu1n self-assigned this Nov 7, 2026

@vu1n vu1n left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

VPS review of 60e9fb1: 2 finding(s), 2 blocking.

The change hides disputed claims from briefings and exposes dispute notes through expand. Two confirmed defects—unscreened feedback notes reaching other agents and read-only ratings clearing writable disputes—should be fixed before merging.

Comment thread worker/src/mcp.ts Resolved
Comment thread worker/src/store.ts Resolved

@vu1n vu1n left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

VPS review of 2fbcaf9: 1 finding(s), 1 blocking.

The change hides disputed claims from briefings and marks them in recall and expand responses. It introduces a query-limit bug that can hide valid undisputed memory, so it should be fixed before merging.

Comment thread worker/src/mcp.ts Resolved

@vu1n vu1n left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

VPS review of 4f8c549: 1 finding(s), 1 blocking.

The change hides claims with standing wrong ratings from briefings and marks them in recall and expand responses. One confirmed defect blocks merging: briefing refill stops at recall’s 50-claim cap and can omit all undisputed settled memory.

Comment thread worker/src/mcp.ts Resolved

@vu1n vu1n left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

VPS review of 0ef0a49: 0 finding(s), 0 blocking.

The change excludes disputed claims from briefings and annotates them in recall and expand until writable feedback clears the dispute. The sole finding identifies missing test coverage without demonstrating a defect, so it does not block merging.

1 finding(s) dropped by the check
  • worker/test/dispute.test.ts:33 Add dispute integration tests for room and user lanes: Missing room/user tests do not establish a concrete failure: both briefing routes filter disputes, recentUserCandidates applies the shared DISPUTED predicate to both scopes, and room recall/expand invoke the dispute annotation helpers.

@vu1n
vu1n merged commit 262dfb3 into main Nov 7, 2026
4 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

Development

Successfully merging this pull request may close these issues.

1 participant