run-series.cmd: sync on a partial build, stop only on a total failure - #119
Merged
Merged
Conversation
The wrapper stopped on any non-zero code from the build. On 2026-09-25 that cost five sessions on both replicas: TradingView restated two put/call closes, the build refused those two by design, and the wrapper exited before its syncs while thirteen breadth series sat correct on the producer. It now reads the build's new exit codes (marketdata EXIT_PARTIAL): sync on 0 and on 2, stop only on 1. The refusal stays visible, because the wrapper exits with the build's code rather than the push's, so a partial run still reports 2. Testing a specific code needs equality, not `if errorlevel`, which is true for that code or any larger one and would read 2 as 1. Two chained `if not` string compares are the cmd idiom and avoid a numeric parse on an empty ERRORLEVEL. The live copy on the box has to be updated by hand; this is the example it is deployed from. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Merged
3 tasks done
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 failure this fixes
The wrapper stopped on any non-zero code from the build. On 2026-09-25 that cost five sessions on both replicas: TradingView restated two put/call closes, the build refused those two by design, and the wrapper exited before its syncs while thirteen breadth series sat correct on the producer.
The change
It reads the build's new exit codes (marketdata
EXIT_PARTIAL): sync on 0 and on 2, stop only on 1. The refusal stays visible, because the wrapper exits with the build's code rather than the push's, so a partial run still reports 2 to the operator and the verifier.Mirroring on a partial is safe by construction: the store is a valid state whatever refused, since the build never writes a bad bar and writes parquet atomically, so a mirror can only make a replica fresher.
Two details worth the review:
if errorlevel, which is true for that code or any larger one and would read 2 as 1. Two chainedif notstring compares are the cmd idiom and avoid a numeric parse on an emptyERRORLEVEL.ERRORLEVELon its own line, so the finalexit /b %RC%reports the build's outcome without masking a push failure.Deployment
This is the versioned example. The live copy at
C:\Users\matt\code\cotdata\scheduler\run-series.cmdhas to be updated by hand, and it needs marketdata's side merged first or the wrapper will never see a 2.Noticed, not fixed
run-series.cmd,run-prices.cmdandrun-equities.cmdeach carry one>=inside aREMline, which every one of these files' own headers warns against. They evidently run fine nightly, so it is latent rather than broken. I kept my additions clear of angle brackets and left the existing three alone.Test plan
Build side: mspinola/marketdata#35.
🤖 Generated with Claude Code