From 40f15acb9beb07bde73765afbea821863402974e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=B5=9C=EC=98=81=EA=B8=B0?= Date: Thu, 13 Aug 2026 10:15:59 +0900 Subject: [PATCH 1/2] =?UTF-8?q?knowledge:=20the=20receiving=20side=20of=20?= =?UTF-8?q?a=20session=20completion=20gate=20=E2=80=94=20hold=20the=20inst?= =?UTF-8?q?ructed=20phase,=20report=20the=20mismatch?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- log.md | 1 + .../session-completion-gates.md | 25 +++++++++++++++++-- wiki/infrastructure/index.md | 2 +- 3 files changed, 25 insertions(+), 3 deletions(-) diff --git a/log.md b/log.md index c930fc2..5f238c2 100644 --- a/log.md +++ b/log.md @@ -43,3 +43,4 @@ Append-only. Format: `## [YYYY-MM-DD] Date: Thu, 13 Aug 2026 10:18:34 +0900 Subject: [PATCH 2/2] =?UTF-8?q?knowledge:=20ingest=20report=20=E2=80=94=20?= =?UTF-8?q?1=20merged,=201=20folded=20into=20#76,=201=20dropped=20as=20dup?= =?UTF-8?q?licate?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .dev-loop/INGEST_REPORT.md | 182 ++++++++++++++++++++++++++++--------- 1 file changed, 139 insertions(+), 43 deletions(-) diff --git a/.dev-loop/INGEST_REPORT.md b/.dev-loop/INGEST_REPORT.md index 55ccfd1..e1efcd8 100644 --- a/.dev-loop/INGEST_REPORT.md +++ b/.dev-loop/INGEST_REPORT.md @@ -1,53 +1,149 @@ -# Knowledge consolidation — 15 open PRs (#17–#40) → one reconciled state +# Knowledge flush — 3 insight(s) -The 15 open `knowledge/*` PRs (created 2026-08-04 → 2026-08-05, before the -harvest processed-store dedupe fix in #41) contained 123 file-versions of ~75 -unique pages, with the same insight landing at up to 3 different paths across -up to 8 PRs. Per-PR review would re-import those duplicates, so — as with the -#6–#13 consolidation — this branch carries the reconciled end-state and the 15 -PRs are closed in its favor. +Queue drained: 3 pending candidates from 3 sessions. Outcome: **1 merged into an +existing page** (this PR), **1 folded into open PR #76**, **1 dropped as a +same-day duplicate of the merged one**. No new page was created. ## Verified best-practice -Every adopted page's sources were carried from its originating PR's flush, where -they were live-verified at flush time; no new URLs were introduced during -consolidation (checked mechanically: every `http(s)` URL in every merged page -appears in a source PR's diff; every added body line in amended pages traces to -a source PR hunk — orphan-line verification). Confidence fields were kept as the -originating flushes set them, except client-side-rate-limiting where the union -of provider-doc citations (Okta, Auth0, GitHub, OpenAI, RFC 6585) supports -`verified` for the load-bearing claims. One subagent's fabricated content (12 -files matching neither main nor any PR, with invented source URLs) was detected -by the same verification and replaced with true PR content. +### A. `05d9b2c2` — the remediation diff is itself an unreviewed defect surface (qa) + +**Claim.** When a review-fix diff is handed to the next round, the edit's own +shape opens defect classes the review never named: a widened fetch opens +unbounded results, an added output line opens an unguarded path, a newly +persisted record opens an orphan, a literal replaced by a placeholder opens +unvalidated assembly. + +**Sources checked.** The general claim ("a fix is more defect-prone than the code +it replaces") is already sourced on the target page to Yin et al., *How do fixes +become bugs?*, ESEC/FSE 2011 — https://dl.acm.org/doi/10.1145/2025113.2025121 and +https://www.eecg.utoronto.ca/~yuan/papers/incorrect_fix_abstract.html ("at least +14.8% to 24.4% of sampled fixes for post-release bugs in these large OSes are +incorrect"). The four-shape taxonomy is **field evidence**, not literature: PR +#327 bot review rounds 13→14, where 4 of round 14's 7 warnings were defects +introduced by round 13's own remediation, one per shape. + +**Confidence:** `verified` for the underlying claim (published study, quoted from +the abstract page I opened); the four-shape table is recorded on the page as a +dated **field observation**, distinguished from the cited study. + +### B/C. `269b1dad` + `df361a8b` — the receiving side of a completion gate (infrastructure) + +These two rows are the same insight harvested twice on 2026-08-12 (same trigger, +same directive, different wording). Treated as one. + +**Claim.** When a Stop/completion gate repeats "verification loop incomplete" at a +pause the worker's own prompt instructed, the worker holds its phase and reports +the gate-vs-prompt mismatch; it does not advance the phase to a terminal value to +silence the gate. + +**Verified by reproduction in this checkout at `fa89dc2`** (not from the +installed plugin copy the candidates cited): + +| Check | Result | +|-------|--------| +| `hooks/loop-gate.sh:55` terminal set | `done\|approved\|merged\|failed\|""` — `impl_done` and `plan_ready` absent | +| `skills/orchestrate/scripts/status-update.sh:6` phase vocabulary | `pending\|planning\|plan_ready\|implementing\|impl_done\|approved\|merged\|done\|failed` — `impl_done` is first-class | +| `skills/orchestrate/templates/session-prompt.md:75,79` | instructs the worker to record `impl_done` "and wait" / "END YOUR TURN" | +| `skills/orchestrate/scripts/ready-set.sh:74` | `satisfied()` = `approved\|merged\|done` — exactly the three values that would silence the gate | +| `skills/orchestrate/scripts/ready-set.sh:28-30` | states the rule a fabricated phase breaks: "A dependency counts as satisfied only at `approved` or higher, NOT at impl_done" | + +So the harm is concrete and checkable, not rhetorical: the only phases that stop +the nudge are the ones the scheduler reads as "reviewed", and writing one +dispatches dependents against an unreviewed interface. + +**External source for the principle** — NIST SP 800-53 r5 AC-5, opened and quoted +verbatim from https://csf.tools/reference/nist-sp-800-53/r5/ac/ac-5/ : +"Separation of duties addresses the potential for abuse of authorized privileges +and helps to reduce the risk of malevolent activity without collusion. Separation +of duties includes dividing mission or business functions and support functions +among different individuals or roles". The phase recording a review verdict +belongs to the reviewing role; the reviewed party writing it is the same actor +initiating and approving. + +**Confidence:** `verified` — reproducible in-repo at a named commit, plus a cited +standard for the principle. The page's existing `confidence: verified` is +unchanged; `last_verified` moved to 2026-08-13. ## Existing-layer check -- Merged-main near-dup scan before consolidation: pairwise Jaccard over - title + "When this applies" across all 141 merged pages → **0 flagged pairs**; - previously merged content carries no duplication. -- Cross-PR dedup during consolidation: 10 duplicate clusters collapsed to one - canonical page each (rate limiting 8→1, call-site enumeration 7→folded into - the canonical merged in #20, stderr/exit-0 diagnostics 4→1, sysroot 2→1, - env-off-switch 2→1, completion predicates 2→1, robots.txt 2→1, - harness-mediated results 2→1, leaked artifacts 2→1, orchestration category - naming unified). Three near-pairs kept distinct after trigger comparison, - with mutual `related:` links (differential setup vs interpretation; expansion - semantics vs off-switch design; import-time tactics vs level choice). -- 24 existing pages received union-merged amendments; additions already present - in main (from #16/#20) were skipped, and all non-canonical `related:` ids - were remapped to canonical page ids (post-merge broken-link scan: 0). +Routed via `INDEX.md` → `wiki/infrastructure/index.md` (agent-orchestration) and +`wiki/qa/index.md` (process). Read every page in both categories whose "load when" +overlapped, plus the qa page the fold targets. + +Pages read: infrastructure-agent-orchestration-session-completion-gates, infrastructure-agent-orchestration-control-signals-vs-primary-artifacts, infrastructure-agent-orchestration-shared-run-state, infrastructure-agent-orchestration-worktree-isolated-workers, infrastructure-agent-orchestration-pane-delivery-confirmation, qa-process-regression-scope, qa-process-release-gates + +**B/C — overlap found, merged rather than created.** +`session-completion-gates` already covers this situation from the **gate author's** +side: its own table classifies "instructed pause awaiting an external actor +(`plan_ready` awaiting approval, `impl_done` awaiting review)" as terminal, and it +cites the same `loop-gate.sh:55` line from a 2026-08-05 reproduction at `95cf947`. +Its "When this applies" already says "when such a gate fires on a worker that did +exactly what its own prompt told it to do". + +What it did **not** carry is the receiving side — what that worker should do while +the gate is firing on it, and which phase values its role may write. That is the +delta merged in: +- "When this applies" extended to the worker's vantage point. +- New **Do this** step 6 with a phase-authorship table (worker: `plan_ready`, + `impl_done`, and `done` only after approval; coordinator only: `approved`, + `merged`). +- Two **Edge cases** rows (repeating nudge = mismatch not skipped work; cite both + file:line in the report) and one **Instead of** row (advance the phase → hold it + and report). +- Two sources added: NIST AC-5, and the `fa89dc2` reproduction including the + `ready-set.sh:74` consequence the 2026-08-05 entry did not have. + +**No conflict.** The addition is consistent with the page's existing direction — +the page tells gate authors to make instructed pauses terminal; the new step tells +the worker not to route around the gap while it exists. Body 73 → 82 lines +(limit 120). No banned qualifiers. + +**Related links.** No new `related:` entries: the four adjacent +agent-orchestration pages were read and none is the counterpart of this delta +(`control-signals-vs-primary-artifacts` is the orchestrator reading a worker's +signals; `shared-run-state` is the file layout; `worktree-isolated-workers` is the +brief contract; `pane-delivery-confirmation` is input delivery). The existing +three-way `related:` set is already correct. + +**A — no page on main covers it; the fold target lives only in an open PR** (see +below). `qa-process-regression-scope` is the nearest merged page and is a +different axis (what to re-test for a *release*, by blast ring, not what a +*remediation edit* opens). It was left untouched. + +## Open-PR check + +Listed 22 open `knowledge/*` heads (`gh pr list --search "head:knowledge/"`): +#80 #79 #78 #76 #74 #73 #72 #69 #68 #66 #64 #62 #61 #58 #57 #56 #55 #52 #51 #50 +#49 #47. Pulled every one's diff (`gh pr diff N`) and grepped the added lines for +each candidate's concepts. + +| Candidate | Overlapping open PR | Verdict | +|-----------|--------------------|---------| +| A — remediation diff as defect surface | **#76**, which adds `wiki/qa/process/defect-class-resweep-after-review.md`; its step 5 is "Read the remediation diff as unreviewed code", and its "Instead of" table already rebuts "treat the previous round's approval as covering the fix" | **fold** | +| B/C — worker side of a completion gate | none. Only #79 touches `session-completion-gates.md`, and only to append one id to `related:`; #47/#51/#64/#80 merely name the page id in their reports or index rows. A grep of all 22 diffs' added lines for `impl_done`, self-approval, phase-fabrication and "advance the phase" returned no match (the only `forge` hits are #51's git-forge email page) | **new** (merged into the existing page here) | +| C alone | duplicate of B — same trigger, same directive, harvested twice on 2026-08-12 | **drop** | + +**Fold executed, not deferred.** Pushed commit `4e9b0a1` to +`dch0202-rsquare:knowledge/dch0202-rsquare-20260812-100014` (PR #76's head), +adding a step 6 to that page — the four remediation shapes and the check each +calls for — plus the PR #327 field-observation source. Explained on the PR: +choiyounggi/dev-loop#76 (issuecomment-5274743196). That page stays at 80 body +lines. **No sibling page was created here for candidate A.** ## Routing decision -- New categories: `infrastructure/agent-orchestration` (5 pages; unified the - competing `orchestration`/`agent-orchestration` names), `databases/data-survey` - (1), `qa/deliverables` (1). All other pages route into existing categories. -- Canonical-path decisions: rate limiting → `backend/common/reliability/` - (sits beside timeouts-and-retries; 6 of 8 variants chose it); stderr - diagnostics → `platforms/processes/` (concern spans beyond shells); leaked - artifacts → `testing/data/artifact-leakage-from-a-suite`; call-site - enumeration → the existing `backend/common/change-impact/` page. -- All 38 new pages listed in their domain indexes (nearest-index rule; backend - routes via its python sub-index for bytecode-cache-staleness); INDEX.md domain - summaries updated for infrastructure/qa/databases. Full-wiki lint: frontmatter, - ids, related-links, index coverage, size, qualifiers, staleness → 0 findings. +| # | Insight | Target | New category? | +|---|---------|--------|---------------| +| B/C | Worker side of a completion gate | `infrastructure/agent-orchestration/session-completion-gates.md` (**merged into existing page**) + `wiki/infrastructure/index.md` load-when extended + `log.md` | no — `agent-orchestration` owns worker/orchestrator protocol, and this page owns this exact situation from the other side | +| A | Defect classes a remediation's own shape opens | `qa/process/defect-class-resweep-after-review.md` **on PR #76's branch** | no — routed to an in-flight page rather than duplicated | +| C | (duplicate of B) | none — retired | — | + +Files changed in this PR: `wiki/infrastructure/agent-orchestration/session-completion-gates.md`, +`wiki/infrastructure/index.md`, `log.md`, this report. No new page, no new category. + +Cross-Check: every URL cited here was opened in this session (the NIST AC-5 quote +was fetched and quoted verbatim; the two Yin et al. URLs are pre-existing sources +on PR #76's page and are quoted only as that page already quotes them). The +in-repo file:line claims were re-run against this checkout at `fa89dc2` rather +than inherited from the candidates' text, which cited the installed plugin copy.