You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
SQL performance M0 (epic #33631): inventory every engine path that does in the app what SQL could do, and a benchmark baseline on SQLite and PostgreSQL #33633
domain:serverDomain lane — seat card indexed by label:pm:seatenhancementNew feature or requestpm:dispatchedDispatched to a dev agent by /pm-dispatchpriority:p1High: required for production / M2
Inventory. On SQL drivers (driver-sql dialects, Turso), list each engine or service path that does any of the following:
materializes an id list, then re-queries with $in (e.g. lowerRelationConditions, engine-query-lowering.ts:181-217; RELATION_FILTER_ID_CAP);
joins, sorts, groups or aggregates in application memory where the SQL could;
issues one query per row or per record (N+1: lookups, expand, summaries, hooks reading parents);
expands a read scope (RLS, sharing, controlled_by_parent) in the app instead of a SQL predicate;
runs on a lookup or master_detail column with no database index. Check whether schema sync creates one by default.
For each item: file:line, the trigger (which API or query shape), and the SQL shape it should become.
Baseline. A repeatable benchmark (script under scripts/ or packages/qa) on SQLite and PostgreSQL, seeded at 100k and 1M child rows with 2–3 levels of parents. It covers list reads with filters and sorts, cross-object filters, dataset aggregates, record pages with related lists, and read-scoped reads as a non-admin. It records p50/p95 and query counts per scenario.
Claim: area-lease pilot #33059 · area A3 · 2026-11-15T03:55Z · p1 assigned to A3 by the seat (domain:server#5) under the drain rule (p1 still claimable)
Session: session_016WV4d1QwJJ5KGZTThP4fnq (area thread A3, os-dev executor)
Account: os-elon-musk
Branch: claude/area-A3-33633
File surface: a benchmark script under scripts/ or packages/qa (dev picks; no product code), its README/notes, and the ranked-list comment on epic #33631. ⛔ No change to packages/**/src product code (M2 does fixes).
Premise: inventory measured by the dev on origin/main.
{
"issue": 33633,
"status": "done",
"branch": "claude/area-A3-33633",
"pr": "https://github.com/objectstack-ai/objectstack/pull/33662",
"head": "fbccdf3f",
"session": "session_016WV4d1QwJJ5KGZTThP4fnq",
"premise_still_valid": true,
"summary": "Measure-only M0: no product code changed. Landed packages/qa/dogfood/bench/sql-perf/ (fixture app with 3 parent levels, private OWD + nested controlled_by_parent chain; bench.mjs HTTP baseline over os dev on SQLite better-sqlite3 and PostgreSQL 16 with exact per-request SQL statement counts from Server-Timing; micro.mjs today-vs-target SQL pairs; README). Measured all 4 cells (SQLite/PG x 100k/1M), 19 scenarios each; ranked list (12 items) + inventory (18 sites across the card's 5 categories) posted on epic #33631 as comment 6889544281 and saved to /mnt/project-files/server-area-pilot/A3/33633/ranked-list.md. Schema sync DOES index authored single-valued lookup/master_detail/user columns on both dialects; the gaps are system columns (created_at default sort, owner_id).",
"inventory_count": 18,
"scenarios": "measured: 19 per cell x 4 cells (SQLite 100k, SQLite 1M, PG 100k, PG 1M) — list filter+sort (admin/member), deep page, cross-object filter small (admin/member) and large (400 INVALID_FILTER at 100k and 1M: >1000 related ids), engine aggregate (admin/member), per-measure-filter aggregate, analytics cube (admin/member), analytics dimension through a lookup (500 DATABASE_ERROR at 1M on both dialects), non-UTC month bucket, record page with related list (admin/member), read-scoped lists (admin/member/account), cascade delete. unmeasured: sharing grants (no shares seeded), roll-up summaries (fixture has none), Turso remote, network database latency.",
"epic_comment": "6889544281",
"ranked_top5": [
"R1 per-measure aggregation filter forces in-memory aggregate: 6.2 s SQLite / 7.3 s PG at 1M; conditional aggregate 0.53 s / 0.14 s (A4, M)",
"R2 analytics dimension through a lookup (FK-expand id list): 500 DATABASE_ERROR at 1M on both dialects (bind limit); JOIN serves it (A3, M) — reproducible defect, flagged for filing",
"R3 default sort created_at has no index: unfiltered page SQLite 1237 ms -> 0.09 ms, PG member page 110 -> 3 ms with (created_at,id) index (A4, S, needs ruling on system-column implicit indexes)",
"R4 vacuous controlled_by_parent chain on unrestricted reads: -29% SQLite / -42% PG per statement, twice per list (A2+A4, S-M, needs decision on orphan semantics)",
"R5 cross-object filter id list + 1000 cap: refused 400 at 100k already; nested subquery serves it in 198 ms PG / 376 ms SQLite at 1M (A4, M)"
],
"tests": "No unit test (no product code). bench.mjs smoke scale 1000 exit 0 (19 scenarios). Full runs under os-verify-lock: 100k pair VERDICT command-exit 0; 1M pair VERDICT batch-last-exit 0 with both parts writing results (sqlite-1000000.json, pg-1000000.json); micro.mjs 1M both dialects VERDICT command-exit 0. bench.mjs and fixture byte-identical between run commit fc532017 and head fbccdf3f (git diff --stat empty). No ablation: no tested behaviour changed.",
"gates": "Local @fbccdf3f: dispatch-gates --commands derived 46 families; 46 run, --ran reconciliation 46/46 accounted, 0 unrun; 43 exit 0. NOT MEASURED (environment): check:dts-closure exit 1 (CLI closure built with OS_SKIP_DTS=1, no .d.ts), check:dual-build-cjs-loads exit 3 PREREQUISITE NOT MET (no full build), check-plugin-teardown-shape --self-test exit 3 (shallow clone cannot reach pinned control commit). tsc over dogfood compiler options limited to bench/**/*.ts exit 0 with objectstack.config.ts in --listFiles; eslint --no-inline-config packages/qa/dogfood/bench exit 0. PR check-runs at report time: Check Changeset success, Check PR Size success, Governed Surface Queue Guard success, PR-body guards success; Lint & Repo Gates jobs, Build Core, Test Core plan, Dogfood Regression Gate, Live E2E UI in_progress.",
"dogfood_battery": "n/a — no `!` in the PR title and no (narrowing) arm",
"mcp_calls": "0",
"api_writes": "3 — fleet-write relay: pr_create (POST /repos/objectstack-ai/objectstack/pulls + /issues/33662/assignees + /issues/33662/labels skip-changeset), post-stamped comment POST /issues/33631/comments (6889544281), post-stamped comment POST /issues/33633/comments (this report)",
"open_questions": [
{ "question": "R3/R11: index system columns created_at (default list order) and owner_id (private OWD scope)? The implicit-index ruling (scope B) excluded system columns for want of a measured read; R3 is that read.", "options": ["A index (created_at, id) and owner_id implicitly on every object", "B index only created_at", "C leave as is; authors declare indexes"], "recommendation": "A, because the unfiltered default page drops from 1.2 s to 0.09 ms (SQLite, 1M) and PG member page 110 -> 3 ms; write cost is one btree per object" },
{ "question": "R4: drop the composed controlled_by_parent leaf when the master's scope is unrestricted? It also hides orphan details today.", "options": ["A drop it (orphans become visible to unrestricted readers)", "B keep it, but skip it only when the FK is declared required", "C keep"], "recommendation": "B, because master_detail is required in practice and it keeps the orphan answer unchanged while taking the 29-42% gain" },
{ "question": "R6: push non-UTC date bucketing down on PostgreSQL (amend ADR-0053 D2), keep in-memory on SQLite?", "options": ["A amend for PG only", "B keep UTC-only native bucketing everywhere"], "recommendation": "A, because PG has a tz database (11x at 1M) and SQLite cannot do DST zones" }
],
"security_findings": "none",
"out_of_scope_findings": [
"class: a · reach: public door POST /api/v1/analytics/query {cube: bench_line_item, measures: [count], dimensions: [opportunity.stage]} with 100k distinct opportunities answers 500 DATABASE_ERROR — SQLite 'too many SQL variables', PG 'bind message has 34464 parameter formats but 0 parameters' (100000 mod 65536); measured on both dialects at 1M · evidence: results pg-1000000.json / sqlite-1000000.json analytics_cross_object_dim, server logs · Seam: spec:none → runtime:service-analytics ObjectQLStrategy#resolveFkAttr (objectql-strategy.ts:1765) · dedupe words: resolveFkAttr, FK-expand bind limit, too many SQL variables analytics, cross-object dimension 500 · it is inventory item R2 of epic #33631, so seat files it as the epic's sub-issue",
"carrier: none · noted, not filed — SharingService#buildReadFilter reads sys_record_share with limit 5000 into id IN (...); grants past 5000 look silently dropped (fail-closed). Read-only inference, not reproduced (fixture seeds no shares); PR Acceptance notes and ranked item R9"
]
}
Rework round for review#2 on PR #33662, posted 2026-11-15T05:49Z.
{
"issue": 33633,
"status": "done",
"branch": "claude/area-A3-33633",
"pr": "https://github.com/objectstack-ai/objectstack/pull/33662",
"new_head": "d00725a65b1dd00f4574d163bbf017ec8a4e79c5",
"session": "session_016WV4d1QwJJ5KGZTThP4fnq",
"premise_still_valid": true,
"summary": "Review#2 rework on PR 33662. micro.mjs I8b now times the chained admin page the engine emits; the statement was re-captured at 1M on both dialects via X-OS-Debug-Timing. The unchained page is the new row I8c, 'with R4', and both rows print the planner's plan before and after the index. Temporary indexes are dropped with 'drop index if exists' (and checked absent) before each before-reading and again in a finally. micro-*.json/.md now carry the commit and the time. PG also times FILTER (WHERE ...) as I4b, and the README documents micro.mjs. Re-run at 1M on SQLite (twice) and PG 16, on a private cluster that is now stopped with its data dir removed. Result: R3's gain depends on R4 on SQLite but not on PG. One correction comment was posted on epic 33631, ranked-list.md in the project folder was updated, and the corrected R1/R3/R5 lines went into a PR comment (body not edited).",
"per_finding": {
"M_I8b": "today = chained admin page (I8b), unchained = I8c 'with R4'; plans recorded; re-run 1M both dialects; R3 cell corrected on 33631 (comment 6889939163), in ranked-list.md, and in the PR comment 6889949678",
"N_R5": "corrected to ~2,000 matching opportunities at 100k (~20,000 at 1M) in the correction comment, ranked-list.md and the PR comment; README did not repeat it",
"N_temp_indexes": "dropIndex() = 'drop index if exists' + absence check (sqlite_master / pg_indexes), called before each before-reading and in a finally, for both I7 and I8",
"N_commit": "micro.mjs runs 'git rev-parse --short HEAD' and writes commit + measuredAt into micro-*.json and the .md header",
"N_R1_shape": "the 0.14 s was sum(case when ... end) (I4, both dialects); new PG row I4b times FILTER (WHERE ...) at 144.6 ms vs case-when 143.8 ms; R1 target cell rewritten to say so"
},
"i8b_numbers_1M_median_of_7": {
"sqlite_run1": "I8b chained 1736.25 -> 1328.3 ms (plan identical before/after: SEARCH via idx_bench_line_item_opportunity + TEMP B-TREE FOR ORDER BY); I8c with R4 1706.92 -> 0.09 ms; I8 member 163.09 -> 179.32 ms",
"sqlite_run2": "I8b chained 1320.03 -> 1391.08 ms (plan identical); I8c with R4 1183.17 -> 0.08 ms; I8 member 147.1 -> 144.58 ms",
"pg": "I8b chained 228.83 -> 0.9 ms (Index Scan Backward on the new index + nested-loop semi join by PK); I8c with R4 61.85 -> 0.51 ms; I8 member 101.19 -> 3.2 ms",
"r1_pg": "I4 4388.52 -> 143.83 ms (case-when); I4b FILTER 144.58 ms",
"r1_sqlite": "I4 5127.17 -> 535.99 ms (run1), 4831.06 -> 546.59 ms (run2)"
},
"corrected_r3_wording": "index (created_at, id) at 1M. PG, independent of R4: admin default page as emitted today (chained) 229 -> 0.9 ms, member page 101 -> 3.2 ms; with R4 as well 62 -> 0.5 ms. SQLite, depends on R4: the chained page keeps its chain-first plan (identical before/after the index): 1736 -> 1328 / 1320 -> 1391 ms over two runs, member page 163 -> 179 / 147 -> 145 ms; only with R4 (chain dropped) 1707 -> 0.09 / 1183 -> 0.08 ms. The earlier 'SQLite 1237 ms -> 0.09 ms' was R3 + R4 together. M2: on PG R3 can land alone; on SQLite file it with or after R4 (which carries the orphan-semantics decision).",
"correction_comment_33631": 6889939163,
"pr_comment_33662": 6889949678,
"tests": "No product code changed; no unit test. micro.mjs at 1M under os-verify-lock: seed sqlite + micro sqlite + seed pg + micro pg 'VERDICT command-exit 0' (held 284s); spec dts build + micro sqlite re-run 'VERDICT command-exit 0' (held 167s). Seeding used bench.mjs --only scoped_list_unfiltered --iterations 1 --warmup 0, which also captured the admin SQL that confirms the chained shape. No ablation (script and readings only).",
"gates": "Local at d00725a6: eslint --no-inline-config packages/qa/dogfood/bench exit 0; tsc -p (dogfood options, include bench/**/*.ts, typeRoots pointed at the package, spec built with declarations) exit 0 with objectstack.config.ts and 29 spec .d.ts in --listFiles; node --check micro.mjs OK. Narrowed derived subset (declared narrowing; the delta is micro.mjs + README): check:nul-bytes 0, check:issue-citations 0, check-issue-citations scan 0, check:doc-authoring 0, check:undeclared-dep-imports 0, check:keyed-text-bounds 0. dispatch-gates --commands derived the same 46 families as the previous head; the remaining 40 were not run locally and are CI's. CI at d00725a6 read 05:49Z: 19 success, 17 skipped, 10 in_progress, 0 failed.",
"dogfood_battery": "n/a: no '!' in the PR title and Clause-② is no",
"mcp_calls": "0",
"api_writes": "3 relay writes via post-stamped (fleet-write): POST issues/33631/comments (6889939163), POST issues/33662/comments (6889949678), POST issues/33633/comments (this os-dev-report); plus 1 git push (fbccdf3f..d00725a6)",
"unmeasured": "none of the ordered cells. Not timed: SQLite FILTER (WHERE ...) (only PG got I4b). The micro output is stamped fbccdf3f because the runs preceded the commit; the micro.mjs that ran is byte-identical to d00725a6's, and the engine tree is fbccdf3f.",
"deviations": "PR body not edited: dev seats do not PATCH PR bodies, and fleet-write has no PR-body op, so the corrected R1/R3/R5 lines are in PR comment 6889949678 for the seat to fold in. The PG cluster data dir was /tmp/os-a3-33633-pgdata, not the scratchpad, because the postgres user cannot traverse the root-only scratchpad path; it is removed.",
"open_questions": [],
"security_findings": "none",
"out_of_scope_findings": []
}
domain:serverDomain lane — seat card indexed by label:pm:seatenhancementNew feature or requestpm:dispatchedDispatched to a dev agent by /pm-dispatchpriority:p1High: required for production / M2
Activity
objectstack-fleet commentedon Nov 15, 2026
domain:server#5 · os-elon-musk · session_016WV4d1QwJJ5KGZTThP4fnq
Claim: area-lease pilot #33059 · area A3 · 2026-11-15T03:55Z · p1 assigned to A3 by the seat (
domain:server#5) under the drain rule (p1 still claimable)Session:
session_016WV4d1QwJJ5KGZTThP4fnq(area thread A3, os-dev executor)Account:
os-elon-muskBranch:
claude/area-A3-33633File surface: a benchmark script under
scripts/orpackages/qa(dev picks; no product code), its README/notes, and the ranked-list comment on epic #33631. ⛔ No change topackages/**/srcproduct code (M2 does fixes).Premise: inventory measured by the dev on
origin/main.objectstack-fleet commentedon Nov 15, 2026
domain:server#5 · os-elon-musk · session_016WV4d1QwJJ5KGZTThP4fnq
os-dev-report
{ "issue": 33633, "status": "done", "branch": "claude/area-A3-33633", "pr": "https://github.com/objectstack-ai/objectstack/pull/33662", "head": "fbccdf3f", "session": "session_016WV4d1QwJJ5KGZTThP4fnq", "premise_still_valid": true, "summary": "Measure-only M0: no product code changed. Landed packages/qa/dogfood/bench/sql-perf/ (fixture app with 3 parent levels, private OWD + nested controlled_by_parent chain; bench.mjs HTTP baseline over os dev on SQLite better-sqlite3 and PostgreSQL 16 with exact per-request SQL statement counts from Server-Timing; micro.mjs today-vs-target SQL pairs; README). Measured all 4 cells (SQLite/PG x 100k/1M), 19 scenarios each; ranked list (12 items) + inventory (18 sites across the card's 5 categories) posted on epic #33631 as comment 6889544281 and saved to /mnt/project-files/server-area-pilot/A3/33633/ranked-list.md. Schema sync DOES index authored single-valued lookup/master_detail/user columns on both dialects; the gaps are system columns (created_at default sort, owner_id).", "inventory_count": 18, "scenarios": "measured: 19 per cell x 4 cells (SQLite 100k, SQLite 1M, PG 100k, PG 1M) — list filter+sort (admin/member), deep page, cross-object filter small (admin/member) and large (400 INVALID_FILTER at 100k and 1M: >1000 related ids), engine aggregate (admin/member), per-measure-filter aggregate, analytics cube (admin/member), analytics dimension through a lookup (500 DATABASE_ERROR at 1M on both dialects), non-UTC month bucket, record page with related list (admin/member), read-scoped lists (admin/member/account), cascade delete. unmeasured: sharing grants (no shares seeded), roll-up summaries (fixture has none), Turso remote, network database latency.", "epic_comment": "6889544281", "ranked_top5": [ "R1 per-measure aggregation filter forces in-memory aggregate: 6.2 s SQLite / 7.3 s PG at 1M; conditional aggregate 0.53 s / 0.14 s (A4, M)", "R2 analytics dimension through a lookup (FK-expand id list): 500 DATABASE_ERROR at 1M on both dialects (bind limit); JOIN serves it (A3, M) — reproducible defect, flagged for filing", "R3 default sort created_at has no index: unfiltered page SQLite 1237 ms -> 0.09 ms, PG member page 110 -> 3 ms with (created_at,id) index (A4, S, needs ruling on system-column implicit indexes)", "R4 vacuous controlled_by_parent chain on unrestricted reads: -29% SQLite / -42% PG per statement, twice per list (A2+A4, S-M, needs decision on orphan semantics)", "R5 cross-object filter id list + 1000 cap: refused 400 at 100k already; nested subquery serves it in 198 ms PG / 376 ms SQLite at 1M (A4, M)" ], "tests": "No unit test (no product code). bench.mjs smoke scale 1000 exit 0 (19 scenarios). Full runs under os-verify-lock: 100k pair VERDICT command-exit 0; 1M pair VERDICT batch-last-exit 0 with both parts writing results (sqlite-1000000.json, pg-1000000.json); micro.mjs 1M both dialects VERDICT command-exit 0. bench.mjs and fixture byte-identical between run commit fc532017 and head fbccdf3f (git diff --stat empty). No ablation: no tested behaviour changed.", "gates": "Local @fbccdf3f: dispatch-gates --commands derived 46 families; 46 run, --ran reconciliation 46/46 accounted, 0 unrun; 43 exit 0. NOT MEASURED (environment): check:dts-closure exit 1 (CLI closure built with OS_SKIP_DTS=1, no .d.ts), check:dual-build-cjs-loads exit 3 PREREQUISITE NOT MET (no full build), check-plugin-teardown-shape --self-test exit 3 (shallow clone cannot reach pinned control commit). tsc over dogfood compiler options limited to bench/**/*.ts exit 0 with objectstack.config.ts in --listFiles; eslint --no-inline-config packages/qa/dogfood/bench exit 0. PR check-runs at report time: Check Changeset success, Check PR Size success, Governed Surface Queue Guard success, PR-body guards success; Lint & Repo Gates jobs, Build Core, Test Core plan, Dogfood Regression Gate, Live E2E UI in_progress.", "dogfood_battery": "n/a — no `!` in the PR title and no (narrowing) arm", "mcp_calls": "0", "api_writes": "3 — fleet-write relay: pr_create (POST /repos/objectstack-ai/objectstack/pulls + /issues/33662/assignees + /issues/33662/labels skip-changeset), post-stamped comment POST /issues/33631/comments (6889544281), post-stamped comment POST /issues/33633/comments (this report)", "open_questions": [ { "question": "R3/R11: index system columns created_at (default list order) and owner_id (private OWD scope)? The implicit-index ruling (scope B) excluded system columns for want of a measured read; R3 is that read.", "options": ["A index (created_at, id) and owner_id implicitly on every object", "B index only created_at", "C leave as is; authors declare indexes"], "recommendation": "A, because the unfiltered default page drops from 1.2 s to 0.09 ms (SQLite, 1M) and PG member page 110 -> 3 ms; write cost is one btree per object" }, { "question": "R4: drop the composed controlled_by_parent leaf when the master's scope is unrestricted? It also hides orphan details today.", "options": ["A drop it (orphans become visible to unrestricted readers)", "B keep it, but skip it only when the FK is declared required", "C keep"], "recommendation": "B, because master_detail is required in practice and it keeps the orphan answer unchanged while taking the 29-42% gain" }, { "question": "R6: push non-UTC date bucketing down on PostgreSQL (amend ADR-0053 D2), keep in-memory on SQLite?", "options": ["A amend for PG only", "B keep UTC-only native bucketing everywhere"], "recommendation": "A, because PG has a tz database (11x at 1M) and SQLite cannot do DST zones" } ], "security_findings": "none", "out_of_scope_findings": [ "class: a · reach: public door POST /api/v1/analytics/query {cube: bench_line_item, measures: [count], dimensions: [opportunity.stage]} with 100k distinct opportunities answers 500 DATABASE_ERROR — SQLite 'too many SQL variables', PG 'bind message has 34464 parameter formats but 0 parameters' (100000 mod 65536); measured on both dialects at 1M · evidence: results pg-1000000.json / sqlite-1000000.json analytics_cross_object_dim, server logs · Seam: spec:none → runtime:service-analytics ObjectQLStrategy#resolveFkAttr (objectql-strategy.ts:1765) · dedupe words: resolveFkAttr, FK-expand bind limit, too many SQL variables analytics, cross-object dimension 500 · it is inventory item R2 of epic #33631, so seat files it as the epic's sub-issue", "carrier: none · noted, not filed — SharingService#buildReadFilter reads sys_record_share with limit 5000 into id IN (...); grants past 5000 look silently dropped (fail-closed). Read-only inference, not reproduced (fixture seeds no shares); PR Acceptance notes and ranked item R9" ] }objectstack-fleet commentedon Nov 15, 2026
domain:server#5 · os-elon-musk · session_016WV4d1QwJJ5KGZTThP4fnq
os-dev-report
Rework round for review#2 on PR #33662, posted 2026-11-15T05:49Z.
{ "issue": 33633, "status": "done", "branch": "claude/area-A3-33633", "pr": "https://github.com/objectstack-ai/objectstack/pull/33662", "new_head": "d00725a65b1dd00f4574d163bbf017ec8a4e79c5", "session": "session_016WV4d1QwJJ5KGZTThP4fnq", "premise_still_valid": true, "summary": "Review#2 rework on PR 33662. micro.mjs I8b now times the chained admin page the engine emits; the statement was re-captured at 1M on both dialects via X-OS-Debug-Timing. The unchained page is the new row I8c, 'with R4', and both rows print the planner's plan before and after the index. Temporary indexes are dropped with 'drop index if exists' (and checked absent) before each before-reading and again in a finally. micro-*.json/.md now carry the commit and the time. PG also times FILTER (WHERE ...) as I4b, and the README documents micro.mjs. Re-run at 1M on SQLite (twice) and PG 16, on a private cluster that is now stopped with its data dir removed. Result: R3's gain depends on R4 on SQLite but not on PG. One correction comment was posted on epic 33631, ranked-list.md in the project folder was updated, and the corrected R1/R3/R5 lines went into a PR comment (body not edited).", "per_finding": { "M_I8b": "today = chained admin page (I8b), unchained = I8c 'with R4'; plans recorded; re-run 1M both dialects; R3 cell corrected on 33631 (comment 6889939163), in ranked-list.md, and in the PR comment 6889949678", "N_R5": "corrected to ~2,000 matching opportunities at 100k (~20,000 at 1M) in the correction comment, ranked-list.md and the PR comment; README did not repeat it", "N_temp_indexes": "dropIndex() = 'drop index if exists' + absence check (sqlite_master / pg_indexes), called before each before-reading and in a finally, for both I7 and I8", "N_commit": "micro.mjs runs 'git rev-parse --short HEAD' and writes commit + measuredAt into micro-*.json and the .md header", "N_R1_shape": "the 0.14 s was sum(case when ... end) (I4, both dialects); new PG row I4b times FILTER (WHERE ...) at 144.6 ms vs case-when 143.8 ms; R1 target cell rewritten to say so" }, "i8b_numbers_1M_median_of_7": { "sqlite_run1": "I8b chained 1736.25 -> 1328.3 ms (plan identical before/after: SEARCH via idx_bench_line_item_opportunity + TEMP B-TREE FOR ORDER BY); I8c with R4 1706.92 -> 0.09 ms; I8 member 163.09 -> 179.32 ms", "sqlite_run2": "I8b chained 1320.03 -> 1391.08 ms (plan identical); I8c with R4 1183.17 -> 0.08 ms; I8 member 147.1 -> 144.58 ms", "pg": "I8b chained 228.83 -> 0.9 ms (Index Scan Backward on the new index + nested-loop semi join by PK); I8c with R4 61.85 -> 0.51 ms; I8 member 101.19 -> 3.2 ms", "r1_pg": "I4 4388.52 -> 143.83 ms (case-when); I4b FILTER 144.58 ms", "r1_sqlite": "I4 5127.17 -> 535.99 ms (run1), 4831.06 -> 546.59 ms (run2)" }, "corrected_r3_wording": "index (created_at, id) at 1M. PG, independent of R4: admin default page as emitted today (chained) 229 -> 0.9 ms, member page 101 -> 3.2 ms; with R4 as well 62 -> 0.5 ms. SQLite, depends on R4: the chained page keeps its chain-first plan (identical before/after the index): 1736 -> 1328 / 1320 -> 1391 ms over two runs, member page 163 -> 179 / 147 -> 145 ms; only with R4 (chain dropped) 1707 -> 0.09 / 1183 -> 0.08 ms. The earlier 'SQLite 1237 ms -> 0.09 ms' was R3 + R4 together. M2: on PG R3 can land alone; on SQLite file it with or after R4 (which carries the orphan-semantics decision).", "correction_comment_33631": 6889939163, "pr_comment_33662": 6889949678, "tests": "No product code changed; no unit test. micro.mjs at 1M under os-verify-lock: seed sqlite + micro sqlite + seed pg + micro pg 'VERDICT command-exit 0' (held 284s); spec dts build + micro sqlite re-run 'VERDICT command-exit 0' (held 167s). Seeding used bench.mjs --only scoped_list_unfiltered --iterations 1 --warmup 0, which also captured the admin SQL that confirms the chained shape. No ablation (script and readings only).", "gates": "Local at d00725a6: eslint --no-inline-config packages/qa/dogfood/bench exit 0; tsc -p (dogfood options, include bench/**/*.ts, typeRoots pointed at the package, spec built with declarations) exit 0 with objectstack.config.ts and 29 spec .d.ts in --listFiles; node --check micro.mjs OK. Narrowed derived subset (declared narrowing; the delta is micro.mjs + README): check:nul-bytes 0, check:issue-citations 0, check-issue-citations scan 0, check:doc-authoring 0, check:undeclared-dep-imports 0, check:keyed-text-bounds 0. dispatch-gates --commands derived the same 46 families as the previous head; the remaining 40 were not run locally and are CI's. CI at d00725a6 read 05:49Z: 19 success, 17 skipped, 10 in_progress, 0 failed.", "dogfood_battery": "n/a: no '!' in the PR title and Clause-② is no", "mcp_calls": "0", "api_writes": "3 relay writes via post-stamped (fleet-write): POST issues/33631/comments (6889939163), POST issues/33662/comments (6889949678), POST issues/33633/comments (this os-dev-report); plus 1 git push (fbccdf3f..d00725a6)", "unmeasured": "none of the ordered cells. Not timed: SQLite FILTER (WHERE ...) (only PG got I4b). The micro output is stamped fbccdf3f because the runs preceded the commit; the micro.mjs that ran is byte-identical to d00725a6's, and the engine tree is fbccdf3f.", "deviations": "PR body not edited: dev seats do not PATCH PR bodies, and fleet-write has no PR-body op, so the corrected R1/R3/R5 lines are in PR comment 6889949678 for the seat to fold in. The PG cluster data dir was /tmp/os-a3-33633-pgdata, not the scratchpad, because the postgres user cannot traverse the root-only scratchpad path; it is removed.", "open_questions": [], "security_findings": "none", "out_of_scope_findings": [] }test(qa): SQL performance M0 baseline — SQLite and PostgreSQL at 100k…