feat(knowledge): config-driven extraction pool effort - #9755
Conversation
Design Review (Fable 5, fork) — 🔴 BLOCK (blocking)Design-level review of The base tree confirms it: Design-Verdict: BLOCK The rebuilt branch reverts landed main work wholesale — concurrency fixes, the live-config watcher, and the embed-signature guard vanish undocumented. BlockersStale-base reconstruction silently reverts intervening main changes across WatchThe inherit chain makes Suggestions
[DESIGN-REVIEWED] 5c72270 |
GPT 5.6 Review (fork) — 🔴 changes requested (blocking)Reviewed 4 of 5 blocking finding(s) are security-class and were withheld from adjudication, so the blocking verdict stands. BLOCKING -- src/kiro_crew/dashboard/handlers/knowledge.py:430 -- Available-embedder searches crash BLOCKING -- src/kiro_crew/dashboard/handlers/knowledge.py:1477 -- URL sync permanently strands sources BLOCKING -- src/kiro_crew/dashboard/handlers/knowledge.py:1439 -- Removed handoff gate permits ingestion data loss BLOCKING -- src/kiro_crew/dashboard/handlers/knowledge.py:250 -- Config loading blocks the startup event loop BLOCKING -- src/kiro_crew/dashboard/handlers/knowledge.py:2757 -- Knowledge live-config handling is removed [BLOCK-MERGE] 5c72270 Adjudication (Opus 4.8) — is blocking on each finding proportionate?Analysis complete. I opened the base code each finding names and the code it calls into. F4 (adjudicable) — Fenced findings — all confirmed reachable on ordinary paths, none extreme:
None reach the FLAG bar (extreme/contradictory conditions); each is reachable in normal operation. [ADJUDICATION] 5c72270 total=1 uphold=1 downgrade=0 |
UX Review (Fable 5, fork) — 🟡 CONCERNSUX-level review of UX-Verdict: CONCERNS Solid, pattern-following settings row — but the disabled-state hint's deixis lies in the Watch
Evidence gaps
Suggestions
[UX-REVIEWED] 5c72270 |
First Principles Review (Fable 5, fork) — 🔴 BLOCKPremise-level review of All verification is done. The base tree confirms: the deleted functions ( First-Principles-Verdict: BLOCK The stale "3-way merge" silently reverts four shipped mainline mechanisms and regresses two CI baselines; the declared effort feature is the minority of this diff. Not justified as shipped
What this change shipsInventory (10 items) — 5 justifiedIntent: let operators tune the Knowledge extraction pool's reasoning effort instead of a hardcoded
Blockers
Watch
[FIRST-PRINCIPLES-REVIEWED] 5c72270 |
Opus 4.8 Review (fork) — 🔴 changes requested (blocking)Reviewed BLOCKING — URL/web source sync self-strands: the handler pre-stamps [BLOCK-MERGE] 5c72270 BLOCKING — src/kiro_crew/dashboard/handlers/knowledge.py (sync_source, agent/URL branch) Input [OPUS-REVIEWED] 5c72270 |
d71971f to
a8cf222
Compare
a8cf222 to
677c73b
Compare
677c73b to
7ba8bab
Compare
8f41521 to
f10ffbb
Compare
f10ffbb to
61cd2d4
Compare
61cd2d4 to
0c36be7
Compare
0c36be7 to
526c55f
Compare
526c55f to
5c72270
Compare
Add knowledge.extraction_effort (enum ['', low..max], default '' = inherit). Resolution: explicit key -> agent.role_efforts.background -> high, so an explicit low now wins where the old constant overrode it. Gate effort application in AcpWorker on model_supports_effort for the actual served model (_resolved_model_id, falling back to _model), so a configured 'auto' selector that resolves to a reasoning model still applies effort. Replace use_config_pool_size with an explicit config_pool_size_key so Knowledge config cannot resize unrelated pools; drop the knowledge_llm_pool alias and require knowledge_fetch_pool explicitly (503 when absent). Settings: the Knowledge tab hosts extraction model, extraction effort (Default/Low/Medium/High/Extra High/Max labels, inherit hint, restart badge) and extraction pool size via its own SettingRow/SimpleSelect pattern; i18n keys under pages.knowledge.settings.*; capture harness and screenshots under temp-screenshots/knowledge-effort/. Note: extraction effort now inherits agent.role_efforts.background when no explicit key is configured — a deliberate policy change from the previous always-high behavior. sync_source concurrency hardening (atomic CAS claim) is intentionally split to a separate PR.
5c72270 to
0b6011f
Compare
Re-created from #8345: its head branch had been corrupted by an orphan (parent-less) commit, and GitHub does not allow reopening a closed PR after the head branch was force-pushed. This PR carries the same single commit, rebuilt on current
main(d63917efb), with targeted tests passing locally.Problem / Motivation
Knowledge extraction effort was hardcoded to
highfor the Knowledge LLM pool: operators could not tune cost/latency/quality for extraction, and Knowledge config could silently resize unrelated LLM pools.Why it matters
Extraction is the dominant cost driver of the knowledge pipeline. An operator running a cheap local model wants
low; a quality-critical deployment wantsmax. The old constant made that impossible, and the shared pool-size key let a knowledge config change silently resize pools it did not own.The change
knowledge.extraction_effortconfig key (enum: '' inherit, low, medium, high, xhigh, max). Resolution: explicit key →agent.role_efforts.background→high(last resort).model_supports_effortfor the served model (_resolved_model_id, falling back to_model), so anautoselector that resolves to a reasoning model still applies effort.config_pool_size_keyreplacesuse_config_pool_size: a pool declares WHICH config key owns its width, soknowledge.extraction_pool_sizecan no longer resize the URL-fetch pool.knowledge_llm_poolalias is dropped: URL sync requiresknowledge_fetch_poolexplicitly and answers 503 with a machine-readable code when it is absent.pages.knowledge.settings.*in all catalogs; capture harness inwebsite/scripts/capture-knowledge-effort.mjs.Screenshots / video
Test plan
test/test_knowledge_effort_pools.py— pool wiring + effort resolution chaintest/test_knowledge_handlers_coverage.py— handler routes, 503 fail-loudly, background-task parkingtest/test_llm_pool.py— LLMPool semantics incl. model-support gate