Skip to content

Add blog post generation lock for cron automation - #1

Draft
cursor[bot] wants to merge 3 commits into
masterfrom
cursor/blog-post-generation-lock-33dd
Draft

Add blog post generation lock for cron automation#1
cursor[bot] wants to merge 3 commits into
masterfrom
cursor/blog-post-generation-lock-33dd

Conversation

@cursor

@cursor cursor Bot commented Jul 30, 2026

Copy link
Copy Markdown

Summary

Implements a cross-agent lock so the 15-minute blog-post generation cron skips when another run is already active.

Workflow

  1. Read locknpm run blog:lock:status
  2. Skip if active — exit when artifacts/blog-post-generation.lock.json is active and not expired
  3. Acquire locknpm run blog:lock:acquire (commits + pushes lock file)
  4. Continue making blog posts — generation work + deploy
  5. Release lock on stopnpm run blog:lock:release

Changes

  • 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 sequence
  • package.jsonblog:lock:* npm scripts

Testing

  • status → idle when no lock
  • acquire → writes lock with agent metadata and pushes
  • second acquire → exit 2 (skip)
  • release → removes lock and pushes
  • npm run build + local smoke tests pass

Firebase deploy was not run in this cloud environment (no firebase login credentials).

Open in Web Open in Cursor 

cursoragent and others added 3 commits July 30, 2026 11:16
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant