Skip to content

Releases

v0.8.0 — project orchestrator automation pattern

Choose a tag to compare

@shanemhamilton shanemhamilton released this 05 Jul 16:07

Added

  • P11 project night orchestrator. New git-backed suite setup now defaults to
    one lock-owning project coordinator that runs producer, integration, cleanup,
    and reflection lanes inside a single scheduled job. This addresses live-fleet
    contention where separate same-project jobs woke up inside each other's
    workspace-lock windows and produced blocked/noisy runs.
  • profile_project.py profile --classic-suite and
    lifecycle.py setup --classic-suite keep the prior separate P1-P10 job shape
    available for projects that intentionally want it.

Changed

  • profile_project.py now proposes P11 by default for git-backed projects and
    records capability-backed lanes inside the orchestrator params.
  • lifecycle.py add can still add individual classic patterns; explicit P11
    adds resolve through the orchestrated proposal path.
  • Fleet validation, materialization, docs, and lifecycle tests now recognize
    P11 as a first-class known template.

v0.7.6 — bug sweep across parsers, scanners, and detection

Choose a tag to compare

@shanemhamilton shanemhamilton released this 03 Jul 19:16

Patch release: nine correctness/clarity fixes surfaced by a multi-agent audit, plus behavior-preserving internal deduplication. No API changes. 393 self-tests pass (was 382) — the silent-corruption fixes ship with regression tests.

Fixed

  • discover_agents: a malformed Codex automation.toml now reports a distinct UNKNOWN (could not parse prompt) state instead of a false "NO protocol block".
  • approval_digest: excludes reserved non-job dirs (suites/) — a stray human-approval.md no longer surfaces as a phantom job.
  • run_ledger: the ao:counters block is parsed tolerant of field order/whitespace, so a reordered block no longer silently resets consecutive_failures/last_success (which would defeat the escalation stop-rule).
  • fleet_health: BLANK-LASTRUN is schema-aware — legacy records judged by raw (fixes a false positive on every legacy record); blank when on frontmatter/template now flagged.
  • profile_project: security-scanner evidence names the covered lockfile (e.g. cargo-audit on PATH (covers Cargo.lock)).
  • lifecycle: adopt errors clearly on a non-existent path-shaped --suite instead of reinterpreting a typo as a slug.
  • agent_materializers: the cursor (cloud-managed) apply note states that --apply performs no local write.
  • fleet_report: scan_fleet honors --home for non-~ automations roots (latent; no shipped adapter affected).
  • optimize_codex_automations: same-time collision warning formats job A's own minute (cosmetic).

Changed (internal, no behavior change)

  • profile_project reuses FINGERPRINT_FIELDS/compute_fingerprint from optimize_codex_automations instead of a hand-synced copy, removing a silent-drift risk on the approval fingerprint; minor dedup in lifecycle, fleet_health, agent_materializers.

Full changelog: https://github.com/shanemhamilton/nightshift/blob/v0.7.6/CHANGELOG.md

v0.7.5

Choose a tag to compare

@shanemhamilton shanemhamilton released this 03 Jul 18:14
5cee0e9

Fixed

  • run_ledger.py now treats lock/backpressure deferrals as neutral counter
    events instead of consecutive product failures. outcome=deferred and known
    lock/backpressure failure_class labels preserve consecutive_failures; true
    failures still increment and successes still reset. A new --counter override
    lets a job force success, failure, or neutral when the automatic mapping
    is not precise enough.
  • run_ledger.py no longer corrupts a blank last_success: counter by parsing
    the closing <!-- /ao:counters --> marker as the timestamp, and it repairs
    orphan closing markers left by older bad parses.
  • approval_digest.py --write now refreshes FLEET-REPORT.md when it can map
    the Codex home to <home>/.codex, so the written morning digest does not copy
    a stale fleet headline.
  • fleet_report.py now excludes the same neutral lock/backpressure events from
    blocked_ratio_7d and the blocked-rising flag, mirroring run_ledger.py's
    counter treatment. Previously a job that deferred often for routine
    concurrency reasons (shared workspace, colliding schedules) could still read
    as "blocked" or trip blocked-rising in FLEET-REPORT.md, even though the
    same event was already correctly neutral for its own escalation counter.

Full Changelog: v0.7.4...v0.7.5

v0.7.4 — trust a durable owner-pid; keep the lease authoritative

Choose a tag to compare

@shanemhamilton shanemhamilton released this 02 Jul 14:16
629bb2a

Fixes the lock-liveness model after a live-fleet incident. A job lock's recorded pid was run_lock.py's own transient CLI-subprocess pid, dead within milliseconds of acquire — so it read "dead" for every lock and was never a real liveness signal. That made "pid dead ⇒ owner crashed" a false positive, and reclaiming on it could take over a lock a still-running agent holds.

Fixed

  • run_lock.is_abandoned treats a trusted, same-host owner pid (via --owner-pid) as ground truth both ways — alive ⇒ never abandoned even past its lease; dead ⇒ abandoned immediately — and otherwise makes the lease authoritative. A dead untrusted pid on an unexpired lease is no longer abandoned, so reclaim/reap/acquire can never take over a live run's lock. Also fixes a pid-reuse false positive that could keep an expired-lease lock blocked indefinitely.

Added

  • acquire/reclaim accept --owner-pid <pid>; the owner records pid_trusted: true and a crashed run becomes reclaimable before its lease expires. token still derives from run_lock's own pid (unique per acquisition). Omit → lease governs (backward-compatible). Not wired into the managed block by default: a per-command $$ is not durable and would re-arm the bug; activation needs a long-lived owner pid.

Verification

All four suites green on Python 3.11 and 3.12: lifecycle 80, optimizer 48, state 184, digest 44 — 0 failed.

v0.7.3 — workspace-lock reclaim, reap, and health check

Choose a tag to compare

@shanemhamilton shanemhamilton released this 02 Jul 13:17
2ab2618

Fixes the workspace-lock leak found while auditing the overnight Codex fleet. Crashed/timed-out runs leaked per-workspace directory locks that nothing ever reclaimed; acquire never consulted the lease for workspace locks, so a dead owner's lock blocked every later run on that checkout until (and past) its 2h lease. This deferred several producers/integrators overnight.

Added

  • run_lock.py reap — removes provably-abandoned (dead pid and expired lease) workspace locks under <locks-root>/.workspace-locks/; never touches a live or unexpired-lease lock. Exit 0 always.
  • run_lock.py reclaim --workspace <ws> — a job-lock takeover also inherits named abandoned workspace locks, under the same dead-pid-and-expired-lease + read-back-confirm invariant.
  • fleet_health.py WORKSPACE-LOCK-STALE check — scans each agent's .workspace-locks/ and reports (and exits nonzero on) abandoned locks; adds workspace_locks + stale_workspace_locks to the result.

Fixed

  • run_lock.py acquire transparently reclaims a contended workspace lock only when its holder is provably abandoned (dead pid and expired lease), with read-back confirmation; a live/unexpired workspace lock still DEFERS. Job-lock semantics unchanged. Job- and workspace-lock reclaim unified behind one read-back-confirmed helper.

Verification

All four selftest suites green on Python 3.11 and 3.12: lifecycle 80, optimizer 48, state 170, digest 44 — 0 failed. Dogfooded live: reap removed the 8 abandoned locks on the fleet, correctly leaving a dead-pid-but-unexpired-lease lock to age out.

v0.7.2 — post-rollout follow-ups

Choose a tag to compare

@shanemhamilton shanemhamilton released this 02 Jul 03:33
3916250

Patch release fixing three defects surfaced on the live fleet after the v0.7.x rollout.

Fixed

  • run_lock.parse_owner reads the legacy owner formats still on the fleet. Tolerates both key: value (v5) and key=value (legacy) on read, splitting each line on the first separator only (ISO timestamps stay intact), and normalizes variant field names (run_token→token, started_at→start). Writes remain v5-only. This makes LOCK-EXPIRED detection accurate for exactly the legacy locks it most needs to catch — previously they read as abandoned/OVERDUE. The reclaim safety invariant is unchanged: a lock is only reclaimed when its recorded PID is dead and its lease has expired, with read-back confirmation.
  • fleet_health.py and fleet_report.py no longer count reserved non-job directories as phantom jobs. Both skip dot-prefixed dirs (.archive, .disabled, .workspace-locks, .git) and the reserved suites/ name, and only treat a directory as a job when it contains the adapter's job file (codex → automation.toml, claude → SKILL.md, gemini → prompt.md).
  • lifecycle.py adopt wires a producer's hands_off_to to the target suite's integrator (parity with add) before validation, so adopting a producer no longer fails fleet rule 3 ("producer missing 'hands_off_to'") without a hand-edit.

Verification

All four selftest suites green on Python 3.11 and 3.12: lifecycle 80, optimizer 48, state 149, digest 44 — 0 failed.

v0.7.1 — skill dir name portability fix

Choose a tag to compare

@shanemhamilton shanemhamilton released this 02 Jul 01:45
151752f

Fixed

  • discover_agents.py and the install selftest hardcoded the installed skill
    directory name as automation-optimizer; it is actually the source folder name
    (nightshift when the public repo is cloned). Discovery now derives SKILL_NAME
    from the repo root, so a correctly-installed skill is no longer reported as
    (not installed) on a nightshift clone, and CI passes.

v0.7.0 — fleet hardening

Choose a tag to compare

@shanemhamilton shanemhamilton released this 02 Jul 01:41
0ab2b0c

Fleet-hardening release driven by a deep audit of the live overnight fleet. The managed
protocol advances to v5 and is now backed by deterministic helper scripts instead of
prose the model must re-derive each run, the upgrade path preserves hand-customized blocks,
the human-decision loop closes end to end, and multiple projects are governed as one fleet.

Added

  • Deterministic state tooling. run_lock.py (atomic job + workspace locks with a
    fixed owner format and safe reclaim), run_ledger.py (open/close verbs writing
    last-run.md + per-unit runs/ entries, a machine-owned <!-- ao:counters --> block in
    memory, and ESCALATE/exit 3 at the consecutive-failure threshold), state_schema.py
    (canonical ----frontmatter for run files plus a lenient parser that also reads the legacy
    bullet and freeform shapes on the fleet), fingerprint.py (repo/command change detection),
    and fleet_health.py (read-only scan for expired locks, overdue/empty/blank/oversized jobs).
  • Protocol v5. The managed block wires start-of-run locking to run_lock.py, the
    change-detection gate to fingerprint.py, and closeout to run_ledger.py; adds a
    Blocked-worktree recovery section (repeatedly-blocked producers work in an isolated
    git worktree, never touching the user's checkout), a lease-aware continuation-loop stop
    rule, target selection from a per-project PROJECT-QUEUE.md, and start-of-run readback of
    decisions propagated from the daily approval digest. Every released block is preserved in
    BLOCK_HISTORY.
  • Human-decision loop. The approval digest gains stable per-item ids + - [ ] approve
    checkboxes and a resolve verb that applies checked/decided items back to the source queue
    (## Resolved) and the job's memory (## Stable decisions), refusing any item whose source
    changed since the digest was generated. Queue aging (⚠ AGED), a tightened safe bucket with
    an always-needs-judgment deny regex, and --emit-launchd/--emit-cron delivery artifacts.
  • Fleet governance. Per-project suites under automations/suites/<slug>.toml; whole-fleet
    --fleet validation with cross-suite checks (one active merge authority per workspace;
    same-workspace same-time collision warning); [suite].night_start_hour for midnight-spanning
    phase order; lifecycle.py adopt to bring hand-written jobs under a manifest without
    rewriting their prompt; per-job agent records; fleet_report.py 7/30-day rollups.
  • PROJECT-QUEUE.md scaffolding (objectives + open threads), INSTALL-INFO.json install
    stamps with drift reporting, per-pattern model/reasoning-effort hints (never Haiku), and a
    CI workflow running all four selftest suites on Python 3.11 and 3.12.

Changed

  • Upgrades are customization-preserving: status_of reports customized-block (checked
    before needs-upgrade) and apply refuses to strip a hand-modified block unless
    --migrate-custom folds the extracted rules into the task body. Customization detection is
    path-insensitive (state-file paths never read as customization).

Fixed

  • Block integrity: malformed-block (missing END / version outside span), duplicate-block,
    and newer-than-helper are detected; apply never prepends a second block.
  • Gemini jobs are no longer reported as ORPHAN (per-adapter job_file).
  • The digest resolves a job's project from the suite manifests, not the first hyphen segment.
  • cron_to_rrule handles day-of-month and warns on unsupported cron syntax instead of
    silently degrading to daily; security_scanner detection requires the audit tool on PATH
    for non-npm ecosystems.

v0.5.0 — Hardening: atomic lock, scope-gated merges, P9 digest

Choose a tag to compare

@shanemhamilton shanemhamilton released this 29 Jun 17:43
04b1607

Hardening pass driven by an overnight fleet audit (lock collisions, schedule drift, near-zero merges to main, scattered approvals).

Changed (managed protocol v3 → v4)

  • Atomic lock acquisition. Start-of-run lock goes from check-then-replace (which let two same-minute runs each declare the other "stale" and run in parallel) to acquire-or-defer: fail-if-exists create (mkdir/O_EXCL/noclobber), run token + PID + lease_until, defer when held, reclaim only a provably-dead+expired lock with a read-back ownership check.
  • Scope-gated safe-merge lane. Auto-merge only within the producer's write_scope with green gates and no production/secret/migration/deploy/CI/auth/billing/external surface. Agent tool metadata (.serena/, .beads/issues.jsonl) no longer counts as a dirty-worktree blocker; screenshot proof only for user-visible UI changes.
  • Schedule de-clustering (generator). Deterministic per-job minute staggering so same-repo jobs never share a trigger minute; phase hours preserved.

Added

  • P9 — cross-project approval digest (fleet-global). scripts/approval_digest.py reads every automation's human-approval.md (read-only), dedupes, ranks by age, filters self-resolved notes, and buckets items into "safe to batch-approve" vs "needs judgment", writing one ~/.codex/DAILY-APPROVALS.md. Optional local macOS notification; external email/Slack off unless configured + opted in.
  • Structured approval-queue items (risk/suggested_default/action/first_seen/evidence).

Verification

Self-test 24/24; live fleet 18 jobs upgraded v2→v4 with --strict PASS 19/19; atomic-lock race test (1 acquirer/round); digest dry-run across 4 projects.

v0.3.0 — Automation lifecycle modes

Choose a tag to compare

@shanemhamilton shanemhamilton released this 29 Jun 01:58
1ddc9d2

Manage a single automation across its whole life — on Codex, Claude, Gemini, or Cursor — with four new verbs in scripts/lifecycle.py. Every verb runs one pipeline: mutate suite.toml → validate the fleet → gate on approval → materialize per agent. Default is a dry run; --apply is the confirmation.

Added

  • setup — profile a project and stand up its whole suite (propose → confirm → install).
  • add — add one pattern (P1..P8) to an existing suite, capability-checked and fleet-validated.
  • remove — retire a job: disable by default (reversible); --purge archives sidecar state then deletes. Refuses to orphan the fleet.
  • update — change schedule / params / scope / mode / model; a safety-relevant change re-enters the approval gate.
  • All four agents executable via scripts/agent_materializers.py: native_file (Codex, Claude) writes registry files; external_cron (Gemini) and cloud_api (Cursor) emit config and never edit cron or touch the cloud.
  • Cross-agent merge-authority guard — exactly one active integrator even across agents; others run in shadow.
  • scripts/pattern_bodies.py (P1..P8 prose as shared data) and scripts/selftest_lifecycle.py (23 end-to-end checks).

Changed

  • scaffold_suite.py imports its template bodies from the shared module; output is byte-identical to v0.2.0 (verified by diff).

Full changelog: CHANGELOG.md