Skip to content

Claudinite scheduler #30

Claudinite scheduler

Claudinite scheduler #30

# Claudinite per-repo task scheduler — the repo's ONLY cron
# (per-project-scheduling DESIGN §3). A thin shim: all logic lives in the
# vendored engine, so this file changes rarely (schema and behavior changes ride
# the vendor refresh, not edits here). It runs hourly on a repo-hashed minute
# constrained to :10–:50 — spreading the fleet, dodging GitHub's :00 stampede,
# and staying clear of the hour boundary the slot math anchors on.
#
# The minute below is a placeholder; bootstrap/vendoring rewrites it to this
# repo's stable hashed minute in :10–:50, computed by
# `node .claudinite/shared/engine/scheduler/hash-minute.mjs <owner/repo>`
# (scheduler-workflow-shape enforces the range; baselining re-derives the value to
# catch drift). `workflow_dispatch` allows a manual run; the concurrency group
# serializes runs so a slow run and its successor never overlap.
name: Claudinite scheduler
on:
schedule:
- cron: '24 * * * *'
workflow_dispatch:
concurrency:
group: claudinite-scheduler
cancel-in-progress: false
permissions:
contents: write # read the repo + vendored engine; baselining's deliver() pushes the maintenance branch (agent-preprocessing §7/E4)
issues: write # file / label / close dispatch issues
pull-requests: write # baselining's deliver() opens the per-cycle maintenance PR and arms auto-merge
actions: read # read the run ledger (last successful run) for due-slot math
jobs:
schedule:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: actions/setup-node@v5
with:
node-version: 24
- name: Evaluate schedule and dispatch due tasks
env:
GITHUB_TOKEN: ${{ github.token }}
run: node .claudinite/shared/engine/scheduler/run.mjs