Skip to content

PR1.2: add input suitability summary#91

Merged
kymuco merged 15 commits into
mainfrom
feat/pr1.2-input-suitability-summary
May 30, 2026
Merged

PR1.2: add input suitability summary#91
kymuco merged 15 commits into
mainfrom
feat/pr1.2-input-suitability-summary

Conversation

@kymuco
Copy link
Copy Markdown
Owner

@kymuco kymuco commented May 30, 2026

Summary

Closes #74.

Adds a deterministic input suitability summary derived from existing analysis evidence:

  • reference/take duration;
  • duration ratio;
  • alignment coverage;
  • voiced-frame coverage;
  • onset evidence;
  • suitability status: ok, warning, or low_confidence.

The summary is additive only and does not change scoring.

Changed

  • Added InputSuitabilitySummary to the stable analysis report model.
  • Added summarize_input_suitability(...) under practicelens.diagnostics.
  • Exposed input_suitability in single-report JSON payloads.
  • Exposed per-take input_suitability in batch JSON entries.
  • Added the summary to debug evidence payloads.
  • Added unit coverage for ok, warning, and low_confidence cases.
  • Added API contract typing for the new payload shape.

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.

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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),
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge 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),
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge 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 👍 / 👎.

@kymuco kymuco merged commit 5649e12 into main May 30, 2026
1 check passed
@kymuco kymuco mentioned this pull request May 31, 2026
11 tasks
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.

[PR1.2] Input suitability summary

1 participant