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
72 changes: 29 additions & 43 deletions .dev-loop/INGEST_REPORT.md
Original file line number Diff line number Diff line change
@@ -1,53 +1,39 @@
# Knowledge consolidation15 open PRs (#17–#40) → one reconciled state
# Knowledge flush1 insight ingested (2 dropped as pending-duplicates of open PR #51)

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 across 2 session files.

## 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 hunkorphan-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.
**Ingested — MAPE-aligned point prediction** (from `avm-hackathon-jycho` session):

- **Claim:** A regression model trained to predict the conditional median (log target + L1 loss) and scored by MAPE is a structural overpredictor; the MAPE-optimal point prediction is the median of the 1/y-reweighted predictive distribution, which equals `median × exp(−σ²)` for a lognormal conditional. Correct per-row with `pred × exp(−λσ²)`, σ estimated from q16/q84 quantile spread, λ selected from 0.5 by multi-period holdout consistency rather than the theoretical 1.0.
- **Sources checked:**
- https://arxiv.org/abs/0912.0902Gneiting, "Making and Evaluating Point Forecasts" (JASA 106:746–762, 2011). Table 5: the Bayes rule under absolute percentage error is the β-median with β = −1 (median of the y⁻¹-reweighted predictive distribution). Confirmed via WebSearch against arxiv.org and the tandfonline JASA record.
- https://arxiv.org/abs/1605.02541 — de Myttenaere, Golden, Le Grand, Rossi, "Mean Absolute Percentage Error for regression models" (Neurocomputing 2016). Confirms MAPE-optimal regression ≡ 1/y-weighted MAE regression. The citation given in the raw candidate was checked and is real (also mirrored at hal.science/hal-01312590).
- Lognormal algebra re-derived independently: for Y ~ LN(μ, σ²), y⁻¹·f(y) normalizes to LN(μ − σ², σ²), whose median is exp(μ − σ²) = median(Y)·exp(−σ²).
- **Verification result:** the shrinkage mechanism and its direction are **verified** against the two papers plus the closed-form derivation. The practical λ = 0.5 starting point and the "quantile spread overestimates σ" claim rest on the session's holdout evidence only (Seoul commercial-building AVM, LightGBM + CatBoost: λ = 0.5 improved MAPE on all 4 holdout years, 19.18% → 18.86% excluding 2025 outliers; λ = 1.0 degraded 2 of 4 years) — that part is **field-tested** and the page's Sources section says so explicitly. Page frontmatter is `confidence: verified` for the sourced mechanism, with the field-tested scope of the λ practice stated inline.

**Dropped candidates** (both from the linkly r3 orchestrate session) — see Open-PR check; neither was ingested, so no verification pass was spent upgrading them.

## 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).
Routing went INDEX.md → backend → domain index. A full-text sweep of the checkout's `wiki/` for `mape`, `percentage error`, `lognormal`, `quantile`, `lightgbm`, `calibration` returned **zero hits** — nothing in any layer covers regression-model point-prediction calibration, so this is a create, not a merge. The closest existing category is `backend/common/llm`, whose pages cover *consuming* LLM completion APIs, not training/evaluating predictive models; I opened its nearest page to confirm the trigger space does not overlap (it gates on HTTP completion responses, not on metrics or point forecasts).

Pages read: backend-common-llm-completion-response-validation

No conflicts flagged. `related:` left empty — no genuinely adjacent page exists yet (the new category is a seed; future ML ingests should link here). Plumbing updated: `wiki/backend/index.md` gained a `### ml` section with a load-when line, the common-subtree route line and root `INDEX.md` backend line both mention MAPE-aligned point-prediction calibration, and `log.md` has the ingest entry.

## Open-PR check

Open `knowledge/*` heads listed via `gh pr list --search "head:knowledge/"`: #47 (`knowledge/dch0202-20260806-130040`), #49 (`knowledge/dch0202-rsquare-20260806-142309`), #50 (`knowledge/dch0202-20260806-172420`), #51 (`knowledge/dch0202-20260806-183029`), #52 (`knowledge/dch0202-rsquare-20260807-100149`).

Per-candidate verdicts:

- **Candidate 1 — worktree_escape guardrail escalation on cross-worktree reads** (linkly): **drop**. Fetched and diffed `origin/knowledge/dch0202-20260806-183029` (#51) against main: its `wiki/infrastructure/agent-orchestration/worktree-isolated-workers.md` additions already carry this insight in strictly better form — including the exact "budget the escalation round trip (read → approve → clear escalations/ → restart the watcher) and state in the worker's first brief that reads are approved" row. #51 additionally *corrects* the raw candidate: its local reproduction (guardrails 1.2.0) shows pure reads pass and the rule fires only when a main-root mention co-occurs with a write verb or an absolute-path redirect — the candidate's blanket "fires on read-only access" phrasing is the pre-correction version. Nothing unique to fold; retired as pending-duplicate.
- **Candidate 2 — Orca dispatch binding taxonomy (idle-prompt check; runtime_unavailable vs agent_unconfigured vs terminal_worktree_mismatch)** (linkly): **drop**. The same #51 diff's `wiki/infrastructure/agent-orchestration/pane-delivery-confirmation.md` additions carry all four rows (bind only on idle prompt because "done" is a report not the turn's end; wait-and-rebind for occupied runtime; close pane + new worker-mode agent for a dead one; always pass worktree with pane) citing the same three 2026-08-06 field incidents the candidate cites. Nothing unique to fold; retired as pending-duplicate.
- **Candidate 3 — MAPE-aligned point prediction** (avm-hackathon): **new**. No overlap with any open head — #47/#49/#50/#52 are testing/shell/encoding-themed and #51's wiki diff (11 files) touches no ML content. Ingested here.

## 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.
- **Candidate 3 → `backend/common/ml/mape-aligned-point-prediction.md`** (id `backend-common-ml-mape-aligned-point-prediction`), **new category `ml`** under backend/common. Justification for the new category: the harvested domain hint was `backend`, and the backend domain's 12 existing categories (api-design, auth, caching, change-impact, concurrency, errors, integrations, jobs, llm, orm, reliability, storage) all cover server-side application code concerns; none covers training or evaluating a predictive model. `llm` is the nearest name but its scope is consuming LLM completion APIs from server code — putting metric-aligned regression calibration there would corrupt its load-when gate. No other domain fits better (databases owns SQL/schema; qa owns release process). The category seeds with one page.
- Candidates 1–2: no routing — dropped as pending-duplicates of open PR #51 (see above); their queue rows are retired to `.processed.jsonl` so the auto-flush cannot re-surface them.
2 changes: 1 addition & 1 deletion INDEX.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ 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, surveying live data to derive a rule, verifying additive migrations |
| [backend](wiki/backend/index.md) | **seeded** | Server-side application code — language-agnostic (`common/`: API contracts, call-site enumeration before a contract change, idempotency, JWT, timeouts/retries, caching, jobs, transactions in app code, shared state/pools, errors, LLM completion validation & context budgeting, consuming external-API responses, externally-owned defaults, 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) |
| [backend](wiki/backend/index.md) | **seeded** | Server-side application code — language-agnostic (`common/`: API contracts, call-site enumeration before a contract change, idempotency, JWT, timeouts/retries, caching, jobs, transactions in app code, shared state/pools, errors, LLM completion validation & context budgeting, MAPE-aligned point-prediction calibration, consuming external-API responses, externally-owned defaults, 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), per-environment/path-valued config, multi-agent orchestration (worker liveness signals, shared run state, tmux pane delivery, completion gates, worktree-isolated workers) |
| [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) |
Expand Down
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-07] ingest | backend-common-ml-mape-aligned-point-prediction — NEW category backend/common/ml (no existing category covers training/evaluating predictive models; llm covers only consuming LLM APIs). A median-predicting regression model (log target + L1) scored by MAPE is a structural overpredictor: the MAPE Bayes rule is the 1/y-reweighted median (Gneiting arXiv:0912.0902 Table 5; de Myttenaere arXiv:1605.02541), = median × exp(−σ²) under lognormality. Directive: per-row `pred × exp(−λσ²)` with σ from q16/q84 quantile spread, λ selected from 0.5 by all-periods holdout improvement (theory λ=1.0 overcorrects because spread-estimated σ is inflated). Theory verified vs sources; λ practice field-tested (Seoul AVM, 4/4 holdout years improved at λ=0.5, 2/4 degraded at λ=1.0). Two queued dev-loop orchestration candidates dropped as pending-duplicates of open PR #51.
Loading
Loading