diff --git a/.dev-loop/INGEST_REPORT.md b/.dev-loop/INGEST_REPORT.md index 2ff3871..ba0f221 100644 --- a/.dev-loop/INGEST_REPORT.md +++ b/.dev-loop/INGEST_REPORT.md @@ -1,35 +1,220 @@ -# Knowledge flush — 1 insight +# Knowledge flush — 5 insight(s) → 2 pages -Source: RNR-3440 (사내 잠재매물 주간 추출 스크립트 메모리 피크 저감). Candidate: -"QueryPie 프록시 경유로 대용량 결과를 스트리밍할 때 server-side named cursor 대신 -일반 커서 + `fetchmany` + openpyxl `write_only`." +Queue drained: 5 pending candidates across 3 sessions. Four of them describe the +same situation at different granularity and were folded into one page (AGENTS.md +"one case per page" cuts by _situation_, not by candidate); the fifth is +unrelated and got its own page. + +| # | Candidate (hash) | Claim | Outcome | +| --- | ------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------ | +| 1 | `f997639131d8ec9e` | Validate a grep gate on a conforming sibling file before adopting it | Folded → `testing-docs-as-spec-document-conformance-checks` (Do this §2) | +| 2 | `739b75ed972c6078` | Token-presence gates are blind three ways; split into structure / modality / row-completeness / cross-reference axes with per-axis negative controls | Folded → same page (Do this §3) | +| 3 | `2e3fcd105c8512fa` | Persist `s3.upload()` `Key`, not `Location` | New page `backend-common-storage-object-key-persistence` | +| 4 | `39dfae0d5a813cb4` | Pair a coverage check with a value-validity check, each with its own negative control | Folded → same page (Do this §4) | +| 5 | `18dc623000d54f07` | Split Markdown rows on unescaped pipes only | Folded → same page (Edge cases + Instead of) | ## Verified best-practice -**Claim 1 — psycopg2 server-side (named) cursor requires a transaction; fails under autocommit.** -- Source: psycopg2 usage docs — `https://github.com/psycopg/psycopg2/blob/master/doc/src/usage.rst` (via Context7). Quote: "Named cursors are typically created 'WITHOUT HOLD', meaning they exist only within the current transaction. Attempting to fetch from them after a commit or in autocommit mode raises an exception." -- Matches my live repro (`can't use a named cursor outside of transactions`). → **verified** +### Insights 1, 2, 4 — controls on a document-conformance check → `confidence: verified` + +**Claim.** A checker is unproven until it has been run against both a conforming +input (must PASS) and a deliberately-broken input (must FAIL), one control per +check; presence checks do not establish correctness. + +Sources checked: + +- **ESLint `RuleTester`** — https://eslint.org/docs/latest/integrate/nodejs-api#ruletester — + fetched; requires both a `valid` array (rule must not fire on compliant code) + and an `invalid` array whose cases must assert the errors the rule produces. + This is the positive/negative control pair as an enforced API shape. +- **Semgrep rule tests** — https://docs.semgrep.dev/writing-rules/testing-rules — + fetched; `ruleid:` annotates true positives and `ok:` true negatives, both in + the same test file. Second independent tool converging on the same requirement. +- **Google Testing Blog, mutation testing** — https://testing.googleblog.com/2021/04/mutation-testing.html — + already cited elsewhere in this wiki; supports "insert a fault, require the + check to fail" as the measure of detection. +- **JSON Schema `required`** — https://json-schema.org/understanding-json-schema/reference/object — + fetched; `required` asserts key presence and constrains no value (a required + property may even be `null`). This is the canonical statement of the + coverage-vs-validity split that insight 4 hit empirically. + +**How verified.** The two linter sources are official docs for tools whose entire +job is "run a rule against a document/AST", and both mandate the two-sided test. +The candidates' own evidence (an independent auditor's 8 mutations passing a +16-gate suite; a `Bogus` cell surviving a coverage check) is the field half. +Insight 1's specific mechanism — a missing target file makes _every_ pattern +red, so red carries no information about the pattern — is a direct logical +consequence, and the candidate reports the positive control actually run +(7 sections matched on the conforming sibling `rfcs/0005`). + +### Insight 5 — unescaped-pipe splitting of GFM table rows → `confidence: verified` + +- **GFM spec, tables extension** — https://github.github.com/gfm/#tables-extension- — + fetched. Cells are "separated by pipes (`|`)", and Example 200 shows you + "include a pipe in a cell's content by escaping it, **including inside other + inline spans**" (`f\|oo`, and an escaped pipe inside a code span and inside + emphasis). So `\|` is legal cell content and `split("|")` overcounts a correct + row. +- **Reproduced here.** Ran the candidate's `re.split(r"(? [추정] 표시 항목은 세션에 명시 근거가 없어 사후 재구성한 의도임 — 검증 필요 + +## Invariants checked + +- Body length: 73 and 60 lines (limit 120). +- Every `related:` id resolves; no duplicate ids across `wiki/`. +- Both pages listed in their domain `index.md`; both domains in `INDEX.md`. +- Two `## [2026-07-30] ingest` entries appended to `log.md`. +- Positive guidance only: every "don't" lives in an `Instead of` row paired with + its replacement and a why. +- Table cell counts re-verified with the unescaped-pipe splitter this PR + documents. diff --git a/INDEX.md b/INDEX.md index 05789bd..e12a17d 100644 --- a/INDEX.md +++ b/INDEX.md @@ -10,10 +10,10 @@ follow the cross-pointers in their index or take the next matching seeded domain | Domain | Status | Route here when | |--------|--------|-----------------| | [databases](wiki/databases/index.md) | **seeded** | Designing schemas/tables/keys, choosing or evaluating indexes, writing or optimizing queries, choosing transaction/isolation behavior | -| [backend](wiki/backend/index.md) | **seeded** | Server-side application code — language-agnostic (`common/`: API contracts, idempotency, JWT, timeouts/retries, caching, jobs, transactions in app code, shared state/pools, errors) plus stack subtrees: `java/` (JPA, Spring proxies, JVM threads/memory), `node/` (event loop, promises, runtime validation, shutdown), `python/` (GIL/asyncio, pydantic, WSGI/ASGI workers, language traps) | +| [backend](wiki/backend/index.md) | **seeded** | Server-side application code — language-agnostic (`common/`: API contracts, idempotency, JWT, timeouts/retries, caching, jobs, transactions in app code, shared state/pools, errors, object-storage references) plus stack subtrees: `java/` (JPA, Spring proxies, JVM threads/memory), `node/` (event loop, promises, runtime validation, shutdown), `python/` (GIL/asyncio, pydantic, WSGI/ASGI workers, language traps) | | [frontend](wiki/frontend/index.md) | **seeded** | Web UI code: state placement, rendering performance, in-UI data fetching (races, infinite scroll), auth token handling, forms, XSS-safe output, accessibility | | [infrastructure](wiki/infrastructure/index.md) | **seeded** | CI/CD pipelines, secrets in build/deploy, container image builds, rollout/rollback strategy, observability (logs/metrics/alerting) | -| [testing](wiki/testing/index.md) | **seeded** | Writing or structuring automated tests: level choice, cases/assertions, test data, mock decisions, flaky tests (release-process quality → qa) | +| [testing](wiki/testing/index.md) | **seeded** | Writing or structuring automated tests: level choice, cases/assertions, test data, mock decisions, flaky tests, checks whose subject is a document rather than code (release-process quality → qa) | | [qa](wiki/qa/index.md) | **seeded** | Release-quality process: release gates, regression scoping, bug reports, severity/priority triage, exploratory testing (writing automated test code → testing) | | [debugging](wiki/debugging/index.md) | **seeded** | Diagnosing a failure — finding what is wrong and why: reproducing, bisection, hypothesis testing, traces/logs, intermittent failures (fixing the diagnosed fault → its owning domain) | | [security](wiki/security/index.md) | **seeded** | Trust-boundary decisions: input validation, session-vs-token auth choice, per-resource authorization (IDOR), secrets hygiene, dependency trust, PII handling (XSS rendering → frontend; CI secrets → infrastructure; JWT implementation → backend/frontend auth) | diff --git a/log.md b/log.md index 587a5dc..3f66362 100644 --- a/log.md +++ b/log.md @@ -34,3 +34,5 @@ Append-only. Format: `## [YYYY-MM-DD]