Skip to content

Add deploy verification outcome evaluator and deadline-aware waiter - #142

Open
srikhyathi wants to merge 1 commit into
prooflinedev:mainfrom
srikhyathi:feat/deploy-verification-outcomes
Open

srikhyathi wants to merge 1 commit into
prooflinedev:mainfrom
srikhyathi:feat/deploy-verification-outcomes

Conversation

@srikhyathi

Copy link
Copy Markdown

Summary

ProoflineClient and AsyncProoflineClient already provide wait_for_review and proofline/outcomes.py for evidence-strict review evaluation, while get_commit_deploy_verifications only exposed a raw generated endpoint wrapper with no client-side SHA validation, evidence evaluation, checkpoint gating, or deadline-aware polling.

This PR adds:

  • proofline/deploy_outcomes.py (evaluate_deploy_verifications, DeployVerificationOutcome, DeployEvaluation, DeployCheckpointGap, DeployOutcomeStatus):
    • Validates CommitDeployVerifications structure (urn:proofline:sdk:invalid-response on malformed responses) and treats unknown future state values as INCOMPLETE.
    • Evaluates recorded checkpoints (LANDING, MINUTES_20, HOUR_1, DAY_1) and aggregates across matching deploys by severity so regressions (REGRESSED), rollbacks (ROLLED_BACK), FAILED deploys, or recorded gaps are never masked as VERIFIED.
    • Supports until_checkpoint (returning CHECKPOINT_VERIFIED when checks through the requested window record HEALTHY with no gaps) and fail_fast (short-circuiting on REGRESSED, ROLLED_BACK, or FAILED across multi-environment deploys).
  • ProoflineClient.wait_for_commit_deploy_verifications and AsyncProoflineClient.wait_for_commit_deploy_verifications with pre-request 40-character lowercase SHA, timeout, and checkpoint validation, environment/task filtering, and _transport.DEADLINE-bounded exponential backoff (5s to 60s), preserving the last observed snapshot on TIMED_OUT.
  • Contract registration in scripts/contracts.py, scripts/install_smoke.py coverage, README.md documentation, and unit/HTTP tests in tests/test_deploy_outcomes.py.

Verification

All checks were run locally on Python 3.13 after the final edit:

  • scripts/generate.py --check (passed)
  • scripts/contracts.py (Python operation and outcome-vocabulary contracts passed.)
  • ruff check . (All checks passed!) and ruff format --check . (242 files already formatted)
  • mypy proofline scripts (Success: no issues found in 233 source files)
  • pytest -q (243 passed in 38.82s)
  • Built proofline_sdk-10.3.0.tar.gz and proofline_sdk-10.3.0-py3-none-any.whl and ran scripts/install_smoke.py in isolated environments (Installed Python SDK sync/async HTTP smoke passed. for both)

This branch has not been deployed

No deployments
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.

1 participant