diff --git a/.dev-loop/INGEST_REPORT.md b/.dev-loop/INGEST_REPORT.md index e6bd352a..d84638d6 100644 --- a/.dev-loop/INGEST_REPORT.md +++ b/.dev-loop/INGEST_REPORT.md @@ -1,88 +1,82 @@ -# Knowledge flush — 7 insight(s) +# Knowledge flush — 1 insight(s) -7 queued rows claimed: 7 general insights, 4 new pages, 3 merged into existing pages, 0 dropped. One candidate claim was refuted during verification and corrected (see dad0a142c377a6f1). +Headless autoflush run, 2026-11-06 (claims by run `20261106-134854-81372`). Claimed 3 candidates: 1 ingested as a new page, 2 released back to `pending` as pending duplicates of open PRs. -This flush reuses the content of an earlier local commit (29a219b, same base `50a3af6`) that never reached GitHub, because the contributor has read-only access to this repo. Every page was reviewed again and four were corrected. The PR comes from the fork `jocenunes/dev-loop` for the same reason. +| Candidate | Domain | Disposition | +|-----------|--------|-------------| +| `2c78c188c0a60329` — Apple Silicon: measure CPU fp32 / MPS fp32 / MPS fp16 p95 for batch-1 embedding inference; re-check accuracy after fp16 | platforms hint → backend/ml | **ingested** — new page `backend-common-ml-inference-device-choice-on-apple-silicon` (verified) | +| `b5863e2d758c98fb` — Claude Code behind a gateway still sends bootstrap/penguin_mode requests while a claude.ai login remains | platforms | released — pending duplicate of open #328 / #298 | +| `fc76dc4dfa08ecde` — Docker-gated schema validator: skip vs fail, known-bad document | testing | released — pending duplicate of open #300 / #317 | ## Verified best-practice -**9f5c3a177b7d59b1: a markdown code span copied into a gate `CHECK:` line runs as command substitution.** -- Sources: https://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html (§2.6.3), https://www.gnu.org/software/bash/manual/html_node/Exit-Status.html -- How verified: end-to-end on main `50a3af6`. `plan-gate.sh emit A` kept the backticks in `CHECK:`, and `gate-check.sh --run` recorded `baseline-tests-ran` UNMET with `exit=127`; the bare bullet recorded MET with `exit=0 matched: GATE_OK`. A code span printing `touch ` created the file, so the output really is executed. -- Confidence: verified. -- Owner note: `plan-gate.sh` lines 85 and 369 could strip the backticks. That is a skill change, so it is out of scope here. - -**dad0a142c377a6f1: non-ASCII object keys fail in Convex at runtime.** -- Sources: https://docs.convex.dev/database/types, https://docs.convex.dev/production/state/limits, convex 1.46.0 and 1.47.0 `dist/esm/values/value.js` (`validateObjectField`). -- How verified: `convexToJson` threw for `16–30`, `preço` and an emoji, and passed `16-30`. Through `convexTest`, on convex 1.46.0 with convex-test 0.0.60 and on 1.47.0 with 0.0.62, `t.query` and `t.mutation` threw the same error, including for a nested key. -- Correction: the candidate said `convex-test` passes. That is false for a test that calls the registered function, so the page now says only helper-level tests miss it. -- Confidence: verified. - -**064e6c85d3711615: parallel children patching one parent document exhaust write-conflict retries, and `convex-test` cannot show it.** -- Sources: https://docs.convex.dev/error, https://docs.convex.dev/testing/convex-test, convex-test 0.0.60 `dist/index.js` (`TransactionManager`), @convex-dev/workpool README and 0.4.13 `dist/component/complete.js`. -- How verified: docs give the error text and the data-model remedy. The convex-test source serializes top-level transactions, and a local run of 34 parallel read-and-patch mutations gave 0 rejections and a final count of 34. The docs page does not discuss concurrency, so that claim rests on source and reproduction. The failure on a real deployment is a field report (34 children, 281 mock tests green); it was not reproduced here. -- Correction: the earlier draft advised against throttling, but the Workpool README documents `maxParallelism: 1` as a fix, so it is now a table row. `onComplete` is inline only when `runOnCompleteInline` is set, and the page now says so. -- Confidence: verified. - -**fb8f286a0d295bd3: an `apiSpec` timeout from `npx convex run` hides "Could not find function".** -- Sources: convex 1.46.0 `dist/esm/cli/lib/run.js` lines 52-56. -- How verified: source read: within `convex run`, `apiSpec` is queried only inside the `Could not find function` branch. The 1 s timeout is a field observation; no string for it exists in the npm package, so it comes from the server. -- Confidence: verified for the mechanism. - -**ef1f9fc35666da7f: a target guard must resolve the environment in the CLI's own order.** -- Sources: https://docs.convex.dev/cli/reference/deploy, https://docs.convex.dev/production/project-configuration, convex 1.46.0 `dist/esm/cli/lib/deploymentSelection.js` lines 84-85 and `command.js`, `npx convex deploy --help`. -- How verified: source read plus a local dotenv 17.3.1 run: the same two `config` calls gave the file's value when unset and kept `dev:exported` when exported. `--help` confirms the production default and the `--dry-run` wording. -- Correction: added the flags that override the environment (`--prod`, `--deployment`, `--deployment-name`, `--preview-name`, `--url`, `--admin-key`), which the candidate and the earlier draft omitted. -- Confidence: verified. - -**9e1f0d72258b768a: prove "identical to main" by running the base commit's code against the committed snapshots.** -- Sources: https://git-scm.com/docs/git-archive, https://jestjs.io/docs/cli (`--ci`), https://vitest.dev/guide/snapshot. -- How verified: the tools' behaviour is documented, and Vitest was added beside Jest. The method itself comes from one field review (3 of 3 green, checksums unchanged). -- Confidence: field-tested for the method. - -**b68aa8912bbe777d: three Templater toggles live in device local storage, not `data.json`.** -- Sources: https://raw.githubusercontent.com/SilentVoid13/Templater/master/src/settings/LocalSettings.ts, https://raw.githubusercontent.com/SilentVoid13/Templater/master/src/settings/Settings.ts, https://raw.githubusercontent.com/SilentVoid13/Templater/master/src/main.ts, https://raw.githubusercontent.com/obsidianmd/obsidian-api/master/obsidian.d.ts -- How verified: read current source on master, which matches the installed 2.26.0. `test/specs/migration.e2e.ts` asserts these keys are not migrated. -- Correction: added the reset notice for old `data.json` values, and the vault scope of `App.loadLocalStorage`. -- Confidence: verified. - -All 13 cited URLs returned HTTP 200 on 2026-11-04. +**`2c78c188c0a60329` — confidence: verified.** Official docs and PyTorch issue measurements back the method. The speed numbers are one machine's field measurement, and the page labels them that way. + +- Claim: on Apple Silicon, for one-sentence-per-call transformer inference, do not choose the device from the "MPS loses at small batch" rule. Measure CPU fp32, MPS fp32 and MPS fp16 p95 on the target machine, and re-check the task metric after switching to fp16. +- Sources checked (WebSearch; this run has no WebFetch, so pages were confirmed through search summaries, not fetched): + - https://docs.pytorch.org/docs/2.14/notes/mps.html — the MPS backend, `is_available()` / `is_built()`, and the macOS/device requirement. + - https://github.com/pytorch/pytorch/issues/148219 — measured per-op dispatch overhead: 1-element `mul` 24.5 µs on MPS (24.2 µs dispatch) vs 0.9 µs on CPU. This is why the rule holds for tiny ops. + - https://github.com/pytorch/pytorch/issues/77799 — BERT inference about 2× slower on MPS than CPU in the report. The rule of thumb is real for some shapes, so the page asks you to measure. + - https://sbert.net/docs/sentence_transformer/usage/efficiency.html — fp16 "can speed up inference on GPUs at a minimal loss of model accuracy". That is "minimal", not "zero", which supports the re-check step. + - https://sbert.net/examples/sentence_transformer/applications/computing-embeddings/README.html — the model is placed "on the most performant available device, e.g. cuda or mps" when `device` is unset. This supports the "pin the device" step. + - https://github.com/huggingface/sentence-transformers/pull/4169 — Transformers v5 loads the checkpoint dtype, so half precision can land on CPU and be "significantly slower than float32". This became an edge row. + - https://github.com/kkollsga/kglite/pull/208 — a third-party server forced CPU because MPS placement grew memory by several GB (bge-m3 ~30 ms MPS vs ~65 ms CPU). This supports the memory row and gives an independent case of MPS winning at batch 1. + - Field evidence from the source session: M4 Pro, torch 2.15. `arctic-embed-l-v2.0-ko` p95 was 46.0 / 20.6 / 13.5 ms (CPU fp32 / MPS fp32 / MPS fp16). Qwen3-Embedding-0.6B was 62.6 / 30.7 / 18.7 ms. The fp16 model kept F1 at 0.931. +- Changed from the candidate: + - Added "pin `device` and `dtype` explicitly", because the library auto-selects MPS and Transformers v5 loads the checkpoint dtype. + - Added warm-up exclusion and version recording. + - Turned "re-check accuracy" into "re-run the task metric on the eval set". + - Added a decision table, a small-model edge row, a memory row and a half-precision-on-CPU row. + - The "600M급" size claim became an edge row stated as a field measurement, not a general size cutoff. +- Not verified externally: the exact model size at which MPS starts to beat CPU at batch 1. The page gives no cutoff and tells the reader to measure. + +**`b5863e2d758c98fb`, `fc76dc4dfa08ecde`**: released before verification (see Open-PR check). ## Existing-layer check -Pages read: infrastructure-agent-orchestration-gate-evidence-exit-code-class, testing-quality-key-order-in-serialized-goldens, testing-quality-value-preserving-refactor-assertions, testing-quality-stale-artifact-baselines, debugging-signals-reading-error-messages, databases-transactions-optimistic-vs-pessimistic-locking - -- `wiki_search` ran on all 7 triggers. Top hits considered: 9f5c → `qa-process-completion-claims`, `platforms-shells-heredoc-body-expansion-with-backtick-prose`, `infrastructure-agent-orchestration-gate-evidence-exit-code-class`, `platforms-shells-command-text-inspected-before-execution`. 9e1f → `testing-quality-key-order-in-serialized-goldens`, `testing-quality-behavior-not-implementation`. The Convex, guard and Templater triggers returned only unrelated pages (best scores about 0.75). -- `grep -i convex` and `grep -i 'obsidian|templater'` over `wiki/` returned nothing on main. -- Merged: 9f5c into `gate-evidence-exit-code-class` (new step, edge rows, sources); fb8f into `reading-error-messages` (edge row, source); 9e1f into `stale-artifact-baselines` (edge row, sources). -- Created: the four pages listed under Routing decision. -- Conflicts: none flagged. The docs/code gap on ASCII field names is recorded as an edge row. -- `related:` links added both ways: `backend-node-boundaries-runtime-validation`, `databases-transactions-optimistic-vs-pessimistic-locking`, `infrastructure-config-environment-config`, `backend-node-runtime-env-files-with-process-loadenvfile`. -- Checks: `node scripts/wiki-structure-checks.js wiki` reports 472 pages, 0 findings; `wiki-lint-prohibitions.js` reports 0 violations. +Pages read: backend-common-llm-self-hosted-model-load-latency, debugging-performance-profile-before-optimizing, backend-common-ml-mape-aligned-point-prediction + +- Indexes read: `INDEX.md`, `wiki/backend/index.md` (full), `wiki/platforms/index.md` (full). +- `wiki_search` hits considered (3 queries: the device-choice/p95 phrasing, "Apple Silicon MPS GPU embedding model inference", and the fp16 accuracy phrasing). Top hits: + - `backend-common-reliability-timeouts-and-retries` + - `debugging-concurrency-intermittent-failures` + - `databases-selection-vector-search-engine-selection` + - `backend-common-ml-mape-aligned-point-prediction` + - `debugging-performance-profile-before-optimizing` + + No hit covers choosing an inference device or dtype. +- `debugging-performance-profile-before-optimizing` owns the general method: measure distributions (median and p95), and separate cold runs from warm runs. The new page applies it to one decision (device and dtype) and links to it instead of restating it. Not a merge target: its trigger is "something is slow", not "choosing a device". +- `backend-common-llm-self-hosted-model-load-latency` covers warm-up for a model server (Ollama), not in-process device choice. Linked, not merged. +- `platforms` has no ML or accelerator category, and its scope is OS differences that break code. Device choice is a model-serving decision, so it does not fit there. +- Created: new page `wiki/backend/common/ml/inference-device-choice-on-apple-silicon.md`. +- Related links: the new page links to both pages above. Back-links were added to both pages' `related:`. +- Conflicts: none. +- `wiki/backend/index.md`: one row added at the top of the `ml` table. `log.md`: one ingest entry appended. +- Not edited: the root `INDEX.md` backend line and the `common` summary row in `wiki/backend/index.md`. Open PR #298 edits `INDEX.md`, and #329/#315/#298/#334 edit `wiki/backend/index.md`. The `ml` table row is enough to route there. ## Open-PR check -Listed 22 open `knowledge/*` heads: #293, #298-#301, #304-#310, #315, #317-#319, #324, #328-#332. Diffed the 19 same-repo heads through `origin/`, and the 3 fork heads (#298, #299, #300) through `pull//head`, for Convex, Templater, Obsidian, `git archive`, workpool, `.env`, backtick, snapshot and command substitution. A title and body search for Convex or Templater returned nothing. +23 open `knowledge/*` PRs: #334, #332, #331, #330, #329, #328, #324, #319, #318, #317, #315, #310, #309, #308, #307, #306, #305, #304, #301, #300, #299, #298, #293. This headless run cannot fetch or diff branch content. Overlap was judged from each PR's title and changed-file list (`gh pr list --repo choiyounggi/dev-loop --state open --search "head:knowledge/" --json number,title,files`), plus #334's report body. -- All 7 candidates: **new**. Keyword hits in #299, #309, #317 and #329 are unrelated uses of "snapshot" or "command substitution". -- Adjacent, not duplicate: #301 covers UTF-8 byte bounds for client JSON keys, which is a different trigger from Convex field names. #300 edits `environment-config.md`, which this PR touches only in `related:`, so a trivial merge conflict is possible. +| Candidate | Overlapping open PR | Verdict | +|-----------|---------------------|---------| +| `2c78c188c0a60329` inference device choice on Apple Silicon | None on trigger. #334 adds `backend/common/ml/grouped-cross-validation-for-templated-examples.md`, which is about model-evaluation splits, a different trigger. It also adds one row to the same `ml` index table; its position could not be diffed from here. This PR inserts its row at the top of that table. If the two rows land next to each other, the merge conflict is two independent rows, and keeping both resolves it. No open PR touches `debugging/performance/` or `backend/common/llm/self-hosted-model-load-latency.md`. The platforms PRs (#328, #324, #319, #309, #299, #298) cover agent CLIs, shells, tmux and tools, not ML inference | **new** | +| `b5863e2d758c98fb` gateway + leftover claude.ai login | #328 edits `platforms/processes/spawning-an-agent-cli-from-a-server.md` with `ANTHROPIC_BASE_URL`/`ANTHROPIC_AUTH_TOKEN` gateway rows. #298 adds `backend/common/llm/gateway-model-alias-resolution.md`. Same trigger family, and both PRs are still open | **pending duplicate → claim released** | +| `fc76dc4dfa08ecde` Docker-gated schema validator: skip vs fail | #300 and #317 edit `testing/quality/checks-that-cannot-pass.md` (and #300 also `tests-that-cannot-fail.md`). Same theme (a validator that skips or always passes), and both PRs are still open. This run could not locate the row's queue file. Its summary is taken from #334's report, which read it | **pending duplicate → claim released** | ## Routing decision -| Insight | Target | Action | -|---------|--------|--------| -| 9f5c3a177b7d59b1 | infrastructure/agent-orchestration/gate-evidence-exit-code-class | merge | -| dad0a142c377a6f1 | backend/node/convex/ascii-keys-in-returned-objects | new page | -| 064e6c85d3711615 | backend/node/convex/parallel-children-writing-one-parent-document | new page | -| fb8f286a0d295bd3 | debugging/signals/reading-error-messages | merge | -| ef1f9fc35666da7f | infrastructure/deploy/effective-target-guard-for-a-deploy-cli | new page | -| 9e1f0d72258b768a | testing/quality/stale-artifact-baselines | merge | -| b68aa8912bbe777d | platforms/tools/templater-device-local-settings | new page | - -New category `backend/node/convex`: no existing node category (runtime, async, boundaries, language) fits a hosted backend's value rules and transaction model, and two pages share it. +- `2c78c188c0a60329` → `backend` / `common/ml` → new page `wiki/backend/common/ml/inference-device-choice-on-apple-silicon.md`. + - The candidate's domain hint was `platforms`. That domain covers OS-level differences that break code across macOS/Linux/Windows, and this lesson is about which device a model runs on, which `backend/common/ml` owns. + - The directive is general: any PyTorch transformer served one request at a time on Apple Silicon. Project names and numbers appear only in the field-evidence Sources line. + - No new category. ## Local-layer candidates none -🤖 Generated with [Claude Code](https://claude.com/claude-code) +## Queue bookkeeping + +- Retired in place (`status: retired`, `retiredBy`, `retiredAt`, `outcome`), the same way earlier headless runs retired rows: `2c78c188c0a60329`. +- Released back to pending with `queue-claim.js release`: `b5863e2d758c98fb`, `fc76dc4dfa08ecde`. +- Reviewer note: `b5863e2d758c98fb` and `fc76dc4dfa08ecde` have now been released by seven or more consecutive runs while #298/#300/#317/#328 stay open. Merging or closing those PRs, or one manual `/dev-loop:knowledge-flush` (which can diff them), would clear them. diff --git a/log.md b/log.md index 109cac0a..1d3be13a 100644 --- a/log.md +++ b/log.md @@ -435,3 +435,4 @@ Append-only. Format: `## [YYYY-MM-DD]