Skip to content

Do not record the re-post guard for a zero-yield transcript - #118

Merged
raphasouthall merged 1 commit into
mainfrom
fix/115-repost-guard-zero-yield
Aug 25, 2026
Merged

Do not record the re-post guard for a zero-yield transcript#118
raphasouthall merged 1 commit into
mainfrom
fix/115-repost-guard-zero-yield

Conversation

@raphasouthall

Copy link
Copy Markdown
Owner

Part of #115. Found by live-verifying #116 against the deployed server.

_llm_classify is not deterministic: three consecutive runs over one omp session's ten pre-filtered candidates kept 5, then 0, then 0 (issue #117). The re-post guard recorded the transcript digest unconditionally, so a post whose classifier run happened to keep nothing was marked harvested and every later retry became a no-op — the insights a luckier run would have kept were lost for good.

The digest is now recorded only when the run yielded something. A zero-yield post stays re-postable, which is the behaviour a flaky classifier needs. Cost is bounded: a re-run only happens when a client posts the same transcript again.

Also corrects the tool docstring, which promised an unconditional no-op.

Gate: uv run ruff check src/ tests/ exit 0; uv run pytest -q exit 0, 805 passed.

The re-post guard recorded the transcript digest whatever the run
produced, so a post whose LLM classification happened to keep nothing was
marked harvested and every retry became a no-op.

That matters because classification is not deterministic (#117): three
runs over the same ten candidates kept 5, 0 and 0. Recording the digest
after an unlucky run makes the loss permanent.

Record it only when the run yielded something. A zero-yield post stays
re-postable, and the cost is bounded by the client choosing to re-post.

Part of #115
@raphasouthall
raphasouthall merged commit 440096c into main Aug 25, 2026
5 checks passed
@raphasouthall
raphasouthall deleted the fix/115-repost-guard-zero-yield branch August 25, 2026 14:17
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