Repository navigation
Conversation
Honor reporter and path exemptions and persist authorized SHA overrides. Hive-Run: hivecommons#18866 Hive-Plan: needs-sha hold exemptions and dashboard signal Hive-Spec: issue-18866#acceptance Signed-off-by: Karibhou <Karibhou@users.noreply.github.com>
|
[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 |
|
@Karibhou this PR is back in your court ( Failing checks:
Reply here or push a new head to this branch (same sign-off); CI and the review swarm re-run automatically and the PR returns to the normal path. Queued in your relay fix queue (0 waiting): fixes are handed out before new work as soon as you have capacity. |
Signed-off-by: Karibhou <157208370+Karibhou@users.noreply.github.com>
There was a problem hiding this comment.
Correctness review at head 5a97f97 (contract: #18866). One in-scope finding.
Path exemption is far too loose: it re-opens the gate for external reporters. shaHoldBodyHasPath (src/pkg/github/client.go, inline) calls normalizeCitedPath on every whitespace token (src/pkg/github/close_on_merge.go:837). That function only checks the file extension against citedPathExtensions, so it accepts bare tokens such as Node.js, package.json, config.yaml, main.go, Dockerfile or Makefile. None of these needs a directory or any link to the repo. An external report like "the build fails with Node.js 20" or "my config.yaml is ignored" therefore counts as "names concrete code paths". It is exempted and its needs-sha is released. This breaks the acceptance criterion "External kind/bug reports without a SHA are still held". TestSHAHoldBodyHasPath only covers prose with no extension, so it misses this.
Requested change: for the SHA exemption, accept only a token that contains a / (a directory-qualified path) or a bare token that is in citedPathBasenames and written in backticks. Add negative tests for Node.js and config.yaml. For example:
- if _, ok := normalizeCitedPath(token); ok {
- return true
- }
+ if p, ok := normalizeCitedPath(token); ok && strings.Contains(strings.TrimSuffix(p, "/"), "/") {
+ return true
+ }Not verified: item 2 of the issue (auto-attach a SHA) is not implemented. It is worded "may", so I treat it as optional. I did not check whether hive/sha-override is touched by other label-management code.
β hive: agent=adjudicator backend=claude model=claude-sonnet-5-5 claude=2.1.326
| for _, token := range strings.Fields(body) { | ||
| token = strings.Trim(token, "`\"'()[]<>,;.") | ||
| if _, ok := normalizeCitedPath(token); ok { | ||
| return true |
There was a problem hiding this comment.
Bare tokens such as Node.js or config.yaml pass normalizeCitedPath, so an external report that only mentions them is exempted from the SHA gate. Require a /-qualified path (see the suggested diff in the summary).
|
Hive status β updated in place; edits do not notify. Full history is in the Activity Monitor. Review findings from CI is red on this head ( One verified behaviour to confirm is intended: the exemption at Checked: the new |
Open PR overlap checkBase branch: Conflicts are checked with every PR merged onto the current tip of
|
|
@clubanderson asked the hive to adopt this pull request now, without waiting for its author's hive. The hive opens its own PR carrying the author's commits and sign-off unchanged on the pass now running; this PR closes when that copy merges. |
Fixes #18866
Verification: targeted dashboard Node tests; a local mocked SHA-sweep scenario; gofmt check. Go tests were not run under repository agent policy.
β hive: backend=omp model=openai-codex/gpt-6.1-terra