Skip to content

worker: a used rating from another session confirms a candidate - #80

Merged
vu1n merged 5 commits into
mainfrom
claude/project-thread-ftmghv
Nov 6, 2026
Merged

vu1n merged 5 commits into
mainfrom
claude/project-thread-ftmghv

Conversation

@vu1n

@vu1n vu1n commented Nov 6, 2026 •

Copy link
Copy Markdown
Owner

Requested by Vu · project thread

Why: in production, 11 of the 15 subjects that ever reached a second session never promoted, only because every later session had been shown the candidate first, so the echo guard gave its re-claim no credit (34 such claims, all different sessions, mostly days apart). Nothing a reader did could count. Diagnosis: research/kypp-promotion-diagnosis-2026-11-06.md in the project files.

Contract

  • recurs counts each used rater as that session's support at the rating's time, so KYPP_RECUR_GAP_MINUTES and the S1 agreement hold still apply. A claim's writer never confirms it.
  • consolidate loads, per live candidate, sessions whose newest feedback row is a used marked writable (store.confirmations); ties break on rowid. A later not_used/wrong (any token) withdraws it.
  • feedback marks a rating writable only when the current caller could write at the claim's level (mayWrite): not read-only, inside its pin, its own user/room lane. Unmarked and pre-existing rows never confirm.
  • The plan carries the ratings it counted (GroupPlan.confirmed); apply refuses the plan if any was withdrawn since.
  • While a group isn't promoting, an unstamped survivor (an echo) no longer supersedes stamped candidates.
  • The claim reply adds an echo: line pointing at feedback; initialize steps say a used from another session confirms.
  • Python arbiter doesn't count ratings (feature map gotcha).

Verification

  • npm test: 365 pass, including test/confirm.test.ts (echo reply, used promotes, writer/read-only/pinned-elsewhere/withdrawn don't, fence on withdrawal, ties, echo keeps the rated claim, gap). Mutations of the wiring, fence, writable check and lane check each fail a test.
  • npm run typecheck clean; featuremap.py check 0 broken pointers.

Merging deploys to kypp.vu1n.dev.

@vu1n vu1n self-assigned this Nov 6, 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 73a481f: 3 finding(s), 3 blocking.

The change allows writable sessions’ used feedback to support candidate promotion. It is not safe to merge yet: legacy read-only ratings can count, withdrawn feedback can survive planning, and tied timestamps can select the wrong verdict.

Comment thread worker/src/store.ts Resolved
Comment thread worker/src/consolidate.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 d217415: 2 finding(s), 2 blocking.

The change lets writable used feedback confirm candidates and explains this in echo replies. Two confirmed defects allow withdrawn support to promote claims and cause duplicate cleanup to discard support needed for promotion, so fixes are needed before merging.

Comment thread worker/src/store.ts Resolved
Comment thread worker/src/consolidate.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 09ce750: 1 finding(s), 1 blocking.

The change allows writable used feedback to confirm candidate claims. It is unsafe to merge because feedback can bypass project write restrictions by reusing a session across credentials.

Comment thread worker/src/mcp.ts Resolved
@vu1n
vu1n force-pushed the claude/project-thread-ftmghv branch from d620108 to 56b4599 Compare November 6, 2026 18:56
@vu1n
vu1n changed the base branch from claude/project-thread-ids25f to main November 6, 2026 18:56

@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 56b4599: 0 finding(s), 0 blocking.

The change allows writable feedback from another session to count toward claim recurrence while preserving stamped candidates beneath echoes. The reported test gap does not establish a defect; based on this finding, the change is safe to merge.

1 finding(s) dropped by the check
  • worker/test/confirm.test.ts:133 Test the S1 hold with feedback-backed recurrence: Feedback-backed promotions still pass through planWithJudge's S1 disagreement check, which replans with autoAccept disabled, and planGroup then preserves the stamped candidate beneath the higher-ranked echo; the missing combined test demonstrates no functional failure.

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

The change lets writable used feedback confirm candidate claims, but incorrectly excludes rooms from confirming claims in linked repositories they can write to. This permission mismatch 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 a4b5857: 1 finding(s), 1 blocking.

The change lets writable sessions confirm candidate claims through used feedback. A room-link authorization race can record a confirmation after write access is removed, so this 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 443cd2f: 1 finding(s), 1 blocking.

The change lets writable used feedback count toward candidate promotion and adds a guard against withdrawn confirmations. A confirmed timestamp-fencing gap can still allow promotion without the required recurrence interval, so it should be fixed before merging.

Comment thread worker/src/store.ts Resolved
@vu1n
vu1n merged commit 2f84035 into main Nov 6, 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