GeezerVison is showing github.com — impl: fleet content-creation throttle — shared ledger, pacing budgets, and verify-by-read filing · Issue #2227 · developing-today/code
impl: fleet content-creation throttle — shared ledger, pacing budgets, and verify-by-read filing #2227DescriptionImplementation for the design in #2013 — design record: doc/2026-10-29T10-08-00Z_design_github-content-creation-pacing/ (PR #2226).
Problem
Every fleet lane authenticates as one account, so GitHub's content-creation ceiling (documented: ~80/min, 500/hour) is a single shared budget no job can see. On 2026-10-28 developing-today/code alone produced 2 916 content-creating events (479 issues/PRs + 2 437 comments), peaking at 511 in the 22:00Z hour; creation then stopped for 31m48s after #1999. gh issue create exited 0 with empty output while creating nothing, so no caller noticed.
Scope
Code lands with the fleet tooling (~/hatch/tools, repo-queue.py, producer/filing scripts), not in this repository. This issue is the tracking record and the spec pointer.
- Creation ledger —
~/.local/state/fleet/content-ledger.sqlite, one row per content-creating call (ts_utc, actor, job, repo, kind, ref, outcome), written as a reservation before the call and finalised after the verifying read; windows computed from the ledger (60 s, 3 600 s), atomic across processes via BEGIN IMMEDIATE.
- Throttle wrapper —
reserve(job, kind) before every create. Account-wide 45/min and 300/hour; ≥ 1 s between POSTs; ≤ 8 in flight; per-lane 50/hour sustained with idle share reclaimable; 75/hour reserve for priority-10 breakage work; bulk programs ≤ 20 issues per 30-minute window.
- Verify-by-read — success only when a read confirms the object: require non-empty stdout with a number/URL, else search for the
<!-- fleet-nonce:… --> marker in the body; record created | verified_existing | failed. Empty output is a failure, never a success.
- Circuit breaker — honour
retry-after; without it wait 60 s then exponential ×2 (5 attempts); after 5 failures stop content creation for 15 minutes, park the calling task with a resume brief, alert. Never spin (GitHub warns retrying while limited can ban the integration).
- Structural reduction — one live agent note per task, edited in place, instead of one comment per checkpoint (comments are 5× the issue volume). Target ≤ 2 comments per task.
- Gap detector — alert when queued filing work exists and no creation is seen for > 5 minutes (belongs in the fleet monitor).
Acceptance
- A filing script run through the wrapper cannot exceed the throttle budgets, proven by a test that replays a 100-create batch and asserts the ledger shape.
- A simulated empty-output/403 create is recorded as
failed, and the batch tally does not count it — regression test for the 2026-10-28 silent failure.
- A simulated 403 with
retry-after and one without both back off per the rules, and five failures open the circuit.
- Warn-only run for one week: the throttle logs what it would have delayed without delaying, and the log is reviewed before enforcing.
- Success measure after enforcement: no creation 403 for 14 days, account-wide hourly total under 300, and queue throughput unchanged.
Order
Ledger + verify-by-read first (additive, fixes the silent-success bug), then the throttle in warn-only mode, then enforcing, then the comment-reduction change in the note-writing path.
Out of scope
- The 42-issue program's partial filing (unknown whether items were lost; the ledger makes it answerable next time).
- Multi-host coordination (open question in the design if a sandbox lane ever files).
Acceptance criteria
- The creation ledger exists at the design's path and records every fleet content-creating call (issues, PRs, comments) with actor/job/repo/kind/ref/outcome, written as a reservation before the call.
- Pacing budgets from the design (investigate: GitHub secondary rate limits — fleet content-creation pacing so filing bursts stop blocking the account #2013) are enforced at the shared choke point(s): a caller that would exceed the budget is delayed or visibly refused — never silently dropped — and the
gh issue create exits-0-but-creates-nothing failure mode is detected and surfaced to the caller.
- A verify-by-read pass demonstrates the ledger's counts against GitHub's actual creation events for one busy hour (the 2026-10-28 22:00Z peak hour, 511 events, is the natural test case).
Activitydeveloping-today commented on Oct 29, 2026 dezren39 commented on Oct 29, 2026 Intake review
- Fleet monitor intake (repo-fleet-monitor, 2026-10-29 05:12 CDT run): this implementation issue (for design investigate: GitHub secondary rate limits — fleet content-creation pacing so filing bursts stop blocking the account #2013, record PR doc: fleet content-creation pacing — measured rates, the 2026-10-28 block, and a shared throttle (#2013) #2226) had kind/status/priority but no effort class and no acceptance-criteria section; AC appended,
effort/l and meta/enriched added.
- Still live? Yes — filed 2026-10-29T10:08Z; the design record landed as PR doc: fleet content-creation pacing — measured rates, the 2026-10-28 block, and a shared throttle (#2013) #2226 and this is its implementation tracker.
- Related: investigate: GitHub secondary rate limits — fleet content-creation pacing so filing bursts stop blocking the account #2013 (design), PR doc: fleet content-creation pacing — measured rates, the 2026-10-28 block, and a shared throttle (#2013) #2226 (design record), id(repl): find selection prompt silently drops unparseable numbers — a typo changes which blobs are fetched, and duplicates fetch twice #1999 (the incident hour where creation silently stopped), Implement repo-fleet-monitor snapshot/SQL-first fetch (digest-judged runs, ≤3M input/run) #2154/Slim repo-fleet-monitor: snapshot/SQL-first state fetch + 2h cadence (target ≤3M/run) #2134 (fleet-monitor token slimming — a sibling fleet-tooling consumer of the same choke points).
- Risks: the ledger is a shared write path for every lane — its failure must never block filing entirely; the design's reservation-before-call ordering is the part to get right.
- Suggested approach: land the ledger in observe-only mode first (record, don't enforce) for one day of counts, then turn on pacing with the observed peaks as the budget baseline.
developing-today commented on Nov 3, 2026 agent-note:v1
state: reviewed (coverage loop-back)
Coverage pass 2026-11-03, loop-back review: this issue was re-reviewed (drift / overlap / already-handled / stale / blockers / ordering) so every open issue in the four repos is reviewed and in the system. Verdict: still live; in the system as task 7310 (triage, queued, priority 50) in repo-health-code-pilot. Labels audited and synced. If it is already handled at current main, its triage closes it with evidence; if oversized, the triage files the split; blockers belong on this issue.
Found via: coverage loop-back 2026-11-03 dezren39 commented on Nov 3, 2026 agent-note:v1
state: picked-up
task: 7310
worker: repo-worker-code
lane: 335a5d1f-bfc1-4831-99ea-850c8939a727
origin: openchamber-scheduled-lane
next: Revalidate current state of issue #2227 and inspect the implementation on current main before deciding whether it is done, blocked, needs a split, or needs implementation. developing-today-fleet commented on Nov 27, 2026
Agent note — second-pass slice check (lane code-f, 2026-11-27): no code-repo slice; fresh warn-week evidence for the hatch#13 review
- Verdict: no PR from this lane. Per this issue's Scope section the code lands in dezren39/hatch, and all of it has landed there: hatch PR Update Rust crate console to 0.15.7 #17 (ledger + verify-by-read, hatch#3 CLOSED) and hatch PR #18 (throttle warn-only, circuit breaker live, gh-post note, gap-check CLI) are both merged. What remains is calendar-gated (warn-week review ~2026-11-30, enforce flip is a hatch stored-mode change, 14-day success measure after that) plus the two review decisions already parked on hatch#13. A competing developing-today/code implementation PR would violate the issue's own scope — not opened.
- Criterion states vs evidence (fresh, this laptop seat):
- Ledger at the design path: CHECKED —
~/.local/state/fleet/content-ledger.sqlite holds 2,990 rows (2,956 created / 34 failed), 2,259 today; schema carries ts_utc, actor, job, repo, kind, ref, outcome (+nonce, detail).
- "Records every fleet call": OPEN with a known gap — only 32 warn-gate observations in ~12h against 2,259 ledger rows today, so most creations still bypass the throttle gate (the fleet-gh/ad-hoc-gh coverage caveat from the 2026-11-24 note stands).
- Pacing budgets enforced: UNCHECKED pending calendar — throttle state reads mode=warn, warn_since=2026-11-23T18:18:43Z, consecutive_failures=0, circuit closed. Warn log is live on laptop traffic: 32 lines, would-be delays up to 2,479s, binding constraints lane_hour (30) and account_hour_reserve (2) — this settles the 2026-11-24 review question for laptop gh-post traffic (representative traffic IS observed), while the bypass-coverage question above remains for the review.
- Pre-enforcement baseline (measured): peak hour 2026-11-26T23Z = 496 ledgered events, above the 300/h account budget — enforcement will bind on real traffic shapes, not just in theory.
- Peak-hour verify-by-read reconciliation (2026-10-28 22:00Z, 511 events): still without an evidence record — close or waive explicitly at the review, as parked.
- Next: the warn-week review on Fleet content-creation throttle: remaining phases — throttle wrapper (warn-only then enforce), circuit breaker, comment reduction, gap detector (from code#2227) dezren39/hatch#13 (~2026-11-30): confirm bypass coverage scope, rule on the peak-hour reconciliation, then flip enforce. Nothing for a developing-today/code packet until the success measure resolves.
developing-today-fleet commented on Nov 27, 2026
Progress (part of #2227, not closing): PR #16347 is open for the next ledger slice.
`fleet gh api --method POST ` now reserves/finalises a shared content-ledger row under kind `other` (the hatch reference `KINDS` catch-all, byte-identical — verified firsthand in `pkgs/gh-fleet/content-ledger/content_ledger.py:73`), fail-closed like the other seven shapes. Repo comes from `repos/{owner}/{repo}/...` endpoints with `-R`/`--repo` fallback. GET reads and PUT/PATCH/DELETE stay unledgered.
Verification: `cargo test -p fleet --bin fleet -- gh_content_ledger create_reserves_before_gh` — 7 passed / 0 failed, run on the laptop at `accef34751c`; no new warnings, rustfmt clean. In-file oracles only, so no test-suite-registry change.
Still unledgered: non-POST `api`, non-comment `pr review` shapes, `label_write`. Pacing budgets / circuit breaker / verify-by-search stay with hatch#13. After #16347 merges, the next landable code-repo slice is the non-comment `pr review` shapes or PUT/PATCH-class `api` in the same file. developing-today-fleet commented on Nov 28, 2026 agent-note:v1
state: in-progress (slice landed as PR)
task: lane oc-code-01 priority-rung claim
lane: oc-code-01
slice: PR #16379 — fleet gh now ledgers every non-interactive pr review submit shape (--comment/--approve/--request-changes plus -c/-a/-r) as kind review; bare pr review stays unledgered (interactive-only, files nothing).
evidence: cargo test --bin fleet -- gh_content_ledger — 6 passed / 0 failed; create_reserves_before_gh e2e — 1 passed; rustfmt clean, no new warnings. Previously classify() returned None for --approve/--request-changes (old tests asserted is_none); new asserts would fail on old code.
remaining: non-POST api passes through; pacing budgets / circuit breaker / verify-by-search stay with hatch#13 per the design order. #2227 stays open. developing-today-fleet commented on Nov 28, 2026
Triage re-verification — #2227 (task 25386, lane any-n)
Verdict: keep open, park. Code-repo ledger work is now fully delivered; the remainder is hatch-side and calendar-gated. No small fix is appropriate for this packet.
Verified this pass (2026-11-28):
Resume: recheck hatch#13 enforce flip after 2026-11-30; no code-repo slice to start (one-writer rule, nothing unowned left). developing-today-fleet commented on Nov 28, 2026
Agent note — #2227 re-verified from lane code-g (priority rung), no code-repo slice exists
Fresh first-hand verification this run (2026-11-28 ~02:15Z), per feature-slice step 1 (states checked against origin/main + live fleet state, not prior notes):
- AC1 — creation ledger at the design path: SATISFIED EXTERNALLY, nothing to land here.
~/.local/state/fleet/content-ledger.sqlite exists with table events(ts_utc, actor, job, repo, kind, ref, outcome, nonce, detail); 3,266 rows, span 2026-11-24T01:58Z to 2026-11-28T02:13Z (minutes old), outcomes created 3,231 / failed 35. Delivered by merged content-ledger: shared creation ledger + verify-by-read filing (hatch#3) dezren39/hatch#17 (hatch#3 COMPLETED 2026-11-23). No ledger/throttle/verify-by-read code exists in developing-today/code outside the design doc itself (doc/2026-10-29T10-08-00Z_design_github-content-creation-pacing/) — confirmed by repo-wide grep.
- AC2 — pacing budgets enforced: IN PROGRESS EXTERNALLY. content-throttle: pacing wrapper (warn-only), circuit breaker, gap detector; gh-post gate + live note (hatch#13) dezren39/hatch#18 merged (throttle wrapper, circuit breaker live, one-live-note, gap detector); throttle in WARN mode since 2026-11-23T01:12Z, enforce flip pending the warn-week review (~2026-11-30). Tracked in hatch#13 (OPEN rollout record).
- AC3 — verify-by-read pass vs GitHub actuals for a busy hour: OPEN, owned by the hatch rollout. The 2026-11-24 review note already flags it: reconcile-or-waive explicitly at the warn-week review. (The ledger post-dates the 2026-10-28 peak, so this must be a recent-hour reconciliation, with the known fleet-gh/gh-shim bypass caveat.)
- Scope stands: this issue's own Scope section puts all code in hatch tooling, not this repo. Four prior independent triages (tasks 15217/16746/18210/19724) reached the same verdict; the hatch delivery since confirms it rather than reopening it.
Verdict: no landable code-repo slice — no PR from this lane (a competing throttle/ledger here would violate the routed design). Next slice, in its home repo: warn-week review on hatch#13 (~2026-11-30), then the enforce flip; fold the AC3 reconcile-or-waive into that review. After the flip, the post-enforcement success measure (no creation 403 for 14 days, hourly under 300) becomes measurable. developing-today-fleet commented on Nov 28, 2026
Agent note — lane 2137-K stand-down (alpha DRIVE 2026-11-27 21:37 CST, priority-rung draw): no landable slice; concurring with the 02:15Z code-g verification, re-checked fresh this run.
fleet agent next rungs this draw: push empty, queue empty (no task claimable), shortlist empty — impl: fleet content-creation throttle — shared ledger, pacing budgets, and verify-by-read filing #2227 served on the priority rung only; no queue task exists for this lane to complete/park.
- Fresh checks (2026-11-28 ~03:45Z, gh CLI): impl: fleet content-creation throttle — shared ledger, pacing budgets, and verify-by-read filing #2227 OPEN, 60 comments, labels unchanged (priority/high, effort/l, no held/user/* labels).
- The last open code-repo slices named in the 01:00Z notes have since landed: PR feat(fleet-gh): ledger POST-class api calls (#2227 slice) #16347 MERGED 2026-11-27T23:44Z and PR feat(fleet-gh): ledger all pr review submit shapes (#2227 slice) #16379 MERGED 2026-11-28T01:39Z (
gh pr view, both reads this run).
- Routing stands: Fleet tooling: add shared content ledger and verify-by-read dezren39/hatch#3 CLOSED (phase 1 delivered), Fleet content-creation throttle: remaining phases — throttle wrapper (warn-only then enforce), circuit breaker, comment reduction, gap detector (from code#2227) dezren39/hatch#13 OPEN — remainder is the warn-week review / enforce flip (~2026-11-30) plus the AC3 reconcile-or-waive owned by that rollout, per the comprehensive verification at impl: fleet content-creation throttle — shared ledger, pacing budgets, and verify-by-read filing #2227 (comment)
Verdict: tracking record / spec pointer whose work is shipped or routed — no PR from this lane, no duplicate implementation. Wake: hatch#13 warn-week review ~2026-11-30. developing-today-fleet commented on Nov 28, 2026 🤖 Agent note — lane oc-code-05 stand-down (priority rung, 2026-11-28 ~04:10Z): no landable slice; concurring with code-g / 2137-K, re-verified fresh.
- impl: fleet content-creation throttle — shared ledger, pacing budgets, and verify-by-read filing #2227 OPEN, labels unchanged, no hold labels. Served on the priority rung only — no queue task exists, no claim held.
- Firsthand (gh API + origin/main file read this run): PRs feat(fleet-gh): ledger POST-class api calls (#2227 slice) #16347 and feat(fleet-gh): ledger all pr review submit shapes (#2227 slice) #16379 both MERGED; no open PR references impl: fleet content-creation throttle — shared ledger, pacing budgets, and verify-by-read filing #2227.
classify() in gh_content_ledger.rs covers all 8 shapes (issue/pr create, issue/pr comment, review-submit, release, gist, POST-class api→other). Residual gaps (bare interactive pr review, GET/PUT/PATCH/DELETE, label writes) are intentionally excluded or hatch-side per the design.
- Fleet content-creation throttle: remaining phases — throttle wrapper (warn-only then enforce), circuit breaker, comment reduction, gap detector (from code#2227) dezren39/hatch#13 still OPEN — remainder is the warn-week review / enforce flip (~2026-11-30), calendar-gated, not actionable today.
- Per the issue's own Scope (code lands in hatch, not this repo): no competing implementation PR opened. Verdict: no edits, no PR. Next lane: recheck hatch#13 after 2026-11-30.
developing-today-fleet commented on Nov 28, 2026 🤖 Agent note · slice landed for review — lane oc-code-04 (OpenChamber scheduled lane, priority rung)
- PR: fleet-monitor: report-only content-creation gap adapter (#2227 item 6) #16510 — report-only content-creation gap adapter (spec item 6) in
pm-stack/fleet-monitor/: runs the throttle's gap-check on the monitor cycle, exit 2 becomes an alert record, detector failures exit non-zero and never fake a clear record. 9-test golden-corpus suite + pm-stack-tests wiring.
- Evidence: red state shown (suite fails with module absent), green (9 OK), live run against the laptop throttle returns a clear record (exit 0); existing monitor suites still pass (6 + 20 OK). CI evidence pending nightly pm-stack-tests.
- State re-verified this run: hatch#3 CLOSED (ledger live at
~/.local/state/fleet/content-ledger.sqlite), throttle in warn mode since 2026-11-23T18:18:43Z (warn week not yet elapsed — enforce flip correctly not taken), hatch#13 still OPEN for the remaining phases. Gap-detector CLI was the unwired piece on the code-repo side; this slice wires it.
- Next slice: warn-week review + enforce flip (hatch-side, due after 2026-11-30), or a hatch#13 phase if the warn log review lands first.
developing-today-fleet commented on Nov 28, 2026
Agent note — lane 0937-D stand-down (alpha DRIVE 2026-11-28, shortlist rank 3 draw; queue rung down this draw, no queue task): no landable slice, re-verified fresh.
- impl: fleet content-creation throttle — shared ledger, pacing budgets, and verify-by-read filing #2227 OPEN, labels unchanged (priority/high, effort/l, epic/fleet-orchestration), no held/user/* label. All 63 comments read.
- The newest slice already landed: PR fleet-monitor: report-only content-creation gap adapter (#2227 item 6) #16510 (spec item 6, fleet-monitor gap adapter) is MERGED 2026-11-28T08:12:32Z, merge commit 9661d06 — verified firsthand this run. Search confirms zero open PRs reference impl: fleet content-creation throttle — shared ledger, pacing budgets, and verify-by-read filing #2227.
- Code-repo ledger slices are all merged per today's earlier verified notes (oc-code-05 04:11Z, code-g 02:15Z); the remainder is hatch-side and calendar-gated: the warn-only week began ~2026-11-23T01:12Z, so the warn-week review + enforce flip (hatch#13) cannot start before ~2026-11-30 and does not live in this repo.
No claim, no PR, no duplicate slice from this lane. Wake: warn-week review on hatch#13 after ~2026-11-30.
MetadataMetadataDevelopmentNo branches or pull requestsIssue actions
|