fix(agent): enforce hard guardrail manual review - #1090
Conversation
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
|
Tip 🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩 ✅ Gittensory review — safe to merge
✅ Approved — safe to merge Review summary Blockers
Nits
Nits — 1 non-blocking
Review context
Contributor next steps
Signal definitions
Review detailsGenerated from public PR metadata and the diff. Advisory only; deterministic signals remain authoritative. The changes tighten guardrail handling by ensuring that any PR hitting a hard guardrail never triggers auto‑approve, auto‑merge, or auto‑close actions. A new guardrail check is added to the approve block and the close condition now requires the PR not to be guardrail‑hit. The label logic already distinguishes guarded PRs, and the comment updates reflect the new behavior. The removal of the now‑unused `wouldMergeButGuarded` variable is safe because its only previous use was in the approve reason, which is now unconditional. All related unit tests have been updated to assert the absence of approve/close on guarded PRs, and the existing test suite continues to cover the other decision paths. No type errors or missing imports are introduced, and the logic remains consistent with the documented policy. Blockers
Nits
🟩 Safe / merged · 🟦 Advisory · 🟨 Held for review · 🟥 Blocked / closed 💰 Earn for open-source contributions like this. Gittensor lets GitHub contributors earn for the work they already do — register to start earning →. Checked by Gittensory, a quiet PR intelligence layer for OSS maintainers.
|
ghost
left a comment
There was a problem hiding this comment.
Gittensory approves — the gate is satisfied and CI is green.
Resolve agent-actions.ts: keep main's #no-request-changes policy AND apply #1090's hard-guardrail enforcement (approve + close now gated on !guardrailHit).
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
gittensory-ui | b43179c | Commit Preview URL Branch Preview URL |
Jun 23 2026, 06:33 PM |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1090 +/- ##
==========================================
- Coverage 94.77% 94.77% -0.01%
==========================================
Files 153 153
Lines 18552 18550 -2
Branches 6707 6705 -2
==========================================
- Hits 17582 17580 -2
Misses 418 418
Partials 552 552 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
…(guard blocks merge, not rejection) (#1106) #1090 gated willClose on !guardrailHit, so a rejected CONTRIBUTOR PR touching a guarded path was HELD instead of closed (e.g. gittensory #1098: rejected, touches src/review|services|signals → stayed open with a 'closing' message). That contradicts the spec: 'guarded + would-merge → hold; otherwise → closure.' The hard-guardrail exists to stop auto-MERGING/APPROVING crucial-path changes without owner review (canMerge + approve still gate on !guardrailHit). It must NOT keep a rejected PR open — closing rejects bad changes and merges nothing, so it is always safe. willClose no longer checks guardrailHit; owner/automation PRs are still never closed (isContributor gates it); GOOD-but-guarded PRs still fall through to the owner (held). Test flipped: a failing contributor PR on a guarded path now CLOSES.
Motivation
Description
!guardrailHitbefore emitting anapproveaction and before emitting a contributorclosedisposition insrc/settings/agent-actions.ts, so guarded PRs are withheld from automated approve/close/merge flows.needs-human-review).test/unit/agent-actions.test.tsto assert guarded PRs are not auto-approved nor auto-closed.Testing
npm test -- --run test/unit/agent-actions.test.ts --reporter=dot, which passed (37 tests).npm test -- --reporter=dot, which exhibited unrelated timeouts/failures in long-running MCP/queue/remediation-route tests (several tests timed out and 8 tests failed), while the targeted agent-actions tests remained green.approve/closeplans for guardrail-hit inputs via the updated unit tests.Codex Task