Skip to content

feat(python-cli-parity): add configurable CI exit codes - #1765

Open
John-David Dalton (jdalton) wants to merge 1 commit into
v1.xfrom
jdalton/surf-2231-exit-codes
Open

John-David Dalton (jdalton) wants to merge 1 commit into
v1.xfrom
jdalton/surf-2231-exit-codes

Conversation

@jdalton

@jdalton John-David Dalton (jdalton) commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor

Preserve the Python CLI exit behavior in socket ci, with separate outcomes for findings, usage errors, API failures, and interruption. Auto-manifest tool failures remain infrastructure errors.

@cursor

cursor Bot commented Nov 25, 2026 •

Copy link
Copy Markdown

PR Summary

Medium Risk
Changes default CI exit semantics and adds flags that alter when pipelines fail; usage errors remain non-zero but other outcomes are remappable.

Overview
Introduces a CI exit-code policy (setCiExitCode / setCiExitCodePolicy) so socket ci can mirror the Python CLI: 0 success, 1 blocking findings, 2 usage, 3 infrastructure/API, 130 interruption.

socket ci gains --disable-blocking (findings and infra/API return 0; usage still 2) and --exit-code-on-api-error (custom API failure code, default 3). The main CLI wires uncaught errors and abort into the same kinds when a CI policy is active.

Scan/CI paths stop setting process.exitCode directly and instead classify failures as api, blocking, or infrastructure (plus optional fallback when no policy is set). Unit tests cover the policy matrix and report output behavior.

Reviewed by Cursor Bugbot for commit d73ecd6. Configure here.

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit d73ecd6. Configure here.

Comment thread src/cli.mts Resolved
@jdalton John-David Dalton (jdalton) changed the title feat(ci): preserve Python CLI exit semantics feat(python-cli-parity): preserve CI exit semantics Nov 25, 2026
@jdalton John-David Dalton (jdalton) changed the title feat(python-cli-parity): preserve CI exit semantics feat(python-cli-parity): add configurable CI exit codes Nov 25, 2026

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

Development

Successfully merging this pull request may close these issues.

1 participant