Skip to content
Back to skills

Dispatch Claim

ASecurity

Check a change to the scheduler's implement dispatch claim (coord.sh claims, dispatch(), refill dispatch, worker harvest and orphan recovery) against the TLA+ model and the real-code replay. Use when a diff touches the covered files listed below.

  • 4 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added November 28, 2026
ai-agentsgit

Security analysis

A100/100

Pro scans all 10 files and shows the line behind each finding

Scanned November 28, 2026

npx -y skills add ZenoWangzy/zenoforge --skill dispatch-claim --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Dispatch Claim?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Dispatch Claim
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/zenowangzy-dispatch-claim/badge)](https://www.skillsdirectory.com/skills/zenowangzy-dispatch-claim)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: verify-dispatch-claim
description: Check a change to the scheduler's implement dispatch claim (coord.sh claims, dispatch(), refill dispatch, worker harvest and orphan recovery) against the TLA+ model and the real-code replay. Use when a diff touches the covered files listed below.
---

# Verify the dispatch claim

Property: one ticket never has two implement units at once. Background, install and results: `README.md` in this directory.

## Covered files

- `engine/coord.sh`
- `engine/mac-autopilot/scheduler.d/dispatch.sh`
- `engine/mac-autopilot/scheduler.d/harvest-workers.sh` (`harvest_workers`, `recover_orphans`, `coord_scheduler_live_worker`)
- `engine/mac-autopilot/scheduler.d/dispatch-queue.sh` (`dispatch_pending`, refill flag)
- `engine/mac-autopilot/scheduler.sh` (`refill_tick`)

All of them sit under the `^engine/` control-surface rule in `engine/state/risk-paths.json` already; no separate entry is needed.

Sync commit: c6a585513b317c5aa0b5902bc145703486923316 (verify.test.sh and replay.test.sh matched the covered code there). `git diff c6a585513b31 -- <covered files>` shows what changed since.

## Steps

1. If the diff touches no covered file, stop: not affected.
2. Run `engine/formal/dispatch-claim/verify.test.sh` for the CI-safe real-code replay, then `engine/formal/dispatch-claim/verify-model.sh` for TLC plus replay. CI does not install TLC; the model command is for a local environment with TLC installed as described in the README.
3. Exit 0: the result equals the recorded expectations (this includes the open finding F1, `refill-pr-guard: LAUNCHED`). If the diff changed what the model describes (new check, new claim step, new requeue path) but results still match, update `DispatchClaim.tla` and `replay.test.sh` first, then re-run.
4. Exit 1: read the printed line.
   - `TLC ...: FAIL (expected PASS)` or a `REPLAY ... CHANGED` line where a guard went HELD to LAUNCHED: the code now breaks the property. That is a bug: report it with the replay output as the reproduction. Do not edit the expectations to make it pass.
   - A guard went LAUNCHED to HELD, or `refill-gap` became PASS: the code was fixed or hardened. Confirm with `VERIFY_TRACE=1` and the replay, then update `EXPECTED_TLC` in `verify-model.sh`, `EXPECTED_REPLAY` in both verification scripts, and the README table in the same change.
   - Replay prints `setup failed`: the stubs in `replay.test.sh` no longer match `dispatch()`; fix the replay.
5. Report one of: in sync (no relevant change, checks pass), updated (model/replay changed with the code, checks pass), bug (code violates the property), blocked (TLC missing or model cannot be synced).
6. Move the sync commit above to the commit you verified only after step 3 or 4 confirms the model describes that code.

Read each TLC counterexample with the vendored `statechart` skill (`pstack_skill_md statechart` in `engine/matt-skills.sh`); copy none of its commands here.

## Break check

Copy `coord.sh` and `mac-autopilot/scheduler.d/` to a scratch dir, remove the guard (for example prefix the `jqf -e --arg issue` condition in `dispatch.sh` with `false &&`), then run `FORMAL_AGENT_DIR=<scratch> verify.test.sh`. It must exit 1 with `slow-pr-guard: LAUNCHED`. Nothing is edited in the repo.

Files in this skill

  • DispatchClaim.tla4 KB
  • README.md4.6 KB
  • SKILL.md3.2 KB
  • fixed.cfg257 B
  • ledger-lag-1024.cfg257 B
  • no-claim.cfg243 B
  • refill-gap.cfg273 B
  • replay.test.sh4.5 KB
  • verify-model.sh2 KB
  • verify.test.sh747 B

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.