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

windows: the two scheduler templates that actually get the panel to the server - #68

Merged
mspinola merged 1 commit into
mainfrom
claude/windows-publish-and-push
Aug 5, 2026
Merged

mspinola merged 1 commit into
mainfrom
claude/windows-publish-and-push

Conversation

@mspinola

@mspinola mspinola commented Aug 5, 2026

Copy link
Copy Markdown
Owner

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.sh in #14 was dead code. That script pushes from the Mac, and cotdata/docs/SYNCING.md documents 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_STORE is a separate store root from COTDATA_STORE, so cotdata's own push-to-server.cmd does 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 a git pull cannot clobber them, wire to Task Scheduler, chain behind errorlevel guards.

template does
docs/examples/windows/run-publish.cmd builds the panel via the portable bin/publish_damage.py
docs/examples/windows/push-panel.cmd rsyncs CROWDMON_STORE to the dash server over SSH

Order: prices → publish → push. Publishing before the prices land builds last week's panel; pushing before publishing ships it. Nothing enforces it.

push-panel.cmd inherits cotdata's three Cygwin-rsync gotchas verbatim, since they apply unchanged: use the ssh that ships with rsync, give it a writable UserKnownHostsFile, cygdrive paths throughout.

One ordering detail that is load-bearing rather than tidy

Dated directories first, manifest.json last. 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 no latest symlink.

--delete prunes 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.sh was 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 skipped from a worktree, unchanged. ruff clean. bash -n clean on the modified wrapper.

Neither .cmd has been executed. I have no Windows box, and both are written by analogy to cotdata/docs/examples/windows/push-to-server.cmd. They need a real run before anyone trusts them — the likeliest snags are the %% escape in run-publish.cmd's closing comment and the .* exclusion in push-panel.cmd, which is there to keep the publisher's dot-prefixed atomic-write staging directories from propagating half-written.

🤖 Generated with Claude Code

…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>
@mspinola
mspinola merged commit f767751 into main Aug 5, 2026
5 checks passed
@mspinola
mspinola deleted the claude/windows-publish-and-push branch August 5, 2026 03:33
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