Skip to content

worker: each briefing asks agents to check up to two claims: disputed, or often read and not confirmed lately - #89

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

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

Conversation

@vu1n

@vu1n vu1n commented Nov 7, 2026

Copy link
Copy Markdown
Owner

A briefing now ends its claim sections with "# check these if your work touches them, then rate them with feedback", holding at most CHECK (2) claims: disputed ones first, then accepted claims shown at least CHECK_SHOWN (10) times with no writable used in CHECK_DAYS (30). A disputed claim reaches a briefing only there. A writable used takes a claim back off the list. The section shares the briefing's size budget and is recorded under section check.

Why: memory goes stale silently; asking the sessions that read a claim to confirm it is the cheapest recheck.

Contracts touched: briefing output (new section); store.checkedness(ids).

Verification: npm run typecheck; npm test 393/393; new test/check.test.ts; featuremap.py check clean.


Generated by Claude Code

vu1n commented Nov 7, 2026

Copy link
Copy Markdown
Owner Author

The Python test job segfaulted (exit 139) inside test_claim_commands.LibsqlCommands.test_six_completion_correction_interleavings_match_kernel, in the native libsql module. This PR changes only worker/ (TypeScript) and docs/features/hosted-worker.md, so no code it touches runs in that job; the worker job passed. Re-running the failed job once; no fix exists for the crash yet.


Generated by Claude Code

@vu1n
vu1n merged commit a803936 into main Nov 7, 2026
2 of 5 checks passed

@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 93cacf3: 1 finding(s), 1 blocking.

The change adds briefing checks for disputed and frequently shown stale claims. One confirmed selection bug can hide eligible disputes, so it should be fixed before merging.

1 finding(s) dropped by the check
  • worker/test/check.test.ts:40 Test expiry and read-only feedback through the new check flow: Missing regression coverage does not demonstrate a defect: toCheck compares lastUsed against the 30-day cutoff, and checkedness counts only feedback explicitly marked writable, which read-only callers cannot produce.

Comment thread worker/src/mcp.ts
project ? store.recentCandidates(project, ctx.session, RECENT) : [],
// User scope is how this person works, read from every repo; unconfirmed lessons stay labelled and apart.
user ? store.recentUserCandidates(user, ctx.session, RECENT_USER) : [],
store.recall("", project, user, { candidates: "none", groups, limit: CHECK, disputed: true }),

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.

P2 Exclude the session's own disputes before applying the query limit

If the two highest-ranked disputed claims belong to the current session, the query returns only those two and toCheck removes both. Other eligible disputes are never considered, and stale accepted claims can take their slots despite the disputed-first rule. This affects both repo and room briefings. Apply the session exclusion in SQL before LIMIT, or fetch further eligible disputes after filtering, and add a regression test.

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