From bbc5d4625adcbdc32aee2f9b4fb4b0d4365d0e99 Mon Sep 17 00:00:00 2001 From: BigSimmo <87357024+BigSimmo@users.noreply.github.com> Date: Fri, 31 Jul 2026 03:32:33 +0800 Subject: [PATCH 01/12] issues: capture the unreadable-CI token, at-risk worktree work, and the unpushed hook fix Three findings from the 2026-07-30 organisation session that were recorded nowhere durable: - #149 the session GitHub PAT lacks Checks: Read, so no agent can confirm a PR is green. The endpoint that does work returns an empty result rather than an error, so it reads like an absence of checks rather than an absence of permission. - #150 four worktrees on already-merged branches hold uncommitted work that exists in no branch and no PR, the largest being +395/-200 across 19 files including CI config. - #151 the pre-commit fail-open for #143 lives only on a never-pushed local branch, which is also 17 behind main and conflicts on the file whose count sentence main's new docs:update generator now owns. Co-Authored-By: Claude Opus 5 --- docs/outstanding-issues.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/docs/outstanding-issues.md b/docs/outstanding-issues.md index 760a044001..afaf9abcaf 100644 --- a/docs/outstanding-issues.md +++ b/docs/outstanding-issues.md @@ -83,7 +83,7 @@ removed after current-main verification; it is not missing recommended work. | 34 | `#105` | Optional | High — browser/UI verification | When a driven-browser session is available | 30–60 minutes | Decide how the ten `LoadingPanel` fallbacks can be observed at all, then verify or re-scope. A cold-load grep cannot see them — every lazy surface mounts behind interaction state, so nothing renders them on first paint — and a claimed cold-load verification was withdrawn 2026-07-30 after it turned out to be matching `ModeHomePageSkeleton`. Either drive the interaction in a browser and assert the surface's specific label, or record that they are unobservable on cold load. The preconnect half is already verified; do not redo it. **Stop:** do not close this on a cold-load grep. | | 35 | `#126` | Optional | Standard — repository hygiene | Once per UTC calendar quarter, or when the live ledger grows large | 5–15 minutes | Run `npm run ledger:rotate -- --dry-run`, then `npm run ledger:rotate` if the preview looks right; commit the live+archive diff. Stop if dry-run shows unexpected mass moves or archive path collisions. | - + ## Open items @@ -156,6 +156,9 @@ removed after current-main verification; it is not missing recommended work. | #146 | P2 | issue | `ui-phone-scroll` Services result anchor jumps on viewport shrink under CI load | **Outcome:** the required `Production UI` job stops failing on a test the PR did not touch. **Evidence 2026-07-30 (PR #1427 run `30534158395`, job `90844138237`, shard 1 of 3):** `tests/ui-phone-scroll.spec.ts:973` "Services results keep a continuous browser viewport after shared chrome releases" failed at `:1133` — `afterViewportResize.anchorTop` did not stay close to `hidden.anchorTop` across the viewport shrink. `120 passed (6.5m)`, classified "needs investigation". **Intermittent on unchanged code:** the spec is byte-identical across heads `79dd28f`, `76f80f3` and `17c8cb9`; shard 1 passed, passed, failed, then passed again on re-run — four data points, one failure. **Not #127 and not fixed by #1427:** this head already carried #1427's runway poll and travel assertion, and the failing assertion is result-content anchor stability across a resize, not the chrome hide. #127 is the reduced-motion hide on the document route; this is the Services result canvas. **A narrowing claimed here was WITHDRAWN 2026-07-30 (Codex, PR #1446):** an earlier version of this row argued that the sibling `documentScrollTop` assertion did not fail, so the scroll position must have held. That inference is invalid — Playwright aborts a test at the first failing `expect`, so once the `anchorTop` assertion threw, the `documentScrollTop` assertion never executed. Its absence from the output shows nothing, and scroll-restoration causes are NOT ruled out. **Next:** capture `anchorTop` and `documentScrollTop` either side of the resize from a CI-load run, and check whether the chrome release and the viewport change can interleave. **Stop:** do not add to `tests/flake-ledger.json` — that ledger takes reproduced `@quarantine` entries only, and this reproduces once in four. Do not loosen the `toBeCloseTo` tolerance; the anchor stability is the assertion's whole point. **Two further data points 2026-07-30 (PR #1457):** failed once more on head `c739340` (run `30551018893`, shard 1) with `anchorTop` expected `-138`, received `-7`, difference `131`, `120 passed`; then passed on heads `9da02d9` and `a6f2281` across all three shards with the diff byte-identical. That is six data points, two failures, still shard 1 only — and both failures landed on a PR touching nothing but `src/app/mockups/**` plus one mockup test, which strengthens the unchanged-code reading. The magnitude is worth noting for the capture suggested above: `131` is roughly 2x the 64px viewport shrink, not a sub-pixel drift. | PR #1427 run `30534158395`; session 2026-07-30 | 2026-07-30 | | #147 | P2 | rec | Mobile CLS breaches four routes, and it reproduces exactly offline | **Outcome:** mobile CLS is under 0.1 on every measured route, or each remaining breach has a recorded reason. **Measured 2026-07-30 with the LOCAL OFFLINE production harness** (`CHROME_PATH=/opt/pw-browsers/chromium npm run verify:lighthouse -- --keep`; Lighthouse 12.8.2, Chromium 141.0.7390.37, demo corpus, inert loopback Supabase). Mobile CLS: `/dsm` 0.363, `/documents/search` 0.220, `/therapy-compass` 0.142, `/` 0.023 — `/forms` did not measure locally (Lighthouse `NO_NAVSTART`, its own "run again" transient), but the live dispatch put it at 0.212. Desktop passes everywhere: 0.016–0.097. **The finding that matters is that these reproduce the live production dispatch EXACTLY.** Against run `30548662649` on `psychiatry.tools`, all four locally measurable mobile routes match to three decimals — 0.023 / 0.142 / 0.220 / 0.363 on both — and the desktop range matches at both endpoints, 0.016–0.097. So CLS on these routes is deterministic layout structure, not network, latency, or production data. Three consequences: (a) the CLS half of `#017` is debuggable and gate-able locally at zero provider cost; (b) `#017`'s recorded blocker "prod server hard-requires Supabase secrets" is stale — `scripts/run-lighthouse-budget.mjs` builds and serves an offline production app precisely to sidestep that, and its earlier note that dev-mode CLS looked "excellent at 0.00–0.04" was measuring DEV, which does not reproduce production; (c) re-dispatching the live workflow to re-measure CLS buys nothing. **LCP does NOT reproduce and must not be read from local runs:** local mobile LCP is 2014–2051 ms against 3639–4716 ms live, because the loopback server has no network latency. The LCP _ranking_ does survive — `/therapy-compass` is the outlier both locally (4978 ms, ~2.4x every other route) and live — which corroborates `#117` rather than replacing it. Mobile TBT, local: `/documents/search` 581 ms, `/dsm` 448, `/therapy-compass` 379, `/` 338. **Ranking by measured contribution, which is what `#017` asked for:** 1. `/dsm` CLS 0.363 (3.6x the threshold, the worst single number anywhere); 2. `/documents/search` 0.220; 3. `/forms` 0.212 (live only); 4. `/therapy-compass` 0.142, and separately the sole LCP outlier via `#117`; 5. `/` 0.023, which passes and needs nothing. **Next:** attribute the shifts to elements. Lighthouse's `layout-shift-elements` audit returned **zero items on every route** — the `cumulative-layout-shift` audit carries only `debugdata` — so attribution needs a driven Chromium session with a `PerformanceObserver` on `layout-shift`, reading `entry.sources[].node` and `entry.value`, against the same offline production build. Start with `/dsm`. **Gate — `#118` owns it, and this row supplies a constraint it was missing.** `#118` already tracks flipping `lighthouse-budget.json` to `enforce: true` and says not to do it "before `#117` or the baseline pins a known-slow route". These numbers make that concrete: pinning a baseline today would bake CLS 0.363 on `/dsm` in as the accepted value, so the CLS fixes must land first or the gate ratifies the breach. Separately, no baseline could have been committed from this run anyway — the grader correctly refused it as incomplete evidence because `/forms` produced no report, and that refusal was not overridden. **Reproduction trap:** without `CHROME_PATH`, `chrome-launcher` cannot find a browser in this container and every route fails; the harness reads `CHROME_PATH`/`PLAYWRIGHT_CHROMIUM_EXECUTABLE_PATH` (`run-lighthouse-budget.mjs:291`) but nothing sets either, even though `PLAYWRIGHT_BROWSERS_PATH` is set. Related to `#121`. Also seen: a truncated `progress` package in the npx cache broke Lighthouse startup entirely; clearing the npx cache entry fixed it. **Stop:** do not re-dispatch the live Web-Vitals workflow to re-measure CLS — it is reproducible offline for free. Do not commit a budget baseline from a run with a failed route. Do not treat local LCP numbers as production LCP. | `#017` live run `30548662649`; local `verify:lighthouse` 2026-07-30; `lighthouse-budget.json` | 2026-07-30 | | #148 | P2 | issue | Rows can be deleted from the issues ledger and no gate notices | **Outcome:** a row cannot leave `docs/outstanding-issues.md` without being archived, and a gate catches it if one does. **Observed 2026-07-30 on `main`:** commit `d8b034c8` (PR #1441, "guard upload limits in production builds") deleted **three** rows from the Open items table and added **zero** rows to the archive — `#085` (genuinely resolved by that same PR, which added `scripts/check-upload-limit-parity.mjs`), `#119` (a duplicate of `#122`), and `#105` (**open and unresolved** — its `LoadingPanel` half was and is unverified). Two of the three were dispositionable; none was dispositioned, and the third should not have been touched at all. The file's own Conventions section says of the archive: _"Move resolved rows here with the resolution date and a one-line outcome. Keep them — do not delete."_ There is precedent for doing it properly even for duplicates — `#140` was archived as "CLOSED as a duplicate, superseded by `#133`" rather than removed. **Why nothing caught it:** `npm run check:outstanding-issues` validates duplicate ids, an id present in both tables, a marker at or below the highest id, malformed rows, and missing headings — every shape the 2026-07-29 triple collision took (`#112`). It does **not** compare against the previous revision, so a row that simply disappears is invisible to it, in `verify:cheap` and in `static-pr` alike. **Likely mechanism, and why this file is the one it happens to:** `#133` deliberately left this file without a `merge=union` driver so overlapping edits conflict loudly instead of being silently concatenated. That is the right design, but it means every sync is a hand-resolution, and taking one side wholesale silently drops the other side's rows — exactly what AGENTS.md forbids for this file. This branch hit five consecutive genuine conflicts on it, and `#105` only survived because each resolution was done row by row and diffed with column padding normalised away afterwards. **Next:** add a deletion check — compare the id set against the merge base (or `origin/main`) and fail when an id present there is absent from both tables, unless the same commit archives it. That is a few lines in `scripts/check-outstanding-issues.mjs` and closes the one shape `#112`'s guard left open. **Stop:** do not fix this by adding a union merge driver — `#133` removed that deliberately and union merge would reintroduce the duplicate-row damage it was removed to stop. The fix is detection, not merge policy. | `main` commit `d8b034c8` (PR #1441); `scripts/check-outstanding-issues.mjs`; `#112`, `#133` | 2026-07-30 | +| #149 | P2 | issue | CI verdicts are unreadable with the current GitHub token | **Outcome:** an agent (or a human on CLI) can confirm a PR is green before merging it. **Detail:** the session `gh` credential is a fine-grained PAT (`github_pat_11AU2...`) without the **Checks: Read** permission. `gh pr checks` fails per context with `Resource not accessible by personal access token`, and `GET /repos/:o/:r/commits/:sha/check-runs` returns 403. `GET .../status` succeeds but reports `total: 0`, because this repo reports through Actions check-runs rather than legacy commit statuses — so the working endpoint is silent rather than wrong, which reads like "no checks" instead of "no permission". Consequence: PRs #1436 and #1458 were both handed off with every local gate green but the hosted verdict unverifiable, and `scripts/guard-push.mjs` logs `auto-merge: gh not available` for the same reason (see #132). **Next:** add Checks: Read to that PAT; nothing in the repo needs changing. | session 2026-07-30; PR #1436, PR #1458 | 2026-07-31 | +| #150 | P2 | issue | Uncommitted work sits in worktrees whose branches are already merged | **Outcome:** work that exists in no branch and no PR is either committed or knowingly discarded, not lost to a disk reclaim. **Inventory 2026-07-30**, all on branches fully merged into `origin/main`, so the changes exist nowhere else: `codex/reconcile-immediate-20260730` — 21 files, +395/-200 across 19 tracked, including `.github/workflows/ci.yml`, `package.json` and `docs/scripts-index.md`; `codex/document-results-mockup-20260730` — 8 files (+13/-3 tracked) plus an untracked `document-search-results/page.tsx` under `src/app/mockups/` (named without a full path here because it does not resolve in this repo); `codex/chat-ledger-triage-d344` — `docs/outstanding-issues.md` +59/-61; `claude/section-spy-browser-coverage` — `tests/ui-smoke.spec.ts` +51. A fifth (`claude/frosty-mayer-2c6167`) self-resolved to clean during the session. **Next:** per worktree, decide commit-to-a-branch vs discard; do not bulk-delete. The reconcile-immediate one is the priority — 395 insertions touching CI config. Removing a merged branch's worktree without this check is how it disappears; that check is why only one of the two "safe" candidates was removed in the 2026-07-30 cleanup. | session 2026-07-30 worktree cleanup | 2026-07-31 | +| #151 | P3 | task | The pre-commit fail-open exists only on a never-pushed local branch | **Outcome:** the cross-worktree hook fix reaches other machines, or is knowingly dropped. **Detail:** `d2fd16d54` on `codex/docs-sync-automation-pr` makes `.githooks/pre-commit` fail open when `scripts/update-docs-inventory.mjs` is absent from the committing worktree (the #143 defect). `git branch -r --contains d2fd16d54` is empty — that branch has never been pushed, so the commit exists in one local worktree only. The branch is also 17 behind `main` and `git merge-tree` reports a real conflict in `docs/scripts-index.md`, because `main` has since landed both the rewritten index and the `docs:update` generator that owns its count sentence. **Next:** whoever owns that branch syncs it, resolves that one file in favour of `main`'s generated header, and pushes; the fix distributes once `scripts/install-git-hooks.mjs` sees it. Until then every checkout still relies on the untracked copy in the primary checkout. | session 2026-07-30; row #143 | 2026-07-31 | ## Resolved / archive From 241b32e84ce437b86ce9614e5d942b910fff0584 Mon Sep 17 00:00:00 2001 From: BigSimmo <87357024+BigSimmo@users.noreply.github.com> Date: Fri, 31 Jul 2026 03:34:14 +0800 Subject: [PATCH 02/12] docs(ledger): record the session-followup capture review for PR #1490 Co-Authored-By: Claude Opus 5 --- docs/branch-review-ledger.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/branch-review-ledger.md b/docs/branch-review-ledger.md index 80239137fb..ced1b72d76 100644 --- a/docs/branch-review-ledger.md +++ b/docs/branch-review-ledger.md @@ -261,3 +261,4 @@ Records before 2026-07-28 were written by hand and had drifted: 146 lines carrie | 2026-07-30 | PR-1475 | 6de5c321beac55860cc4b6fc7d26ef5a7e088f38 | PR #1475 ingestion behavioral extraction | PASS after current-main reconciliation; extracted decisions preserve entrypoint behavior and replace the matching source-grep assertion with executable coverage | focused Vitest 3 files, 27 tests passed; typecheck passed; outstanding-issues and branch-review-ledger guards passed; provider-backed ingestion not run | | 2026-07-30 | PR-1458 | 8c1975b178c67e4c54acffc395d85e38c43d39f5 | PR #1458 superseded root-gate reconciliation | PASS: retained only unique documentation corrections after PR #1480 landed the stronger tracked-root gate; archived resolved shared-hook issue #143 | docs index and links passed; outstanding-issues and branch-review-ledger guards passed; diff check passed | | 2026-07-30 | PR-1448 | 8ece7f345e93170c6bd242701eaff05f5504d98b | PR #1448 authenticated live workflow | PASS after review repair: protected-main-only checkout, explicit bounded mutations, scoped secrets, and static dispatch confirmation; no live provider workflow dispatched | GitHub Actions and PR-policy guards passed; focused Vitest 3 passed; docs links and scripts, issue and ledger guards, Prettier and diff checks passed | +| 2026-07-30 | claude/capture-session-followups | bbc5d4625adcbdc32aee2f9b4fb4b0d4365d0e99 | outstanding-issues capture: unreadable CI token, at-risk worktree work, unpushed hook fix | PR #1490 opened. Ledger-only: adds #149 (PAT lacks Checks: Read so no PR verdict is readable; the working status endpoint returns total:0 rather than erroring), #150 (four already-merged worktrees hold uncommitted work existing in no branch or PR, largest +395/-200 over 19 files incl CI config), #151 (the #143 pre-commit fail-open d2fd16d54 lives only on a never-pushed branch, 17 behind main, conflicting on the file main's docs:update generator now owns). Also records that PR #1458 is superseded by #1480 and should be closed | check:outstanding-issues 149 rows 60 open unique ids next-id=152; docs:check-links 1415 refs resolve; docs:check-index 49 roots/modules/routes; prettier clean | From 1ac7c5f62c9c2051f2af9e437cb8b421526b51ff Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Thu, 30 Jul 2026 19:46:48 +0000 Subject: [PATCH 03/12] docs(ledger): record #143/#151/#149 reconciliation for PR #1490 Co-authored-by: BigSimmo --- docs/branch-review-ledger.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/branch-review-ledger.md b/docs/branch-review-ledger.md index 22d9617c03..d507e3770c 100644 --- a/docs/branch-review-ledger.md +++ b/docs/branch-review-ledger.md @@ -263,3 +263,4 @@ Records before 2026-07-28 were written by hand and had drifted: 146 lines carrie | 2026-07-30 | PR-1448 | 8ece7f345e93170c6bd242701eaff05f5504d98b | PR #1448 authenticated live workflow | PASS after review repair: protected-main-only checkout, explicit bounded mutations, scoped secrets, and static dispatch confirmation; no live provider workflow dispatched | GitHub Actions and PR-policy guards passed; focused Vitest 3 passed; docs links and scripts, issue and ledger guards, Prettier and diff checks passed | | 2026-07-30 | claude/capture-session-followups | bbc5d4625adcbdc32aee2f9b4fb4b0d4365d0e99 | outstanding-issues capture: unreadable CI token, at-risk worktree work, unpushed hook fix | PR #1490 opened. Ledger-only: adds #149 (PAT lacks Checks: Read so no PR verdict is readable; the working status endpoint returns total:0 rather than erroring), #150 (four already-merged worktrees hold uncommitted work existing in no branch or PR, largest +395/-200 over 19 files incl CI config), #151 (the #143 pre-commit fail-open d2fd16d54 lives only on a never-pushed branch, 17 behind main, conflicting on the file main's docs:update generator now owns). Also records that PR #1458 is superseded by #1480 and should be closed | check:outstanding-issues 149 rows 60 open unique ids next-id=152; docs:check-links 1415 refs resolve; docs:check-index 49 roots/modules/routes; prettier clean | | 2026-07-30 | codex/outstanding-deletion-guard | da1bed4bcb05f2b975823c76bab0913278cfaea6 | issue 148 deletion guard | approved: no P0-P2 findings; base comparison is fail-closed in CI and preserves archive moves | verify:cheap; deletion self-test; unreadable-base proof; CI scope; GitHub Actions pin guard | +| 2026-07-30 | claude/capture-session-followups | a026c0bfe70f0e9fe290abbdd3660f4c458e4115 | PR #1490 #143/#151/#149 reconciliation | corrected archived #143 fail-open claim; #151 owns remaining half; #149 separates Checks:Read from missing-gh; merged main #1491 | check:outstanding-issues; docs:check-links | From 5af405bf996564cfaeead5f65d2c9cfad809690e Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Thu, 30 Jul 2026 19:48:38 +0000 Subject: [PATCH 04/12] docs(ledger): supersede PR #1490 reconciliation after remote sync Co-authored-by: BigSimmo --- docs/branch-review-ledger.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/branch-review-ledger.md b/docs/branch-review-ledger.md index d507e3770c..f3d5f9aff9 100644 --- a/docs/branch-review-ledger.md +++ b/docs/branch-review-ledger.md @@ -264,3 +264,4 @@ Records before 2026-07-28 were written by hand and had drifted: 146 lines carrie | 2026-07-30 | claude/capture-session-followups | bbc5d4625adcbdc32aee2f9b4fb4b0d4365d0e99 | outstanding-issues capture: unreadable CI token, at-risk worktree work, unpushed hook fix | PR #1490 opened. Ledger-only: adds #149 (PAT lacks Checks: Read so no PR verdict is readable; the working status endpoint returns total:0 rather than erroring), #150 (four already-merged worktrees hold uncommitted work existing in no branch or PR, largest +395/-200 over 19 files incl CI config), #151 (the #143 pre-commit fail-open d2fd16d54 lives only on a never-pushed branch, 17 behind main, conflicting on the file main's docs:update generator now owns). Also records that PR #1458 is superseded by #1480 and should be closed | check:outstanding-issues 149 rows 60 open unique ids next-id=152; docs:check-links 1415 refs resolve; docs:check-index 49 roots/modules/routes; prettier clean | | 2026-07-30 | codex/outstanding-deletion-guard | da1bed4bcb05f2b975823c76bab0913278cfaea6 | issue 148 deletion guard | approved: no P0-P2 findings; base comparison is fail-closed in CI and preserves archive moves | verify:cheap; deletion self-test; unreadable-base proof; CI scope; GitHub Actions pin guard | | 2026-07-30 | claude/capture-session-followups | a026c0bfe70f0e9fe290abbdd3660f4c458e4115 | PR #1490 #143/#151/#149 reconciliation | corrected archived #143 fail-open claim; #151 owns remaining half; #149 separates Checks:Read from missing-gh; merged main #1491 | check:outstanding-issues; docs:check-links | +| 2026-07-30 | claude/capture-session-followups | f18dc1fb25f4687006be897f2c11a4bb1f583f41 | PR #1490 #143/#151/#149 reconciliation | reconciled after parallel remote main-sync; #143 corrected; #151 owns fail-open; #149 separates Checks vs missing-gh | check:outstanding-issues; docs:check-links | From 42928be0316ab93acdb73925e8c76ac2889d8666 Mon Sep 17 00:00:00 2001 From: BigSimmo <87357024+BigSimmo@users.noreply.github.com> Date: Fri, 31 Jul 2026 03:54:56 +0800 Subject: [PATCH 05/12] issues: record the worktree snapshots and redirect #151 to PR #1494 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit #150 — the four at-risk worktrees were snapshotted onto their own already-merged branches (748ef018f, 5dbd9f965, b7eae51a4, d949859c3), so the work survives a worktree reclaim. All four are clean now. None is pushed or reviewed; the next action is per-snapshot promote-or-reset. #151 — the never-pushed branch is superseded rather than salvageable: its script and hook reached main by other routes, so the fail-open guard was applied to main's committed hook in PR #1494 instead. Co-Authored-By: Claude Opus 5 --- docs/outstanding-issues.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/outstanding-issues.md b/docs/outstanding-issues.md index bcfd3cf247..b835fc658e 100644 --- a/docs/outstanding-issues.md +++ b/docs/outstanding-issues.md @@ -156,8 +156,8 @@ removed after current-main verification; it is not missing recommended work. | #146 | P2 | issue | `ui-phone-scroll` Services result anchor jumps on viewport shrink under CI load | **Outcome:** the required `Production UI` job stops failing on a test the PR did not touch. **Evidence 2026-07-30 (PR #1427 run `30534158395`, job `90844138237`, shard 1 of 3):** `tests/ui-phone-scroll.spec.ts:973` "Services results keep a continuous browser viewport after shared chrome releases" failed at `:1133` — `afterViewportResize.anchorTop` did not stay close to `hidden.anchorTop` across the viewport shrink. `120 passed (6.5m)`, classified "needs investigation". **Intermittent on unchanged code:** the spec is byte-identical across heads `79dd28f`, `76f80f3` and `17c8cb9`; shard 1 passed, passed, failed, then passed again on re-run — four data points, one failure. **Not #127 and not fixed by #1427:** this head already carried #1427's runway poll and travel assertion, and the failing assertion is result-content anchor stability across a resize, not the chrome hide. #127 is the reduced-motion hide on the document route; this is the Services result canvas. **A narrowing claimed here was WITHDRAWN 2026-07-30 (Codex, PR #1446):** an earlier version of this row argued that the sibling `documentScrollTop` assertion did not fail, so the scroll position must have held. That inference is invalid — Playwright aborts a test at the first failing `expect`, so once the `anchorTop` assertion threw, the `documentScrollTop` assertion never executed. Its absence from the output shows nothing, and scroll-restoration causes are NOT ruled out. **Next:** capture `anchorTop` and `documentScrollTop` either side of the resize from a CI-load run, and check whether the chrome release and the viewport change can interleave. **Stop:** do not add to `tests/flake-ledger.json` — that ledger takes reproduced `@quarantine` entries only, and this reproduces once in four. Do not loosen the `toBeCloseTo` tolerance; the anchor stability is the assertion's whole point. **Two further data points 2026-07-30 (PR #1457):** failed once more on head `c739340` (run `30551018893`, shard 1) with `anchorTop` expected `-138`, received `-7`, difference `131`, `120 passed`; then passed on heads `9da02d9` and `a6f2281` across all three shards with the diff byte-identical. That is six data points, two failures, still shard 1 only — and both failures landed on a PR touching nothing but `src/app/mockups/**` plus one mockup test, which strengthens the unchanged-code reading. The magnitude is worth noting for the capture suggested above: `131` is roughly 2x the 64px viewport shrink, not a sub-pixel drift. | PR #1427 run `30534158395`; session 2026-07-30 | 2026-07-30 | | #147 | P2 | rec | Mobile CLS breaches four routes, and it reproduces exactly offline | **Outcome:** mobile CLS is under 0.1 on every measured route, or each remaining breach has a recorded reason. **Measured 2026-07-30 with the LOCAL OFFLINE production harness** (`CHROME_PATH=/opt/pw-browsers/chromium npm run verify:lighthouse -- --keep`; Lighthouse 12.8.2, Chromium 141.0.7390.37, demo corpus, inert loopback Supabase). Mobile CLS: `/dsm` 0.363, `/documents/search` 0.220, `/therapy-compass` 0.142, `/` 0.023 — `/forms` did not measure locally (Lighthouse `NO_NAVSTART`, its own "run again" transient), but the live dispatch put it at 0.212. Desktop passes everywhere: 0.016–0.097. **The finding that matters is that these reproduce the live production dispatch EXACTLY.** Against run `30548662649` on `psychiatry.tools`, all four locally measurable mobile routes match to three decimals — 0.023 / 0.142 / 0.220 / 0.363 on both — and the desktop range matches at both endpoints, 0.016–0.097. So CLS on these routes is deterministic layout structure, not network, latency, or production data. Three consequences: (a) the CLS half of `#017` is debuggable and gate-able locally at zero provider cost; (b) `#017`'s recorded blocker "prod server hard-requires Supabase secrets" is stale — `scripts/run-lighthouse-budget.mjs` builds and serves an offline production app precisely to sidestep that, and its earlier note that dev-mode CLS looked "excellent at 0.00–0.04" was measuring DEV, which does not reproduce production; (c) re-dispatching the live workflow to re-measure CLS buys nothing. **LCP does NOT reproduce and must not be read from local runs:** local mobile LCP is 2014–2051 ms against 3639–4716 ms live, because the loopback server has no network latency. The LCP _ranking_ does survive — `/therapy-compass` is the outlier both locally (4978 ms, ~2.4x every other route) and live — which corroborates `#117` rather than replacing it. Mobile TBT, local: `/documents/search` 581 ms, `/dsm` 448, `/therapy-compass` 379, `/` 338. **Ranking by measured contribution, which is what `#017` asked for:** 1. `/dsm` CLS 0.363 (3.6x the threshold, the worst single number anywhere); 2. `/documents/search` 0.220; 3. `/forms` 0.212 (live only); 4. `/therapy-compass` 0.142, and separately the sole LCP outlier via `#117`; 5. `/` 0.023, which passes and needs nothing. **Next:** attribute the shifts to elements. Lighthouse's `layout-shift-elements` audit returned **zero items on every route** — the `cumulative-layout-shift` audit carries only `debugdata` — so attribution needs a driven Chromium session with a `PerformanceObserver` on `layout-shift`, reading `entry.sources[].node` and `entry.value`, against the same offline production build. Start with `/dsm`. **Gate — `#118` owns it, and this row supplies a constraint it was missing.** `#118` already tracks flipping `lighthouse-budget.json` to `enforce: true` and says not to do it "before `#117` or the baseline pins a known-slow route". These numbers make that concrete: pinning a baseline today would bake CLS 0.363 on `/dsm` in as the accepted value, so the CLS fixes must land first or the gate ratifies the breach. Separately, no baseline could have been committed from this run anyway — the grader correctly refused it as incomplete evidence because `/forms` produced no report, and that refusal was not overridden. **Reproduction trap:** without `CHROME_PATH`, `chrome-launcher` cannot find a browser in this container and every route fails; the harness reads `CHROME_PATH`/`PLAYWRIGHT_CHROMIUM_EXECUTABLE_PATH` (`run-lighthouse-budget.mjs:291`) but nothing sets either, even though `PLAYWRIGHT_BROWSERS_PATH` is set. Related to `#121`. Also seen: a truncated `progress` package in the npx cache broke Lighthouse startup entirely; clearing the npx cache entry fixed it. **Stop:** do not re-dispatch the live Web-Vitals workflow to re-measure CLS — it is reproducible offline for free. Do not commit a budget baseline from a run with a failed route. Do not treat local LCP numbers as production LCP. | `#017` live run `30548662649`; local `verify:lighthouse` 2026-07-30; `lighthouse-budget.json` | 2026-07-30 | | #149 | P2 | issue | CI verdicts are unreadable with the current GitHub token | **Outcome:** an agent (or a human on CLI) can confirm a PR is green before merging it. **Detail:** the session `gh` credential is a fine-grained PAT (`github_pat_11AU2...`) without the **Checks: Read** permission. `gh pr checks` fails per context with `Resource not accessible by personal access token`, and `GET /repos/:o/:r/commits/:sha/check-runs` returns 403. `GET .../status` succeeds but reports `total: 0`, because this repo reports through Actions check-runs rather than legacy commit statuses — so the working endpoint is silent rather than wrong, which reads like "no checks" instead of "no permission". Consequence: PRs #1436 and #1458 were both handed off with every local gate green but the hosted verdict unverifiable, and `scripts/guard-push.mjs` logs `auto-merge: gh not available` for the same reason (see #132). **Next:** add Checks: Read to that PAT; nothing in the repo needs changing. | session 2026-07-30; PR #1436, PR #1458 | 2026-07-31 | -| #150 | P2 | issue | Uncommitted work sits in worktrees whose branches are already merged | **Outcome:** work that exists in no branch and no PR is either committed or knowingly discarded, not lost to a disk reclaim. **Inventory 2026-07-30**, all on branches fully merged into `origin/main`, so the changes exist nowhere else: `codex/reconcile-immediate-20260730` — 21 files, +395/-200 across 19 tracked, including `.github/workflows/ci.yml`, `package.json` and `docs/scripts-index.md`; `codex/document-results-mockup-20260730` — 8 files (+13/-3 tracked) plus an untracked `document-search-results/page.tsx` under `src/app/mockups/` (named without a full path here because it does not resolve in this repo); `codex/chat-ledger-triage-d344` — `docs/outstanding-issues.md` +59/-61; `claude/section-spy-browser-coverage` — `tests/ui-smoke.spec.ts` +51. A fifth (`claude/frosty-mayer-2c6167`) self-resolved to clean during the session. **Next:** per worktree, decide commit-to-a-branch vs discard; do not bulk-delete. The reconcile-immediate one is the priority — 395 insertions touching CI config. Removing a merged branch's worktree without this check is how it disappears; that check is why only one of the two "safe" candidates was removed in the 2026-07-30 cleanup. | session 2026-07-30 worktree cleanup | 2026-07-31 | -| #151 | P3 | task | The pre-commit fail-open exists only on a never-pushed local branch | **Outcome:** the cross-worktree hook fix reaches other machines, or is knowingly dropped. **Detail:** `d2fd16d54` on `codex/docs-sync-automation-pr` makes `.githooks/pre-commit` fail open when `scripts/update-docs-inventory.mjs` is absent from the committing worktree (the #143 defect). `git branch -r --contains d2fd16d54` is empty — that branch has never been pushed, so the commit exists in one local worktree only. The branch is also 17 behind `main` and `git merge-tree` reports a real conflict in `docs/scripts-index.md`, because `main` has since landed both the rewritten index and the `docs:update` generator that owns its count sentence. **Next:** whoever owns that branch syncs it, resolves that one file in favour of `main`'s generated header, and pushes; the fix distributes once `scripts/install-git-hooks.mjs` sees it. Until then every checkout still relies on the untracked copy in the primary checkout. | session 2026-07-30; row #143 | 2026-07-31 | +| #150 | P2 | issue | Uncommitted work sits in worktrees whose branches are already merged | **Outcome:** work that exists in no branch and no PR is either committed or knowingly discarded, not lost to a disk reclaim. **Inventory 2026-07-30**, all on branches fully merged into `origin/main`, so the changes exist nowhere else: `codex/reconcile-immediate-20260730` — 21 files, +395/-200 across 19 tracked, including `.github/workflows/ci.yml`, `package.json` and `docs/scripts-index.md`; `codex/document-results-mockup-20260730` — 8 files (+13/-3 tracked) plus an untracked `document-search-results/page.tsx` under `src/app/mockups/` (named without a full path here because it does not resolve in this repo); `codex/chat-ledger-triage-d344` — `docs/outstanding-issues.md` +59/-61; `claude/section-spy-browser-coverage` — `tests/ui-smoke.spec.ts` +51. A fifth (`claude/frosty-mayer-2c6167`) self-resolved to clean during the session. **Preserved 2026-07-31, not reviewed:** each was committed on its own (already-merged) branch as a `wip: preserve uncommitted work before worktree cleanup` snapshot, so the work now survives a worktree reclaim — `codex/reconcile-immediate-20260730` `748ef018f`, `codex/document-results-mockup-20260730` `5dbd9f965`, `codex/chat-ledger-triage-d344` `b7eae51a4`, `claude/section-spy-browser-coverage` `d949859c3`. All four worktrees are now clean. None is pushed and none is reviewed or verified; the snapshots exist to stop silent loss, not to endorse the content. **Next:** per snapshot, review and either promote it to a real branch/PR or `git reset --hard HEAD~1` to drop it. Do not bulk-delete worktrees without this check — it is why only one of the two "safe" candidates was removed in the 2026-07-30 cleanup. | session 2026-07-30 worktree cleanup | 2026-07-31 | +| #151 | P3 | task | The pre-commit fail-open exists only on a never-pushed local branch | **Outcome:** the cross-worktree hook fix reaches other machines, or is knowingly dropped. **Detail:** `d2fd16d54` on `codex/docs-sync-automation-pr` makes `.githooks/pre-commit` fail open when `scripts/update-docs-inventory.mjs` is absent from the committing worktree (the #143 defect). `git branch -r --contains d2fd16d54` is empty — that branch has never been pushed, so the commit exists in one local worktree only. The branch is also 17 behind `main` and `git merge-tree` reports a real conflict in `docs/scripts-index.md`, because `main` has since landed both the rewritten index and the `docs:update` generator that owns its count sentence. **Superseded 2026-07-31 — do not salvage that branch.** Its script and hook reached `main` through other PRs, so the branch is obsolete; the guard was instead applied to `main`'s committed `.githooks/pre-commit` in PR #1494. Note `main`'s hook still needed it: worktrees on branches predating the script keep aborting. Verified in an isolated repository where the script genuinely does not exist — deleting it from a real worktree does not test this path, because the mixed-inputs guard sees the unstaged deletion and fails first. **Next:** merge #1494, then close this row; abandon `codex/docs-sync-automation-pr` rather than syncing it. | session 2026-07-30; row #143 | 2026-07-31 | ## Resolved / archive From 0a8fc55fc3e3dce3ac94a550e026987a547ac11a Mon Sep 17 00:00:00 2001 From: BigSimmo <87357024+BigSimmo@users.noreply.github.com> Date: Fri, 31 Jul 2026 04:09:15 +0800 Subject: [PATCH 06/12] docs: remove credential metadata and correct audit dates --- docs/branch-review-ledger.md | 2 +- docs/outstanding-issues.md | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/branch-review-ledger.md b/docs/branch-review-ledger.md index f3d5f9aff9..6e99ca6fbd 100644 --- a/docs/branch-review-ledger.md +++ b/docs/branch-review-ledger.md @@ -261,7 +261,7 @@ Records before 2026-07-28 were written by hand and had drifted: 146 lines carrie | 2026-07-30 | PR-1475 | 6de5c321beac55860cc4b6fc7d26ef5a7e088f38 | PR #1475 ingestion behavioral extraction | PASS after current-main reconciliation; extracted decisions preserve entrypoint behavior and replace the matching source-grep assertion with executable coverage | focused Vitest 3 files, 27 tests passed; typecheck passed; outstanding-issues and branch-review-ledger guards passed; provider-backed ingestion not run | | 2026-07-30 | PR-1458 | 8c1975b178c67e4c54acffc395d85e38c43d39f5 | PR #1458 superseded root-gate reconciliation | PASS: retained only unique documentation corrections after PR #1480 landed the stronger tracked-root gate; archived resolved shared-hook issue #143 | docs index and links passed; outstanding-issues and branch-review-ledger guards passed; diff check passed | | 2026-07-30 | PR-1448 | 8ece7f345e93170c6bd242701eaff05f5504d98b | PR #1448 authenticated live workflow | PASS after review repair: protected-main-only checkout, explicit bounded mutations, scoped secrets, and static dispatch confirmation; no live provider workflow dispatched | GitHub Actions and PR-policy guards passed; focused Vitest 3 passed; docs links and scripts, issue and ledger guards, Prettier and diff checks passed | -| 2026-07-30 | claude/capture-session-followups | bbc5d4625adcbdc32aee2f9b4fb4b0d4365d0e99 | outstanding-issues capture: unreadable CI token, at-risk worktree work, unpushed hook fix | PR #1490 opened. Ledger-only: adds #149 (PAT lacks Checks: Read so no PR verdict is readable; the working status endpoint returns total:0 rather than erroring), #150 (four already-merged worktrees hold uncommitted work existing in no branch or PR, largest +395/-200 over 19 files incl CI config), #151 (the #143 pre-commit fail-open d2fd16d54 lives only on a never-pushed branch, 17 behind main, conflicting on the file main's docs:update generator now owns). Also records that PR #1458 is superseded by #1480 and should be closed | check:outstanding-issues 149 rows 60 open unique ids next-id=152; docs:check-links 1415 refs resolve; docs:check-index 49 roots/modules/routes; prettier clean | +| 2026-07-30 | claude/capture-session-followups | bbc5d4625adcbdc32aee2f9b4fb4b0d4365d0e99 | outstanding-issues capture: unreadable CI token, at-risk worktree work, unpushed hook fix | PR #1490 opened. Ledger-only: adds #149 (PAT lacks Checks: Read so no PR verdict is readable; the working status endpoint returns total:0 rather than erroring), #150 (four already-merged worktrees hold uncommitted work existing in no branch or PR, largest +395/-200 over 19 files incl CI config), #151 (the #143 pre-commit fail-open d2fd16d54 lives only on a never-pushed branch, 17 behind main, conflicting on the file main's docs:update generator now owns). Also records that PR #1458 is superseded by #1480 and should be closed after owner confirmation | check:outstanding-issues 149 rows 60 open unique ids next-id=152; docs:check-links 1415 refs resolve; docs:check-index 49 roots/modules/routes; prettier clean | | 2026-07-30 | codex/outstanding-deletion-guard | da1bed4bcb05f2b975823c76bab0913278cfaea6 | issue 148 deletion guard | approved: no P0-P2 findings; base comparison is fail-closed in CI and preserves archive moves | verify:cheap; deletion self-test; unreadable-base proof; CI scope; GitHub Actions pin guard | | 2026-07-30 | claude/capture-session-followups | a026c0bfe70f0e9fe290abbdd3660f4c458e4115 | PR #1490 #143/#151/#149 reconciliation | corrected archived #143 fail-open claim; #151 owns remaining half; #149 separates Checks:Read from missing-gh; merged main #1491 | check:outstanding-issues; docs:check-links | | 2026-07-30 | claude/capture-session-followups | f18dc1fb25f4687006be897f2c11a4bb1f583f41 | PR #1490 #143/#151/#149 reconciliation | reconciled after parallel remote main-sync; #143 corrected; #151 owns fail-open; #149 separates Checks vs missing-gh | check:outstanding-issues; docs:check-links | diff --git a/docs/outstanding-issues.md b/docs/outstanding-issues.md index b8f3d5a0d4..24504557e3 100644 --- a/docs/outstanding-issues.md +++ b/docs/outstanding-issues.md @@ -155,9 +155,9 @@ removed after current-main verification; it is not missing recommended work. | #145 | P3 | issue | A branch sync during in-flight CI cancels a near-complete run, and nothing warns | **Outcome:** a behind-but-passing PR is not re-synced into a CI restart loop. **Observed 2026-07-30 on PR #1454:** three `Update-branch` merges in ~20 minutes (`d49ac0f`, `6de2bf5`, `d9598b7`) each landed while that head's CI was mid-flight, so `cancel-in-progress` cancelled `Build` + `Unit coverage` three times and restarted a full cycle each time; no run finished, so armed auto-merge never fired until the queue quietened. Every check that got time to complete passed, twice over — the PR was never broken. **Gap:** AGENTS.md's anti-churn rule ("assemble every commit before the first push, or wait for the current run to settle") addresses _your own_ pushes only. It says nothing about an operator/`update-branch` sync landing on a head whose CI is already running, which costs the same cancelled cycle and is the case that actually recurs — `#1406`'s ~40%-cancellation measurement is the same phenomenon from the push side. Distinct from `#095` (which is the _reporting_ of cancelled jobs, and worked correctly here: `PR required` said "CANCELLED with no failing job … look for a newer run on the PR's current head") and from `#129`/`#116` (genuine-vs-apparent conflict). **Next:** extend the anti-churn guidance to cover syncs — before an `update-branch`/`git merge origin/main` on an open PR, check whether that head has a run in flight and let it settle first unless the branch is genuinely blocking-behind; prefer syncing once, late, over repeatedly. **Stop:** do not "fix" this by disabling `cancel-in-progress` — superseded runs should still be cancelled; the cost is in _when_ the sync lands, not in the cancellation policy. | session 2026-07-30; PR #1454 runs `30546286820`, `30546667904`, `30547100273`; AGENTS.md § Anti-conflict and CI-speed operating procedure | 2026-07-30 | | #146 | P2 | issue | `ui-phone-scroll` Services result anchor jumps on viewport shrink under CI load | **Outcome:** the required `Production UI` job stops failing on a test the PR did not touch. **Evidence 2026-07-30 (PR #1427 run `30534158395`, job `90844138237`, shard 1 of 3):** `tests/ui-phone-scroll.spec.ts:973` "Services results keep a continuous browser viewport after shared chrome releases" failed at `:1133` — `afterViewportResize.anchorTop` did not stay close to `hidden.anchorTop` across the viewport shrink. `120 passed (6.5m)`, classified "needs investigation". **Intermittent on unchanged code:** the spec is byte-identical across heads `79dd28f`, `76f80f3` and `17c8cb9`; shard 1 passed, passed, failed, then passed again on re-run — four data points, one failure. **Not #127 and not fixed by #1427:** this head already carried #1427's runway poll and travel assertion, and the failing assertion is result-content anchor stability across a resize, not the chrome hide. #127 is the reduced-motion hide on the document route; this is the Services result canvas. **A narrowing claimed here was WITHDRAWN 2026-07-30 (Codex, PR #1446):** an earlier version of this row argued that the sibling `documentScrollTop` assertion did not fail, so the scroll position must have held. That inference is invalid — Playwright aborts a test at the first failing `expect`, so once the `anchorTop` assertion threw, the `documentScrollTop` assertion never executed. Its absence from the output shows nothing, and scroll-restoration causes are NOT ruled out. **Next:** capture `anchorTop` and `documentScrollTop` either side of the resize from a CI-load run, and check whether the chrome release and the viewport change can interleave. **Stop:** do not add to `tests/flake-ledger.json` — that ledger takes reproduced `@quarantine` entries only, and this reproduces once in four. Do not loosen the `toBeCloseTo` tolerance; the anchor stability is the assertion's whole point. **Two further data points 2026-07-30 (PR #1457):** failed once more on head `c739340` (run `30551018893`, shard 1) with `anchorTop` expected `-138`, received `-7`, difference `131`, `120 passed`; then passed on heads `9da02d9` and `a6f2281` across all three shards with the diff byte-identical. That is six data points, two failures, still shard 1 only — and both failures landed on a PR touching nothing but `src/app/mockups/**` plus one mockup test, which strengthens the unchanged-code reading. The magnitude is worth noting for the capture suggested above: `131` is roughly 2x the 64px viewport shrink, not a sub-pixel drift. | PR #1427 run `30534158395`; session 2026-07-30 | 2026-07-30 | | #147 | P2 | rec | Mobile CLS breaches four routes, and it reproduces exactly offline | **Outcome:** mobile CLS is under 0.1 on every measured route, or each remaining breach has a recorded reason. **Measured 2026-07-30 with the LOCAL OFFLINE production harness** (`CHROME_PATH=/opt/pw-browsers/chromium npm run verify:lighthouse -- --keep`; Lighthouse 12.8.2, Chromium 141.0.7390.37, demo corpus, inert loopback Supabase). Mobile CLS: `/dsm` 0.363, `/documents/search` 0.220, `/therapy-compass` 0.142, `/` 0.023 — `/forms` did not measure locally (Lighthouse `NO_NAVSTART`, its own "run again" transient), but the live dispatch put it at 0.212. Desktop passes everywhere: 0.016–0.097. **The finding that matters is that these reproduce the live production dispatch EXACTLY.** Against run `30548662649` on `psychiatry.tools`, all four locally measurable mobile routes match to three decimals — 0.023 / 0.142 / 0.220 / 0.363 on both — and the desktop range matches at both endpoints, 0.016–0.097. So CLS on these routes is deterministic layout structure, not network, latency, or production data. Three consequences: (a) the CLS half of `#017` is debuggable and gate-able locally at zero provider cost; (b) `#017`'s recorded blocker "prod server hard-requires Supabase secrets" is stale — `scripts/run-lighthouse-budget.mjs` builds and serves an offline production app precisely to sidestep that, and its earlier note that dev-mode CLS looked "excellent at 0.00–0.04" was measuring DEV, which does not reproduce production; (c) re-dispatching the live workflow to re-measure CLS buys nothing. **LCP does NOT reproduce and must not be read from local runs:** local mobile LCP is 2014–2051 ms against 3639–4716 ms live, because the loopback server has no network latency. The LCP _ranking_ does survive — `/therapy-compass` is the outlier both locally (4978 ms, ~2.4x every other route) and live — which corroborates `#117` rather than replacing it. Mobile TBT, local: `/documents/search` 581 ms, `/dsm` 448, `/therapy-compass` 379, `/` 338. **Ranking by measured contribution, which is what `#017` asked for:** 1. `/dsm` CLS 0.363 (3.6x the threshold, the worst single number anywhere); 2. `/documents/search` 0.220; 3. `/forms` 0.212 (live only); 4. `/therapy-compass` 0.142, and separately the sole LCP outlier via `#117`; 5. `/` 0.023, which passes and needs nothing. **Next:** attribute the shifts to elements. Lighthouse's `layout-shift-elements` audit returned **zero items on every route** — the `cumulative-layout-shift` audit carries only `debugdata` — so attribution needs a driven Chromium session with a `PerformanceObserver` on `layout-shift`, reading `entry.sources[].node` and `entry.value`, against the same offline production build. Start with `/dsm`. **Gate — `#118` owns it, and this row supplies a constraint it was missing.** `#118` already tracks flipping `lighthouse-budget.json` to `enforce: true` and says not to do it "before `#117` or the baseline pins a known-slow route". These numbers make that concrete: pinning a baseline today would bake CLS 0.363 on `/dsm` in as the accepted value, so the CLS fixes must land first or the gate ratifies the breach. Separately, no baseline could have been committed from this run anyway — the grader correctly refused it as incomplete evidence because `/forms` produced no report, and that refusal was not overridden. **Reproduction trap:** without `CHROME_PATH`, `chrome-launcher` cannot find a browser in this container and every route fails; the harness reads `CHROME_PATH`/`PLAYWRIGHT_CHROMIUM_EXECUTABLE_PATH` (`run-lighthouse-budget.mjs:291`) but nothing sets either, even though `PLAYWRIGHT_BROWSERS_PATH` is set. Related to `#121`. Also seen: a truncated `progress` package in the npx cache broke Lighthouse startup entirely; clearing the npx cache entry fixed it. **Stop:** do not re-dispatch the live Web-Vitals workflow to re-measure CLS — it is reproducible offline for free. Do not commit a budget baseline from a run with a failed route. Do not treat local LCP numbers as production LCP. | `#017` live run `30548662649`; local `verify:lighthouse` 2026-07-30; `lighthouse-budget.json` | 2026-07-30 | -| #149 | P2 | issue | CI verdicts are unreadable with the current GitHub token | **Outcome:** an agent (or a human on CLI) can confirm a PR is green before merging it. **Detail:** the session `gh` credential is a fine-grained PAT (`github_pat_11AU2...`) without the **Checks: Read** permission. `gh pr checks` fails per context with `Resource not accessible by personal access token`, and `GET /repos/:o/:r/commits/:sha/check-runs` returns 403. `GET .../status` succeeds but reports `total: 0`, because this repo reports through Actions check-runs rather than legacy commit statuses — so the working endpoint is silent rather than wrong, which reads like "no checks" instead of "no permission". Consequence: PRs #1436 and #1458 were both handed off with every local gate green but the hosted verdict unverifiable, and `scripts/guard-push.mjs` logs `auto-merge: gh not available` for the same reason (see #132). **Next:** add Checks: Read to that PAT; nothing in the repo needs changing. | session 2026-07-30; PR #1436, PR #1458 | 2026-07-31 | -| #150 | P2 | issue | Uncommitted work sits in worktrees whose branches are already merged | **Outcome:** work that exists in no branch and no PR is either committed or knowingly discarded, not lost to a disk reclaim. **Inventory 2026-07-30**, all on branches fully merged into `origin/main`, so the changes exist nowhere else: `codex/reconcile-immediate-20260730` — 21 files, +395/-200 across 19 tracked, including `.github/workflows/ci.yml`, `package.json` and `docs/scripts-index.md`; `codex/document-results-mockup-20260730` — 8 files (+13/-3 tracked) plus an untracked `document-search-results/page.tsx` under `src/app/mockups/` (named without a full path here because it does not resolve in this repo); `codex/chat-ledger-triage-d344` — `docs/outstanding-issues.md` +59/-61; `claude/section-spy-browser-coverage` — `tests/ui-smoke.spec.ts` +51. A fifth (`claude/frosty-mayer-2c6167`) self-resolved to clean during the session. **Preserved 2026-07-31, not reviewed:** each was committed on its own (already-merged) branch as a `wip: preserve uncommitted work before worktree cleanup` snapshot, so the work now survives a worktree reclaim — `codex/reconcile-immediate-20260730` `748ef018f`, `codex/document-results-mockup-20260730` `5dbd9f965`, `codex/chat-ledger-triage-d344` `b7eae51a4`, `claude/section-spy-browser-coverage` `d949859c3`. All four worktrees are now clean. None is pushed and none is reviewed or verified; the snapshots exist to stop silent loss, not to endorse the content. **Next:** per snapshot, review and either promote it to a real branch/PR or `git reset --hard HEAD~1` to drop it. Do not bulk-delete worktrees without this check — it is why only one of the two "safe" candidates was removed in the 2026-07-30 cleanup. | session 2026-07-30 worktree cleanup | 2026-07-31 | -| #151 | P3 | task | The pre-commit fail-open exists only on a never-pushed local branch | **Outcome:** the cross-worktree hook fix reaches other machines, or is knowingly dropped. **Detail:** `d2fd16d54` on `codex/docs-sync-automation-pr` makes `.githooks/pre-commit` fail open when `scripts/update-docs-inventory.mjs` is absent from the committing worktree (the #143 defect). `git branch -r --contains d2fd16d54` is empty — that branch has never been pushed, so the commit exists in one local worktree only. The branch is also 17 behind `main` and `git merge-tree` reports a real conflict in `docs/scripts-index.md`, because `main` has since landed both the rewritten index and the `docs:update` generator that owns its count sentence. **Superseded 2026-07-31 — do not salvage that branch.** PR #1442 tracked the hook and the inventory script onto `main`, so that half is done and the branch is obsolete; note the archived `#143` row implied the fail-open itself was durable, which it was not — only the hook and script landed, not the guard. the guard was instead applied to `main`'s committed `.githooks/pre-commit` in PR #1494. Note `main`'s hook still needed it: worktrees on branches predating the script keep aborting. Verified in an isolated repository where the script genuinely does not exist — deleting it from a real worktree does not test this path, because the mixed-inputs guard sees the unstaged deletion and fails first. **Next:** merge #1494, then close this row; abandon `codex/docs-sync-automation-pr` rather than syncing it. | session 2026-07-30; row #143 | 2026-07-31 | +| #149 | P2 | issue | CI verdicts are unreadable with the current GitHub token | **Outcome:** an agent (or a human on CLI) can confirm a PR is green before merging it. **Detail:** the session `gh` credential is a fine-grained PAT without the **Checks: Read** permission. `gh pr checks` fails per context with `Resource not accessible by personal access token`, and `GET /repos/:o/:r/commits/:sha/check-runs` returns 403. `GET .../status` succeeds but reports `total: 0`, because this repo reports through Actions check-runs rather than legacy commit statuses — so the working endpoint is silent rather than wrong, which reads like "no checks" instead of "no permission". Consequence: PRs #1436 and #1458 were both handed off with every local gate green but the hosted verdict unverifiable. Separately, `scripts/guard-push.mjs` logs `auto-merge: gh not available` only when the CLI cannot execute; that is a distinct #132 prerequisite, not a Checks-permission symptom. **Next:** add Checks: Read to that PAT; install or restore `gh` separately when the CLI is unavailable. Nothing in the repo needs changing. | session 2026-07-30; PR #1436, PR #1458 | 2026-07-30 | +| #150 | P2 | issue | Uncommitted work sits in worktrees whose branches are already merged | **Outcome:** work that exists in no branch and no PR is either committed or knowingly discarded, not lost to a disk reclaim. **Inventory 2026-07-30**, all on branches fully merged into `origin/main`, so the changes exist nowhere else: `codex/reconcile-immediate-20260730` — 21 files, +395/-200 across 19 tracked, including `.github/workflows/ci.yml`, `package.json` and `docs/scripts-index.md`; `codex/document-results-mockup-20260730` — 8 files (+13/-3 tracked) plus an untracked `document-search-results/page.tsx` under `src/app/mockups/` (named without a full path here because it does not resolve in this repo); `codex/chat-ledger-triage-d344` — `docs/outstanding-issues.md` +59/-61; `claude/section-spy-browser-coverage` — `tests/ui-smoke.spec.ts` +51. A fifth (`claude/frosty-mayer-2c6167`) self-resolved to clean during the session. **Preserved 2026-07-30, not reviewed:** each was committed on its own (already-merged) branch as a `wip: preserve uncommitted work before worktree cleanup` snapshot, so the work now survives a worktree reclaim — `codex/reconcile-immediate-20260730` `748ef018f`, `codex/document-results-mockup-20260730` `5dbd9f965`, `codex/chat-ledger-triage-d344` `b7eae51a4`, `claude/section-spy-browser-coverage` `d949859c3`. All four worktrees are now clean. None is pushed and none is reviewed or verified; the snapshots exist to stop silent loss, not to endorse the content. **Next:** per snapshot, review and either promote it to a real branch/PR or `git reset --hard HEAD~1` to drop it. Do not bulk-delete worktrees without this check — it is why only one of the two "safe" candidates was removed in the 2026-07-30 cleanup. | session 2026-07-30 worktree cleanup | 2026-07-30 | +| #151 | P3 | task | The pre-commit fail-open exists only on a never-pushed local branch | **Outcome:** the cross-worktree hook fix reaches other machines, or is knowingly dropped. **Detail:** `d2fd16d54` on `codex/docs-sync-automation-pr` makes `.githooks/pre-commit` fail open when `scripts/update-docs-inventory.mjs` is absent from the committing worktree (the #143 defect). `git branch -r --contains d2fd16d54` is empty — that branch has never been pushed, so the commit exists in one local worktree only. The branch is also 17 behind `main` and `git merge-tree` reports a real conflict in `docs/scripts-index.md`, because `main` has since landed both the rewritten index and the `docs:update` generator that owns its count sentence. **Superseded 2026-07-30 — do not salvage that branch.** PR #1442 tracked the hook and the inventory script onto `main`, so that half is done and the branch is obsolete; note the archived `#143` row implied the fail-open itself was durable, which it was not — only the hook and script landed, not the guard. the guard was instead applied to `main`'s committed `.githooks/pre-commit` in PR #1494. Note `main`'s hook still needed it: worktrees on branches predating the script keep aborting. Verified in an isolated repository where the script genuinely does not exist — deleting it from a real worktree does not test this path, because the mixed-inputs guard sees the unstaged deletion and fails first. **Next:** merge #1494, then close this row; abandon `codex/docs-sync-automation-pr` rather than syncing it. | session 2026-07-30; row #143 | 2026-07-30 | ## Resolved / archive @@ -170,7 +170,7 @@ Move resolved rows here with the resolution date and a one-line outcome. Keep th | ID | Type | Summary | Outcome | Resolved | | ---- | ----- | -------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ---------- | -| #143 | issue | Shared pre-commit hook could abort commits in linked worktrees | PARTIAL via PR #1442; fail-open claim CORRECTED 2026-07-31 (PR #1490). PR #1442 tracked `.githooks/pre-commit` and `scripts/update-docs-inventory.mjs` on `main`, so linked worktrees no longer depend on an untracked primary-checkout copy for those files. The earlier archive outcome that "the installed shared hook now fails open when a committing worktree lacks the inventory script" was wrong: checked-in `.githooks/pre-commit` still invokes `node scripts/update-docs-inventory.mjs` unconditionally (L97). That remaining half is open as `#151` (unpushed `d2fd16d54` on `codex/docs-sync-automation-pr`). Do not discard that local branch on the strength of this archive row. | 2026-07-30 | +| #143 | issue | Shared pre-commit hook could abort commits in linked worktrees | PARTIAL via PR #1442; fail-open claim CORRECTED 2026-07-30 (PR #1490). PR #1442 tracked `.githooks/pre-commit` and `scripts/update-docs-inventory.mjs` on `main`, so linked worktrees no longer depend on an untracked primary-checkout copy for those files. The earlier archive outcome that "the installed shared hook now fails open when a committing worktree lacks the inventory script" was wrong: checked-in `.githooks/pre-commit` still invokes `node scripts/update-docs-inventory.mjs` unconditionally (L97). That remaining half is open as `#151` (unpushed `d2fd16d54` on `codex/docs-sync-automation-pr`). Do not discard that local branch on the strength of this archive row. | 2026-07-30 | | #091 | issue | Results band could not express a partial-source failure | Resolved by PR #1480. Favourites and shared result bands now retain only the honest loaded count, visibly report unavailable sources, and expose a tested Retry recovery path without masking partial failures as ready. | 2026-07-30 | | #128 | issue | Draft-to-ready alone did not retrigger required CI | Resolved by PR #1480. The CI pull-request trigger now includes ready_for_review alongside opened, synchronize, and reopened, with the workflow contract and exact-head Actions runs passing. | 2026-07-30 | | #134 | issue | Ledger merge driver could be absent when install was skipped | Resolved by PR #1480. The branch-review-ledger guard now fails loudly when merge=ledger is declared but merge.ledger.driver is not configured, and its self-test covers the missing-driver case. | 2026-07-30 | From 4a041fcd2ac8f12e4ebb0ab68e0151722db65bcf Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Thu, 30 Jul 2026 20:42:12 +0000 Subject: [PATCH 07/12] issues: archive #151 after #1494 and mark #143 fully resolved PR #1494 landed the fail-open guard on main, so close the open salvage row and update the #143 archive from PARTIAL to resolved across #1442 and #1494. Also carries the merge of origin/main that cleared the GitHub DIRTY mergeability state. Co-authored-by: BigSimmo --- docs/outstanding-issues.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/outstanding-issues.md b/docs/outstanding-issues.md index a15d2e13bf..1b6ae4ffd3 100644 --- a/docs/outstanding-issues.md +++ b/docs/outstanding-issues.md @@ -155,7 +155,6 @@ removed after current-main verification; it is not missing recommended work. | #147 | P2 | rec | Mobile CLS breaches four routes, and it reproduces exactly offline | **Outcome:** mobile CLS is under 0.1 on every measured route, or each remaining breach has a recorded reason. **Measured 2026-07-30 with the LOCAL OFFLINE production harness** (`CHROME_PATH=/opt/pw-browsers/chromium npm run verify:lighthouse -- --keep`; Lighthouse 12.8.2, Chromium 141.0.7390.37, demo corpus, inert loopback Supabase). Mobile CLS: `/dsm` 0.363, `/documents/search` 0.220, `/therapy-compass` 0.142, `/` 0.023 — `/forms` did not measure locally (Lighthouse `NO_NAVSTART`, its own "run again" transient), but the live dispatch put it at 0.212. Desktop passes everywhere: 0.016–0.097. **The finding that matters is that these reproduce the live production dispatch EXACTLY.** Against run `30548662649` on `psychiatry.tools`, all four locally measurable mobile routes match to three decimals — 0.023 / 0.142 / 0.220 / 0.363 on both — and the desktop range matches at both endpoints, 0.016–0.097. So CLS on these routes is deterministic layout structure, not network, latency, or production data. Three consequences: (a) the CLS half of `#017` is debuggable and gate-able locally at zero provider cost; (b) `#017`'s recorded blocker "prod server hard-requires Supabase secrets" is stale — `scripts/run-lighthouse-budget.mjs` builds and serves an offline production app precisely to sidestep that, and its earlier note that dev-mode CLS looked "excellent at 0.00–0.04" was measuring DEV, which does not reproduce production; (c) re-dispatching the live workflow to re-measure CLS buys nothing. **LCP does NOT reproduce and must not be read from local runs:** local mobile LCP is 2014–2051 ms against 3639–4716 ms live, because the loopback server has no network latency. The LCP _ranking_ does survive — `/therapy-compass` is the outlier both locally (4978 ms, ~2.4x every other route) and live — which corroborates `#117` rather than replacing it. Mobile TBT, local: `/documents/search` 581 ms, `/dsm` 448, `/therapy-compass` 379, `/` 338. **Ranking by measured contribution, which is what `#017` asked for:** 1. `/dsm` CLS 0.363 (3.6x the threshold, the worst single number anywhere); 2. `/documents/search` 0.220; 3. `/forms` 0.212 (live only); 4. `/therapy-compass` 0.142, and separately the sole LCP outlier via `#117`; 5. `/` 0.023, which passes and needs nothing. **Next:** attribute the shifts to elements. Lighthouse's `layout-shift-elements` audit returned **zero items on every route** — the `cumulative-layout-shift` audit carries only `debugdata` — so attribution needs a driven Chromium session with a `PerformanceObserver` on `layout-shift`, reading `entry.sources[].node` and `entry.value`, against the same offline production build. Start with `/dsm`. **Gate — `#118` owns it, and this row supplies a constraint it was missing.** `#118` already tracks flipping `lighthouse-budget.json` to `enforce: true` and says not to do it "before `#117` or the baseline pins a known-slow route". These numbers make that concrete: pinning a baseline today would bake CLS 0.363 on `/dsm` in as the accepted value, so the CLS fixes must land first or the gate ratifies the breach. Separately, no baseline could have been committed from this run anyway — the grader correctly refused it as incomplete evidence because `/forms` produced no report, and that refusal was not overridden. **Reproduction trap:** without `CHROME_PATH`, `chrome-launcher` cannot find a browser in this container and every route fails; the harness reads `CHROME_PATH`/`PLAYWRIGHT_CHROMIUM_EXECUTABLE_PATH` (`run-lighthouse-budget.mjs:291`) but nothing sets either, even though `PLAYWRIGHT_BROWSERS_PATH` is set. Related to `#121`. Also seen: a truncated `progress` package in the npx cache broke Lighthouse startup entirely; clearing the npx cache entry fixed it. **Stop:** do not re-dispatch the live Web-Vitals workflow to re-measure CLS — it is reproducible offline for free. Do not commit a budget baseline from a run with a failed route. Do not treat local LCP numbers as production LCP. | `#017` live run `30548662649`; local `verify:lighthouse` 2026-07-30; `lighthouse-budget.json` | 2026-07-30 | | #149 | P2 | issue | CI verdicts are unreadable with the current GitHub token | **Outcome:** an agent (or a human on CLI) can confirm a PR is green before merging it. **Detail:** the session `gh` credential is a fine-grained PAT without the **Checks: Read** permission. `gh pr checks` fails per context with `Resource not accessible by personal access token`, and `GET /repos/:o/:r/commits/:sha/check-runs` returns 403. `GET .../status` succeeds but reports `total: 0`, because this repo reports through Actions check-runs rather than legacy commit statuses — so the working endpoint is silent rather than wrong, which reads like "no checks" instead of "no permission". Consequence: PRs #1436 and #1458 were both handed off with every local gate green but the hosted verdict unverifiable. Separately, `scripts/guard-push.mjs` logs `auto-merge: gh not available` only when the CLI cannot execute; that is a distinct #132 prerequisite, not a Checks-permission symptom. **Next:** add Checks: Read to that PAT; install or restore `gh` separately when the CLI is unavailable. Nothing in the repo needs changing. | session 2026-07-30; PR #1436, PR #1458 | 2026-07-30 | | #150 | P2 | issue | Uncommitted work sits in worktrees whose branches are already merged | **Outcome:** work that exists in no branch and no PR is either committed or knowingly discarded, not lost to a disk reclaim. **Inventory 2026-07-30**, all on branches fully merged into `origin/main`, so the changes exist nowhere else: `codex/reconcile-immediate-20260730` — 21 files, +395/-200 across 19 tracked, including `.github/workflows/ci.yml`, `package.json` and `docs/scripts-index.md`; `codex/document-results-mockup-20260730` — 8 files (+13/-3 tracked) plus an untracked `document-search-results/page.tsx` under `src/app/mockups/` (named without a full path here because it does not resolve in this repo); `codex/chat-ledger-triage-d344` — `docs/outstanding-issues.md` +59/-61; `claude/section-spy-browser-coverage` — `tests/ui-smoke.spec.ts` +51. A fifth (`claude/frosty-mayer-2c6167`) self-resolved to clean during the session. **Preserved 2026-07-30, not reviewed:** each was committed on its own (already-merged) branch as a `wip: preserve uncommitted work before worktree cleanup` snapshot, so the work now survives a worktree reclaim — `codex/reconcile-immediate-20260730` `748ef018f`, `codex/document-results-mockup-20260730` `5dbd9f965`, `codex/chat-ledger-triage-d344` `b7eae51a4`, `claude/section-spy-browser-coverage` `d949859c3`. All four worktrees are now clean. None is pushed and none is reviewed or verified; the snapshots exist to stop silent loss, not to endorse the content. **Next:** per snapshot, review and either promote it to a real branch/PR or `git reset --hard HEAD~1` to drop it. Do not bulk-delete worktrees without this check — it is why only one of the two "safe" candidates was removed in the 2026-07-30 cleanup. | session 2026-07-30 worktree cleanup | 2026-07-30 | -| #151 | P3 | task | The pre-commit fail-open exists only on a never-pushed local branch | **Outcome:** the cross-worktree hook fix reaches other machines, or is knowingly dropped. **Detail:** `d2fd16d54` on `codex/docs-sync-automation-pr` makes `.githooks/pre-commit` fail open when `scripts/update-docs-inventory.mjs` is absent from the committing worktree (the #143 defect). `git branch -r --contains d2fd16d54` is empty — that branch has never been pushed, so the commit exists in one local worktree only. The branch is also 17 behind `main` and `git merge-tree` reports a real conflict in `docs/scripts-index.md`, because `main` has since landed both the rewritten index and the `docs:update` generator that owns its count sentence. **Superseded 2026-07-30 — do not salvage that branch.** PR #1442 tracked the hook and the inventory script onto `main`, so that half is done and the branch is obsolete; note the archived `#143` row implied the fail-open itself was durable, which it was not — only the hook and script landed, not the guard. the guard was instead applied to `main`'s committed `.githooks/pre-commit` in PR #1494. Note `main`'s hook still needed it: worktrees on branches predating the script keep aborting. Verified in an isolated repository where the script genuinely does not exist — deleting it from a real worktree does not test this path, because the mixed-inputs guard sees the unstaged deletion and fails first. **Next:** merge #1494, then close this row; abandon `codex/docs-sync-automation-pr` rather than syncing it. | session 2026-07-30; row #143 | 2026-07-30 | ## Resolved / archive @@ -168,7 +167,8 @@ Move resolved rows here with the resolution date and a one-line outcome. Keep th | ID | Type | Summary | Outcome | Resolved | | ---- | ----- | -------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ---------- | -| #143 | issue | Shared pre-commit hook could abort commits in linked worktrees | PARTIAL via PR #1442; fail-open claim CORRECTED 2026-07-30 (PR #1490). PR #1442 tracked `.githooks/pre-commit` and `scripts/update-docs-inventory.mjs` on `main`, so linked worktrees no longer depend on an untracked primary-checkout copy for those files. The earlier archive outcome that "the installed shared hook now fails open when a committing worktree lacks the inventory script" was wrong: checked-in `.githooks/pre-commit` still invokes `node scripts/update-docs-inventory.mjs` unconditionally (L97). That remaining half is open as `#151` (unpushed `d2fd16d54` on `codex/docs-sync-automation-pr`). Do not discard that local branch on the strength of this archive row. | 2026-07-30 | +| #143 | issue | Shared pre-commit hook could abort commits in linked worktrees | Resolved 2026-07-30 across PR #1442 and PR #1494. PR #1442 tracked `.githooks/pre-commit` and `scripts/update-docs-inventory.mjs` on `main`. An earlier archive claim that fail-open was already durable was wrong and was corrected on PR #1490; the remaining half shipped in PR #1494, which makes the shared hook skip inventory sync when the committing worktree lacks the inventory script (and re-checks the empty-task early exit so a skipped inventory does not fail on unrelated dirty files). See also `#151`. | 2026-07-30 | +| #151 | task | The pre-commit fail-open exists only on a never-pushed local branch | Resolved 2026-07-30 by PR #1494. Fail-open now lives on `main`'s tracked `.githooks/pre-commit`; the unpushed `codex/docs-sync-automation-pr` salvage path was abandoned. | 2026-07-30 | | #091 | issue | Results band could not express a partial-source failure | Resolved by PR #1480. Favourites and shared result bands now retain only the honest loaded count, visibly report unavailable sources, and expose a tested Retry recovery path without masking partial failures as ready. | 2026-07-30 | | #128 | issue | Draft-to-ready alone did not retrigger required CI | Resolved by PR #1480. The CI pull-request trigger now includes ready_for_review alongside opened, synchronize, and reopened, with the workflow contract and exact-head Actions runs passing. | 2026-07-30 | | #134 | issue | Ledger merge driver could be absent when install was skipped | Resolved by PR #1480. The branch-review-ledger guard now fails loudly when merge=ledger is declared but merge.ledger.driver is not configured, and its self-test covers the missing-driver case. | 2026-07-30 | From bb404bebc7762b8d0a313b547edf785bf7efb80c Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Thu, 30 Jul 2026 20:42:13 +0000 Subject: [PATCH 08/12] docs(ledger): record PR #1490 main-sync and #151 closeout Co-authored-by: BigSimmo --- docs/branch-review-ledger.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/branch-review-ledger.md b/docs/branch-review-ledger.md index df6b87db4a..b9f4603276 100644 --- a/docs/branch-review-ledger.md +++ b/docs/branch-review-ledger.md @@ -272,3 +272,4 @@ Records before 2026-07-28 were written by hand and had drifted: 146 lines carrie | 2026-07-30 | PR-1494 | 807a3a09f5afc12e8db4f9158abe09d9c7b336c9 | PR #1494 pre-commit fail-open review | FIXED P2: legacy worktrees may skip a genuinely absent generator, while a staged deletion or rename now fails closed | docs-inventory Vitest 5 passed; shell syntax passed; Prettier test check passed; diff check passed | | 2026-07-30 | claude/x3-rag-coverage-gate-qx9j7d (PR #1463, squashed as dba7356f) | dba7356fc8dc926d951d6de6f019d5b8e000be21 | X3/#101 per-request hydration extraction from rag.ts into rag-hydration.ts | clean and landed — byte-identical move verified against pre-merge main, rag.ts 4780->4543, budget ratcheted to 4543, no back-edge (cluster referenced zero rag.ts-local symbols), both public re-exports preserved; squash captured 100% of branch content | typecheck, lint, check:knip, check:maintainability-budgets 4543/4543, focused vitest 83/83 incl rag-query-concurrency, eval:rag:offline 572/572 36 golden, format:check, verify:cheap, verify:pr-local build+bundle-scan, post-merge content verification on main | | 2026-07-30 | dba7356fc8dc926d951d6de6f019d5b8e000be21 | dba7356fc8dc926d951d6de6f019d5b8e000be21 | X3 hydration unit: per-request hydration extraction from rag.ts into rag-hydration.ts (PR #1463) | clean and landed — byte-identical move verified against pre-merge main, rag.ts 4780->4543, budget ratcheted to 4543, no back-edge, both public re-exports preserved. Supersedes the earlier row for this HEAD, which was keyed only to the slash-form branch token and so returned NOT REVIEWED on a landed-SHA lookup; it also mislabelled the unit as #101, which is the unrelated open canary-gated retrieval-parallelisation recommendation | typecheck, lint, check:knip, check:maintainability-budgets 4543/4543, focused vitest 83/83, eval:rag:offline 572/572 36 golden, format:check, verify:cheap 442 files 4625 passed, verify:pr-local, post-merge content verification on main | +| 2026-07-30 | claude/capture-session-followups | 4a041fcd2ac8f12e4ebb0ab68e0151722db65bcf | PR #1490 main sync + #151 close | merged origin/main (clean tree; GitHub DIRTY was ledger-driver staleness); archived #151 via #1494; #143 fully resolved; review threads already addressed | check:outstanding-issues; docs:check-links; merge-tree clean | From 55cc3f91de5d14960081806910633fe2eaf0c0c2 Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Thu, 30 Jul 2026 20:48:41 +0000 Subject: [PATCH 09/12] docs(ledger): record #1496 id-collision renumber for PR #1490 Co-authored-by: BigSimmo --- docs/branch-review-ledger.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/branch-review-ledger.md b/docs/branch-review-ledger.md index b9f4603276..3e0935a0bc 100644 --- a/docs/branch-review-ledger.md +++ b/docs/branch-review-ledger.md @@ -273,3 +273,4 @@ Records before 2026-07-28 were written by hand and had drifted: 146 lines carrie | 2026-07-30 | claude/x3-rag-coverage-gate-qx9j7d (PR #1463, squashed as dba7356f) | dba7356fc8dc926d951d6de6f019d5b8e000be21 | X3/#101 per-request hydration extraction from rag.ts into rag-hydration.ts | clean and landed — byte-identical move verified against pre-merge main, rag.ts 4780->4543, budget ratcheted to 4543, no back-edge (cluster referenced zero rag.ts-local symbols), both public re-exports preserved; squash captured 100% of branch content | typecheck, lint, check:knip, check:maintainability-budgets 4543/4543, focused vitest 83/83 incl rag-query-concurrency, eval:rag:offline 572/572 36 golden, format:check, verify:cheap, verify:pr-local build+bundle-scan, post-merge content verification on main | | 2026-07-30 | dba7356fc8dc926d951d6de6f019d5b8e000be21 | dba7356fc8dc926d951d6de6f019d5b8e000be21 | X3 hydration unit: per-request hydration extraction from rag.ts into rag-hydration.ts (PR #1463) | clean and landed — byte-identical move verified against pre-merge main, rag.ts 4780->4543, budget ratcheted to 4543, no back-edge, both public re-exports preserved. Supersedes the earlier row for this HEAD, which was keyed only to the slash-form branch token and so returned NOT REVIEWED on a landed-SHA lookup; it also mislabelled the unit as #101, which is the unrelated open canary-gated retrieval-parallelisation recommendation | typecheck, lint, check:knip, check:maintainability-budgets 4543/4543, focused vitest 83/83, eval:rag:offline 572/572 36 golden, format:check, verify:cheap 442 files 4625 passed, verify:pr-local, post-merge content verification on main | | 2026-07-30 | claude/capture-session-followups | 4a041fcd2ac8f12e4ebb0ab68e0151722db65bcf | PR #1490 main sync + #151 close | merged origin/main (clean tree; GitHub DIRTY was ledger-driver staleness); archived #151 via #1494; #143 fully resolved; review threads already addressed | check:outstanding-issues; docs:check-links; merge-tree clean | +| 2026-07-30 | claude/capture-session-followups | adc4e2e86edce33849ec9c8080b8f0be86155734 | PR #1490 main sync after #1496 id collision | merged c8e53d57; kept main #149/#150; archived #151 via #1494; renumbered this PR's open rows to #152/#153; #143 fully resolved | check:outstanding-issues; docs:check-links; merge-tree clean | From e0b9f39855218e4db4e5cc716f7fa79b471eb8e0 Mon Sep 17 00:00:00 2001 From: BigSimmo <87357024+BigSimmo@users.noreply.github.com> Date: Fri, 31 Jul 2026 05:59:42 +0800 Subject: [PATCH 10/12] docs(review): clarify snapshot branch state --- docs/outstanding-issues.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/outstanding-issues.md b/docs/outstanding-issues.md index f61a2b33d6..16812dd0c6 100644 --- a/docs/outstanding-issues.md +++ b/docs/outstanding-issues.md @@ -155,7 +155,7 @@ removed after current-main verification; it is not missing recommended work. | #149 | P2 | issue | `check:installed-lock-parity` only compares seven top-level packages, so transitive drift passes | **Outcome:** a session cannot run local gates against a `node_modules` that silently disagrees with the lockfile. **Evidence 2026-07-30:** the `SessionStart` hook reported "node_modules matches the lockfile, skipping install" while `brace-expansion` was installed at **1.1.16** and the lockfile pinned **1.1.18** — the CVE-2026-14257 patch. Every local gate run in that window was weaker than it appeared, including several `verify:cheap` runs reported as green during PR #1430/#1444 work. It surfaced only because `tests/installed-lock-parity.test.ts` asserts the patched behaviour directly (`maxLength` honoured); its failure was initially mistaken for a pre-existing repo defect, since it also failed on clean `main` **in the same stale container**. `npm ci --include=dev` fixed it. **CORRECTION 2026-07-30 (PR #1496 review, Codex):** an earlier version of this row said the parity check lives only in `verify:ui` and proposed adding it to `verify:cheap`. **Both were wrong** — `verify:cheap:internal` already runs `check:installed-lock-parity`, so that follow-up was a no-op, and it ran green throughout the stale window. The real gap is its **scope**: `scripts/check-installed-lock-parity.mjs` compares only seven top-level packages (`criticalInstalledPackages` = next, react, react-dom, eslint, playwright, typescript, vitest), so a stale **transitive** dependency is invisible to it. Proved by faking `node_modules/brace-expansion` back to `1.1.16` against the `1.1.18` lockfile pin: `npm run check:installed-lock-parity` **exits 0**. That also explains why the hook and the gate both reported parity while the tree was stale — neither was looking at the package that drifted. **Next:** broaden the check beyond the seven names — validate the full installed tree against the lockfile, or stamp the install with the lockfile hash and compare that — so transitive drift is caught rather than assumed absent. **Stop:** do not treat a green `check:installed-lock-parity` as proof the install is lockfile-current; today it means seven packages match. | `scripts/check-installed-lock-parity.mjs`; `tests/installed-lock-parity.test.ts`; `package.json` | 2026-07-30 | | #150 | P2 | issue | CodeRabbit reviewed none of a full day's PRs; spending cap reached | **Outcome:** the repo's second automated reviewer is either funded or acknowledged as absent, rather than appearing to review while skipping. **Evidence 2026-07-30:** CodeRabbit posted "Review limit reached … Your organization has reached its usage spending cap" on **every** PR opened that day — #1404, #1430, #1444, #1445, #1479 — reviewing none of them. Each notice renders as an ordinary bot comment, so a skimming reader sees reviewer activity where there was no review. The Codex connector was the sole substantive reviewer across those PRs and found three real defects that had survived local gates and self-review: a proxy-variable inference in #1430, an `unset` vs `unspecified` git-attribute conflation in #1444, and an earlier P1 recursive-delete on an unvalidated `--dir`. **Next:** decide whether to raise the cap, switch to label-based opt-in so the budget lands on PRs that need it, or accept single-reviewer coverage explicitly. **Stop:** do not read a CodeRabbit comment as a completed review without checking it is not a rate-limit notice. | PRs #1404/#1430/#1444/#1445/#1479; `.coderabbit.yaml` | 2026-07-30 | | #152 | P2 | issue | CI verdicts are unreadable with the current GitHub token | **Outcome:** an agent (or a human on CLI) can confirm a PR is green before merging it. **Detail:** the session `gh` credential is a fine-grained PAT without the **Checks: Read** permission. `gh pr checks` fails per context with `Resource not accessible by personal access token`, and `GET /repos/:o/:r/commits/:sha/check-runs` returns 403. `GET .../status` succeeds but reports `total: 0`, because this repo reports through Actions check-runs rather than legacy commit statuses — so the working endpoint is silent rather than wrong, which reads like "no checks" instead of "no permission". Consequence: PRs #1436 and #1458 were both handed off with every local gate green but the hosted verdict unverifiable. Separately, `scripts/guard-push.mjs` logs `auto-merge: gh not available` only when the CLI cannot execute; that is a distinct #132 prerequisite, not a Checks-permission symptom. **Next:** add Checks: Read to that PAT; install or restore `gh` separately when the CLI is unavailable. Nothing in the repo needs changing. | session 2026-07-30; PR #1436, PR #1458; originally captured as #149 on PR #1490 before #1496 reused that id | 2026-07-30 | -| #153 | P2 | issue | Uncommitted work sits in worktrees whose branches are already merged | **Outcome:** work that exists in no branch and no PR is either committed or knowingly discarded, not lost to a disk reclaim. **Inventory 2026-07-30**, all on branches fully merged into `origin/main`, so the changes exist nowhere else: `codex/reconcile-immediate-20260730` — 21 files, +395/-200 across 19 tracked, including `.github/workflows/ci.yml`, `package.json` and `docs/scripts-index.md`; `codex/document-results-mockup-20260730` — 8 files (+13/-3 tracked) plus an untracked `document-search-results/page.tsx` under `src/app/mockups/` (named without a full path here because it does not resolve in this repo); `codex/chat-ledger-triage-d344` — `docs/outstanding-issues.md` +59/-61; `claude/section-spy-browser-coverage` — `tests/ui-smoke.spec.ts` +51. A fifth (`claude/frosty-mayer-2c6167`) self-resolved to clean during the session. **Preserved 2026-07-30, not reviewed:** each was committed on its own (already-merged) branch as a `wip: preserve uncommitted work before worktree cleanup` snapshot, so the work now survives a worktree reclaim — `codex/reconcile-immediate-20260730` `748ef018f`, `codex/document-results-mockup-20260730` `5dbd9f965`, `codex/chat-ledger-triage-d344` `b7eae51a4`, `claude/section-spy-browser-coverage` `d949859c3`. All four worktrees are now clean. None is pushed and none is reviewed or verified; the snapshots exist to stop silent loss, not to endorse the content. **Next:** per snapshot, review and either promote it to a real branch/PR or `git reset --hard HEAD~1` to drop it. Do not bulk-delete worktrees without this check — it is why only one of the two "safe" candidates was removed in the 2026-07-30 cleanup. | session 2026-07-30 worktree cleanup; originally captured as #150 on PR #1490 before #1496 reused that id | 2026-07-30 | +| #153 | P2 | issue | Uncommitted work sits in worktrees whose branches are already merged | **Outcome:** work that exists in no branch and no PR is either committed or knowingly discarded, not lost to a disk reclaim. **Inventory 2026-07-30**, all from worktrees whose pre-snapshot branch tips were fully merged into `origin/main`, so the uncommitted changes existed nowhere else: `codex/reconcile-immediate-20260730` — 21 files, +395/-200 across 19 tracked, including `.github/workflows/ci.yml`, `package.json` and `docs/scripts-index.md`; `codex/document-results-mockup-20260730` — 8 files (+13/-3 tracked) plus an untracked `document-search-results/page.tsx` under `src/app/mockups/` (named without a full path here because it does not resolve in this repo); `codex/chat-ledger-triage-d344` — `docs/outstanding-issues.md` +59/-61; `claude/section-spy-browser-coverage` — `tests/ui-smoke.spec.ts` +51. A fifth (`claude/frosty-mayer-2c6167`) self-resolved to clean during the session. **Preserved 2026-07-30, not reviewed:** each was committed on its own branch as an unpushed `wip: preserve uncommitted work before worktree cleanup` snapshot, so the work now survives a worktree reclaim — `codex/reconcile-immediate-20260730` `748ef018f`, `codex/document-results-mockup-20260730` `5dbd9f965`, `codex/chat-ledger-triage-d344` `b7eae51a4`, `claude/section-spy-browser-coverage` `d949859c3`. All four worktrees are now clean. None is pushed and none is reviewed or verified; the snapshots exist to stop silent loss, not to endorse the content. **Next:** per snapshot, review and either promote it to a real branch/PR or `git reset --hard HEAD~1` to drop it. Do not bulk-delete worktrees without this check — it is why only one of the two "safe" candidates was removed in the 2026-07-30 cleanup. | session 2026-07-30 worktree cleanup; originally captured as #150 on PR #1490 before #1496 reused that id | 2026-07-30 | ## Resolved / archive From ad71cf292e0992806192323b26fd8c5908ebb5b2 Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Thu, 30 Jul 2026 22:03:44 +0000 Subject: [PATCH 11/12] docs(ledger): record PR #1490 main sync after snapshot wording Co-authored-by: BigSimmo --- docs/branch-review-ledger.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/branch-review-ledger.md b/docs/branch-review-ledger.md index 465960f5f8..9414228f30 100644 --- a/docs/branch-review-ledger.md +++ b/docs/branch-review-ledger.md @@ -284,3 +284,4 @@ Records before 2026-07-28 were written by hand and had drifted: 146 lines carrie | 2026-07-30 | pr/1431 | 74e10087eb20a81279fb56d18f28a2475d895fab | docs: visual baseline platform layout | approved; candidate adoption and Linux baseline guidance match implementation | runtime/install parity; ledger; CI scope; docs inventory/links; Prettier; diff-check | | 2026-07-30 | pr/1431 | b4848aa92e890193a4a41744b611746673f3b058 | docs: visual baseline platform layout | approved after remote-head reconciliation; guidance unchanged | ledger; CI scope; docs inventory/links; Prettier; diff-check | | 2026-07-30 | pr/1431 | 897de9b1b7fc243006c1a71e67a6333681272ac6 | docs: visual baseline platform layout | approved after PR 1462 base sync; visual guidance unchanged | ledger; CI scope; docs inventory; Prettier; diff-check | +| 2026-07-30 | claude/capture-session-followups | 7954c044dd16e0669d417e09d6b6192a4df0e72d | PR #1490 main sync | merged origin/main 9af15e1f (clean tree; GitHub DIRTY was merge=ledger staleness); kept #152/#153 and clarified #153 snapshot wording; #151/#143 remain archived | check:outstanding-issues; docs:check-links; merge-tree clean | From 9a356b4fc426edf5e585ca7e2ea3f3c8b5647ee8 Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Thu, 30 Jul 2026 23:34:20 +0000 Subject: [PATCH 12/12] docs(ledger): record PR #1490 conflict resolution against #1508 Co-authored-by: BigSimmo --- docs/branch-review-ledger.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/branch-review-ledger.md b/docs/branch-review-ledger.md index 1ea94df2db..048ef3faec 100644 --- a/docs/branch-review-ledger.md +++ b/docs/branch-review-ledger.md @@ -321,3 +321,4 @@ Records before 2026-07-28 were written by hand and had drifted: 146 lines carrie | 2026-07-30 | PR-1507 | 5e22b89f7bdb73335d12a0cf4091915615b20dd7 | PR #1507 remote ancestry reconciliation | APPROVED — identical-tree remote merge ancestry reconciled without content change; no remaining findings. | focused Vitest 2 files/40 tests PASS on identical tree; issue and ledger guards PASS; diff check PASS; merge-tree d6594063a4aa2c5f8b7a9ec72c1c41c94e6937fa | | 2026-07-30 | claude/capture-session-followups | 6bd0c3f85743c5406d49474bb7a92956fa44c0d2 | PR #1490 merge conflict | merged origin/main; resolved outstanding-issues against #1508 IDs; kept pre-snapshot wording | check:outstanding-issues,docs:check-links | | 2026-07-30 | claude/capture-session-followups | bdd27597e9b9d72d56940cd9a55c8000f9bbe1fc | PR #1490 merge conflict | merged origin/main; resolved outstanding-issues against #1508 IDs; kept pre-snapshot wording | check:outstanding-issues,docs:check-links | +| 2026-07-30 | claude/capture-session-followups | e47c9d410a2eaaffd73af9e41dc57113f8cc9ef1 | PR #1490 merge conflict | merged origin/main; resolved outstanding-issues against #1508 IDs; kept pre-snapshot wording | check:outstanding-issues,docs:check-links |