diff --git a/docs/pr-discussions/PR-3950-backlog-b-0570-scarcity-tracker-for-shared-limited-resources.md b/docs/pr-discussions/PR-3950-backlog-b-0570-scarcity-tracker-for-shared-limited-resources.md new file mode 100644 index 000000000..f9d98adc7 --- /dev/null +++ b/docs/pr-discussions/PR-3950-backlog-b-0570-scarcity-tracker-for-shared-limited-resources.md @@ -0,0 +1,60 @@ +--- +pr_number: 3950 +title: "backlog(B-0570): scarcity tracker for shared limited resources" +author: "AceHack" +state: "MERGED" +created_at: "2026-05-16T22:00:13Z" +merged_at: "2026-05-16T22:01:50Z" +closed_at: "2026-05-16T22:01:50Z" +head_ref: "feature/b-0570-scarcity-tracker-2026-05-16" +base_ref: "main" +archived_at: "2026-05-16T22:13:42Z" +archive_tool: "tools/pr-preservation/archive-pr.ts" +--- + +# PR #3950: backlog(B-0570): scarcity tracker for shared limited resources + +## PR description + +## Summary + +Files B-0570 — design row for a scarcity tracker covering GitHub API GraphQL/REST budgets (and future: runner minutes, etc.). Empirically motivated by today's session saturating 5000/hr GraphQL across 3-4 concurrent agents authenticating as the same user. + +## Why now + +The 2026-05-16 session demonstrated the failure mode in real time: thread resolution on PR #3945 was blocked ~13 minutes by GraphQL exhaustion. A tracker would have surfaced \`graphql.remaining: 800\` mid-session; agents could have deferred or switched to REST. + +## Mitigation axes (sibling rows) + +The row's mitigation-axes table identifies 3 orthogonal axes; sibling rows file follow-on work: +- **B-0571** — GitHub App for factory automation (separate rate-limit pool; primary mitigation) +- **B-0572** — LFG GitHub tier audit (XS effort; Enterprise = 3× per-user headroom for free if already paid) +- Per-user-account partition (e.g., Addison's account) — discretionary, no row + +## Diff + +- \`docs/backlog/P1/B-0570-*.md\` (170 lines) — design row with origin, acceptance criteria, 6-slice decomposition, design sketch, mitigation-axes table, composes-with +- \`docs/BACKLOG.md\` (+1 line) — generated index updated via \`BACKLOG_WRITE_FORCE=1 bun tools/backlog/generate-index.ts\` + +🤖 Generated with [Claude Code](https://claude.com/claude-code) + +## Reviews + +### COMMENTED — @copilot-pull-request-reviewer (2026-05-16T22:01:18Z) + +## Pull request overview + +Adds a new P1 backlog row (B-0570) designing a scarcity tracker for shared limited resources (GitHub API GraphQL/REST budgets, runner minutes, etc.), motivated by a real GraphQL rate-limit exhaustion observed in the 2026-05-16 session. The generated backlog index is updated accordingly. + +**Changes:** +- New per-row file `B-0570-...md` with origin, acceptance criteria, 6-slice decomposition, design sketch, and mitigation-axes table +- Regenerated `docs/BACKLOG.md` index to include the new row + +### Reviewed changes + +Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments. + +| File | Description | +| ---- | ----------- | +| docs/backlog/P1/B-0570-scarcity-tracker-shared-limited-resources-github-api-2026-05-16.md | New design row for the scarcity tracker (P1, factory-infrastructure) | +| docs/BACKLOG.md | Generated index entry for B-0570 | diff --git a/docs/pr-discussions/PR-3951-backlog-b-0571-github-app-for-factory-automation-separate-ap.md b/docs/pr-discussions/PR-3951-backlog-b-0571-github-app-for-factory-automation-separate-ap.md new file mode 100644 index 000000000..3dfae9942 --- /dev/null +++ b/docs/pr-discussions/PR-3951-backlog-b-0571-github-app-for-factory-automation-separate-ap.md @@ -0,0 +1,69 @@ +--- +pr_number: 3951 +title: "backlog(B-0571): GitHub App for factory automation \u2014 separate API rate-limit pool" +author: "AceHack" +state: "MERGED" +created_at: "2026-05-16T22:01:32Z" +merged_at: "2026-05-16T22:04:03Z" +closed_at: "2026-05-16T22:04:03Z" +head_ref: "feature/b-0571-github-app-factory-2026-05-16" +base_ref: "main" +archived_at: "2026-05-16T22:13:42Z" +archive_tool: "tools/pr-preservation/archive-pr.ts" +--- + +# PR #3951: backlog(B-0571): GitHub App for factory automation — separate API rate-limit pool + +## PR description + +## Summary + +Sibling row to [B-0570](https://github.com/Lucent-Financial-Group/Zeta/pull/3950) (scarcity tracker). Primary capacity-mitigation for the per-user GitHub API saturation flagged today. Files the design row for a "Zeta-Factory" GitHub App installation on the LFG repo, with installation-token auth replacing PAT auth for automated agent work. + +## Why + +GitHub Apps have separate rate-limit pools designed for automation (vs the shared per-user 5000/hr bucket that saturated today across 3-4 concurrent agents). Plus clean \`[bot]\` attribution. Plus least-privilege permissions scope. + +Per the mitigation-axes table in B-0570: this is the substrate-honest primary mitigation. Tier audit (B-0572) is the cheaper test (free 3× if LFG is already Enterprise); App is the architectural answer. + +## Diff + +- \`docs/backlog/P2/B-0571-*.md\` (118 lines) — design row with origin, acceptance criteria, 7-slice decomposition, design sketch, alternatives comparison, composes-with, substrate-honest caveats, open questions +- \`docs/BACKLOG.md\` (+1 line) — generated index updated + +## Acceptance highlights + +- App created in LFG org with least-privilege permissions +- \`tools/auth/get-installation-token.ts\` — JWT signing + installation token fetch +- Token-rotation logic (~1hr expiry) +- Migration: Otto bg worker + Lior antigravity loop switch to App auth +- Tracker (B-0570) reports App + user pools separately + +## Composes with + +- B-0570 (scarcity tracker) +- B-0572 (LFG tier audit — sibling mitigation) +- \`methodology-hard-limits.md\` (App permissions must be least-privilege) + +🤖 Generated with [Claude Code](https://claude.com/claude-code) + +## Reviews + +### COMMENTED — @copilot-pull-request-reviewer (2026-05-16T22:02:34Z) + +## Pull request overview + +Files a P2 backlog row designing a "Zeta-Factory" GitHub App installation to give automated agents a separate API rate-limit pool from human-user PATs, as a primary mitigation for the shared-bucket saturation surfaced in sibling row B-0570. + +**Changes:** +- Adds `docs/backlog/P2/B-0571-*.md` design row with acceptance criteria, 7-slice decomposition, design sketch, alternatives table, and open questions. +- Updates `docs/BACKLOG.md` generated index with the new B-0571 entry under P2. + +### Reviewed changes + +Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments. + +| File | Description | +| ---- | ----------- | +| docs/backlog/P2/B-0571-github-app-factory-automation-2026-05-16.md | New per-row backlog file (118 lines) describing the GitHub App proposal. | +| docs/BACKLOG.md | Generated index line for B-0571 added under P2. |