Skip to content

feat: add proofline assessment command to inspect domain coverage and subjects - #110

Open
sathishking wants to merge 1 commit into
prooflinedev:mainfrom
sathishking:feat/assessment-command
Open

sathishking wants to merge 1 commit into
prooflinedev:mainfrom
sathishking:feat/assessment-command

Conversation

@sathishking

Copy link
Copy Markdown

Problem

openapi.public.json exposes get_assessment (GET /api/v1/organizations/{org_id}/reviews/{review_id}/assessments/{assessment_id} → CustomerAssessmentDetail), but the CLI had no way to inspect a single environment assessment—and proofline review / proofline findings omitted assessment IDs from text output.

When an environment assessment finished—or ended INCOMPLETE (WORLD_UNAVAILABLE, EVIDENCE_UNAVAILABLE, CHECKS_UNRESOLVED)—engineers could only see a single summary line in the terminal without knowing:

  1. Which of the 18 environment risk domains were CONSIDERED vs SKIPPED, and why.
  2. Which release subjects/artifacts (subjects) the assessment authorized.
  3. Exact assessment timing (started_at, completed_at).

What changed

  • build.rs: Registered ("get", "get_assessment", &["review_id", "assessment_id"]) in OPERATIONS.
  • src/model.rs & src/api.rs: Added AssessmentDetail (CustomerAssessmentDetail), AssessmentDomain (DomainView), optional SubjectView fields on ReviewSubject, and Api::assessment.
  • src/outcome.rs: Added same_assessment identity verification, extracted shared evaluate_gap logic between Assessment and AssessmentDetail, and added assessment_terminal and assessment_findings_reach under the CLI's fail-closed rules.
  • src/render.rs:
    • Printed id: <UUID> under each environment in review text output so proofline assessment works without --json.
    • Added render::assessment_detail to render timing, completeness gaps, authorized subjects, CONSIDERED / SKIPPED domain evaluations, deterministic checks, and severity-sorted findings with one_line / terminal_safe sanitization.
  • src/lib.rs & README.md: Added proofline assessment <REVIEW_ID> [ASSESSMENT_ID] [--environment NAME] [--json] [--fail-on SEVERITY]:
    • Passing ASSESSMENT_ID queries get_assessment in one request (findings:read).
    • Passing --environment <NAME> resolves the environment case-insensitively via get_review.
    • Omitting both auto-selects when a review has one assessment, or lists available environments and IDs when multiple exist.
  • tests/contract.rs & tests/http.rs: Held AssessmentDetail and AssessmentDomain to openapi.public.json, verified the get_assessment route, and tested direct lookup, --environment resolution, --json, --fail-on, incomplete exit 2 handling, and server ID-mismatch refusal.

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