sweep up scrum WARNs — model const, stale config, temp_path entropy, smoke gate

Four findings deferred from the 2026-05-02 scrum, all 1-5 line fixes:

W1 (kimi WARN @ scrum_master_pipeline.ts:1143) — `gemini-3-flash-preview`
hardcoded twice in MAP and REDUCE phases. Extracted TREE_SPLIT_MODEL +
TREE_SPLIT_PROVIDER constants near the existing config block. Diverging
the two would break tree-split coherence (per-shard digests must come
from the same model the reducer collapses).

W2 (qwen WARN @ providers.toml:30) — stale `kimi-k2:1t` reference in
operator-facing comments after PR #13 noted it's upstream-broken. Reframed
as historical context ("was X here pre-2026-05-03 — that model is broken")
so future operators don't paste-route from the comment.

W3 (opus WARN @ vectord-lance/src/lib.rs:622) — temp_path() entropy was
only pid+nanos, which collide under tokio scheduling when multiple tests
in the same cargo process create temp dirs back-to-back. Added per-process
AtomicU64 sequence counter — guarantees uniqueness regardless of clock.

W4 (opus INFO @ scripts/lance_smoke.sh:38) — `|| echo '{}'` swallowed
curl transport failures (gateway down, network broken, timeout), surfacing
as misleading "no method field" jq errors at the next probe. Now captures
$? separately, gates a "curl reachable" probe, and only falls back to
empty body for the dependent jq parse. Smoke went 9 → 10 probes.

Verified: vectord-lance 7/7 tests PASS, gateway cargo check clean,
lance_smoke.sh 10/10 PASS against live gateway.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
root
2026-05-03 00:11:59 -05:00
co-authored by Claude Opus 4.7
parent 7bb66f08c3
commit ac7c996596
4 changed files with 51 additions and 21 deletions
+21 -14
View File
@@ -37,6 +37,13 @@ const MAX_ATTEMPTS = 9;
// crates/<crate>/src/*.rs.
const FILE_TREE_SPLIT_THRESHOLD = Number(process.env.LH_SCRUM_TREE_SPLIT_THRESHOLD ?? 6000);
const FILE_SHARD_SIZE = Number(process.env.LH_SCRUM_SHARD_SIZE ?? 3500);
// Centralized to keep MAP and REDUCE phases in lockstep — diverging the two
// breaks tree-split consistency (per-shard digests must come from the same
// model the reducer collapses). Surfaced 2026-05-02 by kimi scrum WARN at
// scrum_master_pipeline.ts:1143.
const TREE_SPLIT_MODEL = "gemini-3-flash-preview";
const TREE_SPLIT_PROVIDER = "ollama_cloud";
// Same-model retry budget after observer rejection. After this many
// quality rejects on the current model, advance to the next provider-
// error fallback. Counts ONLY observer/quality rejects, not provider
@@ -1143,15 +1150,15 @@ Format each as a code-fenced block with the byte offset within the shard:
EXACT LINE OF SOURCE — DO NOT PARAPHRASE, DO NOT TRUNCATE
\`\`\`
Pick the most reviewer-relevant lines: route definitions (e.g. \`@app.route(...)\`), function signatures, security-sensitive calls (auth/SQL/exec/template/secrets), hardcoded credentials/defaults, exception handlers, sensitive imports. The reviewer will REFUSE to act on any claim not backed by a verbatim anchor — so anchors are how you prove findings are real.`;
// 2026-04-28: gpt-oss:120b → gemini-3-flash-preview via Ollama
// Pro. Tree-split MAP fires once per shard (potentially 5-20×
// per file), so latency dominates total scrum time. Gemini 3
// flash returns shard digests substantially faster than the old
// 120B free model while staying strong enough for byte-anchored
// 2026-04-28: gpt-oss:120b → TREE_SPLIT_MODEL via Ollama Pro.
// Tree-split MAP fires once per shard (potentially 5-20× per
// file), so latency dominates total scrum time. Gemini 3 flash
// returns shard digests substantially faster than the old 120B
// free model while staying strong enough for byte-anchored
// extraction.
const r = await chat({
provider: "ollama_cloud",
model: "gemini-3-flash-preview",
provider: TREE_SPLIT_PROVIDER,
model: TREE_SPLIT_MODEL,
prompt,
max_tokens: 900,
});
@@ -1201,14 +1208,14 @@ COPY EVERY anchor block from the piece notes IN ORDER, character-perfect. DO NOT
Output the anchor blocks under their original \`\`\`@offset...\`\`\` fences, each on its own with a blank line between. The reviewer rejects findings that don't quote a string from this anchors block, so completeness here directly determines review quality.`;
// 2026-04-28: gpt-oss:120b → gemini-3-flash-preview via Ollama
// Pro. The reducer runs once per file (vs once per shard for MAP)
// but on a much larger context (all shard digests stacked), so
// throughput per token still matters. Same model as MAP for
// consistency in tree-split outputs.
// 2026-04-28: gpt-oss:120b → TREE_SPLIT_MODEL via Ollama Pro. The
// reducer runs once per file (vs once per shard for MAP) but on a
// much larger context (all shard digests stacked), so throughput
// per token still matters. Must match MAP model exactly — diverging
// the two breaks tree-split coherence.
const reduced = await chat({
provider: "ollama_cloud",
model: "gemini-3-flash-preview",
provider: TREE_SPLIT_PROVIDER,
model: TREE_SPLIT_MODEL,
prompt: reducePrompt,
max_tokens: 2400,
});