Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
735a937
fix(tooling,ui,cross-mode): complete safe tooling guards, landmark de…
BigSimmo Aug 19, 2026
cc9c567
Potential fix for pull request finding
BigSimmo Aug 19, 2026
5246925
Potential fix for pull request finding
BigSimmo Aug 19, 2026
e77336b
Merge branch 'main' into gemini/safe-tooling-ui-and-crossmode-hardening
BigSimmo Aug 19, 2026
a7b24b9
fix: revert therapy-compass home title from "Therapy Compass" back to…
Copilot Aug 19, 2026
edb92ed
fix(ui,modes): restore canonical placeholder ellipsis and presentatio…
BigSimmo Aug 19, 2026
1a2e0ea
Merge branch 'main' into gemini/safe-tooling-ui-and-crossmode-hardening
BigSimmo Aug 19, 2026
a3e081d
fix(ci): disable PWA install prompts in Lighthouse budget runs
Copilot Aug 19, 2026
d6b49b5
Fix stale shared-home CI expectations (#2179)
Copilot Aug 19, 2026
ff1c0af
Initial plan (#2178)
Copilot Aug 19, 2026
ccb4c44
fix: resolve remaining PR review feedback
Copilot Aug 19, 2026
6514837
fix: tighten pr-policy verification parsing and legacy governance mat…
BigSimmo Aug 19, 2026
377831d
fix: sync stale test assertions with this branch's copy/attribution c…
claude Aug 19, 2026
bdacc17
test: align mode-home and attribution assertions with current compone…
BigSimmo Aug 19, 2026
49cb391
Merge remote-tracking branch 'origin/gemini/safe-tooling-ui-and-cross…
BigSimmo Aug 19, 2026
d020c71
Merge origin/main into gemini/safe-tooling-ui-and-crossmode-hardening
Copilot Aug 19, 2026
6e96cf1
Merge branch 'main' into gemini/safe-tooling-ui-and-crossmode-hardening
BigSimmo Aug 19, 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
13 changes: 12 additions & 1 deletion docs/branch-cleanup-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -121,10 +121,21 @@ credentials.
5. Record completed cleanup reviews with `npm run ledger:append -- --ref <branch> --head <full-sha> --scope branch-cleanup --outcome <o> --checks <c>`. The scope cell must be exactly `branch-cleanup` for a later sweep to treat it as complete; `branch-cleanup-deletion-pending` deliberately does not count.
6. Remove detached worktrees only when clean, unneeded, and absent from active `git worktree list` output.

## Dev Drive Stale Worktree Pruning (Inbox `ec356a7d`)
## Dev Drive Stale Worktree Pruning (Inbox `ec356a7d`, `#6SMMB4`)

Worktrees accumulate across active multi-agent development fleets (e.g. on Dev Drive `D:` or secondary disks, where dozens of worktrees can hold ~19+ GB of duplicated `node_modules` at ~0.89 GB and ~50,000 files each). Stale worktrees compete for disk capacity, cause dependency drift, and contend on the cross-worktree test run coordinator lock (`scripts/run-heavy.mjs` / `scripts/test-run-lock.mjs`).

### Dev Drive Trusted Package Cache (#6SMMB4)

When operating multi-worktree fleets on a Windows Dev Drive (`D:`, ReFS), verify that the npm package cache (`D:\.npm-cache`) is registered as a Dev Drive trusted cache. If unverified or untrusted, Microsoft Defender real-time scanning inspects every `npm ci` extraction across all worktrees.

From an **elevated administrator prompt**:

```cmd
fsutil devdrv query D:
fsutil devdrv trust D:\.npm-cache
```

### Safety Rules for Worktree Pruning

- **Never pass `--force` to `git worktree remove`.** If git refuses removal due to untracked files, submodules, or uncommitted changes, that refusal is a critical safety signal, not an obstacle to override.
Expand Down
2 changes: 1 addition & 1 deletion docs/design-system/adoption-manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -3932,6 +3932,6 @@
"productImportedComponentCount": 34,
"rootCount": 88,
"productionRouteCount": 75,
"nextUiEntryCount": 128
"nextUiEntryCount": 131
}
}
8 changes: 7 additions & 1 deletion docs/launch-operator-runbook.md
Original file line number Diff line number Diff line change
Expand Up @@ -173,12 +173,18 @@ Following a Supabase database restore or disaster recovery failover, verify all
4. **Cron Job Schedule Registration:** Verify pg_cron extensions and scheduled maintenance jobs (cache retention, query log sweeps) are active.
5. **Storage Bucket Policies:** Confirm private document storage buckets (`documents`, `document-images`) have active RLS policies preventing unauthenticated public reads.

## 8. Operational notes & diagnostics (#248, #305, #315, #102)
## 8. Operational notes & diagnostics (#248, #305, #315, #102, #6SMMB4)

- **Search-Health Indexes (#248):** Ensure migration `20260705180000_reconcile_search_health_indexes.sql` is active on live and `search_schema_health()` reports `ok: true` with no `missing` entries (`npm run check:indexing`) — treat its `required_indexes` list as the recovery criterion, not a fixed count, since later migrations extend it.
- **Concurrent Document Index Recipe (#102):** When applying additive document index optimizations on a busy database (`documents_title_bare_trgm_idx`, `documents_file_name_bare_trgm_idx`, and `documents_status_id_idx`), pre-create indexes concurrently (`CREATE INDEX CONCURRENTLY IF NOT EXISTS`) before applying the committed migration and registering in `search_schema_health()` to avoid write lock contention. Validate each index with `pg_index.indisvalid`. Note that bare-column trigrams and composite `(status, id)` indexes on the RAG path are canary-gated due to unordered `LIMIT 12` selection in candidate retrieval ([operator-apply-performance-latency-remediation.md](operator-apply-performance-latency-remediation.md)).
- **Canary Latency & Cost Boundaries (#305):** Retrieval latency p90 SLO is ≤ 20s. Canary cost metrics provide lower-bound estimates without cache warmup.
- **UI Smoke Reporter Stranding (#315):** When debugging rare UI smoke test timeouts, inspect reporter stranding in Playwright hooks rather than assuming layout regressions.
- **Dev Drive Trusted Package Cache (#6SMMB4):** On Windows workstations hosting worktrees on a Dev Drive (e.g. `D:`, ReFS), verify that the local npm package cache (`D:\.npm-cache`) is registered as a trusted Dev Drive cache. If unverified or not registered, Microsoft Defender real-time scanning runs over every `npm ci` across all worktrees. From an **elevated administrator prompt**, inspect and register the trusted cache:
```cmd
fsutil devdrv query D:
fsutil devdrv trust D:\.npm-cache
```
Confirming or trusting the cache on the volume exempts package extractions from Defender real-time scan overhead during multi-worktree operations.

## 9. Ledger queue derivation & credential discipline (#327, #042)

Expand Down
8 changes: 5 additions & 3 deletions docs/rag-improvement/HANDOVER.md
Original file line number Diff line number Diff line change
Expand Up @@ -337,9 +337,11 @@ offline fixtures and validation only`.
against an existing branch: it can discard unpushed packet commits. Never build on a stale head.
2. Read: your packet here → the matching README section → `docs/rag-behaviour/README.md`
(+ `safeguards.md` before touching any protected surface).
3. Check the packet's status row AND the open PR list for a duplicate implementation
(`#292`: an open ledger row is not proof nobody is building it — PR #1899 already covers
A1 phase 1).
3. Check the canonical queue in [`docs/outstanding-issues.md`](../outstanding-issues.md)
and this file's status table (§2). Check the open PR list for duplicate implementation
only when explicit owner approval for provider access exists; otherwise proceed with
local/offline evidence and note the duplicate-risk caveat (`#292`: an open ledger row is
not proof nobody is building it — PR #1899 already covers A1 phase 1).
4. State the RAG-impact flag to the owner in your first message if your packet touches a
protected surface (all of Track A does).
5. Confirm what is NOT authorised: live canary dispatches, provider-backed evals
Expand Down
5 changes: 4 additions & 1 deletion docs/rag-improvement/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ infrastructure, corrected.
behaviour change needs a live eval-canary pair (provider-backed, ~$1–2, explicit approval per
run). Nothing here authorises reindexing, migrations, or provider calls by itself.

**Canonical task queue:** per `AGENTS.md`, canonical cross-session task tracking and deduplication live in [`docs/outstanding-issues.md`](../outstanding-issues.md). Always consult the canonical ledger first. Check open PRs only when explicit owner approval for provider access exists; otherwise continue with local/offline evidence and note the duplicate-risk caveat.

---

## 1. Review verdict on the original PDF
Expand Down Expand Up @@ -358,7 +360,8 @@ default-off flags.
## 5. Sequencing summary

Execution across cloud sessions is coordinated by [HANDOVER.md](HANDOVER.md): per-session
work packets, the live status table, checklists, and paste-ready prompts.
work packets, the live status table, checklists, and paste-ready prompts. Canonical task
ownership and cross-session tracking remain registered in [`docs/outstanding-issues.md`](../outstanding-issues.md).

| Order | Item | Depends on | Behaviour change? |
| ----- | ----------------------------------------------- | ------------------------------- | ----------------------------------------- |
Expand Down
2 changes: 1 addition & 1 deletion docs/scripts-index.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Scripts index

Curated map of `scripts/` (247 files) and the `package.json` script surface (252 entries),
Curated map of `scripts/` (248 files) and the `package.json` script surface (252 entries),
grouped by purpose. This is orientation, not an exhaustive per-file listing — the authoritative
command list is `package.json`, and `npm run docs:check-scripts` verifies every `npm run <x>`
referenced in docs resolves to a real script. `npm run docs:update` refreshes the exact counts above.
Expand Down
84 changes: 74 additions & 10 deletions eval/docling/fixtures/generate_fixtures.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,19 +67,83 @@ def draw_table(page: fitz.Page, top: float, table: dict) -> float:
rows, cols = table["rows"], table["cols"]
rect = usable_rect()
col_width = (rect.x1 - rect.x0) / cols
bottom = top + rows * ROW_HEIGHT
row_height = float(table.get("rowHeight", ROW_HEIGHT))
unruled = bool(table.get("unruled") or table.get("style") == "unruled")
rotated_headers = bool(table.get("rotatedHeaders") or table.get("rotated_headers"))
header_row_height = float(
table.get("headerRowHeight", row_height if not rotated_headers else max(row_height, TABLE_SIZE * 4.5))
)
row_heights = [header_row_height] + [row_height] * max(0, rows - 1)
row_edges = [top]
for height in row_heights:
row_edges.append(row_edges[-1] + height)
col_edges = [rect.x0 + idx * col_width for idx in range(cols + 1)]
bottom = row_edges[-1]
if bottom > rect.y1:
die(f"table {table['tableId']} does not fit on its page — reduce rows in the manifest")
for r in range(rows + 1):
y = top + r * ROW_HEIGHT
page.draw_line(fitz.Point(rect.x0, y), fitz.Point(rect.x1, y), width=0.5)
for c in range(cols + 1):
x = rect.x0 + c * col_width
page.draw_line(fitz.Point(x, top), fitz.Point(x, bottom), width=0.5)

hidden_horizontal_segments: set[tuple[int, int]] = set()
hidden_vertical_segments: set[tuple[int, int]] = set()
for cell in table["cells"]:
r, c = cell["row"], cell["col"]
col_span = max(1, int(cell.get("colSpan", 1)))
row_span = max(1, int(cell.get("rowSpan", 1)))
for interior_row in range(r + 1, min(rows, r + row_span)):
for col_segment in range(c, min(cols, c + col_span)):
hidden_horizontal_segments.add((interior_row, col_segment))
for interior_col in range(c + 1, min(cols, c + col_span)):
for row_segment in range(r, min(rows, r + row_span)):
hidden_vertical_segments.add((interior_col, row_segment))

if not unruled:
for row_boundary in range(rows + 1):
y = row_edges[row_boundary]
for col_segment in range(cols):
if (row_boundary, col_segment) in hidden_horizontal_segments:
continue
page.draw_line(
fitz.Point(col_edges[col_segment], y),
fitz.Point(col_edges[col_segment + 1], y),
width=0.5,
)
for col_boundary in range(cols + 1):
x = col_edges[col_boundary]
for row_segment in range(rows):
if (col_boundary, row_segment) in hidden_vertical_segments:
continue
page.draw_line(
fitz.Point(x, row_edges[row_segment]),
fitz.Point(x, row_edges[row_segment + 1]),
width=0.5,
)
else:
# Unruled / booktabs style: horizontal rules only (top, mid/header, bottom)
page.draw_line(fitz.Point(rect.x0, top), fitz.Point(rect.x1, top), width=1.0)
page.draw_line(fitz.Point(rect.x0, row_edges[1]), fitz.Point(rect.x1, row_edges[1]), width=0.5)
page.draw_line(fitz.Point(rect.x0, bottom), fitz.Point(rect.x1, bottom), width=1.0)

for cell in table["cells"]:
x = rect.x0 + cell["col"] * col_width + 3
y = top + cell["row"] * ROW_HEIGHT + ROW_HEIGHT - 6
page.insert_text(fitz.Point(x, y), cell["text"], fontname=BODY_FONT, fontsize=TABLE_SIZE)
r, c = cell["row"], cell["col"]
col_span = max(1, int(cell.get("colSpan", 1)))
row_span = max(1, int(cell.get("rowSpan", 1)))
is_rotated = (r == 0 and rotated_headers) or bool(cell.get("rotate") == 90 or cell.get("rotated"))
x0 = col_edges[c]
x1 = col_edges[min(cols, c + col_span)]
y0 = row_edges[r]
y1 = row_edges[min(rows, r + row_span)]
cell_rect = fitz.Rect(x0, y0, x1, y1)
x = cell_rect.x0 + 3
y = cell_rect.y1 - 6
if is_rotated:
page.insert_text(
fitz.Point(cell_rect.x0 + min(cell_rect.width, 16.0), cell_rect.y1 - 4),
cell["text"],
fontname=BODY_FONT,
fontsize=TABLE_SIZE,
rotate=90,
)
else:
page.insert_text(fitz.Point(x, y), cell["text"], fontname=BODY_FONT, fontsize=TABLE_SIZE)
Comment thread
coderabbitai[bot] marked this conversation as resolved.
return bottom


Expand Down
28 changes: 16 additions & 12 deletions eval/docling/fixtures/manifest.v1.json
Original file line number Diff line number Diff line change
Expand Up @@ -1747,6 +1747,7 @@
"page": 1,
"rows": 8,
"cols": 5,
"unruled": true,
"cells": [
{
"row": 0,
Expand Down Expand Up @@ -1955,6 +1956,7 @@
"page": 2,
"rows": 11,
"cols": 4,
"unruled": true,
"cells": [
{
"row": 0,
Expand Down Expand Up @@ -2227,6 +2229,7 @@
"page": 1,
"rows": 8,
"cols": 5,
"mergedCells": true,
"cells": [
{
"row": 0,
Expand All @@ -2236,12 +2239,8 @@
{
"row": 0,
"col": 1,
"text": "Morning dose (mg)"
},
{
"row": 0,
"col": 2,
"text": "Evening dose (mg)"
"colSpan": 2,
"text": "Daily dose schedule (mg)"
},
{
"row": 0,
Expand Down Expand Up @@ -2707,6 +2706,7 @@
"page": 1,
"rows": 8,
"cols": 5,
"rotatedHeaders": true,
"cells": [
{
"row": 0,
Expand Down Expand Up @@ -2915,6 +2915,7 @@
"page": 2,
"rows": 11,
"cols": 4,
"rotatedHeaders": true,
"cells": [
{
"row": 0,
Expand Down Expand Up @@ -3187,6 +3188,8 @@
"page": 1,
"rows": 8,
"cols": 5,
"unruled": true,
"mergedCells": true,
"cells": [
{
"row": 0,
Expand All @@ -3196,12 +3199,8 @@
{
"row": 0,
"col": 1,
"text": "Morning dose (mg)"
},
{
"row": 0,
"col": 2,
"text": "Evening dose (mg)"
"colSpan": 2,
"text": "Daily dose schedule (mg)"
},
{
"row": 0,
Expand Down Expand Up @@ -3395,6 +3394,7 @@
"page": 2,
"rows": 11,
"cols": 4,
"unruled": true,
"cells": [
{
"row": 0,
Expand Down Expand Up @@ -3667,6 +3667,8 @@
"page": 1,
"rows": 8,
"cols": 5,
"unruled": true,
"rotatedHeaders": true,
"cells": [
{
"row": 0,
Expand Down Expand Up @@ -3875,6 +3877,8 @@
"page": 2,
"rows": 12,
"cols": 4,
"unruled": true,
"rotatedHeaders": true,
"cells": [
{
"row": 0,
Expand Down
18 changes: 13 additions & 5 deletions eval/docling/report/lab-contract.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -144,15 +144,23 @@ function validateTable(fixture, table, index, seenTableIds, failures) {
failures.push(`${label}: every cell needs integer row/col and non-empty text`);
continue;
}
if (cell.row < 0 || cell.row >= table.rows || cell.col < 0 || cell.col >= table.cols) {
const colSpan = Number.isInteger(cell.colSpan) && cell.colSpan > 1 ? cell.colSpan : 1;
const rowSpan = Number.isInteger(cell.rowSpan) && cell.rowSpan > 1 ? cell.rowSpan : 1;
if (cell.row < 0 || cell.row + rowSpan > table.rows || cell.col < 0 || cell.col + colSpan > table.cols) {
failures.push(
`${label}: cell (${cell.row},${cell.col}) is outside the declared ${table.rows}x${table.cols} grid`,
);
}
const position = `${cell.row}:${cell.col}`;
if (positions.has(position)) failures.push(`${label}: duplicate cell at (${cell.row},${cell.col})`);
positions.add(position);
if (cell.row === 0) headerCols.add(cell.col);
for (let r = 0; r < rowSpan; r++) {
for (let c = 0; c < colSpan; c++) {
const position = `${cell.row + r}:${cell.col + c}`;
if (positions.has(position)) failures.push(`${label}: duplicate cell at (${cell.row + r},${cell.col + c})`);
positions.add(position);
}
}
if (cell.row === 0) {
for (let c = 0; c < colSpan; c++) headerCols.add(cell.col + c);
}
}
if (headerCols.size !== table.cols) {
failures.push(`${label}: header row 0 must fill all ${table.cols} columns — table recall scoring anchors on it`);
Expand Down
Loading
Loading