Skip to content

feat: an added or changed database query needs Proof for the claim (v2.28.0) - #94

Merged
cskwork merged 3 commits into
mainfrom
feat/query-proof
Nov 18, 2026
Merged

cskwork merged 3 commits into
mainfrom
feat/query-proof

Conversation

@cskwork

@cskwork cskwork commented Nov 18, 2026 •

Copy link
Copy Markdown
Owner

Problem

A change could add or rewrite a SELECT that passed every test and review yet ran ten times slower on production-sized data, because Proof for the claim covered only explicit performance and refactor claims. A correlated subquery placed inside a join condition is correct on a small fixture and only shows its cost on the largest real scope.

Changes

  • phases/3-build.md: Proof for the claim now also applies to an added or changed database query. Query proof is base and after actual plans (EXPLAIN ANALYZE or equivalent) on the largest realistic data scope, with time and plan shape. It fails on time over 2x or 500 ms, a full scan repeated per outer row, a lost hash join, or a correlated subquery added to a join condition or select list on a large table; a scoped set filter is preferred. A missing index becomes a proposed DDL file, not applied.
  • roles/reviewer.md: plan and diff review block any change that needs Proof for the claim without a planned method or without the proof in logs/.
  • roles/qa.md: changed-query scenarios need Proof for the claim, like performance and refactor scenarios.

Verification

CI selftest passed on ubuntu, macos and windows (windows on a rerun after a one-second file-watch timing failure in the to-do tests). Locally: prompt budgets: total 5991/6000 words, plan 2497, build 2149, evidence 2118 (each ≤ 2500); every linked phase/role/template path exists. node --test tests/*.test.mjs: 207/220 pass; the 13 failures are HTTP/TUI/lock timeouts in the to-do tests, which also fail on the previous release commit (6 of 168 in the same files), and this release changes no code. The full tests/selftest.sh was not run locally: a local hook blocks its git reset --hard step.

2026-11-18 AIDT A20-1477: JOIN ON 안의 상관 NOT EXISTS가 기능 시험·QA는 통과했지만 해시 조인을 문항마다 전체 스캔으로 바꿔 운영 응답이 약 2.1s에서 21.4s로 늘었다. Query 기준(2배·500ms, 반복 전체 스캔, 해시 조인 소실, 큰 테이블 상관 서브쿼리)과 인덱스 DDL 제안을 build·reviewer·qa에 연결. 프롬프트 예산: 전체 5991/6000, plan 2497/2500.
@cskwork
cskwork merged commit 518a1d6 into main Nov 18, 2026
3 checks passed
@cskwork
cskwork deleted the feat/query-proof branch November 18, 2026 12:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant