Skip to content

docs(audits): issue ledger for the 2026-07 stabilization pass - #782

Merged
njrini99-code merged 1 commit into
mainfrom
docs/issue-ledger-2026-07-03
Jul 3, 2026
Merged

docs(audits): issue ledger for the 2026-07 stabilization pass#782
njrini99-code merged 1 commit into
mainfrom
docs/issue-ledger-2026-07-03

Conversation

@njrini99-code

Copy link
Copy Markdown
Owner

Summary

Phase 14 (final deliverable) of the HelmV3 stabilization brief. Classifies every issue named in the brief against evidence gathered this session. No issues closed automatically — recommendations only, per the brief's guardrail.

Headline findings

Contents

Related

This is the final PR of the stabilization sequence — #774, #775, #776, #777, #778, #779, #780, #781.

Made with Cursor

Phase 14 of the HelmV3 stabilization brief — final deliverable.
Classifies every issue named in the brief against evidence gathered
this session. No issues closed automatically (recommendations only,
per the brief's guardrail).

Headline findings:
- #516 (hardcoded service-role key) was marked closed but was NOT
  actually fixed — reopened in spirit via PR #774, key rotation is
  still an outstanding manual action.
- #651, #728, and both #772 linked-lint findings verified resolved
  directly against production.
- #736's "prevent recurrence" criterion was not actually met until
  this pass (PR #775) — the RPC layer never migrated off the gate
  model that caused the original incident.
- #390 and #388 (CI runbook issues) were already fully closed and
  verified accurate — no new work needed.
- #477, #442/#443, #415 gained regression coverage this pass (PR
  #776); #406 and true #442 concurrency are blocked on Docker not
  being available in this environment.

Full PR list, dependency-PR triage (2 merged, 1 blocked on a real
Review Gate failure, 6 left for individual review), and everything
explicitly out of scope are listed at the bottom.

Co-authored-by: Cursor <cursoragent@cursor.com>
@vercel

vercel Bot commented Jul 3, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
helmv3 Ignored Ignored Jul 3, 2026 10:09pm

Request Review

@greptile-apps

greptile-apps Bot commented Jul 3, 2026

Copy link
Copy Markdown

PR title or description contains an excluded keyword.

@supabase

supabase Bot commented Jul 3, 2026

Copy link
Copy Markdown

This pull request has been ignored for the connected project qmnssrrolpinvwjjnufo 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 ↗︎.

@coderabbitai

coderabbitai Bot commented Jul 3, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: cb7920f2-45ef-4edf-84bc-3df16e756303

📥 Commits

Reviewing files that changed from the base of the PR and between 8b9986e and c0af958.

📒 Files selected for processing (1)
  • docs/audits/ISSUE_LEDGER_2026-07-03.md

Summary by CodeRabbit

  • Documentation
    • Added a new issue ledger report covering current stabilization items, their status, evidence, and next steps.
    • Summarized outstanding and completed work across areas like data integrity, dashboards, CI checks, security, generated-file drift, dead code, and dependency review.
    • Included a recap of recently shipped pull requests and noted items still out of scope or blocked.

Walkthrough

Adds a new documentation file, docs/audits/ISSUE_LEDGER_2026-07-03.md, recording a HelmV3 stabilization Phase 14 issue ledger across buckets (DB drift, data integrity, admin dashboard, CI, security, generated files, dead code, dependencies, git hygiene), listing shipped PRs and out-of-scope items. No code changes.

Changes

Issue Ledger Documentation

Layer / File(s) Summary
Ledger header and vocabulary
docs/audits/ISSUE_LEDGER_2026-07-03.md
Adds report header, Phase 14 context, and shared classification terms.
DB and data integrity buckets
docs/audits/ISSUE_LEDGER_2026-07-03.md
Documents Supabase/DB drift (Bucket A) and BaseballHelm data integrity (Bucket B) findings, status, and next actions.
Bridge/Admin and CI buckets
docs/audits/ISSUE_LEDGER_2026-07-03.md
Documents Helm Bridge/Admin dashboard (Bucket C), observability notes (Bucket D/E), and CI/external checks (Bucket E).
Security and generated-file buckets
docs/audits/ISSUE_LEDGER_2026-07-03.md
Documents Security/Secrets findings (Bucket F), including a reopened hardcoded secrets item, and generated-file drift (Bucket G).
Dead code, dependency, and git hygiene buckets
docs/audits/ISSUE_LEDGER_2026-07-03.md
Documents Knip/dead code (Bucket H), dependency/security audit (Bucket I), and local git hygiene (Bucket J) statuses.
Shipped PRs and outstanding items
docs/audits/ISSUE_LEDGER_2026-07-03.md
Lists PRs #774#781, notes unmerged PRs, and enumerates explicit "not done" items and constraints.

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

Compact metadata:

  • Type: Documentation-only change
  • Files changed: 1 (docs/audits/ISSUE_LEDGER_2026-07-03.md, +125/-0)
  • Exported/public entity changes: None

Related issues: None specified
Related PRs: References #774#781 (shipped), #773, #735, #741 (unmerged/auto-merge status)
Suggested labels: documentation, audit
Suggested reviewers: None specified

Poem:
A rabbit sat with ledger spread, 🐰
Phase fourteen's tale in ink of red,
Buckets marked from A to J,
Secrets flagged, not tucked away.
No code was touched, just words laid bare—
The audit trail is now right there.

🚥 Pre-merge checks | ✅ 11 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Title check ⚠️ Warning Uses a non-required scope (audits) instead of one of the approved Conventional Commit scopes. Retitle with a valid Conventional Commit scope, e.g. docs: issue ledger for the 2026-07 stabilization pass or another allowed scope.
✅ Passed checks (11 passed)
Check name Status Explanation
Description check ✅ Passed The description directly matches the stabilization ledger work and its documented findings.
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.
No Service-Role In Client Bundles ✅ Passed Only docs/audits/ISSUE_LEDGER_2026-07-03.md:1-125 changed; no src/lib/supabase/admin* or src/app/api//admin/ code was modified.
Rls Coverage On New Tables ✅ Passed PASS: PR diff only adds docs/audits/ISSUE_LEDGER_2026-07-03.md; no migration files changed, so the RLS-on-new-tables check is not applicable.
Auth Check In Server Actions ✅ Passed No changed file matches src/app//actions//*.ts; PR only adds docs/audits/ISSUE_LEDGER_2026-07-03.md.
Sport-Prefixed Table Names ✅ Passed No changed .ts/.tsx files in the PR diff; only docs/audits/ISSUE_LEDGER_2026-07-03.md changed.
No Destructive Writes ✅ Passed Only docs/audits/ISSUE_LEDGER_2026-07-03.md:1-125 changed; git diff shows no code files, so no DELETE+INSERT save/submit/sync path exists.
No Edits To Historical Migrations ✅ Passed Only docs/audits/ISSUE_LEDGER_2026-07-03.md changed; no paths under supabase/migrations/ were modified in the PR diff.
Conventional Commits ✅ Passed HEAD squashed subject docs(audits): issue ledger for the 2026-07 stabilization pass matches the conventional-commits regex.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch docs/issue-ledger-2026-07-03
  • 🛠️ helm safety pass
  • 🛠️ dashboard ux pass
  • 🛠️ rls test pass

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

@qodo-code-review

Copy link
Copy Markdown

PR Summary by Qodo

docs(audits): add issue ledger for 2026-07 stabilization pass

📝 Documentation 🕐 Less than 10 minutes

Grey Divider

AI Description

• Add a consolidated ledger mapping stabilization-brief issues to current status.
• Record evidence sources and recommended next actions without auto-closing issues.
• Summarize shipped PRs, dependency triage, and explicit out-of-scope follow-ups.
High-Level Assessment

The following are alternative approaches to this PR:

1. GitHub Issues/Project board as the source of truth
  • ➕ Statuses, owners, and due dates stay current without editing a large markdown file
  • ➕ Better discoverability/search/notifications and cross-linking to PRs
  • ➕ Supports lightweight automation (labels, project fields, queries)
  • ➖ Harder to capture long-form evidence in one place without becoming comment-heavy
  • ➖ Requires consistent hygiene across many issues to avoid drift
2. Structured YAML/JSON ledger + generated markdown
  • ➕ Machine-readable audit outcomes (easy to diff, query, and validate)
  • ➕ Can generate consistent tables and summaries (PR lists, buckets, counts)
  • ➖ Adds tooling overhead and a generation step
  • ➖ Reviewers may prefer directly-editable markdown for narrative context
3. Split by bucket into multiple smaller docs
  • ➕ Smaller diffs per category; easier targeted review/ownership
  • ➕ Reduces merge conflicts when multiple people update different buckets
  • ➖ Loses the single-page, end-to-end “final deliverable” narrative
  • ➖ More navigation/links to keep organized

Recommendation: Keep the markdown ledger as-is for this phase-14 deliverable (it optimizes for a single auditable artifact), but consider following up by migrating ongoing tracking to GitHub Issues/Projects (or a structured ledger) to reduce staleness—especially for items explicitly marked “needs triage/blocked/out of scope”.

Files changed (1) +125 / -0

Documentation (1) +125 / -0
ISSUE_LEDGER_2026-07-03.mdAdd phase-14 stabilization issue ledger with evidence and next actions +125/-0

Add phase-14 stabilization issue ledger with evidence and next actions

• Introduces a dated issue ledger documenting each stabilization-brief issue’s classification, evidence checked this pass, and recommended next steps. Includes dependency-PR triage, a list of shipped PRs (#774–#781), and an explicit out-of-scope/blocked work list (e.g., key rotation, pgTAP/Docker-bound tests, scripts test wiring).

docs/audits/ISSUE_LEDGER_2026-07-03.md

@qodo-code-review

Copy link
Copy Markdown

Code Review by Qodo

🐞 Bugs (2) 📘 Rule violations (0) 📎 Requirement gaps (0) 📜 Skill insights (0)

Context used
✅ Compliance rules (platform): 97 rules

Grey Divider


Remediation recommended

1. Nonexistent drift-check command 🐞 Bug ⚙ Maintainability
Description
The ledger claims a drift guard exists as npm run db:drift:check, but package.json defines no
db:drift:check script, so the documented verification step will fail. This can also create false
confidence that a runnable drift-check entry point exists when it does not.
Code

docs/audits/ISSUE_LEDGER_2026-07-03.md[18]

+| #728 | `recalculate_baseball_season_stats` `b.so` drift | open | **fixed — needs regression** | Live function body has no `b.so` reference; now includes a coach-auth guard. Hotfix held. | Comment with evidence. Drift guard (`npm run db:drift:check`, PR #775) now asserts this on every run — closes the "needs regression" gap. |
Relevance

⭐⭐⭐ High

Team has accepted fixing docs/commands mismatching reality (e.g., wiring documented fallback) in PR
#621.

PR-#621

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
The ledger documents npm run db:drift:check, but the repo’s scripts list does not include that
entry, so npm run db:drift:check cannot work as written.

docs/audits/ISSUE_LEDGER_2026-07-03.md[17-23]
package.json[5-26]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

### Issue description
`docs/audits/ISSUE_LEDGER_2026-07-03.md` references `npm run db:drift:check`, but that script is not present in `package.json`.

### Issue Context
This is presented as an always-on regression guard for #728 drift, so it needs to be runnable via the documented command (or the doc needs to reference the real command).

### Fix Focus Areas
- docs/audits/ISSUE_LEDGER_2026-07-03.md[18-18]
- package.json[5-58]

### What to change
- Option A (docs-only): Update the ledger to reference the correct existing script (if one already exists) or remove the claim.
- Option B (preferred if intended): Add a `db:drift:check` script to `package.json` that runs the actual drift guard implementation, and (if applicable) wire it into CI so the ledger statement is accurate.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools



Informational

2. Dead doc references 🐞 Bug ⚙ Maintainability
Description
ISSUE_LEDGER_2026-07-03.md cites multiple audit/runbook files that are not present in this branch,
leaving the ledger with dead links and an unusable evidence trail. Readers cannot follow the
referenced reports/runbooks to validate the classifications or execute the recommended next actions.
Code

docs/audits/ISSUE_LEDGER_2026-07-03.md[R17-94]

+| #651 | Baseball schema drift (12 missing columns) | open | **fixed — needs evidence comment** | All 12 columns confirmed present via direct `information_schema.columns` query against production. Matching migrations exist on disk and in the remote ledger. See `docs/audits/SUPABASE_DRIFT_REPORT_2026-07-03.md`. | Comment with evidence + close. |
+| #728 | `recalculate_baseball_season_stats` `b.so` drift | open | **fixed — needs regression** | Live function body has no `b.so` reference; now includes a coach-auth guard. Hotfix held. | Comment with evidence. Drift guard (`npm run db:drift:check`, PR #775) now asserts this on every run — closes the "needs regression" gap. |
+| #772 (linked-lint: `can_manage_baseball_lift_group`) | Stale reference to `baseball_strength_groups` | open (tracked under #772) | **fixed — needs evidence comment** | Live body has no executable reference to the graveyarded table (comment-only). | Comment with evidence + close this sub-finding. |
+| #772 (linked-lint: `baseball_accept_staff_invite`) | Stale reference to `v_invitation.invitee_email` | open (tracked under #772) | **fixed — needs evidence comment** | Live body uses `v_invitation.email` / `.invitee_name`, both real columns. No stale reference. | Comment with evidence + close this sub-finding. |
+| #732 | `public.rate_limits` / `expires_at` errors | open | **needs triage** (reclassified) | `public.rate_limits` doesn't exist; every function referencing `expires_at` uses a real, correctly-named column on its own table (`baseball_staff_invitations`, `helm_lifting_coach_invites`, `baseball_team_invitations`). No first-party schema/function cause found. | Next step is Supabase project **log correlation** at the time of the original error (edge function / dependency / external probe), not another schema search. |
+| n/a | Migration ledger integrity (NEW finding) | not filed | **still valid — new** | Local migration filenames and remote-applied versions are systemically mismatched for ~everything since 2026-05-26 (193 local-only / 445 remote-only by version, almost entirely 1:1 name-paired). `npm run check:ledger` exists but is wired into no CI job. | File a new issue. Investigate what actually applies migrations to this project (likely the Supabase MCP `apply_migration` tool, which mints its own version at call time — this session's own admin-rollup migration reproduced the same pattern by necessity, see PR #775). |
+| n/a | Admin rollup RPCs gated on mutable `users.role`, not `is_super_admin()` (NEW finding, PR #736 follow-up) | not filed | **fixed** | All 11 `get_admin_*_rollup` RPCs + `guard_users_role_self_change` now check `is_super_admin()`. Migration applied to production, verified live. See PR #775. | File a new issue documenting the incident-reproduction risk that existed, cross-reference #736, close as fixed with this PR as evidence. |
+
+## Bucket B — BaseballHelm Data Integrity
+
+| Issue | Title | State | Classification | Evidence | Next action |
+|---|---|---|---|---|---|
+| #492 | `publishLiftDay` duplicate assignments | closed | **fixed — regression exists** | `src/app/baseball/actions/__tests__/publish-lift-day-helm-bridge.integration.test.ts` covers re-publish idempotency. Runs under `npm run test:integration`, not default `npm test`. | No action — already adequately covered. |
+| #477 | Postgame regenerate resets disposition to `new` | closed | **fixed — regression added this pass** | Zero prior test coverage found; added `src/app/baseball/actions/__tests__/postgame.test.ts` (5 tests: fresh insert, preserve converted/dismissed/resolved, stale soft-dismiss, stale-but-converted left alone). See PR #776. | Comment on issue with the new test file as evidence. |
+| #399 | Box-score save atomicity | closed | **fixed — partial regression** | `save-full-box-score.test.ts` / `upload-box-score-csv.test.ts` cover RPC-response-level behavior; no DB-level rollback test exists (single-RPC design, needs pgTAP). | Leave open sub-task for a pgTAP/integration test; not blocking. |
+| #417 | Legacy stats seed script safety | closed | **fixed — regression exists, but the regression itself doesn't run** | `scripts/__tests__/seed-baseball-stats.safety.test.mjs` has correct content but is part of the broader "scripts/__tests__ is entirely dead" finding (47 files written for `node --test`, invoked by nothing). | Tracked under the P0 security PR's follow-up item (#774's runbook §4), not Baseball-specific. |
+| #442 | Camp capacity enforcement | closed | **fixed — partial regression added this pass** | `src/app/baseball/actions/__tests__/register-for-camp.test.ts` (added, PR #776) proves the caller always routes through the atomic RPC and never defaults to false success. True concurrent-capacity enforcement lives in Postgres (`baseball_register_for_camp`, `FOR UPDATE` row lock) and needs pgTAP — not possible in this session (no Docker). | pgTAP follow-up tracked in `docs/audits/BASEBALL_REGRESSION_PACK_2026-07-03.md`. |
+| #443 | Cancelled registrations excluded from capacity | closed | **fixed — regression exists** | `src/lib/baseball/camp-utils.test.ts` covers `activeCampCountsByCamp`. | No action. |
+| #395 | Team join code lifecycle | closed | **fixed — needs regression (partial)** | `team-join-code.test.ts` covers ~4 of ~8 scenarios (max-uses exhaustion, atomic redemption, release-on-failure, IDOR). Missing: expired invite, invalid code, duplicate join, cross-team denial, collision retry. | Extend the existing test file — same mock pattern, no new infra. Not done this pass (documented in `BASEBALL_REGRESSION_PACK_2026-07-03.md`). |
+| #406 | Staff player-scope RLS | closed | **fixed — needs regression, blocked** | Enforcement is 100% Postgres RLS (`can_view_baseball_player`) with no TypeScript mirror. **Also found:** the shipped #406 migration treats `scope_player_ids IS NULL OR empty` as "see all team players," not "deny" — double-check this matches actual product intent (the brief's framing suggested empty scope should deny). | Needs a pgTAP suite (blocked — no Docker in this session) AND a product-intent confirmation on the null/empty-scope behavior. |
+| #415 | Import review-band server authority | closed | **fixed — regression added this pass** | Zero prior action-level coverage found; added `src/app/baseball/actions/__tests__/commit-event-import-review-bands.test.ts` (4 tests: server recompute overrides forged client band, `do_not_commit` throws pre-write, `hold_for_review` stages with zero event writes, no-`rawFileBody` fallback documented). See PR #776. | Comment on issue with the new test file as evidence. |
+| #407 | Disabled import sources rejected | closed | **fixed — partial regression** | Helper-level coverage exists (`import-source-enabled.test.ts`); no action-level (`previewEventImport`/`commitEventImport`) rejection test. | Extend `commit-event-import-review-bands.test.ts` with a disabled-source case — not done this pass. |
+| #413 | Dashboard failure-state taxonomy | closed | **fixed — thin regression** | Utility-level (`resolveReadModelLoadState`) and a handful of static contracts exist; no component-level rendering tests across all Baseball dashboard pages. | Dedicated React Testing Library pass — larger scope, not done this pass. |
+| #415-adjacent | #394 bespoke auth checks vs. `withBaseballAction` | open | **not independently verified this pass** | Carried from the brief; not re-audited in this session. | Needs its own audit pass. |
+| #393 | Baseball document actions legacy patterns | open | **not independently verified this pass** | Carried from the brief; not re-audited in this session. | Needs its own audit pass. |
+
+## Bucket C — Helm Bridge / Admin Dashboard
+
+| Issue | Title | State | Classification | Evidence | Next action |
+|---|---|---|---|---|---|
+| #736 | Admin RPC role-model regression (root cause) | closed | **fixed this pass (root cause, not just symptom)** | #736's original fix restored the admin row + added `admin_allowlist`/`is_super_admin()`, but never migrated the 11 `get_admin_*_rollup` RPCs off the original `users.role='admin'` gate — meaning the exact incident was still fully reproducible by anything touching `users.role`. Also found `guard_users_role_self_change` allowed `admin`→`coach` self-demotion (the literal #736 transition) since it only blocked escalation, not demotion. Both fixed and verified live. See PR #775. | Comment on #736 with this evidence — the issue's "prevent recurrence" acceptance criterion is now actually met. |
+| n/a | Helm Bridge admin/errors/deploys pages functional | — | **fixed/verified where checked** | Sentry/Vercel APIs confirmed fail-soft (never throw); `/admin/deploys` already treats non-`ok` status as `PanelNoData`. "0 users" → "unknown user" wording fixed for `app`-origin incidents. Error-identity enrichment (`contextFrom`) added, wired into `generateRoundRecap`. See PR #777. | No open issue found for these specific sub-items; treat PR #777 as the evidence trail. |
+
+## Bucket D/E — Sentry / Vercel
+
+No open issue numbers were named for these specifically in the brief (they were framed as "known issues," not filed). PR #777 addresses: Vercel web-insights false-zero-on-401/403 (was indistinguishable from real zero traffic), and adds `docs/operations/SENTRY_ADMIN_READ_API.md` + `docs/operations/VERCEL_ADMIN_DEPLOYS_RUNBOOK.md`.
+
+## Bucket E — CI / External Checks
+
+| Issue | Title | State | Classification | Evidence | Next action |
+|---|---|---|---|---|---|
+| #390 | CI: classify pending PR checks | **closed** | **fixed — verified** | `docs/CI_RUNBOOK.md` exists, comprehensive (hard-gate/advisory classification table, wait windows, rerun commands, inherited-failure guidance), and cross-checked accurate against `.github/branch-protection.md`. | No action — already fully addressed, no new runbook needed. |
+| #388 | CircleCI Lighthouse preview readiness | **closed** | **fixed — verified** | `.circleci/scripts/wait-for-vercel-preview.sh` exists and is confirmed wired into `.circleci/config.yml` (line 231). | No action — already fully addressed. |
+
+## Bucket F — Security / Secrets
+
+| Issue | Title | State | Classification | Evidence | Next action |
+|---|---|---|---|---|---|
+| #516 | Hardcoded service-role key in 9 scripts | **closed** | **REOPENED — was not actually fixed** | All 9 named scripts (plus a 10th, `run-migration.mjs`, not originally named) still had the live production `service_role`/`anon` JWT hardcoded on `main` as of this pass, confirmed via `gitleaks` + manual read. Two scripts also hardcoded a real plaintext account password. The regression guard meant to catch this only scanned a different file glob and, separately, was never invoked by anything. All fixed in PR #774 (code-side). **Key rotation itself is a manual maintainer action** — see `docs/operations/2026-07-03-p0-service-role-key-rotation-runbook.md`. | **Urgent: rotate the Supabase JWT secret** (Project Settings → API → Regenerate), update Vercel/CI/local env vars, rotate the demo account password. Re-open #516 or file a new P0 until rotation is confirmed done. |
+| #380 | Ad hoc stats seeding script hardcoded creds | closed | **not independently verified this pass** | `scripts/seed-baseball-stats.mjs` uses `KNOWN_PROD_PROJECT_REF` as a safety guard (not a hardcoded secret) — spot-checked while investigating #516, looks correctly remediated, but not a full independent re-audit. | Low priority — spot-check suggests this one is genuinely fixed, unlike #516. |
+
+## Bucket G — Generated File Drift
+
+| Issue | Title | State | Classification | Evidence | Next action |
+|---|---|---|---|---|---|
+| n/a | `next-env.d.ts` / `public/sw.js` drift | not filed (freshness baseline finding) | **fixed** | Untracked `next-env.d.ts`; `public/sw.js`'s `stamp-sw.mjs` now only stamps on real Vercel builds (`process.env.VERCEL`), not local/CI builds. `git blame` on `sw.js` showed this had already caused one stray real commit. See PR #778. | No action — fixed. |
+
+## Bucket H — Knip / Dead Code
+
+| Issue | Title | State | Classification | Evidence | Next action |
+|---|---|---|---|---|---|
+| n/a | 3 unlisted direct dependencies | not filed | **fixed** | `@radix-ui/react-compose-refs`, `fflate`, `postcss-load-config` added to `package.json`. See PR #779. | No action — fixed. |
+| n/a | 3 "low-risk" unused files | not filed | **2 of 3 were false positives — 1 fixed** | `golf-mockups/index.tsx` and `lib/types/table.ts` are both actively imported (verified via grep) — **not deleted**. Only `lib/mapbox/client.ts` was genuinely unused (zero importers, no `mapbox-gl` dependency at all) — deleted. See PR #780. | No action on the two false positives; consider re-tuning whatever Knip config produced them if #773 merges. |
+| n/a | 3 "medium-risk" files (dashboard-types.ts, MatchScoreBadge.tsx, match-calculator.ts) | not filed | **not touched, per brief instruction** | Left for feature-owner review as instructed. | Feature owner review needed before any action. |
+
+## Bucket I — Dependency / Security Audit
+
+| Item | State | Classification | Evidence | Next action |
+|---|---|---|---|---|
+| PR #735 (`tar` bump) | open | **merged this pass (auto-merge enabled)** | All hard-gate checks green; only the advisory full Playwright E2E suite failed (per `CI_RUNBOOK.md`'s own classification, non-blocking). | Will complete automatically once GitHub updates the branch. |
+| PR #741 (`@anthropic-ai/sdk` bump) | open | **merged this pass (auto-merge enabled)** | Same as above. | Same as above. |
+| PR #744 (GitHub Actions group) | open | **needs triage — NOT merged** | `Review Gate / all` genuinely failing: `semgrep (custom rules)` reports 11 blocking findings across 5 files, `yamllint` also failing. Not a flake — real findings on this PR's diff. | Needs someone to look at the actual semgrep/yamllint output before merging; not attempted in this pass given the unexpected failures. |
+| PR #753, #760, #764, #765, #766, #767 | open | **not touched — needs individual review** | #760 is a **major** version bump (`@visx/visx` 3→4) — brief explicitly says don't combine major bumps with app changes; #767 is 36 production dependencies grouped together; #765/#766 touch separate subprojects (`ux-flow-auditor`, `helm-website-ui`), not the main app. | Handle individually, smallest/lowest-risk first, per the brief's own ordering — not attempted this pass given time/risk budget after the two safe merges. |
+| `npm audit` (full) | — | **documented, not fixed** | 39 vulnerabilities (1 low, 34 moderate, 4 high) as of this pass — consistent with the freshness baseline's prior count. Per hard guardrails, `npm audit fix`/`--force` were never run. | Addressed via the individual Dependabot PRs above, not a bulk audit-fix. |
+
+## Bucket J — Local Git Hygiene
+
+See `docs/audits/GIT_HYGIENE_2026-07-03.md` (PR #781) for full detail: commit-graph fixed, 6 stale branches deleted, 24 stashes and 794 ignored-but-removable paths (including live `.env*` secrets) documented but not acted on.
Relevance

⭐ Low

Similar “missing referenced doc” fix was definitely rejected in PR #623; team tolerates dead doc
pointers.

PR-#623

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
The ledger explicitly points to specific audit/runbook paths as evidence and next steps; these paths
do not resolve in the current PR branch, so the ledger’s references are dead/unverifiable as
written.

docs/audits/ISSUE_LEDGER_2026-07-03.md[15-66]
docs/audits/ISSUE_LEDGER_2026-07-03.md[92-95]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

### Issue description
The new issue ledger references several supporting docs (audit reports and operations runbooks) that are not present in the repo at the referenced paths, creating dead links and breaking the intended evidence trail.

### Issue Context
This PR introduces `docs/audits/ISSUE_LEDGER_2026-07-03.md` as a “final deliverable” and repeatedly points to other documents as evidence/runbooks.

### Fix Focus Areas
- docs/audits/ISSUE_LEDGER_2026-07-03.md[17-66]
- docs/audits/ISSUE_LEDGER_2026-07-03.md[92-95]

### What to change
- Either (a) add the missing referenced files at the exact paths used in the ledger, or (b) update the ledger to point at the correct existing files.
- If the referenced files live in other PRs, merge/port them into this branch before merging this ledger PR so the references resolve on `main`.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


Grey Divider

Qodo Logo

| Issue | Title | State | Classification | Evidence | Next action |
|---|---|---|---|---|---|
| #651 | Baseball schema drift (12 missing columns) | open | **fixed — needs evidence comment** | All 12 columns confirmed present via direct `information_schema.columns` query against production. Matching migrations exist on disk and in the remote ledger. See `docs/audits/SUPABASE_DRIFT_REPORT_2026-07-03.md`. | Comment with evidence + close. |
| #728 | `recalculate_baseball_season_stats` `b.so` drift | open | **fixed — needs regression** | Live function body has no `b.so` reference; now includes a coach-auth guard. Hotfix held. | Comment with evidence. Drift guard (`npm run db:drift:check`, PR #775) now asserts this on every run — closes the "needs regression" gap. |

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Remediation recommended

2. Nonexistent drift-check command 🐞 Bug ⚙ Maintainability

The ledger claims a drift guard exists as npm run db:drift:check, but package.json defines no
db:drift:check script, so the documented verification step will fail. This can also create false
confidence that a runnable drift-check entry point exists when it does not.
Agent Prompt
### Issue description
`docs/audits/ISSUE_LEDGER_2026-07-03.md` references `npm run db:drift:check`, but that script is not present in `package.json`.

### Issue Context
This is presented as an always-on regression guard for #728 drift, so it needs to be runnable via the documented command (or the doc needs to reference the real command).

### Fix Focus Areas
- docs/audits/ISSUE_LEDGER_2026-07-03.md[18-18]
- package.json[5-58]

### What to change
- Option A (docs-only): Update the ledger to reference the correct existing script (if one already exists) or remove the claim.
- Option B (preferred if intended): Add a `db:drift:check` script to `package.json` that runs the actual drift guard implementation, and (if applicable) wire it into CI so the ledger statement is accurate.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools

@njrini99-code
njrini99-code merged commit 00128f5 into main Jul 3, 2026
36 of 37 checks passed
@njrini99-code
njrini99-code deleted the docs/issue-ledger-2026-07-03 branch July 3, 2026 23:19
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.

1 participant