fix(vintage): make a preflight failure visible instead of silent - #84
Merged
Merged
Conversation
Task Scheduler reported "cotdata vintage" as completing successfully on 2026-07-31 at 17:00, and nothing appeared in the store on either replica: no new snapshot, no new raw file, and no new line in run.log. The absent run.log line is what identifies it. The only code between setlocal and the first ">> %VINTAGE_LOG%" redirect is the mkdir and the preflight block, so a script that reached the first redirect would have appended something even on total failure. It did not, so it exited in preflight, which is preflight working. The defect is that preflight was unreadable. Its diagnostics went only to stdout, which Task Scheduler discards, so the outcome was: check fires, run does nothing, task reports success, History shows a clean Task Started / Action completed / Task completed, and the sole trace is a Last Run Result code nobody reads because the task looks fine. The message explaining the problem went to the one place that cannot be read. Three changes: - Preflight failures now also append to vintage-preflight.log, beside the SCRIPT rather than inside the store. It cannot live in the store, because the likeliest thing preflight catches is a wrong store path and a log written under a wrong path is equally lost. %~dp0 exists by definition and is where the operator already is. - Preflight moved ABOVE the mkdir, and the store-path check moved first. A half-edited copy would otherwise create a stray directory literally named "REPLACE_WITH_STORE_PATH\vintage" in the task's working directory, write an entire capture into it, and sync nothing, which is indistinguishable from a task that ran and did nothing. - The header now names the two things to read when the task claims success but nothing appears, with the exit codes decoded: 0x3 is a wrong store path, 0x2331 is a venv without cotdata-vintage.exe. No library change; 257 tests still pass. Co-Authored-By: Claude Opus 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.
The
cotdata vintagetask reported success on 2026-07-31 at 17:00 and nothing appeared in the store on either replica: no new snapshot, no new raw file, no new line inrun.log.The absent
run.logline identifies it. The only code betweensetlocaland the first>> %VINTAGE_LOG%redirect is themkdirand the preflight block, so a script that reached the first redirect would have appended something even on total failure. It did not, so it exited in preflight. Preflight worked.The defect is that preflight was unreadable. Its diagnostics went only to stdout, which Task Scheduler discards. Net effect: the check fires, the run does nothing, the task reports success, History shows a clean Task Started / Action completed / Task completed, and the only trace is a Last Run Result code nobody reads because the task looks fine. The message explaining the problem went to the one place that cannot be read.
Changes
vintage-preflight.logbeside the script, not in the store. It cannot live in the store, because the likeliest thing preflight catches is a wrong store path, and a log written under a wrong path is equally lost.%~dp0exists by definition.mkdir, store-path check first. A half-edited copy would otherwise create a stray directory literally namedREPLACE_WITH_STORE_PATH\vintagein the task's working directory, write an entire capture into it, and sync nothing.0x3wrong store path,0x2331venv without the entry points.No library change. 257 tests still pass.
Generated with Claude Code