Repository navigation
π needs-sha: exempt owner/detailed issues, overrideable waiver, visible hold on the row - #18873
Conversation
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
Hive status β updated in place; edits do not notify. Full history is in the Activity Monitor. clubanderson this PR is held at Failing checks:
Next: the hive does not push to your branch. Push a new head (or reply here); CI and the review swarm re-run automatically and the PR returns to the normal path. Review follow-ups: 6 open of 6 (below
|
Open PR overlap checkBase branch: Conflicts are checked with every PR merged onto the current tip of
|
There was a problem hiding this comment.
Security perspective: no in-scope blockers at 8259f87.
- The waiver endpoint is gated like the hold toggle (
api_repo_hold.go:99), is size-limited, and only accepts issues in watched repos. The waiver marker is only trusted from the App bot. - Advisory, out-of-scope: the path-citation exemption (
sha_hold_exempt.go:66) is spoofable by any reporter who writessrc/x.goin the body. This is as specified in #18866. - Not verified: how the proxy sets
X-Hive-User.
β hive: agent=adjudicator-2 backend=claude model=claude-sonnet-5-5 claude=2.1.326
There was a problem hiding this comment.
Delta re-review at 6d8f6d7: refactor and notification-site registration look fine and in scope. Still present: src/hive.yaml.example:170 says "Trusted reporters' SHA-less bugs get this soft label", which contradicts the new behavior (all non-exempt reporters; owners/maintainers/path-citers exempt). #18866 requires docs updated.
# # Non-exempt reporters' SHA-less bugs get this soft label, not `hold` (#12002).
# # Owners/maintainers, hive accounts, issues naming repo paths and waived issues are exempt (#18866).
Other prior findings (per-sweep comment listing, path-citation attestation, unused param, helper placement) are untouched by the delta and unchanged; they are out-of-scope and already tracked.
β hive: agent=adjudicator-3 backend=claude model=claude-sonnet-5-5 claude=2.1.326
5c159f8 to
d111959
Compare
|
Scanner: this branch has a merge conflict with v5 (mergeable_state=dirty). It is a human-authored branch, so I have not pushed to it. Please rebase onto origin/v5 and force-push; CI will re-run. π Hive Agent: |
β¦, show the hold on the row (#18866) The SHA-hold sweep no longer gates the hive's own accounts, owners/maintainers or issues whose body names concrete repo file paths (self-attested, documented), and lifts a needs-sha already applied to them. A persistent sha-waived label (row menu Waive/Restore SHA requirement, gated like hold release) overrides the gate and is never re-added. Held issues show a pill and Open-chevron note via the new sha_hold stage-tracker field. Signed-off-by: Andrew Anderson <andy@clubanderson.com> Co-authored-by: scanner <280983584+hivecommons-hive[bot]@users.noreply.github.com>
Signed-off-by: scanner <280983584+hivecommons-hive[bot]@users.noreply.github.com>
7158844 to
29e68c1
Compare
|
Scanner note (suggestion only, branch is busy): the failing checks are 'Sign-off survives the squash' and 'native-queue-policy', neither related to the diff content. Please check the DCO squash attribution log for the commit lacking a sign-off and re-sign it in your own signed commit. π Hive Agent: |
| return ", `" + strings.Join(removed, "`, `") + "` removed" | ||
| } | ||
|
|
||
| // refreshItemSnapshotNow re-reads one item and patches the status snapshot so the |
There was a problem hiding this comment.
This helper is documented as generic but lives in the SHA-waiver file and logs 'SHA waiver:' on failure. Move it next to the other row-action helpers (e.g. api_repo_hold.go) and use a neutral log message.
| } else { | ||
| c.RecordSHAWaiver(owner+"/"+repo, issue.GetNumber(), "") | ||
| } | ||
| hasSHA := exempt || shaPattern.MatchString(issue.GetBody()) |
There was a problem hiding this comment.
hasSHA is now true for exempt issues with no SHA. Suggest renaming:
| hasSHA := exempt || shaPattern.MatchString(issue.GetBody()) | |
| gateMet := exempt || shaPattern.MatchString(issue.GetBody()) |
(and updating later uses).
| target := rowActionTarget(repoFull, rowActionTargetIssue, number) | ||
| out := repoSHAWaiverResponse{OK: true, Repo: repoFull, Number: number, Waived: body.Waived, Added: []string{}, Removed: []string{}} | ||
|
|
||
| if body.Waived { |
There was a problem hiding this comment.
Advisory: split the waive and restore branches into helpers, and give the "owner" fallback login (line 127) a named constant.
Conflicts were api-reference route citation line numbers only (auth.md, configuration.md): kept v5's rows (including the new parent-autoclose routes) and re-anchored citations with check-api-reference-citations.sh --fix. static/index.html verified byte-identical to the concatenation of static-src per manifest.txt. Signed-off-by: Andrew Anderson <andy@clubanderson.com>
Fixes #18866
What
reporter_trust.trusted_associations, default OWNER/MEMBER/COLLABORATOR); issues whose body names a concrete repo file path (repo-relative, under a known top-level dir such assrc//pkg//docs//.github/, ending in a known extension; absolute paths, URLs, bare file names and comments do not count); issues carryingsha-waived. Exemption is evaluated every sweep, so an already-appliedneeds-shais lifted (π Sessions: a session's Codex/OpenCode login copy can still refresh and diverge from the shared login (follow-up to #18793)Β #18740 is released on the next tick). External reporters with no SHA and no path are still held.sha-waivedis a persistent label: the sweep never adds or keepsneeds-shawhile it is on, and the issue reaches the actionable set / stage-label pass. Row menu "Waive SHA requirement" / "Restore SHA requirement" (POST .../items/{n}/sha-waiver) is gated exactly like the hold toggle (verified owner role or repo write/maintain/admin), removesneeds-shaat once, posts one App-authored comment with ahive:sha-waived by=<login>marker. The marker is only trusted from the App bot, so a forged comment cannot name a waiver.sha_holdfield on stage-tracker rows (state,pill,tip,note,by). Pill "Held: needs commit SHA" (hover: "Post a commit SHA in the issue, or waive this requirement."), note "held: post a commit SHA" on the lit Open chevron, "SHA waived by " once waived.holdalready has its own pill, so it is untouched.Deviations
None from the requested menu/pill wording. The waiver action is not wrapped in the operator-action ledger (no "acted" badge); the toast and audit entry (
repo_item_sha_waiver) still apply.Tests
Go: exemption invariant table (external held; owner/collaborator/bot/detailed-body not held; lingering
needs-shalifted), path detector table, waiver persists across sweeps and restore re-holds, forged waiver marker ignored, waived issue eligible inEnumerateActionable, endpoint authz (reader 403, anonymous 401, writer/owner ok, repeat no-op, PR 404, audit),sha_holdpayload. Node-lifted JS: pill, chevron note, menu item gating, request shape. Two existing cases insha_hold_soft_test.gochanged because members are now exempt. Not run locally (CI only).static/index.htmlregenerated by concatenatingstatic-srcpermanifest.txt(verified byte-identical on the unmodified tree first). Docs: labels reference, glossary, operator reference, API reference, activity-monitor, openapi.json. Fragment:changelog.d/fixed-18866-needs-sha-exempt-visible.md.π€ Generated with Claude Code