Add blog post generation lock for cron automation - #1
Draft
cursor[bot] wants to merge 3 commits into
Draft
Conversation
Introduce artifacts/blog-post-generation.lock.json with acquire/status/release CLI so 15-minute Cloud Agent runs skip when another generation is active. Co-authored-by: Joe M <ether314@users.noreply.github.com>
Co-authored-by: Joe M <ether314@users.noreply.github.com>
Co-authored-by: Joe M <ether314@users.noreply.github.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 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.
Summary
Implements a cross-agent lock so the 15-minute blog-post generation cron skips when another run is already active.
Workflow
npm run blog:lock:statusartifacts/blog-post-generation.lock.jsonis active and not expirednpm run blog:lock:acquire(commits + pushes lock file)npm run blog:lock:releaseChanges
scripts/lib/blog-post-generation-lock.mjs— lock read/write, git sync, stale TTL (2h)scripts/blog-post-generation.mjs— CLI (status,acquire,release,run)AGENTS.md— documents the cron automation sequencepackage.json—blog:lock:*npm scriptsTesting
status→ idle when no lockacquire→ writes lock with agent metadata and pushesacquire→ exit 2 (skip)release→ removes lock and pushesnpm run build+ local smoke tests passFirebase deploy was not run in this cloud environment (no
firebase logincredentials).