Repository navigation
Closed
Description
Why
Two seat accounts were restricted by the platform on 2026-09-21. The measured shape, read from the platform's own headers:
- the token the seats wrote with was user-to-server —
GET /useranswered a login,X-OAuth-Scopesempty,X-RateLimit-Limit: 15000, an expiry header present — so every write was booked against a person; X-RateLimit-Remainingstayed at 15000/15000 the whole time: quota was not the trigger. The trigger was rate shape: 17 issues created in 29 s (a 1.2 s gap, each process sleeping its own), after which the account was restricted for the window 08:16–08:52 UTC, and every later push by it got nogithub-actionscheck-suite while sibling PRs dispatched normally;- the platform names "rapid content creation" and "bursts" as secondary-limit triggers and asks for ≥ 1.5 s between content-creating writes.
Two conclusions, and this card is both of them made mechanical:
- Writes must leave the personal identity — a server-to-server installation token of the
ObjectStack FleetApp, whose actor isobjectstack-fleet[bot]with nobody behind it. - The gate must be enforced across processes — the fleet's subagents each run in their own worktree, so a per-process pause is not a gate.
scripts/pm/write-pace.mjsalready paces per process (mkdir lock, 3 s gap, 40/hour, stop markers); it needs a fleet-wide lease and a batch mode.
Deliverables
scripts/pm/fleet-token.mjs— mints the installation token with an RS256 JWT built on nodecrypto(no dependency):iat = now − 60,exp = now + 600,iss = OS_FLEET_APP_ID;POST /app/installations/{id}/access_tokens; cache at mode 0600, refreshed 5 min early, minting serialised through the write lease and re-checked after the wait;--export/--print/--status/--refresh; PEM, PEM-with-literal-\nand base64 forms ofOS_FLEET_PRIVATE_KEYdetected; every log line, status line, error and stack redacted (--self-testfeeds a known token and key through every path and greps them all); an importablegetFleetToken().scripts/pm/write-pace.mjs— rule ④ (the lease: one write in flight fleet-wide, FIFO tickets, dead-holder reaping, a bounded wait that refuses loudly) and rule ⑤ (batch mode: N ≥ 5 raises the gap to 30 s for the next N writes, announced with the count and the estimate, fleet-wide through the shared log);--runfor shell callers,--announce-batch N; the self-test measures the lease and the batch gap on REAL child processes by their timestamps.scripts/pm/issue-create.mjs— the one door a new card leaves through: prose from files never argv, one POST behind both halves of the throttle, read-back, exit-code ladder.scripts/pm/with-fleet.sh+scripts/pm/fleet-git-credential.sh— mint → export (GITHUB_TOKEN/GH_TOKEN, so the 15 existingprocess.env.GITHUB_TOKEN ?? process.env.GH_TOKENcall sites change by zero lines) → git identity (committer = bot by its user id; author = bot, or a real login viaOS_FLEET_GIT_AUTHOR_LOGIN) → git credential throughGIT_CONFIG_*env pairs (nothing on disk,git remote -vunchanged) → run the command behind the gate.AGENTS.md— the rule: every GitHub write leaves throughscripts/pm/, as the fleet identity, behind the gate; never a barecurl/fetch/gh api -X POST|PATCH|PUT|DELETEwrite.
Deviations from the brief, stated rather than hidden
- The gate extends
write-pace.mjsinstead of adding a second lock besideos-verify-lock.sh: that script's primitive isflock, which macOS does not ship (it runs unlocked there by ruling), and write-pace's mkdir lock is the landed cross-process primitive on the write path. The ticket-queue shape ofos-verify-lock.shis mirrored, not its primitive. - A 403/429 is rule ③ (a 30-minute stop marker, or the
retry-afterwhen longer), not an exponential-backoff retry: the 2/4/8/16 s convention is for a dropped transport, and a secondary-limit refusal retried after 16 s inside one process is the per-process pacing that produced the burst. - The token cache lives beside the throttle's log (
~/.cache/objectstack-pm/), not in a per-session scratchpad: N sessions minting N tokens at once is the concurrency the lock exists to prevent. - The bot's noreply address uses the bot USER id (
332303061), not the App id; the minter resolves it.
Online acceptance (needs the injected OS_FLEET_* — in the report)
Metadata
Metadata
Assignees
Labels
No labels
Activity
hotlong commentedon Sep 22, 2026
Claim: session_local_fce2b4bd-ec0d-4e1c-8395-224cd17995e6 · branch
claude/issue-19641-fleet-bot-identity-write-gate· claimed 2026-09-22T03:24ZOwner of this card for the duration of the PR; the branch name above carries the card number once it is known.
Generated by Claude Code
hotlong commentedon Sep 22, 2026
Ruling record —
AGENTS.mdline ceiling 1109 → 1116Asked in the maintainer's desktop session at 2026-09-22T04:54Z: the write-gate rule this card adds to
AGENTS.mdcosts six lines over a ceiling standing at headroom 0. Option A proposed raising the ceiling to 1116 with the ruling quoted in the PR; option B proposed compressing seven lines of other rules instead. The maintainer's answer, verbatim and untranslated:The proposal it accepted, verbatim: 「A(推荐):你给一句裁决,我原文引进 PR 正文,并把
scripts/pm/check-skill-line-ratchet.mjs里['AGENTS.md', 1109]改成1116。」Cited from the raising PR's body and from the
CEILINGScomment inscripts/pm/check-skill-line-ratchet.mjs.Generated by Claude Code
feat(pm): fleet GitHub writes act as objectstack-fleet[bot] behind on…