Skip to content

Preserve transient OIDC issuer errors across CI startup and renewal - #107

Open
gana04982-ship-it wants to merge 1 commit into
prooflinedev:mainfrom
gana04982-ship-it:fix/oidc-transient-availability
Open

gana04982-ship-it wants to merge 1 commit into
prooflinedev:mainfrom
gana04982-ship-it:fix/oidc-transient-availability

Conversation

@gana04982-ship-it

Copy link
Copy Markdown

Summary

  • Keep ApiError transience and upstream attribution intact when requesting OIDC tokens from GitHub Actions (Issuer::token in src/github_actions.rs), attributing failures to "GitHub Actions" via ApiError::with_origin so 5xx and transport outages exit 4 (Unavailable) rather than 1, while 4xx refusals and malformed responses remain non-transient (1).
  • Carry transient: bool on ApiError::Renewal so transient runner OIDC blips during Renewal::token preserve FAILED_READS = 5 retry tolerance in deploy::wait and map exhausted outages to exit 4, while still keeping scan::uncertain false (no downstream POST was sent) and keeping org-mismatch/refusal errors non-transient.
  • Harden exchange lease expiry arithmetic using checked_sub and a 30s renewal floor (SKEWED_RENEW_FLOOR) when lifetime is zero, preventing signed subtraction overflow and tight-loop OIDC polling under clock skew without rejecting past fixture timestamps.

Tests

  • Added unit tests in src/github_actions.rs (exchange_clamps_past_expiry_without_overflow_or_immediate_renewal, malformed_oidc_response_names_github_actions_and_is_not_transient).
  • Added paused-clock tests in src/lib.rs (oidc_issuer_outages_remain_unavailable_and_refusals_do_not, deploy_wait_tolerates_transient_oidc_renewal_outages_and_aborts_on_refusal).
  • Added end-to-end binary cases in tests/http.rs (failing_oidc 403 -> exit 1, 503 -> exit 4).

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