Repository navigation
Add ci deploy --annotations to surface deploy check outcomes on the run summary - #136
Open
tranhoangtu-it wants to merge 1 commit into
Open
tranhoangtu-it wants to merge 1 commit into
tranhoangtu-it wants to merge 1 commit into
Conversation
Add an opt-in --annotations flag to `proofline ci deploy` that writes `::error` and `::warning` workflow commands on stderr for regressed and unestablished deploy checks while leaving stdout JSON untouched. Shared escaping and job-level command formatting live in `src/annotations.rs`, so values from server responses and GitHub metadata are sanitized through `text::terminal_safe` and escaped like `@actions/core` without duplication. Clean `HEALTHY` runs with no gaps and transport/auth failures emit no deploy annotations.
Codex Review Summary: ❌ FailedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
This branch has not been deployed
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.
Who this helps
Teams running
proofline ci deployin GitHub Actions who want regressed or unestablished deploy checks surfaced directly on the workflow run summary on every GitHub plan, without digging through job logs or passing--json.What changed
src/annotations.rsexposesLevel,escape_data,escape_property, andwrite_job(pub(crate)), sharingwrite_commandwithci review --annotationsso workflow-command formatting and escaping live in one place.src/deploy.rsadds--annotationstoCiDeployArgs, threads a testablestderrWritesink intowait_with_output, shares raw vs. terminal-folded helpers (deploy_label/label,deploy_rollback/rollback_line,checkpoints_in_scope,deploy_gaps,regressed_checkpoints), and emits:Verdict::Done(never claiming a deploy is safe) or on transport/auth/usage errors;::errorper regressed deploy onVerdict::Regressed(including failures and regressions recorded after--until), naming the deploy label, regressed checkpoints, state, rollback/rolled_backdetails, gaps, anddeploy_url;::warningper affected deploy onVerdict::NotComplete(Waiting,Superseded,Unverified,Inactive,Ended,UnknownState,NotEstablished), or one job-level::warningwhen zero matching deploys were recorded, an unsuccessfulworkflow_runconcluded with no deploy, or no verification read answered.tests/http.rsadds an end-to-end mock-server integration test forproofline ci deploy --annotations.README.mddocuments--annotationsright beside theci deploydocumentation.Decisions
Verdict::Done(HEALTHY, no gaps) emits zero annotations; only regressions emit::error, and unestablished results emit::warning.github_environment,deployment_task,aws_provider,aws_run_id,state,gaps,deploy_url, rollback pages, repositoryname,conclusion) are assembled unescaped and passed once throughannotations::write_job, which runstext::terminal_safeand@actions/core-style escaping (%25,%0A, and%3A/%2Cin properties) so a payload cannot forge a second workflow command or inject ANSI/bidi sequences.stderr: Matchesci review --annotations(src/lib.rs) so existing CI logs do not change unless requested and--jsonoutput onstdoutstays a single valid JSON document.Verification
src/annotations.rs(write_job_escapes_title_and_message_onto_one_line) andsrc/deploy.rs(annotations_report_regressions_and_unestablished_checks_as_escaped_commands) covering opt-in behavior,Verdict::Done,Verdict::Regressed(including later regressions,FAILED, AWS runs, rollbacks, gaps, and--json), allVerdict::NotCompletereadings + zero-deploy cases,401/403/503error paths, and injection payloads.tests/http.rs(ci_deploy_annotations_report_regressions_and_unestablished_deploys_as_escaped_commands) running the compiledprooflinebinary against anaxummock server.1.100.0-aarch64-apple-darwin(fromrust-toolchain.toml):cargo fmt --checkcargo clippy --locked --all-targets -- -D warningscargo test --locked(160 passed, 0 failed, 1 pre-existing ignored intests/hooks.rs; run with canonicalizedTMPDIRon macOS per unattended_registration_preserves_settings_and_uses_the_installed_binary fails on macOS (/var vs /private/var) #112)cargo deny check(advisories ok, bans ok, licenses ok, sources ok)