Skip to content

feat: section-presence toggle for insight_extraction / memory_extraction#81

Merged
enriquephl merged 6 commits into
devfrom
feat/extraction-enabled-toggle
Jun 3, 2026
Merged

feat: section-presence toggle for insight_extraction / memory_extraction#81
enriquephl merged 6 commits into
devfrom
feat/extraction-enabled-toggle

Conversation

@enriquephl

Copy link
Copy Markdown
Member

Implements docs/superpowers/specs/2026-06-03-extraction-enable-disable-design.md.

What

Disable an extraction task by omitting its [tasks.*_extraction] section in model_config.toml:

[tasks.X_extraction] filter_prompt Result
present set on
present blank/absent boot-fail
absent off (no error)
  • validate_extraction_prompts() (model_config.rs) — present section ⇒ filter_prompt required; absent ⇒ off. Unit-tested (no DB).
  • Boot gate (main.rs) — replaces the old unconditional gate; bails only on present-but-blank.
  • Dreaming sweeper (dreaming.rs) — goes inert when memory_extraction is absent, so it never claims sessions / retry-loops.
  • insight_extraction path already skips cleanly on None — no change.
  • Reasoning on extraction tasks already worked end-to-end — documented only (omit / {enabled=true} / {enabled=false}).

No new config field, no schema change (model stays required). reasoning is unchanged.

⚠️ Behavior change (0.6.x)

Earlier releases made both sections mandatory (an absent section boot-failed). They are now optional-by-omission. The shipped examples/model_config.toml keeps both sections, so the default — both extractions on — is unchanged.

Verification (local)

  • cargo fmt --all -- --check
  • cargo clippy --workspace --all-targets -- -D warnings
  • cargo test -p eros-engine-llm --lib ✓ 101/101 (incl. 5 new)
  • server boot-gate test ✓; OpenAPI snapshot ✓ no drift
  • (DB-backed integration tests run in CI)

Built via subagent-driven execution with per-task spec + code-quality review and a final comprehensive review.

🤖 Generated with Claude Code

enriquephl and others added 6 commits June 3, 2026 18:14
…xtraction

Disable an extraction task by omitting its [tasks.*_extraction] section:
- section present  → filter_prompt required, else boot-fail (today's gate, re-scoped)
- section absent   → that extraction is off, engine boots fine (behavior change vs Spec B2)
- dreaming sweeper goes inert when memory_extraction section is absent
- no new config field, no schema change; model stays required
- reasoning on extraction tasks already works end-to-end — documented, not built

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…mpt required)

Section-presence gate helper: a present [tasks.*_extraction] section must carry a
usable filter_prompt; an absent section means that extraction is off. Unit-tested
at the ModelConfig level (no DB needed). Wired into the boot gate next.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Boot fails only when a [tasks.*_extraction] section is present but its filter_prompt
is blank. An absent section now boots fine (that extraction is off) — behavior change
from Spec B2's mandatory gate. Test asserts the shipped config still passes.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Early-return before claiming any sessions when resolve_memory_extract() is None,
so an omitted [tasks.memory_extraction] section turns the feature off cleanly
instead of retry-looping the per-row no-stamp path.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Comment both [tasks.*_extraction] sections to say: remove the section to turn the
feature off; filter_prompt is required while present. Add a commented
reasoning = { enabled = false } showing the optional force-off.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Both language docs: present section ⇒ filter_prompt required (boot-fail otherwise);
absent section ⇒ extraction off. Note the 0.6.x behavior change and the reasoning
three-state. zh prose in 简体中文.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@enriquephl enriquephl merged commit 4493387 into dev Jun 3, 2026
6 checks passed
@enriquephl enriquephl deleted the feat/extraction-enabled-toggle branch June 3, 2026 12:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant