PR1.2: add input suitability summary#91
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 89295a8d48
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| "reasons": list(report.analysis_confidence.reasons), | ||
| "limitations": list(report.analysis_confidence.limitations), | ||
| }, | ||
| "input_suitability": input_suitability_to_payload(report.input_suitability), |
There was a problem hiding this comment.
Update the report contract expectations
In this context, running PYTHONPATH=src pytest -q tests/unit/test_json_report.py tests/integration/test_offline_pipeline.py now fails because this new top-level input_suitability key is not reflected in the stable report.json contract assertions/examples, which still expect the old shape. Please update the contract tests and generated example artifacts alongside this schema addition; otherwise CI remains red for the published report payload.
Useful? React with 👍 / 👎.
| }, | ||
| "evidence_summary": { | ||
| "alignment_coverage": _metric_score(report, MetricName.ALIGNMENT_COVERAGE), | ||
| "input_suitability": input_suitability_to_payload(report.input_suitability), |
There was a problem hiding this comment.
Update the debug payload contract expectation
In this context, PYTHONPATH=src pytest -q tests/unit fails in test_report_to_debug_payload_is_serializable because evidence_summary now includes input_suitability but the stable debug-payload expected value was not updated. Since debug_payload.json is treated as a stable diagnostic artifact, please update the expected payload/fixtures with this new nested field before merging.
Useful? React with 👍 / 👎.
Summary
Closes #74.
Adds a deterministic input suitability summary derived from existing analysis evidence:
ok,warning, orlow_confidence.The summary is additive only and does not change scoring.
Changed
InputSuitabilitySummaryto the stable analysis report model.summarize_input_suitability(...)underpracticelens.diagnostics.input_suitabilityin single-report JSON payloads.input_suitabilityin batch JSON entries.ok,warning, andlow_confidencecases.Tests
Not run locally in this environment: repository cannot be cloned from GitHub here because outbound DNS/network access is unavailable. The patch was applied through the GitHub connector and Python files were syntax-checked locally before upload.