Individual skill

science-agent-scheduling

Use when a campaign is running and work must be dispatched, retried or throttled — when a shard sits in running with no heartbeat, when a lease expired and the result was duplicated, when retries storm the source APIs, when budget or concurrency must be cut mid-campaign, or when someone wants to fix a stuck task by editing state directly.

dsh-science/skills/science/science-agent-scheduling/SKILL.md

Read pinned source

Source commit 088b0228df4fbb613d00d70823a325677f4970c2

What was checked

Matches the observed repository HEAD
Yes
Scanner rules are current
No
Repository scan complete
No
Skill scan complete
No
Observed behavior
Not checked yet
Last checked
Nov 5, 2026

These are observations at the recorded commit, not a guarantee of safety. Review the source before running it.

Install this skill

Choose an agent in your Stack or copy a command below. Commands fetch the pinned commit and copy only this skill directory. Existing destinations are refused. Copying a command does not install anything.

An install command is unavailable: current rules, complete repository and skill scans, an eligible behavior level and a permitted license are required.

Repository context

Repository stars (not skill ratings)
969
Repository last updated
Oct 25, 2026
License
MIT

Observed agent integration: No specific integration evidence. Standard SKILL.md installation does not imply verified compatibility.

Files and excerpt

File metadata and permitted, redacted excerpts come from the recorded scan. Source links are pinned to that commit.

Browse files
Read excerpt

# 任务调度:租约、幂等与背压

## 一条总原则

**调度器是唯一能改状态的人。** 模型、脚本、人都不直接写 task 状态;
所有状态变化只由 `science_campaign_run` 的动作(claim / heartbeat / complete / fail /
release)产生。手工改 state 会让事件流与状态表对不上,之后每一次重跑都不可信。

## 租约(lease)

- 领取任务即获得租约,`leaseMs` 默认 120000(2 分钟)。
- 租约不是所有权,是**临时独占**;到期未续,任务自动回到 pending,任何人可再领。
- 领取前必须写 `owner`、`leaseUntil`、`attempt`。三项缺一,这次领取无效。
- 续租用 `heartbeat`,间隔取 `leaseMs/3`(约 40 秒)。不要等到快到期才续。
Back to top