Skip to content

fix(config): enrich / retrieval.events / pages_first still use bool() on quoted false #620

Description

@kurosawareiji7007-hub

#558 introduced coerce_bool and fixed most config loaders so a mistakenly quoted enabled: false disables the feature. Three loaders were missed and still use bare bool(), so the quoted form silently leaves the feature on (or turns an off-by-default feature on).

where

  • src/vouch/enrich.pyload_enrich_config: enabled=bool(raw.get(enabled, True))
  • src/vouch/retrieval_events.pyload_events_config: same pattern (default on)
  • src/vouch/context.py_configured_pages_first: bool(raw.get(enabled, False)) — quoted false` incorrectly enables pages-first

why it matters

  • enrich defaults on: opting out with capture.enrich.enabled: false still runs the LLM subject pass
  • retrieval events default on: retrieval.events.enabled: false still writes telemetry JSONL
  • pages_first defaults off: retrieval.pages_first.enabled: false turns the boost on

YAML authors often quote booleans; #558 already established the house contract that quoted false must disable.

repro

capture:
  enrich:
    enabled: false
retrieval:
  events:
    enabled: false
  pages_first:
    enabled: false

load_enrich_config(...).enabled / load_events_config(...).enabled / _configured_pages_first(...)[0] are all True today.

expected — all three are False (same as unquoted false and the fixed recall/capture/admission/… loaders).

suggested fixenabled=coerce_bool(raw.get(enabled, default), default) in each loader; add the same test_*_quoted_false_does_not_enable regressions the other modules already have.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions