Skip to content

Add preview_correction_impact workflow proposal with rule-based rationale#155

Closed
akgohain wants to merge 1 commit into
mainfrom
codex/add-correction-impact-proposal-action
Closed

Add preview_correction_impact workflow proposal with rule-based rationale#155
akgohain wants to merge 1 commit into
mainfrom
codex/add-correction-impact-proposal-action

Conversation

@akgohain
Copy link
Copy Markdown
Collaborator

Motivation

  • Provide a backend-only proposal that estimates retraining readiness from recent proofreading/correction activity.
  • Make recommendations transparent and rule-based by using explicit constants for thresholds and an export window.

Description

  • Add server_api/workflow/proposals.py implementing PROPOSAL_TYPE_PREVIEW_CORRECTION_IMPACT and build_preview_correction_impact_proposal(...) which summarizes correction event counts, recent exports, and returns a recommendation plus a human-readable rationale that references explicit constants (LOW_CORRECTION_THRESHOLD, HIGH_CORRECTION_THRESHOLD, and RECENT_EXPORT_WINDOW).
  • Introduce CORRECTION_EVENT_TYPES and EXPORT_EVENT_TYPES and a deterministic recent_exports summarizer that does not mutate input state.
  • Export the new API from server_api/workflow/__init__.py for clean imports.
  • Add tests/test_workflow_correction_preview.py covering low-correction and high-correction scenarios and asserting payload shape, recommendation behavior, and that inputs are not mutated.

Testing

  • Ran PYTHONPATH=. uv run --no-project pytest -q tests/test_workflow_correction_preview.py which passed with 2 passed.
  • Note: an initial uv run pytest -q tests/test_workflow_correction_preview.py failed in this environment due to local editable dependency metadata for pytorch_connectomics, which does not affect the unit tests when PYTHONPATH=. is used.
  • Tests confirm the proposal includes summary + recommendation + rationale and that there is no direct state mutation.

Codex Task

@akgohain
Copy link
Copy Markdown
Collaborator Author

Consolidated into draft PR #165 (feat/codex-wave-integration). Closing this source draft to keep review in one place.

@akgohain akgohain closed this Apr 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant