diff --git a/context/db-migrations.md b/context/db-migrations.md index 4fc4864e2..60467fb13 100644 --- a/context/db-migrations.md +++ b/context/db-migrations.md @@ -60,6 +60,12 @@ schema migrations. reader reloads the stored statistics (`internal/db/db.go::Optimize`). - Migrations must never drop or rebuild `sqlite_stat1`, and a query-plan assertion needs seeded rows plus `DB.Optimize` first (`internal/db/db.go::Optimize`). +- Lookups keyed by an unbounded ID list, such as pull-list enrichment, must not + expand the list into `IN (?, ?, ...)` placeholders: SQLite caps a statement at + 32,766 bound variables. Bind the list once as a JSON array through + `json_each(?)`, or batch it + (`internal/db/queries_stacks.go::ListStackPlacementsForMRs`, + `internal/db/queries.go::GetWorktreeLinksForMRs`). ## Federation Spoke Preparation diff --git a/context/platform-sync-invariants.md b/context/platform-sync-invariants.md index 00a229b74..a3bbc4c7b 100644 --- a/context/platform-sync-invariants.md +++ b/context/platform-sync-invariants.md @@ -500,10 +500,13 @@ Repository import requests and route/query shapes should carry pushed-head refresh, manual workspace refresh, and on-demand worktree sync must check item visibility before item-specific provider access. Workspace and Fleet projections retain local records but omit removed parent metadata; - visible stack members are renumbered contiguously after filtering. + visible stack members are renumbered contiguously after filtering, and the + pull list's per-row stack placement must report the same position and size + as the detail stack context. `inaccessible` items remain visible. (`internal/server/pullapi/helpers.go::visibleMergeRequest`, - `internal/server/issueapi/mutation_handlers.go::requireVisibleIssue`) + `internal/server/issueapi/mutation_handlers.go::requireVisibleIssue`, + `internal/db/queries_stacks.go::ListStackPlacementsForMRs`) - Embedded navigation events for repo-bound routes must publish identity from parsed route state, not from global embed config. When a route carries repo identity, event payloads should include `provider`, `platform_host`, and diff --git a/context/testing.md b/context/testing.md index 79479cd4e..ac34e05f7 100644 --- a/context/testing.md +++ b/context/testing.md @@ -187,6 +187,14 @@ the diff, so scope diff locators to `.diff-area`. Pane tab headers are `role="tab"` with an `aria-label`, so use `getByRole("tab", { name })` — `getByRole(..., { hasText })` is not a valid option and silently matches every tab. +The mock Playwright config's 30 s timeout covers the whole test, and every +`page.goto` is a full Vite dev-server load that slows several-fold under CI's +14 workers; keep a test to two navigations or split it, or it fails on the +first attempt and only passes on retry. (`frontend/playwright.config.ts`) +Sidebar item rows are `