Skip to content

fix(vintage): make a preflight failure visible instead of silent - #84

Merged
mspinola merged 1 commit into
mainfrom
claude/vintage-preflight-visible
Aug 1, 2026
Merged

mspinola merged 1 commit into
mainfrom
claude/vintage-preflight-visible

Conversation

@mspinola

@mspinola mspinola commented Aug 1, 2026

Copy link
Copy Markdown
Owner

The cotdata vintage task 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 in run.log.

The absent run.log line 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. 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

  • Preflight failures append to vintage-preflight.log beside 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. %~dp0 exists by definition.
  • Preflight moved above the mkdir, store-path check 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.
  • Header names the two things to read when the task claims success but nothing appears, with exit codes decoded: 0x3 wrong store path, 0x2331 venv without the entry points.

No library change. 257 tests still pass.

Generated with Claude Code

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>
@mspinola
mspinola merged commit 5e98cb8 into main Aug 1, 2026
5 checks passed
@mspinola
mspinola deleted the claude/vintage-preflight-visible branch August 1, 2026 13:45
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