Skip to content

slang: Add an opt-in fail-on-error gate - #41

Open
DanielKellerM wants to merge 1 commit into
pulp-platform:mainfrom
DanielKellerM:slang/fail-on-error
Open

slang: Add an opt-in fail-on-error gate#41
DanielKellerM wants to merge 1 commit into
pulp-platform:mainfrom
DanielKellerM:slang/fail-on-error

Conversation

@DanielKellerM

Copy link
Copy Markdown

The action cannot fail a job today: run_slang.py exits 0 regardless of compile errors so reviewdog can annotate them, and the reviewdog step is continue-on-error: true. That makes it an annotator rather than a gate, so a project that wants slang as its elaboration gate has to reimplement the driver call. We hit exactly that in iDMA and ended up with a local copy of the same pinned pyslang driver.

fail-on-error (default false) keeps current behaviour for every existing consumer and adds a step that fails when the diagnostics contain an error.

Two deliberate choices:

  • The gate runs after reviewdog, so a failing run is still annotated.
  • It reads slang_diags.json rather than reviewdog's exit status. reviewdog needs a token with check-write permission, which a pull request from a fork does not get; a gate built on its exit code would pass silently on fork PRs, which is where a public gate is worth the most.

A missing diagnostics file is also a failure, so a slang invocation that never ran cannot read as success.

Tested locally: errors exit 1 and are listed, warnings-only exits 0, missing file exits 1.

The action exits 0 regardless of compile errors so reviewdog can annotate
them, and the reviewdog step is continue-on-error, so the action cannot fail a
job. That makes it an annotator, and a project wanting slang as an elaboration
gate has to reimplement the driver call instead of using it.

fail-on-error keeps the default behaviour and adds a step, after reviewdog so
diagnostics are still annotated, that fails when the diagnostics contain an
error. It reads the diagnostics rather than reviewdog's exit status: reviewdog
needs a check-write token, which a pull request from a fork does not get, so a
gate built on it would pass silently exactly where a public gate matters most.
Copilot AI lite review requested due to automatic review settings August 13, 2026 16:51

Copilot AI 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.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

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.

2 participants