Skip to content

fix(action-center): order the candidate queue by what each action covers - #866

Merged
gkhngyk merged 1 commit into
mainfrom
fix/candidate-priority-by-reach
Oct 1, 2026
Merged

gkhngyk merged 1 commit into
mainfrom
fix/candidate-priority-by-reach

Conversation

@gkhngyk

@gkhngyk gkhngyk commented Oct 1, 2026

Copy link
Copy Markdown
Contributor

Summary

Orders the candidate queue by what each action covers, instead of by how many signals carry it.

Evidence in the priority score was the linked signal count (1.5 per signal, capped at 10). The V1 library folds a group of prompts into one signal and keeps at most five signals per kind. So the evidence term was almost always 1.5 or 7.5, nearly every waiting candidate scored 67 or 73, and the daily promotion fell back to definition-id order.

Evidence is now the action's reach: payload.targetCount, the prompts, pages, sources or topics it covers. It is scored on a log scale and capped at the same 15 points:

targets 1 5 11 50
evidence 2.5 6.5 9.0 14.2
  • Fifty prompts outrank five, and five outrank one. Breadth still cannot cross a grade: the widest medium (65 + 15 + 42 = 122) stays below a fresh high (200).
  • A definition whose payload names no targets falls back to the signal count.
  • Config: priority.evidencePerSignal / evidenceCap → evidencePerDoubling (2.5) / evidenceMax (15).

Re-scored against the hosted queue (68 waiting candidates). Where reach differs, it now decides the order. For example, one brand's 32-page and 25-prompt candidates move ahead of its single-target ones. The ties that remain are candidates with the same impact, one target each and the same first-seen day. Nothing distinguishes those, and they keep breaking on wait time, then id.

Related issue

Tracking #818

Type of change

  • fix — Bug fix

How to test

  • cd server && npx vitest run → 877 passing. candidates.test.js covers reach over signal count, the 1/5/50 ordering, the fallback, the cap, and the grade invariant.
  • After deploy, action_candidates.priority for waiting rows spreads beyond 67/73. A candidate covering many targets sits above a single-target one of the same impact and age.

Checklist

  • Branch follows the naming convention
  • Commits follow Conventional Commits
  • Changes are focused — one concern per PR

🤖 Generated with Claude Code

Evidence in the priority score was the signal count. The library folds a
group of prompts into one signal and keeps at most five signals a kind, so
nearly every candidate scored 67 or 73 and the queue promoted in id order.
Evidence is now the action's reach (payload.targetCount) on a log scale,
capped at the same 15 points, so breadth orders a grade without crossing
one.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@gkhngyk
gkhngyk merged commit 67b7dce into main Oct 1, 2026
6 checks passed
@gkhngyk
gkhngyk deleted the fix/candidate-priority-by-reach branch October 1, 2026 17:11
@gkhngyk gkhngyk mentioned this pull request Oct 2, 2026
33 of 37 tasks
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