Skip to content
This repository was archived by the owner on Aug 8, 2026. It is now read-only.

windows: log the chain, because a stopped chain and a finished one look alike - #74

Merged
mspinola merged 1 commit into
mainfrom
claude/nightly-chain-log
Aug 5, 2026
Merged

windows: log the chain, because a stopped chain and a finished one look alike#74
mspinola merged 1 commit into
mainfrom
claude/nightly-chain-log

Conversation

@mspinola

@mspinola mspinola commented Aug 5, 2026

Copy link
Copy Markdown
Owner

Task Scheduler records one Last Run Result on one task, so a chain that stopped after step 1 and a chain that ran all four are indistinguishable from it: the three steps that never executed have no representation anywhere. The wrapper now redirects every step to nightly.log with a timestamp header, and nightly chain ok is the only line that means all four ran.

This also gives the call trap a symptom. That paragraph previously ended "there is no error and nothing in the log to look at", which was true when there was no log. Now the trace is the absence of a line: the log ends after the price output with no nightly chain ok. Rewritten to say so, since that absence is the whole reason for the log.

Redirects are per-line rather than one redirect on a parenthesised block, and the reason is recorded inline so nobody tidies it away. cmd expands %ERRORLEVEL% for an entire block at parse time, so every guard inside one would test the value from before the block started. The chain would then run all four steps regardless of failure while still reporting success, which is a worse version of the bug the guards exist to prevent. Avoiding it needs setlocal enabledelayedexpansion and !ERRORLEVEL! throughout; per-line redirection has no such trap.

Docs only. No src/ or tests/ change, so the four suite totals in CLAUDE.md are unmoved.

🤖 Generated with Claude Code

…ok alike

Task Scheduler records one Last Run Result on one task, so a chain that stopped
after step 1 and a chain that ran all four are indistinguishable from it: the three
steps that never executed have no representation anywhere. The wrapper now
redirects every step to nightly.log with a timestamp header, and `nightly chain ok`
is the only line that means all four ran.

This also gives the `call` trap a symptom. That paragraph previously ended "there
is no error and nothing in the log to look at", which was true when there was no
log. Now the trace is the ABSENCE of a line: the log ends after the price output
with no `nightly chain ok`. Rewritten to say so, since that absence is the whole
reason for the log.

Redirects are per-line rather than one redirect on a parenthesised block, and the
reason is recorded inline so nobody tidies it: cmd expands %ERRORLEVEL% for an
entire block at parse time, so every guard inside one would test the value from
before the block started. The chain would then run all four steps regardless of
failure while still reporting success, which is a worse version of the bug the
guards exist to prevent. Avoiding it needs setlocal enabledelayedexpansion and
!ERRORLEVEL! throughout; per-line redirection has no such trap.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@mspinola
mspinola merged commit c791b38 into main Aug 5, 2026
5 checks passed
@mspinola
mspinola deleted the claude/nightly-chain-log branch August 5, 2026 17:47
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant