This repository was archived by the owner on Aug 8, 2026. It is now read-only.
Repository navigation
windows: the two scheduler templates that actually get the panel to the server - #68
Merged
Merged
Conversation
…he server docs/examples/windows/run-publish.cmd and push-panel.cmd, following cotdatas convention exactly: copy out of the repo into a scheduler dir, fill the REPLACE_WITH_* markers there so a git pull cannot clobber them, chain behind errorlevel guards, wire to Task Scheduler. CROWDMON_STORE is a separate store ROOT, so cotdatas push-to-server.cmd does not carry the panel and no exclusion-list change would make it. Hence a second push script rather than a flag. push-panel.cmd pushes dated directories first and manifest.json last, and here that ordering is load-bearing rather than tidy: the reader resolves the current week THROUGH the manifest, so a manifest naming a directory that has not landed is caught and reported as a partial sync, while the reverse silently serves last week as though it were this week. Same reason there is no latest symlink. --delete prunes a week the publisher has dropped from its rolling window, and unlike the cotdata push there is no consumer-owned directory on the far side to exclude. No service restart after a push: the readers cache is keyed on the manifests mtime, unlike a cotdata store push whose consumers hold an in-process indexer. Also fixes a claim from #67. That PR said the publish-location correction was stated in all three places; the merge touched four files and bin/publish_damage.sh was not among them, so it was two. The block is in the script now, pointing at the Windows templates rather than at an inline invocation. 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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Adds the two Windows scheduler templates that actually get the damage panel onto the dash server. Requires mspinola/cot-analyzer#16, which deprecates the Mac-side script this was previously (and uselessly) wired into.
Why this exists
The optional fourth payload added to
cot-analyzer/scripts/push_data_cache_to_server.shin #14 was dead code. That script pushes from the Mac, andcotdata/docs/SYNCING.mddocuments the Mac as a read-only replica: one Windows server produces everything and feeds two replicas, the Mac over SMB and the dash server over SSH. So the panel had no path to production at all.CROWDMON_STOREis a separate store root fromCOTDATA_STORE, so cotdata's ownpush-to-server.cmddoes not carry it and no change to its exclusion list would. Hence a second push script rather than a flag.The two templates
Following cotdata's convention exactly — copy out of the repo into a scheduler directory, fill the
REPLACE_WITH_*markers there so agit pullcannot clobber them, wire to Task Scheduler, chain behinderrorlevelguards.docs/examples/windows/run-publish.cmdbin/publish_damage.pydocs/examples/windows/push-panel.cmdCROWDMON_STOREto the dash server over SSHOrder: prices → publish → push. Publishing before the prices land builds last week's panel; pushing before publishing ships it. Nothing enforces it.
push-panel.cmdinherits cotdata's three Cygwin-rsync gotchas verbatim, since they apply unchanged: use the ssh that ships with rsync, give it a writableUserKnownHostsFile, cygdrive paths throughout.One ordering detail that is load-bearing rather than tidy
Dated directories first,
manifest.jsonlast. The reader resolves the current week through the manifest, so a manifest naming a directory that has not landed is caught and reported as a partial sync — whereas the reverse, data present and manifest stale, silently serves last week as though it were this week. Same reason there is nolatestsymlink.--deleteprunes a week the publisher has already dropped from its rolling window. Unlike cotdata's push there is no consumer-owned directory on the far side to exclude, so nothing needs protecting from the mirror.No service restart after a push. The reader caches on the manifest's mtime, so a fresh sync is picked up on the next request — unlike a cotdata store push, whose consumers hold an in-process indexer.
It is small: ~4 MB parquet plus 220 KB of blocks per week, eight weeks retained, and only the newest dated directory changes between runs.
Also fixes a claim from #67
That PR's description said the publish-location correction was "stated in all three places". The merge touched four files and
bin/publish_damage.shwas not among them — the edit was made and lost before the commit, so it was two places, not three. The block is in the script now, and points at these templates rather than at an inline invocation.Testing
560 passed / 95 skippedfrom a worktree, unchanged.ruffclean.bash -nclean on the modified wrapper.Neither
.cmdhas been executed. I have no Windows box, and both are written by analogy tocotdata/docs/examples/windows/push-to-server.cmd. They need a real run before anyone trusts them — the likeliest snags are the%%escape inrun-publish.cmd's closing comment and the.*exclusion inpush-panel.cmd, which is there to keep the publisher's dot-prefixed atomic-write staging directories from propagating half-written.🤖 Generated with Claude Code