You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Close a policy-bypass where some advisory rebuild/prediction paths did not supply linked-issue author evidence, allowing a repo-configured selfAuthoredLinkedIssueGateMode: "block" to be falsely reported as passing on authorized retriggers and predictions.
Description
Resolve and pass linked-issue author logins into buildPullRequestAdvisory for scheduled re-gate sweeps so self-authored findings are evaluated. (src/queue/processors.ts)
Resolve and pass linked-issue author logins in the authorized PR-action advisory builder used by the PR-panel retrigger and gate-override flows so manual retriggers honor the configured blocker. (src/queue/processors.ts)
Derive linked-issue author evidence from the cached issues collection for the predicted-gate path so public predictions reflect available issue-author data while preserving fail-open semantics. (src/rules/predicted-gate.ts)
Add regression unit tests covering the authorized-action advisory path and predicted-gate behavior when issue-author evidence is present or absent. (test/unit/gate-check-policy.test.ts, test/unit/predicted-gate.test.ts)
Ran npx vitest run test/unit/predicted-gate.test.ts test/unit/gate-check-policy.test.ts; both test files passed (all added regression tests succeeded).
Ran npm run typecheck; typecheck completed successfully with no errors.
Attempted npm run test:coverage; tests ran but coverage remapping failed with an environment/tooling error (TypeError: jsTokens is not a function).
Attempted npm audit --audit-level=moderate; the npm audit endpoint returned 403 Forbidden in this environment.
✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 94.79%. Comparing base (ecddb0e) to head (6a2c756). ⚠️ Report is 9 commits behind head on main.
✅ All tests successful. No failed tests found.
Re-implemented fresh on current main. Your diagnosis was correct — the self-authored-linked-issue finding was only threaded on the main webhook path, leaving the re-gate sweep, the authorized-PR-action path, and the predicted-gate preview without it. The new PR wires all three, adapted to the live-fetch-fallback resolveLinkedIssueAuthorLogins signature (the 5-arg form that landed in #1238 after this PR was branched) and the predicted-gate's snapshot resolution. Thanks for catching the inconsistency.
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
gittensor:bugGittensor-scored bug fix — scores a 0.05x multiplier.
1 participant
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.
Motivation
selfAuthoredLinkedIssueGateMode: "block"to be falsely reported as passing on authorized retriggers and predictions.Description
buildPullRequestAdvisoryfor scheduled re-gate sweeps so self-authored findings are evaluated. (src/queue/processors.ts)src/queue/processors.ts)issuescollection for the predicted-gate path so public predictions reflect available issue-author data while preserving fail-open semantics. (src/rules/predicted-gate.ts)test/unit/gate-check-policy.test.ts,test/unit/predicted-gate.test.ts)src/queue/processors.ts,src/rules/predicted-gate.ts,test/unit/gate-check-policy.test.ts,test/unit/predicted-gate.test.ts.Testing
npx vitest run test/unit/predicted-gate.test.ts test/unit/gate-check-policy.test.ts; both test files passed (all added regression tests succeeded).npm run typecheck; typecheck completed successfully with no errors.npm run test:coverage; tests ran but coverage remapping failed with an environment/tooling error (TypeError: jsTokens is not a function).npm audit --audit-level=moderate; the npm audit endpoint returned403 Forbiddenin this environment.Codex Task