Skip to content

docs(ledger): record 2026-07-14 branch-cleanup pass (60 branches)#677

Merged
BigSimmo merged 5 commits into
mainfrom
claude/cleanup-branches-worktrees-mxov4x
Jul 14, 2026
Merged

docs(ledger): record 2026-07-14 branch-cleanup pass (60 branches)#677
BigSimmo merged 5 commits into
mainfrom
claude/cleanup-branches-worktrees-mxov4x

Conversation

@BigSimmo

@BigSimmo BigSimmo commented Jul 14, 2026

Copy link
Copy Markdown
Owner

Summary

  • Meticulous review of all 59 remote branches + worktrees against the rewritten origin/main (fresh-root history; every PR shows merged=false, so "already on main" was judged by actual content, not PR status).
  • Retained 7 branches carrying novel/active work or open PRs; marked 53 as deletion candidates (already on main / superseded old-lineage snapshots / throwaway CI-retry / redundant perf-r2 duplicates), each verified with a branch-only-file novelty sweep plus an adversarial re-check.
  • The only file change here is docs/branch-review-ledger.md (+60 audit rows). Local main was also reset from a stale orphaned ref to origin/main.
  • Remote branch deletion could not be executed: git push --delete returns HTTP 403 for this session (ref-deletion is not permitted; normal pushes work). The 53 deletion commands are recorded for an operator with delete permission.

Retained

Branch Why kept
claude/specifiers-v2-design-r55baf open PR #656 (full DSM-5-TR catalog)
codex/formulation-specifier-separation-current open PR #672
cursor/audit-remediation-plan-0411 open PR #673
claude/perf-r2-plan-cache-migration unmerged batch signed-URL endpoint not on main
claude/calculators-search-page calculators mockup feature (note: #670 has since merged to main)
codex/domain-1-governance-remediation novel governance/privacy modules never merged
claude/filter-layout-search-prominence-kwrbwl newly pushed active DSM work, no PR yet

Verification

  • npm run verify:pr-local — N/A: docs-only change (single markdown ledger append); no source/config/test behavior touched.
  • npm run verify:ui — N/A: no UI/routing/styling change.
  • npm run verify:release — N/A: no release/handoff behavior change.
  • npm run eval:retrieval:quality — N/A: no retrieval/ranking/selection/chunking/scoring change.
  • npm run eval:rag / eval:quality — N/A: no answer-generation change.
  • npm run check:production-readiness — N/A: no clinical workflow/privacy/env/Supabase/governance/deployment change.
  • npm run check:deployment-readiness — N/A: no deployment behavior change.

Clinical Governance Preflight

Not applicable — this change does not touch ingestion, answer generation, search/ranking, source rendering, document access, privacy, production env, or clinical output. It only appends review records to docs/branch-review-ledger.md.

  • Source-backed claims still require linked source verification before clinical use — N/A
  • No patient-identifiable document workflow was introduced or expanded — N/A
  • Supabase target remains Clinical KB Database (sjrfecxgysukkwxsowpy) — unchanged
  • Service-role keys and private document access remain server-only — unchanged
  • Demo/synthetic content remains clearly separated from real clinical sources — unchanged
  • Source metadata, review status, and outdated/unknown-source behavior remain conservative — unchanged
  • Deployment classification/TGA SaMD impact — N/A

Notes

🤖 Generated with Claude Code

https://claude.ai/code/session_019EoTnerf4thGDH8KGGo9Ai


Generated by Claude Code

Summary by CodeRabbit

  • Documentation
    • Updated the branch review ledger with records from the 2026-07-14 cleanup and retention review.
    • Documented branches retained for active work or explicit decisions.
    • Recorded deletion candidates whose removal was blocked by access permissions, along with follow-up actions.

Meticulous review of all 59 remote branches + worktrees against the
rewritten origin/main (fresh-root history; all PRs show merged=false, so
"on main" was judged by content, not PR status).

Retained 7 branches carrying novel/active work or open PRs:
- specifiers-v2-design (#656), formulation-specifier-separation (#672),
  audit-remediation-plan (#673) — open PRs
- perf-r2-plan-cache-migration — unmerged batch signed-URL endpoint
- calculators-search-page — clinical-calculators mockup feature
- domain-1-governance-remediation — novel governance/privacy modules
- filter-layout-search-prominence — newly pushed active DSM work

Marked 53 branches as deletion candidates (already on main / superseded
old-lineage snapshots / throwaway CI-retry / redundant perf-r2 dups),
verified via branch-only-file novelty sweep with adversarial re-check.
Remote deletion is blocked by this session's git permission (HTTP 403);
deletion commands recorded for the operator.

Also reset the stale orphaned local main to origin/main.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019EoTnerf4thGDH8KGGo9Ai
@coderabbitai

coderabbitai Bot commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Warning

Review limit reached

@BigSimmo, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 7 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 70e8734c-55e9-47b0-b9eb-2a437364ed66

📥 Commits

Reviewing files that changed from the base of the PR and between 742605e and c261f78.

📒 Files selected for processing (3)
  • docs/branch-review-ledger.md
  • scripts/sweep-branch-ledger.mjs
  • tests/repo-hygiene.test.ts
📝 Walkthrough

Walkthrough

The branch review ledger is extended with retained-branch decisions and deletion-candidate records from the 2026-07-14 cleanup pass, including HTTP 403 deletion blocks and operator hand-offs.

Changes

Branch cleanup ledger

Layer / File(s) Summary
Retained branch records
docs/branch-review-ledger.md
Adds entries for branches retained due to open PRs or explicit decisions.
Deletion candidate records
docs/branch-review-ledger.md
Adds entries recording blocked remote deletions, local main resets, and operator hand-offs.

Estimated code review effort: 1 (Trivial) | ~2 minutes

Possibly related PRs

  • BigSimmo/Database#657: Adds similar branch-cleanup and Git-permission-blocked deletion records to the same ledger.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the docs ledger update and the branch-cleanup pass.
Description check ✅ Passed The description matches the template with Summary, Verification, Clinical Governance Preflight, and Notes, and marks inapplicable checks clearly.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch claude/cleanup-branches-worktrees-mxov4x

Comment @coderabbitai help to get the list of available commands.

@supabase

supabase Bot commented Jul 14, 2026

Copy link
Copy Markdown

This pull request has been ignored for the connected project sjrfecxgysukkwxsowpy because there are no changes detected in supabase directory. You can change this behaviour in Project Integrations Settings ↗︎.


Preview Branches by Supabase.
Learn more about Supabase Branching ↗︎.

@BigSimmo
BigSimmo marked this pull request as ready for review July 14, 2026 19:09

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@docs/branch-review-ledger.md`:
- Line 496: Update scripts/sweep-branch-ledger.mjs to parse branch names from
the ledger table’s branch column generically instead of restricting matches to
claude/ and codex/ prefixes, so cursor/, copilot/, and fix/ entries are included
in ledgerBranches. This applies to docs/branch-review-ledger.md lines 496-496
and 523-553; no direct changes to the documentation are required.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 02d5979d-aaa3-4bf8-a00d-cf5f9bfab3c7

📥 Commits

Reviewing files that changed from the base of the PR and between 43a8a3e and 742605e.

📒 Files selected for processing (1)
  • docs/branch-review-ledger.md

Comment thread docs/branch-review-ledger.md Outdated

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 742605ea12

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. 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".

Comment thread docs/branch-review-ledger.md Outdated
@BigSimmo

Copy link
Copy Markdown
Owner Author

@codex resolve actionable Codex review findings for this pull request and current head using the repository instructions. This is the pull request's single automatic repair pass: do not perform a fresh review, create new standalone findings, or request another review. Work only the existing unresolved Codex threads on the current head. Always fix P0 and P1 findings. For P2 and lower findings, fix only clear, scoped, low-risk issues; otherwise disposition them with a concise reason. After fixing or dispositioning a thread, reply in that thread with as the first line, followed by a concise summary; that marker authorizes the workflow to close that exact thread. If human input or new authorization is required, do not use the marker and leave the thread open with the blocker. Finish only after every actionable thread is fixed or dispositioned and closed, or explicitly left open for a human decision. Do not update the branch from main, address unrelated reviews, broaden scope, or create more than one scoped fix commit. Do not use external APIs, paid services, credentials, dependency changes, or broad refactors unless explicitly authorized. Add targeted tests where behavior changes and run the narrowest relevant validation.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 742605ea12

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. 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".

Comment thread docs/branch-review-ledger.md Outdated
Resolves three valid review findings on the 2026-07-14 branch-cleanup ledger
entries:

- Codex P2 (skip bug): the 53 blocked-deletion rows used scope `branch-cleanup`,
  which the guide's skip lookup (`| branch | head | branch-cleanup |`) treats as a
  completed review — so a future pass would skip branches whose deletion never
  happened. They now use scope `branch-cleanup-deletion-pending` so future passes
  re-evaluate and retry; the 7 genuinely-decided retained rows keep `branch-cleanup`.
- Codex P2 (provenance): rows claimed "Read-only; no provider/live checks" while
  actually using the authenticated GitHub PR inventory (provider-backed read) and
  attempting a remote `git push --delete` (provider-backed write, denied 403). The
  checks column now records those provider-backed steps accurately.
- CodeRabbit (parser): scripts/sweep-branch-ledger.mjs recognized only claude/ and
  codex/ prefixes, omitting the cursor/, copilot/, and fix/ rows. parseLedgerBranches
  now parses the branch/ref column generically across all namespaces; added test
  coverage in tests/repo-hygiene.test.ts.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019EoTnerf4thGDH8KGGo9Ai

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 0a0423d565

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. 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".

Comment thread scripts/sweep-branch-ledger.mjs Outdated
Follow-up to the generic parser: it captured the full `origin/claude/foo`
token for remote-tracking ledger rows, but the sweep strips `origin/` from
live refs to `claude/foo` before `ledgerBranches.has(short)`, so those
already-reviewed branches were reported as not-in-ledger and could be
re-reviewed. Strip a leading `origin/` when recording names so both forms
normalize to the short name the throttling check compares against. Adds a
regression test.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019EoTnerf4thGDH8KGGo9Ai

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 1f60aaa967

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. 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".

Comment thread scripts/sweep-branch-ledger.mjs Outdated
claude and others added 2 commits July 14, 2026 19:38
…guide

The generic parser made the sweeper report every branch/ref mention as
in-ledger, so the newly added `branch-cleanup-deletion-pending` branches
showed up as already-reviewed even though docs/branch-cleanup-guide.md says
only an exact `branch-cleanup` scope match at the current HEAD authorizes a
skip. A later sweep could then miss the still-pending deletion.

Replace the coarse membership flag with hasCompletedCleanupReview(), which
matches branch name + current HEAD + exact `branch-cleanup` scope — excluding
deletion-pending rows and stale HEADs so they are surfaced for re-evaluation.
parseLedgerBranches (all mentions) is retained and both share refTokensFromCell.
Adds focused tests for the deletion-pending and moved-HEAD cases.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019EoTnerf4thGDH8KGGo9Ai
@BigSimmo
BigSimmo merged commit 1619825 into main Jul 14, 2026
16 checks passed
@BigSimmo
BigSimmo deleted the claude/cleanup-branches-worktrees-mxov4x branch July 17, 2026 05:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants