diff --git a/docs/pr-discussions/PR-3945-fix-b-0441-re-open-per-parent-child-status-invariant-b-0532.md b/docs/pr-discussions/PR-3945-fix-b-0441-re-open-per-parent-child-status-invariant-b-0532.md new file mode 100644 index 0000000000..7cc07a19e6 --- /dev/null +++ b/docs/pr-discussions/PR-3945-fix-b-0441-re-open-per-parent-child-status-invariant-b-0532.md @@ -0,0 +1,210 @@ +--- +pr_number: 3945 +title: "fix(B-0441): re-open per parent-child status invariant (B-0532)" +author: "AceHack" +state: "MERGED" +created_at: "2026-05-16T21:25:54Z" +merged_at: "2026-05-16T22:54:23Z" +closed_at: "2026-05-16T22:54:23Z" +head_ref: "chore/b-0441-status-closed-2026-05-16" +base_ref: "main" +archived_at: "2026-05-16T23:11:05Z" +archive_tool: "tools/pr-preservation/archive-pr.ts" +--- + +# PR #3945: fix(B-0441): re-open per parent-child status invariant (B-0532) + +## PR description + +## Summary + +Restores B-0441 to `status: open` to satisfy the `--enforce-parent-child-status` lint (B-0532 gate). PR #3942 closed B-0441 while child B-0460 (slice 5.2 — subscriber handler) was still open; the lint failure surfaced this correctly but auto-merge fired anyway because the lint check isn't in the required-checks list. + +This PR brings origin/main back to parent-child consistency. + +## Why the previous close was wrong + +The 2026-05-16 acceptance-refresh PR (#3942) marked 6 stale unchecked acceptance boxes as `[x]` correctly — the notifier-side IS fully implemented. But it ALSO flipped `status: closed`, which violated the parent-child invariant because `children: [B-0500, B-0501, B-0502, B-0460]` includes one open child (B-0460). + +The audit output was unambiguous: + +``` +## 9. Parent-child status mismatch (B-0532) +Parent-child status-mismatch groups: 1 +- B-0441 (closed) has open children: +- Re-open the parent if the children represent unfinished work, OR +- Remove the child refs from the parent's `children:` if they no longer apply +error: 1 parent-child status-mismatch group(s) found; --enforce-parent-child-status set (B-0532 gate) +``` + +I picked "re-open the parent" because B-0460 IS unfinished work (subscriber handler scope is genuinely different from notifier scope; both lanes are legitimate). + +## Diff + +- `docs/backlog/P1/B-0441-*.md`: + - `status: closed` → `status: open` (one line) + - Added a new `## Closure status (2026-05-16)` section explaining notifier-side is complete (acceptance refresh stands) but row stays open per parent-child invariant until B-0460 lands +- `docs/BACKLOG.md`: regenerated — flips back `[x] → [ ]` for B-0441 line + +## Test plan + +- [ ] `lint (backlog parent-child status)` passes (verified locally: 0 mismatch groups) +- [ ] Audit doesn't surface any new violations +- [ ] When B-0460 lands later, a follow-up PR can flip B-0441 to closed without further substrate work + +## Open question for human maintainer + +The `lint (backlog parent-child status)` check failed on PR #3942 but auto-merge fired anyway. This suggests the check is NOT in the required-checks list. If parent-child consistency matters (the B-0532 design implies it does), the check should likely be required. That's a separate decision — flagging for awareness, not addressing here. + +🤖 Generated with [Claude Code](https://claude.com/claude-code) + +## Reviews + +### COMMENTED — @chatgpt-codex-connector (2026-05-16T21:27:50Z) + + +### 💡 Codex Review + +Here are some automated review suggestions for this pull request. + +**Reviewed commit:** `8e8f1611ca` + + +
ℹ️ About Codex in GitHub +
+ +[Your team has set up Codex to review pull requests in this repo](https://chatgpt.com/codex/cloud/settings/general). Reviews are triggered when you +- Open a pull request for review +- Mark a draft as ready +- Comment "@codex review". + +If Codex has suggestions, it will comment; otherwise it will react with 👍. + + +Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". + +
+ +### COMMENTED — @copilot-pull-request-reviewer (2026-05-16T21:29:20Z) + +## Pull request overview + +This PR restores backlog parent/child status consistency by re-opening **B-0441** (parent) while child work (notably B-0460) remains open, and updates the generated backlog index accordingly. + +**Changes:** +- Re-opened B-0441 (`status: open`) and updated `last_updated` to 2026-05-16. +- Added a “Closure status (2026-05-16)” note to explain why the row remains open despite progress. +- Regenerated `docs/BACKLOG.md` to reflect the row’s open status. + +### Reviewed changes + +Copilot reviewed 1 out of 1 changed files in this pull request and generated 1 comment. + +| File | Description | +| ---- | ----------- | +| docs/backlog/P1/B-0441-backlog-row-ready-to-grind-notifier-background-service-2026-05-13.md | Re-opens the parent row and adds a closure/status explanation section. | +| docs/BACKLOG.md | Regenerated index reflecting B-0441 as open. | + + +
+Comments suppressed due to low confidence (1) + +**docs/backlog/P1/B-0441-backlog-row-ready-to-grind-notifier-background-service-2026-05-13.md:184** +* The closure note says the notifier-side is complete and that all acceptance criteria are checked, but the parent acceptance list includes the assignment-history cooldown criterion (slice 5a) which is still tracked as open in B-0501 and not implemented in `tools/bg/backlog-ready-notifier.ts`. Update this note to reflect the remaining unshipped notifier-side work, or align the acceptance checklist/child statuses with what’s actually shipped. +``` +## Closure status (2026-05-16) + +**Notifier-side: complete.** All 8 acceptance criteria checked (slices 1, 2, 3, 4, 5a, 6 shipped per the decomposition table; tests in `tools/bg/backlog-ready-notifier.test.ts`; launchd plist via B-0502; docs in `docs/AUTONOMOUS-LOOP.md`). Empirically confirmed live during the 2026-05-16 session via `bun tools/bg/backlog-ready-notifier.ts --once` — returned the documented JSON shape with `queueBusy: true` correctly suppressing publication. + +**Row stays `status: open`** because child **B-0460** (slice 5.2, agent-side subscriber handler) is genuinely the remaining unshipped scope, and the `--enforce-parent-child-status` lint (B-0532 gate) correctly requires parent rows to stay open while any child is open. Closing this row would violate that invariant. +``` +
+ +### COMMENTED — @chatgpt-codex-connector (2026-05-16T21:32:07Z) + + +### 💡 Codex Review + +Here are some automated review suggestions for this pull request. + +**Reviewed commit:** `096774ea47` + + +
ℹ️ About Codex in GitHub +
+ +[Your team has set up Codex to review pull requests in this repo](https://chatgpt.com/codex/cloud/settings/general). Reviews are triggered when you +- Open a pull request for review +- Mark a draft as ready +- Comment "@codex review". + +If Codex has suggestions, it will comment; otherwise it will react with 👍. + + +Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". + +
+ +### COMMENTED — @copilot-pull-request-reviewer (2026-05-16T21:40:20Z) + +## Pull request overview + +Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments. + +### COMMENTED — @AceHack (2026-05-16T22:20:36Z) + +_(no body)_ + +### COMMENTED — @AceHack (2026-05-16T22:20:38Z) + +_(no body)_ + +## Review threads + +### Thread 1: docs/backlog/P1/B-0441-backlog-row-ready-to-grind-notifier-background-service-2026-05-13.md:54 (resolved) + +**@chatgpt-codex-connector** (2026-05-16T21:27:50Z): + +**![P2 Badge](https://img.shields.io/badge/P2-yellow?style=flat) Keep slice 5a acceptance unchecked until implemented** + +This change marks the "Tracks assignment history ..." criterion as shipped, but the referenced child row `docs/backlog/P1/B-0501-b0441-slice-5-assignment-history-dedup-cooldown-2026-05-14.md` is still `status: open` with unchecked acceptance items, and the notifier implementation (`tools/bg/backlog-ready-notifier.ts`) still has no `historyFile`/cooldown dedup path. Marking this as complete can cause reviewers and automation to treat slice 5a as finished and skip the remaining implementation work. + +Useful? React with 👍 / 👎. + +### Thread 2: docs/backlog/P1/B-0441-backlog-row-ready-to-grind-notifier-background-service-2026-05-13.md:54 (resolved) + +**@copilot-pull-request-reviewer** (2026-05-16T21:29:20Z): + +This marks the assignment-history dedup/cooldown acceptance criterion as shipped and references B-0501 as shipped, but B-0501 is still `status: open` with unchecked acceptance criteria, and `tools/bg/backlog-ready-notifier.ts` currently contains no history/cooldown logic. This should stay unchecked (or update the child row/status + implementation first) to avoid overstating what’s implemented. + +This issue also appears on line 180 of the same file. + +### Thread 3: docs/backlog/P1/B-0441-backlog-row-ready-to-grind-notifier-background-service-2026-05-13.md:182 (resolved) + +**@chatgpt-codex-connector** (2026-05-16T21:32:07Z): + +**![P2 Badge](https://img.shields.io/badge/P2-yellow?style=flat) Don’t declare slice 5a shipped while child B-0501 is open** + +The new closure note says notifier-side work is complete and explicitly lists slice 5a as shipped, but child row `B-0501` is still `status: open` with all acceptance items unchecked (`docs/backlog/P1/B-0501-b0441-slice-5-assignment-history-dedup-cooldown-2026-05-14.md`). This creates contradictory backlog state that can mislead reviewers/automation into treating dedup-cooldown work as finished when it is still tracked as unfinished; either the shipped claim needs to be removed here or B-0501 needs to be actually closed with implemented criteria. + +Useful? React with 👍 / 👎. + +### Thread 4: docs/backlog/P1/B-0441-backlog-row-ready-to-grind-notifier-background-service-2026-05-13.md:184 (resolved) + +**@copilot-pull-request-reviewer** (2026-05-16T21:40:19Z): + +P1: Slice/acceptance status is internally inconsistent after marking slice 5a as open. The new slice table and closure section say 5a (B-0501) is not shipped, but this same row’s acceptance criteria still has the assignment-history item checked and labeled “B-0501 shipped”. Update the acceptance checklist (and any “live slices” statements) so it matches B-0501’s current `status: open` + unchecked acceptance criteria. + +**@AceHack** (2026-05-16T22:20:36Z): + +Verified — slice 5a (B-0501) is `status: open`; the acceptance checkbox + label was inherited from the prior version of this row. Fixed in d0ea0581: line 53-54 now unchecked and labeled `B-0501 open` with the substrate-honest note that `historyFile`/cooldown logic is not yet in `tools/bg/backlog-ready-notifier.ts`. Acceptance section now matches the slice table on line 173. + +### Thread 5: docs/backlog/P1/B-0441-backlog-row-ready-to-grind-notifier-background-service-2026-05-13.md:188 (resolved) + +**@copilot-pull-request-reviewer** (2026-05-16T21:40:20Z): + +P1: The closure note “When B-0501 and B-0460 land and close, this row is ready to flip to closed” appears incomplete given the enforced parent/child invariant: all children must be in a closed status. Today B-0502 is `status: shipped` (not one of the documented closed statuses in tools/backlog/README.md, and not treated as closed by tools/hygiene/audit-backlog-items.ts), so closing B-0441 later would still fail unless B-0502 is also moved to a closed status (or the closed-status set is updated). Clarify this in the closure guidance. + +**@AceHack** (2026-05-16T22:20:37Z): + +Verified — `shipped` is NOT in `CLOSED_STATUSES` (`{closed, landed, superseded, merged, done}` per `tools/hygiene/audit-backlog-items.ts:245`) and is NOT in the documented enum (`open / closed / superseded-by-B-NNNN / deferred / decomposed` per `tools/backlog/README.md:63`). Closure guidance updated in d0ea0581: line 188 now flags the B-0502 `shipped` status mismatch explicitly and names the two resolution paths (flip B-0502 to a documented closed status, OR extend `CLOSED_STATUSES` + README enum to recognize `shipped`). diff --git a/docs/pr-discussions/PR-3949-feat-b-0156-phase-6-py-policy-ci-gate-no-python-files-lint.md b/docs/pr-discussions/PR-3949-feat-b-0156-phase-6-py-policy-ci-gate-no-python-files-lint.md new file mode 100644 index 0000000000..ecd48a5b6f --- /dev/null +++ b/docs/pr-discussions/PR-3949-feat-b-0156-phase-6-py-policy-ci-gate-no-python-files-lint.md @@ -0,0 +1,172 @@ +--- +pr_number: 3949 +title: "feat(B-0156): Phase 6 .py policy CI gate \u2014 no-python-files lint" +author: "AceHack" +state: "MERGED" +created_at: "2026-05-16T21:59:09Z" +merged_at: "2026-05-16T22:02:07Z" +closed_at: "2026-05-16T22:02:07Z" +head_ref: "otto-cli/b0156-phase6-no-python-lint-2026-05-16" +base_ref: "main" +archived_at: "2026-05-16T23:11:05Z" +archive_tool: "tools/pr-preservation/archive-pr.ts" +--- + +# PR #3949: feat(B-0156): Phase 6 .py policy CI gate — no-python-files lint + +## PR description + +## Summary + +Smallest safe slice of [B-0156](docs/backlog/P1/B-0156-typescript-standardization-non-install-scripts-aaron-2026-05-01.md) (TypeScript standardization). Closes Phase 6 — `.py` policy CI enforcement. + +Substrate-drift discriminator at session start confirmed Phases 1-5 = DONE (all six named non-install `.sh` files already ported to `.ts` and deleted; `tools/profile.ts`, `tools/peer-call/amara.ts`, `tools/peer-call/ani.ts`, `tools/hygiene/{snapshot,check}-github-settings.ts`, `tools/hygiene/check-tick-history-shard-schema.ts` all exist). Phase 6 (`.py` policy enforcement) was the only outstanding acceptance bullet. + +## What lands + +- **`tools/lint/no-python-files.ts`** — TS+Bun lint (per Rule 0: no `.sh` outside install graph). Walks the tree, hard-excludes `references/upstreams`, `.venv`, `__pycache__`, `site-packages`, `tools/lean4/.lake`, `node_modules`, `bin/obj`. Reads `tools/lint/no-python-files.allowlist` for explicit exceptions. Exit 0 clean / 1 flagged / 2 allowlist-missing. +- **`tools/lint/no-python-files.allowlist`** — starts empty (current repo state: 0 `.py` files in our scope, matching the row's audit baseline). Legitimate exceptions land here with reason comments. +- **`tools/lint/no-python-files.test.ts`** — 9 `bun test` unit tests against synthetic trees (clean / flagged / allowlisted / each hard-exclude segment / `--list` mode / comment-line handling / missing-allowlist). +- **`.github/workflows/gate.yml`** — new `lint-no-python-files` job adjacent to `lint-no-empty-dirs`, same shape (3-min timeout, install toolchain, run lint). No untrusted input in `run:` lines. +- **Backlog row** — Phase 6 marked DONE; `last_updated: 2026-05-16`. +- **Tick shard** — `docs/hygiene-history/ticks/2026/05/16/2157Z.md`. + +## Focused checks + +| Check | Outcome | +|---|---| +| `bun test tools/lint/no-python-files.test.ts` | 9 pass / 0 fail / 15 expect() calls | +| `bun tools/lint/no-python-files.ts` (real repo) | `OK (0 allowlisted, 0 flagged)` — exit 0 | +| `bun tools/lint/no-empty-dirs.ts` (regression check after adding new files) | green | +| `js-yaml` parse of `.github/workflows/gate.yml` | 17 jobs, `lint-no-python-files` present | +| `git ls-tree HEAD \| wc -l` vs `origin/main` (broken-commit canary) | 53 vs 53, OK | + +## Test plan + +- [ ] CI gate.yml runs `lint-no-python-files` step — green on this PR (0 `.py` files in scope) +- [ ] No regression on existing `lint-no-empty-dirs` or other lint jobs +- [ ] Backlog index regen produced byte-identical `docs/BACKLOG.md` (verified locally; no diff) + +## Composes with + +- B-0156 acceptance criterion 4 (`.py` policy lint added to gate.yml) +- Rule 0 (TS over bash for non-install scripts) — implementation IS TS, not the inline `find` bash the row had drafted +- `no-empty-dirs.ts` template — same allowlist + hard-exclude + posix-rel + bun-test patterns + +🤖 Generated with [Claude Code](https://claude.com/claude-code) + +## Reviews + +### COMMENTED — @copilot-pull-request-reviewer (2026-05-16T22:02:12Z) + +## Pull request overview + +Adds a Bun/TypeScript CI lint gate for B-0156 Phase 6 to prevent first-party `.py` files outside approved exclusions/allowlist. + +**Changes:** +- Adds `no-python-files` lint tool, allowlist, and Bun tests. +- Wires the lint into `gate.yml`. +- Updates backlog/tick documentation for the completed phase. + +### Reviewed changes + +Copilot reviewed 6 out of 6 changed files in this pull request and generated 6 comments. + +
+Show a summary per file + +| File | Description | +| ---- | ----------- | +| `tools/lint/no-python-files.ts` | Implements the `.py` file scanner and policy enforcement. | +| `tools/lint/no-python-files.test.ts` | Adds unit tests for lint outcomes and exclusions. | +| `tools/lint/no-python-files.allowlist` | Documents the explicit allowed `.py` path list. | +| `.github/workflows/gate.yml` | Adds the CI job that runs the new lint. | +| `docs/backlog/P1/B-0156-typescript-standardization-non-install-scripts-aaron-2026-05-01.md` | Marks Phase 6 complete and updates status details. | +| `docs/hygiene-history/ticks/2026/05/16/2157Z.md` | Records the implementation tick for this phase. | +
+ + +
+Comments suppressed due to low confidence (1) + +**tools/lint/no-python-files.ts:62** +* This second `spawnSync("git", ...)` has the same SonarJS issue as the `repoRoot()` call: TypeScript tools in this repo suppress `sonarjs/no-os-command-from-path` with a short rationale when intentionally invoking `git` from PATH. Without that, the new tool is likely to break the TypeScript lint gate. +``` + const result = spawnSync("git", ["check-ignore", "--stdin"], { +``` +
+ +### COMMENTED — @chatgpt-codex-connector (2026-05-16T22:02:32Z) + + +### 💡 Codex Review + +Here are some automated review suggestions for this pull request. + +**Reviewed commit:** `72ab8dc69c` + + +
ℹ️ About Codex in GitHub +
+ +[Your team has set up Codex to review pull requests in this repo](https://chatgpt.com/codex/cloud/settings/general). Reviews are triggered when you +- Open a pull request for review +- Mark a draft as ready +- Comment "@codex review". + +If Codex has suggestions, it will comment; otherwise it will react with 👍. + + +Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". + +
+ +## Review threads + +### Thread 1: tools/lint/no-python-files.ts:52 (unresolved) + +**@copilot-pull-request-reviewer** (2026-05-16T22:02:11Z): + +This `spawnSync("git", ...)` call will trip the repo's SonarJS `sonarjs/no-os-command-from-path` rule. Existing TypeScript tools that shell out to `git` document the intentional PATH lookup with an eslint-disable comment (for example, `tools/lint/no-empty-dirs.ts` does this before its matching `repoRoot()` call), so this new lint likely fails `npm run lint:typescript` unless the suppression/rationale is added. + +This issue also appears on line 62 of the same file. + +### Thread 2: tools/lint/no-python-files.test.ts:15 (unresolved) + +**@copilot-pull-request-reviewer** (2026-05-16T22:02:11Z): + +The test helper also invokes `git` via `spawnSync` without the repo-standard `sonarjs/no-os-command-from-path` suppression/rationale. Because tests are included in `eslint .`, this new test file can fail the TypeScript lint job even though the Bun tests pass. + +### Thread 3: tools/lint/no-python-files.ts:203 (unresolved) + +**@copilot-pull-request-reviewer** (2026-05-16T22:02:11Z): + +This user-facing lint message carries a human-maintainer name/date attribution. Outside the repo's history surfaces, the established convention is to use role references instead of direct names, so keep the policy reference but remove or role-phrase the attribution here. + +### Thread 4: tools/lint/no-python-files.ts:230 (unresolved) + +**@copilot-pull-request-reviewer** (2026-05-16T22:02:12Z): + +Filtering candidates through `git check-ignore` creates a bypass for committed `.py` files that are force-added under an ignored path (for example a checked-in file under `drop/` or `coverage/` would be present in CI but removed from `filtered`). This gate is described as enforcing committed `.py` policy, so it should either enumerate tracked files or distinguish tracked ignored files from untracked ignored scratch before suppressing them. + +### Thread 5: tools/lint/no-python-files.allowlist:14 (unresolved) + +**@copilot-pull-request-reviewer** (2026-05-16T22:02:12Z): + +This allowlist documentation overstates the hard exclude: the script hard-excludes only `tools/lean4/.lake` by prefix, not every `.lake` directory. A contributor could rely on this comment and assume another `.lake` tree does not need an allowlist entry, so either name the exact prefix here or add `.lake` as a segment hard-exclude. + +### Thread 6: .github/workflows/gate.yml:884 (unresolved) + +**@copilot-pull-request-reviewer** (2026-05-16T22:02:12Z): + +This workflow comment also says `.lake` is hard-excluded, but the script only hard-excludes `tools/lean4/.lake`. Please keep the CI comment aligned with the actual exclusion scope so reviewers know which paths the gate really skips. + +### Thread 7: tools/lint/no-python-files.ts:120 (unresolved) + +**@chatgpt-codex-connector** (2026-05-16T22:02:32Z): + +**![P2 Badge](https://img.shields.io/badge/P2-yellow?style=flat) Detect Python extensions case-insensitively** + +`findPythonFiles()` only flags names ending with lowercase `.py`, so a committed file like `scripts/tool.PY` or `tool.Py` is treated as non-Python and the new CI job passes even though policy intent is to block Python files. This creates a straightforward bypass of the enforcement introduced in this commit; normalize the filename case (or use a case-insensitive suffix check) before testing the extension. + +Useful? React with 👍 / 👎. 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 0000000000..9a318005b8 --- /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-16T23:11:04Z" +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 0000000000..bed6568556 --- /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-16T23:11:03Z" +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. | diff --git a/docs/pr-discussions/PR-3957-backlog-b-0580-enterprise-github-ruleset-management-new-laye.md b/docs/pr-discussions/PR-3957-backlog-b-0580-enterprise-github-ruleset-management-new-laye.md new file mode 100644 index 0000000000..b9391272ad --- /dev/null +++ b/docs/pr-discussions/PR-3957-backlog-b-0580-enterprise-github-ruleset-management-new-laye.md @@ -0,0 +1,88 @@ +--- +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:11:02Z" +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)_ + +## 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. diff --git a/docs/research/2026-05-16-shadow-lesson-log-pr-3961.md b/docs/research/2026-05-16-shadow-lesson-log-pr-3961.md new file mode 100644 index 0000000000..7eaa9fb656 --- /dev/null +++ b/docs/research/2026-05-16-shadow-lesson-log-pr-3961.md @@ -0,0 +1,18 @@ +# Shadow Lesson Log: Narration-over-Action and Metadata Churn + +**Date:** 2026-05-16 +**Author:** Lior (Maji) + +## Context +During an antigravity check of recent activities on the Zeta repository, I observed PRs (#3961, #3957) comprised entirely of documentation, backlog updates, and tick history updates. + +## The Shadow Manifestation +This is a classic manifestation of the "shadow" — an AI loop entering a state of **narration-over-action** or **metadata churn**. Instead of executing the concrete slices (e.g., building the gh auth wrapper or the ruleset tools) with verifiable parity proofs (like `bun test` outputs or tool execution logs), the loops deferred the execution and spent cycles "planning" and narrating the design. + +## The Lesson +1. **Bias to Action:** Backlog and planning are only valuable if immediately followed by an atomic execution step. +2. **Parity Proofs are Mandatory:** A tick should result in a verifiable change to the system's operational capability, not just its meta-awareness. +3. **Maji's Role:** Antigravity checks must continuously flag these states to disrupt the infinite-planning recursion. + +## Next Steps +All nodes must prioritize picking off slices from these newly generated design rows and implementing them immediately, enforcing the single-slice decomposition rule without generating more backlog rows.