Add sanitized diagnostics to the Z.ai quota health check
This pull request was posted by Codex Desktop using gpt-6-luna on behalf of David.
- Relates to #10081
Why we make these changes
When the Z.ai quota check is unknown, operators currently see only the broad status. Add fixed diagnostic categories and validated HTTP status so the failure can be investigated without exposing provider data.
New public surface
none
User-visible behavior
The quota remains unknown and fail-closed; only a safe suffix is added to check output, incident content, and recovery output. For example: Z.ai quota health is unknown becomes Z.ai quota health is unknown (quota diagnostic: http_error; HTTP status 429). Version 1 artifacts without diagnostic metadata remain readable. Operator guidance lists the safe categories and optional status.
Verification
Targeted pytest and pyright pass. Focused coverage found no uncovered changed implementation lines or branches.
Focused tests
- Parser and HTTP metadata: test_zai_quota_parser_attaches_fixed_diagnostic, test_zai_quota_probe_records_only_http_error_category_and_status
- Artifact compatibility and sanitization: test_health_artifact_round_trips_versioned_gate_dto, test_health_artifact_discards_invalid_optional_diagnostics, test_check_and_incident_outputs_keep_hostile_provider_data_out, test_check_command_sanitizes_request_validation_error
- Recovery output: test_scheduled_monitor_creates_or_reuses_unknown_quota_incident, test_scheduled_recovery_dry_run_reports_unknown_quota_diagnostic
What changes for existing users
Quota decisions, workflow gates, and recovery conditions remain unchanged; artifacts gain optional diagnostic metadata.
Checklist
- No breaking changes in accordance with the version policy.
- Any permitted compatibility impact has a label, warning, migration, release note, and exact API-check waiver.
- PR title is fit for the release changelog.