Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
182 changes: 139 additions & 43 deletions .dev-loop/INGEST_REPORT.md
Original file line number Diff line number Diff line change
@@ -1,53 +1,149 @@
# Knowledge consolidation15 open PRs (#17–#40) → one reconciled state
# Knowledge flush3 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.
1 change: 1 addition & 0 deletions log.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,3 +43,4 @@ Append-only. Format: `## [YYYY-MM-DD] <ingest|revise|lint|gap|contradiction|drif
## [2026-08-06] revise | Union-merged amendments from the same 15 PRs into 24 existing pages (largest: tests-that-cannot-fail — 7 PRs: per-assertion mutation granularity, restore-mechanism-by-commit-state, suite-total-drop detection; portable-shell-scripts — 8 PRs: POSIX inline set-- reordering, ${VAR:-} vs ${VAR-} colon semantics, quote-by-what-the-text-is; test-data-and-isolation — 6 PRs: env-derived write paths, absent-variable cases, exec-bit fixtures, leak attribution; change-impact/call-site-enumeration — 8 unique additions from 7 path-variants: rename-in-place, same-type reorder, *args forwarding, two-searches-agree fallacy, codemod, coverage completion check). All non-canonical cross-page ids remapped to canonical pages; every added line traced to its source PR hunk (fabricated worker output was detected by orphan-line verification and replaced with true PR content).
## [2026-08-06] dedup | Cross-PR duplicate clusters collapsed: client-side rate limiting (8 PR versions at 3 paths → 1), call-site enumeration (7 versions at 7 paths → additions folded into the already-merged canonical page), stderr/exit-0 diagnostics (4 versions at 4 paths → 1), macOS sysroot (2→1), env-var off switch (2→1), completion predicates (2→1), robots.txt (2→1), harness-mediated results (2→1), leaked test artifacts (2→1), orchestration category naming (orchestration vs agent-orchestration → agent-orchestration). Kept distinct after trigger comparison: differential-testing vs differential-run-agreement (setup vs interpretation), unset-versus-empty-parameters vs env-var-off-switches (semantics vs design, cross-linked), import-time-side-effects vs test-level-choice edge (tactics vs level choice, cross-linked). Merged-main near-dup scan (Jaccard over title+trigger, 141 pages): 0 pairs — no duplication among previously merged content.
## [2026-08-06] ingest | Reconciled post-consolidation flush PRs #42–#43 (created against pre-#44 main). Folded unique content: platforms/filesystems/permissions-and-exec-bits (+`sh "$SCRIPT"` interpreter-invocation rows — stubs need no exec bit, avoids EDR chmod+x heuristics), platforms/shells/command-text-inspected-before-execution (+gate-AUTHOR step 8: parse all three POSIX quoting forms, expand only ~/$HOME/${HOME}; red-then-green bats evidence), testing/quality/checks-that-cannot-pass (+vacuously-green pre-implementation test row), platforms/processes/tool-diagnostics-without-a-failing-exit-code (+repeat-suppression edge, +clang reproduction source), infrastructure/ci-cd/secrets-handling (+independent credential channels row: gh token vs git SSH vs API token, git push --dry-run / author:@me probes), testing/mocking/what-to-mock (+ESM read-only-bindings DI rows, +PATH-emptied tripwire negative-proof). Dropped as duplicates of the #44 state: #42's rate-limit row (already in timeouts-and-retries + client-side-rate-limiting), #42's warning-only-diagnostics page (same trigger as tool-diagnostics-without-a-failing-exit-code), #42's leak-attribution row (already in test-data-and-isolation).
## [2026-08-13] ingest | knowledge-flush of 3 queued insights: 1 merged into an existing page, 2 retired. Merged into infrastructure/agent-orchestration/session-completion-gates: the receiving side of a completion gate — a worker on which the gate repeats at an instructed pause holds its phase and reports the gate-vs-prompt mismatch rather than advancing to a terminal value, with a phase-authorship table (worker writes `plan_ready`/`impl_done`, and `done` only after approval; `approved`/`merged` are the coordinator's review verdict). Reproduced at `fa89dc2`: `hooks/loop-gate.sh:55` accepts `done|approved|merged|failed|""` while `skills/orchestrate/scripts/status-update.sh:6` lists `impl_done`, and the three values that would silence the gate are exactly the three `skills/orchestrate/scripts/ready-set.sh:74` counts as dependency-satisfying — so a fabricated phase dispatches dependents against an unreviewed interface. Sourced to NIST SP 800-53 r5 AC-5 (separation of duties). Retired: the second copy of that insight (same trigger, same directive, harvested twice in one day) and the review-remediation defect-surface insight, folded into open PR #76's qa/process/defect-class-resweep-after-review rather than re-ingested here.
Loading
Loading