Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -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-16T23:20:34Z"
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 |
Original file line number Diff line number Diff line change
@@ -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-16T23:20:34Z"
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. |
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
---
pr_number: 3957
title: "backlog(B-0580): Enterprise GitHub ruleset management \u2014 new layer above org/individual mapping"
author: "AceHack"
state: "MERGED"
created_at: "2026-05-16T22:23:03Z"
merged_at: "2026-05-16T23:05:48Z"
closed_at: "2026-05-16T23:05:48Z"
head_ref: "backlog/b-0580-enterprise-ruleset-management-2026-05-16"
base_ref: "main"
archived_at: "2026-05-16T23:20:33Z"
archive_tool: "tools/pr-preservation/archive-pr.ts"
---

# PR #3957: backlog(B-0580): Enterprise GitHub ruleset management — new layer above org/individual mapping

## PR description

## Summary

Files B-0580 — Enterprise GitHub ruleset management work-stream. Per Aaron 2026-05-16, after creating the first enterprise-level ruleset (#16490134) under the 30-day Enterprise trial: the Enterprise tier adds a THIRD ruleset layer above org + per-repo, multiplying the existing ruleset-divergence smell from B-0427.

## Why

Two reframings:
1. **Surface expansion** — was 2 layers (org/individual), now 3 (enterprise/org/individual). Cross-layer rule conflicts become a real failure mode without coherent governance
2. **DV2.0 ruleset-divergence smell composes** per `dv2-data-split-discipline-activated.md` — the smell was known for repo-split (B-0427); Enterprise multiplies it

## 5-slice decomposition

- Slice 1: `tools/github/list-rulesets.ts` — REST enumeration at all 3 layers
- Slice 2: manual audit of #16490134 + any other enterprise rulesets + LFG org rulesets + Zeta repo rulesets
- Slice 3: `tools/github/audit-ruleset-divergence.ts` — cross-layer diff, flag conflicts
- Slice 4: `docs/governance/RULESETS.md` — authoritative policy doc (which rule belongs at which layer)
- Slice 5 (deferred): `tools/github/apply-rulesets.ts` — policy-as-code apply

## Composes with

- [B-0427](docs/backlog/) (repo-split axis 3 — Code/English with ruleset-divergence smell)
- [B-0572](https://github.com/Lucent-Financial-Group/Zeta/pull/3952) (LFG GitHub tier decision — Enterprise trial that created the layer)
- `.claude/rules/dv2-data-split-discipline-activated.md` (the smell-detection framework)
- `.claude/rules/methodology-hard-limits.md` (rulesets ARE policy-as-code substrate for governance hard-limits)

## Caveat re scope

Enterprise-layer writes (slice 5) require `admin:enterprise` scope — current local PAT lacks it. Slices 1-4 work with `read:org` scope (which the current PAT has). Authoritative policy doc + tooling can land before any policy-as-code apply.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

## Reviews

### COMMENTED — @copilot-pull-request-reviewer (2026-05-16T22:28:45Z)

## Pull request overview

> [!NOTE]
> Copilot was unable to run its full agentic suite in this review.

Adds a new P2 backlog entry (B-0580) tracking enterprise-level GitHub ruleset management as a third governance layer above existing org/individual rulesets, and registers it in the main backlog index.

**Changes:**
- New backlog doc B-0580 describing motivation, slices, acceptance criteria, and first-discovery findings for the new enterprise ruleset created (`16490134`).
- Adds B-0580 entry to `docs/BACKLOG.md` under P2.

### Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

| File | Description |
| ---- | ----------- |
| docs/backlog/P2/B-0580-enterprise-ruleset-management-2026-05-16.md | New backlog row defining the 5-slice work-stream for enterprise ruleset governance. |
| docs/BACKLOG.md | Registers B-0580 in the P2 backlog list. |

### COMMENTED — @AceHack (2026-05-16T23:05:41Z)

_(no body)_

### COMMENTED — @AceHack (2026-05-16T23:11:50Z)

Maji Antigravity Check: Drift detected. Metadata churn / narration-over-action identified. Next step: peel one slice off this design row and execute it to restore parity and operational alignment.

## Review threads

### Thread 1: docs/backlog/P2/B-0580-enterprise-ruleset-management-2026-05-16.md:22 (resolved)

**@copilot-pull-request-reviewer** (2026-05-16T22:28:44Z):

The quote contains several misspellings ('enterpirse', 'ruleselt', 'managment', 'individiual'). Since this is presented as a verbatim quote from Aaron, it may be intentional to preserve fidelity; if so, consider adding a `[sic]` marker. Otherwise, correct the typos.

**@AceHack** (2026-05-16T23:05:41Z):

Verbatim preservation — Aaron-quotes are kept as-typed across the repo (no `[sic]`); the typos are the signal of authentic real-time capture. Project convention; see `.claude/rules/substrate-or-it-didnt-happen.md` verbatim-preservation trigger. Resolving no-op.
Loading