Do not record the re-post guard for a zero-yield transcript - #118
Merged
Conversation
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of #115. Found by live-verifying #116 against the deployed server.
_llm_classifyis 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 -qexit 0, 805 passed.