From 0543771a02ee22ac2f32d0d88d58567ff34be588 Mon Sep 17 00:00:00 2001 From: teahubxyz Date: Sun, 18 Oct 2026 16:10:58 +0000 Subject: [PATCH] Workflows batch: heartbeat knobs, housekeeping.yml, its test in CI (#127) Workflows batch: heartbeat knobs, housekeeping.yml, its test in CI (#127) heartbeat.yml passes TIME_CAP_SLACK, TIME_ANTHROPIC_API (the caching kill switch), TIME_REVIEW_TIEBREAK and TIME_REVIEW_QUORUM; housekeeping.yml runs the daily sweep at 13:17 UTC; ci.yml runs test_housekeeping.py. Owner-approved merge. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_017K4vyY3yUD3GsvoZaAtKkD --- .github/workflows/ci.yml | 1 + .github/workflows/heartbeat.yml | 6 +++++- .github/workflows/housekeeping.yml | 26 ++++++++++++++++++++++++++ 3 files changed, 32 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/housekeeping.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 73f735d..1e07274 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -19,3 +19,4 @@ jobs: node-version: 22 - run: python3 .github/time/test_time.py - run: python3 .github/time/test_seed.py + - run: python3 .github/time/test_housekeeping.py diff --git a/.github/workflows/heartbeat.yml b/.github/workflows/heartbeat.yml index 9178b89..1b7f22b 100644 --- a/.github/workflows/heartbeat.yml +++ b/.github/workflows/heartbeat.yml @@ -48,8 +48,12 @@ jobs: TIME_DAILY_CAP: ${{ vars.TIME_DAILY_CAP }} TIME_DAILY_USD: ${{ vars.TIME_DAILY_USD }} # spend governor: dollars per day (default 5) … TIME_MONTHLY_USD: ${{ vars.TIME_MONTHLY_USD }} # … and per month (default 100); ledger in time/ledger/ + TIME_CAP_SLACK: ${{ vars.TIME_CAP_SLACK }} # a run launched within budget may finish up to this x the daily cap (default 1.5; #117) + TIME_ANTHROPIC_API: ${{ vars.TIME_ANTHROPIC_API }} # messages (default, prompt caching) | compat = the OpenAI-compatible endpoint (#119) TIME_CURSOR_MODEL: ${{ vars.TIME_CURSOR_MODEL }} - TIME_REVIEW: ${{ vars.TIME_REVIEW }} + TIME_REVIEW: ${{ vars.TIME_REVIEW }} # one seat, or a comma-separated council (#77) + TIME_REVIEW_TIEBREAK: ${{ vars.TIME_REVIEW_TIEBREAK }} # the seat called only on a split, e.g. venice:kimi (#77) + TIME_REVIEW_QUORUM: ${{ vars.TIME_REVIEW_QUORUM }} # approves minus objects needed to land (default 1; #77) TIME_STUCK_HOURS: ${{ vars.TIME_STUCK_HOURS }} TIME_AUTOMERGE: ${{ vars.TIME_AUTOMERGE }} TIME_REQUIRE_CHECKS: ${{ vars.TIME_REQUIRE_CHECKS }} diff --git a/.github/workflows/housekeeping.yml b/.github/workflows/housekeeping.yml new file mode 100644 index 0000000..0598ad2 --- /dev/null +++ b/.github/workflows/housekeeping.yml @@ -0,0 +1,26 @@ +name: housekeeping +# The daily sweep (#83, .github/time/housekeeping.py): prunes merged branches, closes spent signal issues and empty +# milestones, lists the stale on the Astra log. Deterministic, no model calls; dry-run unless TIME_MODE=live. +# SOP: .agents/skills/housekeeping/SKILL.md +on: + schedule: + - cron: "17 13 * * *" # a few minutes after the Astra tick (13:13) + workflow_dispatch: +concurrency: + group: housekeeping + cancel-in-progress: false +jobs: + sweep: + runs-on: ubuntu-latest + timeout-minutes: 10 + steps: + - uses: actions/checkout@v5 + with: + sparse-checkout: .github/time + persist-credentials: false + - run: python3 .github/time/housekeeping.py + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + TIME_TOKEN: ${{ secrets.TIME_TOKEN }} # branch and issue writes go out as the `time` user + TIME_MODE: ${{ vars.TIME_MODE }} + TIME_VENTURE_MEASURE_DAYS: ${{ vars.TIME_VENTURE_MEASURE_DAYS }}