Rank the suggested moments against each other before choosing - #159
Conversation
|
Warning Review limit reached
Next review available in: 33 minutes Limit details: You’ve used the included review currently available. You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. How can I continue?Wait for the limit to reset, then comment An organization admin can change what happens after included review limits in Billing. How do review limits work?CodeRabbit enforces per-developer PR review limits within each organization. For paid Pro and Pro+ reviews, CodeRabbit uses a developer's included PR review attempts over the past 7 days to set the current hourly allowance. At typical activity levels, the full plan allowance applies. Higher sustained activity can lower the allowance until earlier attempts leave the 7-day window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (8)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
A long episode is searched in three to six timeline buckets, each its own call. Their scores are not comparable: a generous bucket's 17 beats a strict bucket's 15 because the two calls never met. Scores are integer sums of four 1-5 dimensions, so the pool is thick with ties, and a tie at the cut line was broken by list position, which favours the opening minutes. One transcript-free pass now compares the whole pool and writes a rank. It runs after the audio blend, so a laughter peak is an input rather than a later reshuffle, and only when there is a surplus to drop. Any failure falls back to score ordering. This is also where a workspace's published-clip history belongs. What retains on a channel says which of twelve candidates to keep, not where to look for them, and it was being fetched once per bucket and spent on finding instead of choosing. Two fixes fall out of it: - local_prompt replaces the prompt outright, so the learned block reached only the cloud backend. A subscriber whose chain resolved to local Claude Code or Codex paid for learnings the model never saw. - prompt_block caught CloudError only. A stalled body raises TimeoutError and a non-JSON 200 raises JSONDecodeError, either of which aborted the run. It is held for the process now, keyed on the token. The CLI called blend_signal_scores and dropped the result, so laughter detection could not promote a clip there. Both entry points go through one path now and ship the same clips from the same episode.
d3dce2d to
db03301
Compare
What this does
A long episode is searched in three to six timeline buckets, each its own LLM call. Their scores are not comparable: a generous bucket's 17 beats a strict bucket's 15 because the two calls never met. Scores are integer sums of four 1-5 dimensions, so a pool of a dozen candidates is thick with ties, and a tie at the cut line was broken by list position, which systematically favours the opening minutes of the episode.
One transcript-free pass now compares the whole pool at once and writes a 1-based
rank. It runs after the audio blend, so a laughter peak is an input to the decision rather than a reshuffle of it, and only when the pool has a surplus to drop. Every failure path falls back to the score ordering that shipped before.scoreis left alone. It stays the model's self-reported 0-20 sum, so the CLI's/20display and the signal blend's+3ceiling keep their meaning.This is also the right home for a workspace's published-clip history. What retains on a channel answers "which of these twelve do I keep", not "where do I look", and it was being fetched once per bucket and spent on discovery.
Needs
rank_momentsregistered in podcli-cloud, which is deployed.Two fixes fall out of it
local_promptreplaces the prompt outright rather than merging, so the workspace-learnings block reached only the cloud backend. A Pro subscriber whose chain resolved to local Claude Code or Codex was paying for learnings the model never saw.prompt_blockcaughtCloudErroronly. A stalled response body raisesTimeoutErrorand a non-JSON 200 raisesJSONDecodeError, and either aborted the whole suggestion run. It is now held for the life of the process, keyed on the session token so a workspace switch cannot leak one workspace's learnings into another's prompt.The CLI called
blend_signal_scoresand discarded the return value, so laughter detection could not promote a clip into the set on that path.podcli processand the studio now go through one selection path and ship the same clips from the same episode.How I tested it
npx tsc --noEmit,npx vitest run(262 passing),pytest tests/(625 passing; the one failure istest_find_cli_falls_back_to_shell_lookup, which fails on a clean checkout ofmainon any machine with a realclaudeon PATH).Ten new tests cover the ranking pass: a tie at the cut line decided by rank, timeline ordering of the result, a partial ranking discarded whole, an unreadable answer, no AI available, a pool with nothing to drop making no call, and the pass being metered under its own purpose. Two more assert the learned block reaches a local CLI and that the free-tier prompt is byte-identical when there is no block.
Checklist
npx tsc --noEmitandnpm testpass (pluspytest tests/if you touched the backend)