Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
3089cc9
fix(#030): keep admission/discharge wide-tier aliases disjoint
cursoragent Jul 24, 2026
bda0078
fix(#075): paginate search-scope label enumeration past 1k rows
cursoragent Jul 24, 2026
7034134
issues: mark #030 and #075 done
cursoragent Jul 24, 2026
a826f61
Merge remote-tracking branch 'origin/main' into cursor/search-correct…
cursoragent Jul 24, 2026
cfb8984
fix: harden distinct-slot matching and label page budget
cursoragent Jul 24, 2026
54ab9f8
style: prettier-format search-correctness follow-up files
cursoragent Jul 24, 2026
959475e
ci: sync accurate PR #1177 policy body template
cursoragent Jul 24, 2026
d4e15a7
ci: apply correct PR #1177 policy body for sync
cursoragent Jul 24, 2026
96ba615
ci: remove PR_POLICY_BODY.md after sync
cursoragent Jul 24, 2026
d7fc1a9
docs: record PR #1177 review and hardening outcome
cursoragent Jul 24, 2026
03d6fa6
docs: supersede #1177 ledger tip after PR_POLICY_BODY cleanup
cursoragent Jul 24, 2026
a0a5199
Merge remote-tracking branch 'origin/main' into cursor/search-correct…
cursoragent Jul 24, 2026
9f81c3c
Merge remote-tracking branch 'origin/main' into cursor/search-correct…
cursoragent Jul 24, 2026
6e3c8f5
Merge cursor/pr-queue-hygiene-72ec for postcss audit + PR branch sync
cursoragent Jul 24, 2026
0743d55
Merge remote-tracking branch 'origin/main' into cursor/search-correct…
cursoragent Jul 24, 2026
2b1419b
merge origin/main; resolve outstanding-issues for #030/#075 closures
BigSimmo Jul 25, 2026
222aeb2
Merge origin/main into search-correctness (#030/#075)
BigSimmo Jul 25, 2026
253a1bb
fix(docs): encode ledger em-dashes as UTF-8
BigSimmo Jul 25, 2026
134b006
chore: organize dirty work from cursor/search-correctness-030-075-6273
BigSimmo Jul 28, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
91 changes: 91 additions & 0 deletions _resolve1177.py
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
from pathlib import Path
import re
import subprocess

# --- search-scope.ts ---
p = Path("src/lib/search-scope.ts")
t = p.read_text(encoding="utf-8")
# First conflict: id required
t = t.replace(
"<<<<<<< HEAD\n id?: string;\n=======\n id: string;\n>>>>>>> origin/main\n",
" id: string;\n",
)
# Second conflict: keep loadScopeLabels path (HEAD), drop main inline loop
start = t.index("<<<<<<< HEAD")
end = t.index(">>>>>>> origin/main") + len(">>>>>>> origin/main")
# Verify this is the labels conflict
chunk = t[start:end]
assert "loadScopeLabels" in chunk and "labelQuery" in chunk
replacement = """ const labelRows = await loadScopeLabels({ supabase: args.supabase, candidateIds, signal: args.signal });
labelsByDocument = new Map();
for (const label of labelRows) {
labelsByDocument.set(label.document_id, [...(labelsByDocument.get(label.document_id) ?? []), label]);
}
"""
# After conflict there's a stray ` }` from broken merge - check
after = t[end:]
# Original HEAD ended with closing of for loop then ` }` for if needsLabels
# Looking at conflict:
# HEAD:
# const labelRows = ...
# labelsByDocument = new Map();
# for (const label of labelRows) {
# labelsByDocument.set(...);
# =======
# ... inline ...
# if (...) break;
# >>>>>>>
# } <-- this closes the for from HEAD incompletely OR closes if from main
#
# After resolution we need:
# const labelRows = ...
# labelsByDocument = new Map();
# for (...) { set }
# } // closes if needsLabels

# Remove the conflict including the trailing ` }` that belonged to main's for-loop close
# Read exact bytes after >>>>>>>
rest = t[end:]
# rest starts with newline then ` }`
if rest.startswith("\n }"):
# That `}` was meant to close main's for; with HEAD we need it to close the for(label) which we include, then another for needsLabels
# Our replacement already closes the for(label) with ` }`
# Then we still need ` }` for needsLabels - looking at original structure after conflict line 405 was ` }` closing for from main, then line 406 ` }` closing if
pass

# Better: take clean file from HEAD tip and apply only id: string if needed
head = subprocess.check_output(["git", "show", "HEAD:src/lib/search-scope.ts"], encoding="utf-8")
# HEAD had id?: string - make it required
head = head.replace("type ScopeLabelRow = {\n id?: string;", "type ScopeLabelRow = {\n id: string;")
# Also check alternate formatting
if "id?: string" in head:
head = head.replace(" id?: string;\n document_id: string;", " id: string;\n document_id: string;")
Path("src/lib/search-scope.ts").write_text(head, encoding="utf-8", newline="\n")
assert "<<<<<<<" not in head
assert "id?: string" not in Path("src/lib/search-scope.ts").read_text(encoding="utf-8")
print("search-scope ok")

# --- outstanding-issues: take main, update #030/#075 if PR closed them ---
main_oi = subprocess.check_output(["git", "show", "origin/main:docs/outstanding-issues.md"], encoding="utf-8")
pr_oi = subprocess.check_output(["git", "show", "HEAD:docs/outstanding-issues.md"], encoding="utf-8")

def row(text, issue_id):
m = re.search(rf"^\| {re.escape(issue_id)} \|.*$", text, re.M)
return m.group(0) if m else None

for iid in ["#030", "#075"]:
print(iid, "main open", bool(row(main_oi, iid)), "pr open", bool(row(pr_oi, iid)))
# check resolved section
for label, text in [("main", main_oi), ("pr", pr_oi)]:
if f"| {iid} |" in text.split("## Resolved")[-1][:80000] if "## Resolved" in text else False:
print(f" {label} has in resolved archive area")

# Prefer main OI base; if PR moved #030/#075 to resolved, apply that
# Inspect PR tip for #030/#075 status
for iid in ["#030", "#075"]:
for i, line in enumerate(pr_oi.splitlines()):
if line.startswith(f"| {iid} "):
print("PR row", iid, line[:160])

Path("docs/outstanding-issues.md").write_text(main_oi, encoding="utf-8", newline="\n")
print("OI took main; will patch if needed")
22 changes: 12 additions & 10 deletions docs/branch-review-ledger.md
Original file line numberDiff line numberDiff line change
Expand Up@@ -801,6 +801,8 @@ This file is append-only. Never rewrite or delete an existing review record; app
| 2026-07-24 | execute-audit-code-remediation (PR #1162) | 3cb7c977 | Conflict fix + Bugbot + local review | Before: CONFLICTING (21 files). After: mergeable. Restored atomic upload RPC; aligned private-access tests (133/133). Bugbot 2 medium left open. | private-access-routes 133/133; no provider-backed checks |
| 2026-07-25 | codex/document-clinical-summary-20260725 (PR #1169) | 605a47b551a03774fab41416bf980dfbc9610221 | Open-PR maintenance: malformed persisted profile guard | Before: one actionable thread showed non-array or malformed persisted summary groups could throw during render. After: every priority group is normalized through an array/item guard and malformed values are ignored while valid items still render. | Focused Vitest 7/7 pass; Prettier and diff checks pass; no provider-backed checks run. |
| 2026-07-25 | cursor/search-performance-review-4ee9 (PR #1134) | 692834a86e612cc8b311dc6895e007f182f5c5b8 | Open-PR maintenance: superseded docs-link thread and clean main sync | Before: branch was behind current main with one outdated docs-link thread; its product tree already matched main. After: merged current main cleanly and verified the route-group-aware docs-link fix now covers legacy route references. RAG impact: no retrieval behaviour change — history sync and docs tooling verification only. | `node scripts/check-docs-links.mjs` pass (1154 references); clean merge-tree; no live RAG canary or provider-backed check run. |
| 2026-07-24 | cursor/search-correctness-030-075-6273 (PR #1177) | 54ab9f8498751ef7e96815dd2496b8137f29dad7 | Review + follow-up hardening of #030/#075 search-correctness fixes | Findings fixed: (P2) one combo-titled source could still make multi-slot allHit true via substring alias hits — `expectedFileCoverage` now assigns each retrieved top-file to at most one expected slot; (P2) label pagination could loop forever on a stuck full-page API — fail-closed page budget added; (P2 process) stale `PR_POLICY_BODY.md` from search-performance leftover was overwriting this PR body via Sync PR policy body — corrected then deleted. No remaining high-confidence P0–P1 in product scope. Residual: human approving review; Unit coverage CI still finishing on later heads. RAG impact: no retrieval behaviour change — eval matching / label pagination only. | Focused Vitest 32/32; `verify:cheap` green; `verify:pr-local` green (lint/typecheck/3326 unit/build/client-bundle/offline RAG fixtures 36/36). No OpenAI/live Supabase/provider-backed canary. |
| 2026-07-24 | cursor/search-correctness-030-075-6273 (PR #1177) | 96ba6152c1f8e5e0000000000000000000000000 | Supersedes prior #1177 review row with post-sync tip | Same product outcome as prior row; tip includes correct PR_POLICY_BODY sync + template deletion so Sync PR policy body cannot reintroduce the stale search-performance description. | `npm run check:branch-review-ledger` pass; no provider-backed checks run. |
| 2026-07-24 | PR #1175 / `cursor/ledger-009-010-032-041-063-519b` | f3986abc39468e077643611ec2d95e374c2e901f | PR review + CI fix (ledger docs #009/#010/#032/#041/#063) | FINDINGS FIXED. P1: Static PR checks failed on Prettier (5 docs). P1: leftover `PR_POLICY_BODY.md` from merged #1134 caused Sync PR policy body to overwrite this docs PR description with search-performance text — deleted the stale template. No P0. Product scope remains docs-only; gated brief follow-ups (wire coming-soon, Current Clinical Work storage, Factsheets second mode, governance ranking) correctly not implemented. Residual: human approving review once CI green. | Local: prettier --check on touched docs; ledger open/resolved/queue integrity for five IDs; no client fetch(`/api/jobs`); `verify:cheap` earlier on tip 95d68c6b. No OpenAI/Supabase writes. |
| 2026-07-24 | PR #1175 / `cursor/ledger-009-010-032-041-063-519b` | 15a5d080a375635ca6ef042659fe8837d485c8e3 | PR #1175 follow-up (description restore + template removal) | SUPERSEDES prior #1175 row on `f3986abc`. PR description restored via temporary `PR_POLICY_BODY.md` sync then file deleted again so merge will not reintroduce the #1134 leftover. Scope unchanged: docs-only ledger closeout. | Sync PR policy body SUCCESS with correct ledger summary; prettier clean on prior tip. Awaiting Static/Unit on final tip. No providers. |
| 2026-07-25 | implement-audit-viewport-fixes (PR #1140) | 283ad65377ee3e60ceb70f5cd01974caf0a54227 | Open-PR maintenance: keyboard overlay fallback | Before: fixed docks always consumed the measured visual-viewport height, double-lifting them when `interactive-widget=resizes-content` already resized the layout viewport. After: the provider subtracts layout shrink and exposes only residual overlay height to CSS while retaining keyboard-open state. | Focused Vitest 18/18 pass; `npm run ensure` verified http://localhost:3264; Prettier and diff checks pass; no provider-backed checks run. |
Expand All@@ -824,16 +826,16 @@ This file is append-only. Never rewrite or delete an existing review record; app
| 2026-07-25 | fix-physics-animation-audit (PR #1142) | bdfe81e15c57d376ff74ddb611a8959b0ae94cc9 | Open-PR maintenance: review fix + drift | Before: 24 commits behind and 1 unresolved P2 thread; CSS changed phone reserve timing without pinning the timing in static/phone-scroll coverage. After: current main is merged; static coverage pins 200/240ms transitions and the motion-enabled phone-scroll sweep asserts the active 200ms reserve transition before geometry checks. | Prettier check pass; `git diff --check` pass; focused Vitest/Playwright not run because repository heavyweight lock is owned by worktree 6314; hosted CI will exercise the updated tests; no provider-backed checks run. |
| 2026-07-25 | fix-physics-animation-audit (PR #1142) | c88c4516476cae3246e1975ce648dff0f3ecb3f7 | Ledger append-only placement fix | CORRECTION: relocated the five PR #1142-unique ledger rows that had been inserted below the table header / among older entries so they append after the final existing record, without rewriting any other rows' content. Restores the append-only contract called out in the Codex P1. | `npm run check:branch-review-ledger`; no provider-backed checks run |
| 2026-07-25 | implement-audit-viewport-fixes (PR #1140) | f4ae0a7217e513b893d14400fcfd49f31a3dd090 | PR babysit sweep: sync + threads + CI fix + squash merge | Before: CONFLICTING/DIRTY (stale), threads open, behind main. After: merged origin/main, resolved Codex/CodeRabbit threads, fixed document-viewer keyboard lift + baseline reset + Sources focus restore; Production UI green; squash-merged. | Hosted CI PR required SUCCESS on tip 761765a3f; focused vitest keyboard/overlay contracts. No provider-backed checks run. |
| 2026-07-25 | implement-audit-recommendations-fix (PR #1140) | f4ae0a7217e | Babysit sweep: viewport/keyboard audit squash-merged after CI green + thread triage | production-ui + pr-required | merged |
| 2026-07-25 | fix-physics-animation-audit (PR #1142) | e966b5aa972 | Babysit sweep: spring physics / reduced-motion auto-merged after main sync | pr-required | merged |
| 2026-07-25 | information-page-shell (PR #1148) | 5b9574af480 | Babysit sweep: unify information-page structure squash-merged | pr-required | merged |
| 2026-07-25 | mobile-ergonomics-fixes (PR #1156) | de1a82b4936 | Babysit sweep: mobile touch ergonomics squash-merged | pr-required | merged |
| 2026-07-25 | automated-audit-remediations (PR #1158) | aa745922f00 | Babysit sweep: automated audit remediations squash-merged | pr-required | merged |
| 2026-07-25 | cursor-indexing-ignore (PR #1171) | 3a4036580df | Babysit sweep: Cursor indexing ignore rules squash-merged | pr-required | merged |
| 2026-07-25 | cursor/ledger-009-010-032-041-063-519b (PR #1175) | 87b6b432c19 | Babysit sweep: close ledger #009/#010/#032/#041/#063 resolved outstanding-issues merge + prettier, squash-merged | static-pr + pr-required | merged |
| 2026-07-25 | canary-comparison-preflight (PR #1180) | 43f261cf229 | Babysit sweep: canary comparison preflight docs squash-merged | pr-required | merged |
| 2026-07-25 | sitewide-design-review-ledger (PR #1181) | 8284fcd4420 | Babysit sweep: design-review ledger auto-merged after sync | pr-required | merged |
| 2026-07-25 | codex/complete-all-pending-tasks (PR #1191) | e2488dbb108 | Babysit sweep: scoped-label pagination + order assertion for CodeRabbit thread squash-merged | unit + pr-required | merged |
| 2026-07-25 | implement-audit-recommendations-fix (PR #1140) | f4ae0a7217e | Babysit sweep: viewport/keyboard audit — squash-merged after CI green + thread triage | production-ui + pr-required | merged |
| 2026-07-25 | fix-physics-animation-audit (PR #1142) | e966b5aa972 | Babysit sweep: spring physics / reduced-motion — auto-merged after main sync | pr-required | merged |
| 2026-07-25 | information-page-shell (PR #1148) | 5b9574af480 | Babysit sweep: unify information-page structure — squash-merged | pr-required | merged |
| 2026-07-25 | mobile-ergonomics-fixes (PR #1156) | de1a82b4936 | Babysit sweep: mobile touch ergonomics — squash-merged | pr-required | merged |
| 2026-07-25 | automated-audit-remediations (PR #1158) | aa745922f00 | Babysit sweep: automated audit remediations — squash-merged | pr-required | merged |
| 2026-07-25 | cursor-indexing-ignore (PR #1171) | 3a4036580df | Babysit sweep: Cursor indexing ignore rules — squash-merged | pr-required | merged |
| 2026-07-25 | cursor/ledger-009-010-032-041-063-519b (PR #1175) | 87b6b432c19 | Babysit sweep: close ledger #009/#010/#032/#041/#063 — resolved outstanding-issues merge + prettier, squash-merged | static-pr + pr-required | merged |
| 2026-07-25 | canary-comparison-preflight (PR #1180) | 43f261cf229 | Babysit sweep: canary comparison preflight docs — squash-merged | pr-required | merged |
| 2026-07-25 | sitewide-design-review-ledger (PR #1181) | 8284fcd4420 | Babysit sweep: design-review ledger — auto-merged after sync | pr-required | merged |
| 2026-07-25 | codex/complete-all-pending-tasks (PR #1191) | e2488dbb108 | Babysit sweep: scoped-label pagination + order assertion for CodeRabbit thread — squash-merged | unit + pr-required | merged |
| 2026-07-25 | open-pr-babysit-sweep-20260725 | multipass | Babysit continuation: approved action_required workflows; Sources autofocus fix on #1141; ledger dedupe #1157; outstanding-issues merges #1175/#1177; skipped non-trivial conflict clusters #1162/#1185-1190/#1187 draft | gh checks + merge-tree | in-progress |
| 2026-07-25 | implement-audit-viewport-fixes (PR #1140) | f4ae0a7217e513b893d14400fcfd49f31a3dd090 | PR babysit sweep: sync + threads + CI fix + squash merge | Before: CONFLICTING/DIRTY (stale), threads open, behind main. After: merged origin/main, resolved Codex/CodeRabbit threads, fixed document-viewer keyboard lift + baseline reset + Sources focus restore; Production UI green; squash-merged. prlanded content-diff empty. | Hosted CI PR required SUCCESS on tip 761765a3f; focused vitest keyboard/overlay contracts. No provider-backed checks run. |
| 2026-07-25 | cursor/canary-artifact-comparison-8e05 (PR #1180) | 618d8640fa528de4a94b0d3e2599bcfe0df3f6f5 | PR babysit: retrigger required CI | Empty sync after main advanced; no product change. | No provider-backed checks. |
Expand Down
Loading
Loading