Merged
Conversation
…-24 P0 #1) Pre-change, the default install silently produced no judgeable content: set_input_content / set_output_content / set_retrieval_content no-op'd because their rate-gate evaluated ``random.random() < 0.0 == False``. The L2 evaluator judge then returned empty test cases for every span and eval_rollups stayed ``pending`` forever. Customers had to read the docs AND flip a config flag before the "SDK in → eval out" loop worked. Flipping the default to 0.10 (what the docs already recommended for production) inverts the failure mode from silent-no-eval to loud- content-captured-with-PII-risk. Three PII-defense layers still run on every captured attribute: 1. SDK in-process scrub (pii_scrub_enabled=True by default) 2. Collector credential-regex scrub on content attribute prefixes 3. Evaluator Presidio NER before judge calls Changes: - BotanuConfig.content_capture_rate default 0.0 → 0.10 - YAML loader fallback default matches (config.py:436) - Bootstrap logs content_capture_rate at every startup; warns when <= 0.0 so the "why are eval rollups empty" debugging path ends at a startup log line, not silently-dropped helper calls. - Tests: test_default_is_zero → test_default_is_ten_percent, test_env_var_invalid_ignored now expects 0.10 fallback. - Docs: api/configuration.md table + getting-started/configuration.md code sample both updated. All 150 SDK unit tests still pass. NOTE: working-tree had one unrelated pre-existing change to src/botanu/models/run_context.py — NOT included in this commit. Signed-off-by: Deborah Jacob <deborah@botanu.ai>
Pre-existing working-tree change. Removes a 4-line explanatory comment about why ``botanu.outcome.status`` is not emitted (the customer-trust-hole note). Behavior unchanged — the SDK still does not emit ``botanu.outcome.status``. The rationale lives in project memory + the value-engine / cost-engine design docs. Signed-off-by: Deborah Jacob <deborah@botanu.ai>
Resolves 10 lint findings: - S603 subprocess call (bare noqa) - RUF015 list-index slice -> next() - RUF059 unused unpacked code -> _code - RUF005 x7 results + [False] -> [*results, False] Signed-off-by: Deborah Jacob <deborah@botanu.ai>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Changes
Type of change
Testing
pytest)ruff check)mypy)Checklist
git commit -s) per the DCO