Repository navigation
Run every qsv call through qsv-client - #19
Merged
Merged
Conversation
No qsv run during onboarding had a timeout, so a stalled describegpt (an LLM that never answers) or a stats --everything on a huge CSV blocked the job forever. qsv-client kills a run's whole process group once it passes its timeout. The defaults are describegpt 900s, stats 900s, frequency 600s and count 120s, and VERIKAN_QSV_<PASS>_TIMEOUT overrides each one. The run_qsv_* helpers keep their contract: they return None on any failure, now including a missing binary or a timeout, and they log the error type and kind instead of truncated stderr. stats and frequency now stream to a sibling .part file that replaces the output only after a run succeeds, so a failed run leaves the previous qsv_stats.csv in place instead of a truncated one. The bytes on disk are still exactly qsv's stdout. qsv_dict.json is still re-dumped with indent=2, because it is published and hashed. Binary discovery honours QSV_BIN, in the onboarding health warning too. Discovery can fall back to qsvlite/qsvdp, which have no describegpt, so after a describegpt failure the binary's command list is checked once and a missing describegpt is reported. A successful run pays nothing for that check. The two inline `qsv count` blocks, which swallowed every exception, become run_qsv_count. The Dockerfile moves from qsv 22.0.1 to 24.0.0. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Why
No qsv run during onboarding had a timeout. A stalled
describegpt(an LLM that never answers) or astats --everythingon a huge CSV blocked the job forever. qsv-client kills a run's whole process group once it passes its timeout. It also returns typed errors and finds the binary in one place.What changed
VERIKAN_QSV_<PASS>_TIMEOUT, e.g.VERIKAN_QSV_STATS_TIMEOUT=1800.run_qsv_describegpt/run_qsv_stats/run_qsv_frequencystill returnNoneon failure, now including a missing binary or a timeout. They log the error type and kind instead of truncated stderr..partfile that replaces the output only when the run succeeds. A failed run leaves the previousqsv_stats.csv/qsv_frequency.csvin place. The bytes on disk are still exactly qsv's stdout.qsv_dict.jsonunchanged: it is still re-dumped withjson.dump(indent=2), because it is published and hashed.QSV_BIN, in the admin health warning too. Discovery can fall back toqsvlite/qsvdp, which have nodescribegpt. So after a describegpt failure the binary's command list is checked once, and a missing describegpt is reported.run_qsv_countreplaces the duplicated inlineqsv countblocks in both onboarding scripts, which swallowed every exception.qsvat its root.Tests
New fake-binary tests cover:
runtime_warningsis now tested viaQSV_BIN. I broke each fix in turn and the matching test failed each time.I also smoke-tested against a real qsv 24.0.0.
🤖 Generated with Claude Code