Add preview_correction_impact workflow proposal with rule-based rationale#155
Closed
akgohain wants to merge 1 commit into
Closed
Add preview_correction_impact workflow proposal with rule-based rationale#155akgohain wants to merge 1 commit into
akgohain wants to merge 1 commit into
Conversation
Collaborator
Author
|
Consolidated into draft PR #165 ( |
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.
Motivation
Description
server_api/workflow/proposals.pyimplementingPROPOSAL_TYPE_PREVIEW_CORRECTION_IMPACTandbuild_preview_correction_impact_proposal(...)which summarizes correction event counts, recent exports, and returns arecommendationplus a human-readablerationalethat references explicit constants (LOW_CORRECTION_THRESHOLD,HIGH_CORRECTION_THRESHOLD, andRECENT_EXPORT_WINDOW).CORRECTION_EVENT_TYPESandEXPORT_EVENT_TYPESand a deterministicrecent_exportssummarizer that does not mutate input state.server_api/workflow/__init__.pyfor clean imports.tests/test_workflow_correction_preview.pycovering low-correction and high-correction scenarios and asserting payload shape, recommendation behavior, and that inputs are not mutated.Testing
PYTHONPATH=. uv run --no-project pytest -q tests/test_workflow_correction_preview.pywhich passed with2 passed.uv run pytest -q tests/test_workflow_correction_preview.pyfailed in this environment due to local editable dependency metadata forpytorch_connectomics, which does not affect the unit tests whenPYTHONPATH=.is used.summary+recommendation+rationaleand that there is no direct state mutation.Codex Task