feat(dashboard): make missing required evidence explicit - #642
Conversation
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Resolved the stacked-base conflict by merging the current Validation: backend operations-case/dashboard focused tests 12 passed; frontend Vitest 41 files / 383 tests passed. Hosted checks remain authoritative; this stacked PR still waits for its parent #640 and protected approvals. |
| supported_types = {fact.fact_type_code for fact in parsed_facts} | ||
| if ( | ||
| any(not isinstance(code, str) or code not in FACT_TYPES for code in missing_fact_types) | ||
| or len(set(missing_fact_types)) != len(missing_fact_types) | ||
| or supported_types.intersection(missing_fact_types) | ||
| or supported_types.union(missing_fact_types) != REQUIRED_FACT_TYPES[item["case_kind_code"]] | ||
| ): | ||
| return None |
There was a problem hiding this comment.
📝 Info: Completeness gate rejects the whole response
The gate at operations_case_analysis.py requires each case's supported plus missing fact types to exactly equal that kind's required set. Any case that fails makes parse_operations_case_response return None, which raises ValueError and fails the whole analysis job. This also forbids a case from carrying a supported fact of a type belonging to another kind, unlike the prior facts loop.
Was this helpful? React with 👍 or 👎 to provide feedback.
Summary
Verification
uv run --extra backend --extra dev pytest -q tests/test_operations_case_analysis.py tests/test_operations_case_ingestion.py tests/test_operations_dashboard.py tests/test_schema.py::test_migration_applies_cleanly tests/test_public_docstrings.py tests/test_documentation_hygiene.py(20 passed)corepack pnpm exec vitest run src/components/OperationsDashboard.test.tsx(5 passed)corepack pnpm lintcorepack pnpm buildcorepack pnpm build-storybookRequiredFactMissingdesktop screenshot inspectedStacked on #640. No unsupported fact receives a fabricated value, evidence span, keyword rule, threshold, or weight.