ci: path-safe required CI gate (always-run aggregate check)#37
Merged
Conversation
#36) /v1/infer now emits a `classification` field ("classified" | "abstain") alongside attackClass, so a consumer can distinguish a confident benign from "the model could not produce a usable verdict". Until now both carried attackClass:"" and were indistinguishable, so FGA Step 5 failed silently open. - Abstain when inference throws or the predicted-class confidence is below ABSTAIN_CONFIDENCE_FLOOR (0.5, a conservative heuristic pending selective-risk calibration). On abstain, attackClass is forced to "" so a low-confidence guess is never actionable; the raw guess is kept in evidence. - The HTTP 500 error body also carries classification:"abstain". - Additive and backward/forward compatible: older consumers ignore the field; an older daemon lets the consumer fall back to its legacy attackClass==""?abstain:classified heuristic. No lockstep deploy required. - 20/20 daemon tests pass (+2). Bump @nanomind/daemon 0.3.0 -> 0.4.0.
There was a problem hiding this comment.
Claude Code Review
VERDICT: APPROVE
SUMMARY: This PR introduces a CI workflow restructure using path-filtered change detection with an always-run aggregate gate check, making the CI status safe to require in branch protection without wedging docs/config-only PRs. The change is purely CI infrastructure — no source code, runtime behavior, or security surface is modified. The workflow logic correctly implements fail-closed semantics (the changes job must succeed for the gate to pass), and the shell script in ci-gate uses proper quoting and safe variable expansion patterns.
Reviewed 8 files changed (32350 bytes)
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.
Why
Branch protection should be able to require CI before merge, but the CI workflow was path-filtered (
packages/**,integrations/**, ...). A path-filtered workflow never reports a status on PRs that don't match, so requiringBuild & Testwould wedge those PRs forever on "Expected — waiting for status".What
CI now runs on every PR to main and aggregates into a single always-run
CI Gatecheck that is safe to require:paths:filter — the workflow always runs, soCI Gatealways reports.changesjob (dorny/paths-filter) detects relevant paths;Build & TestandPack smokerun only when code changed, and are skipped otherwise.CI Gate(needs: [changes, build-and-test, pack-smoke],if: always()) is the required check:pull-requests: readsopaths-filtercan list PR files via the API.Effect
After merge,
CI Gatecan be set as a required status check, making the test suite merge-blocking for code PRs without wedging docs-only / config PRs. No source/runtime change.