chore: one row-text model for every capability check
Merged
EV
11h ago+673+673+012345678901234567890123456789-705-705-012345678901234567890123456789
Description
One row-text model and one summary-cut helper for every capability check. No behavior changes.
CheckRowTextmoves fromcapability_checks/models.pytoonyx/connectors/models.py, next to thesummaryanddescriptionthatValidationErrorcarries inconnectors/exceptions.py. Every caller imports it from there.MicrosoftRowTextis deleted. It duplicatedCheckRowText.microsoft_utilscould not import the checks package (test_microsoft_utils_import_direction.py, unchanged). Now both share the lower-level model.- Microsoft check text moves out of
microsoft_utils. Text that only checks use moves to the newcapability_checks/microsoft_check_text.py:sign_in,sign_in_text,grant_line,raise_for_sign_in_error, the sign-in rows andENTRA_GROUPS_DENIED_ROW.MicrosoftSignInmoves tocapability_checks/models.py. Everythinggraph_errors.pymaps for the Outlook connector's own validation stays inmicrosoft_utils. - One summary-cut helper.
fit_summaryandMAX_ROW_SUMMARY_LENGTH, next toCheckRowText, replace the copies infit_line, SharePoint, OneDrive and Outlook (_line), and Linear (_MAX_SUMMARY_CHARS). A genericshorten(text, limit)inonyx/utils/text_processing.pyreplaces the findings and advisory cuts. - Two helpers become public:
raise_with_rowandis_transport_failure, which the moved sign-in mapper reuses instead of copying.
How Has This Been Tested?
- Connector, server, EE and background unit suites: 5075 passed.
tyis clean.- The import-direction test and the 40-character row test pass. The row test now also covers
microsoft_check_text.
Additional Options
- [Optional] Please cherry-pick this PR to the latest release version.
- [Optional] Override Linear Check
🤖 Generated with Claude Code
Summary by cubic
Consolidates the shared capability-check pieces into one home each: a single row-text model, one summary-cut helper, and capability_checks/models.py as the home of the check's Pydantic models. No behavior changes.
CheckRowTextandMAX_ROW_SUMMARY_LENGTHmove toonyx/connectors/models.py;MicrosoftRowTextis deleted, andmicrosoft_check_text.pyholds the check-only Microsoft text somicrosoft_utilsstill never imports check code.- The draft-run, runner, and stored-run-progress models (state, plan, cached result, readiness, outcome, progress) move into
capability_checks/models.py. - A shared
shortenintext_processing.pyreplaces the per-module row and advisory truncation helpers.
Summary by CodeRabbit
-
New Features
- Added clearer Microsoft connector sign-in results, permission guidance, and certificate-expiration warnings.
- Added consistent capability-check statuses and result details for readiness, errors, dependencies, and partial results.
-
Bug Fixes
- Improved Microsoft authentication and Graph error messages.
- Standardized capability-check summaries and descriptions across connectors.
- Improved truncation of long names and advisory messages for clearer, more readable results.