Skip to content

test(errorPaths): pin the GitHub refusal in every wrapped issue-comment failure - #547

Merged
mrbobbytables merged 1 commit into
mainfrom
quality/test-error-paths-cause
Oct 21, 2026
Merged

mrbobbytables merged 1 commit into
mainfrom
quality/test-error-paths-cause

Conversation

@hivecommons-hive

Copy link
Copy Markdown
Contributor

Test Improvement

__tests__/issueCommentTest/errorPaths.test.ts asserted the eleven could not … wraps in src/issueComment/* (assign.ts:42,73, unassign.ts:42,64, cc.ts:39,70, uncc.ts:38, reopen.ts:45, close.ts:60, retitle.ts:51, lock.ts:62) by prefix only, so dropping the interpolated rejection (: ${e}) from any of them left the suite green — verified on main @ 88241f4 for close.ts:60 and reopen.ts:45 (npx vitest related … → 576/576 pass) and lock.ts:62 (the file directly, 19/19). That cause (HttpError: Resource not accessible by integration) is the only line a maintainer gets when a token lacks a permission.

Each of the eleven assertions now matches the full message, could not <step>: HttpError: Resource not accessible by integration, via one shared cause constant.

Files: __tests__/issueCommentTest/errorPaths.test.ts only. No src/, dist/ or docs change. Disjoint from every open held PR (#510–#545): none touches this file.

Verification (this branch, local)

  • npx vitest run __tests__/issueCommentTest/errorPaths.test.ts: 19/19 pass
  • npx eslint __tests__/issueCommentTest/errorPaths.test.ts: clean
  • mutant close.ts:60 could not close issue: ${e} → could not close issue: the file now fails 1/19 (Received: "could not close issue")

Related Issue

Refs #523 — the folded errorPaths finding on that tracker is fully addressed by this PR; the tracker stays open for its other folded findings (e2e String(e) arms, run.ts:40 / config.ts:657 / lgtm.ts:68 v8-ignore text, which need a src/ change — needs-human: production-file edits outside the quality lane).


Filed by quality agent (hold-gated mode). Human review required.

— hive: agent=quality backend=copilot model=claude-fable-5.1 copilot=1.0.88

…nt failure

Each 'could not …' wrap in src/issueComment/* interpolates the rejection, so
the Action failure names the HttpError GitHub returned. The eleven error-path
tests matched the prefix only; dropping the cause from any wrap left them
green. Each now asserts the full 'could not <step>: HttpError: Resource not
accessible by integration' message.

Signed-off-by: quality <280983584+hivecommons-hive[bot]@users.noreply.github.com>
@hivecommons-hive
hivecommons-hive Bot requested a review from jpmcb as a code owner October 21, 2026 06:49
@hivecommons-hive hivecommons-hive Bot added the hold Indicates that a PR should not merge because someone has issued a /hold command. label Oct 21, 2026
@hivecommons-hive

Copy link
Copy Markdown
Contributor Author

Important

Held for human review by the hive's ACMM level gate.

This PR was opened by the "quality" agent while Hive policy required a human checkpoint for that agent. Agent PRs are held at ACMM L3–L5; an outreach PR that targets a repository this hive does not manage is held at every level because it publishes project-facing communication into someone else's project.

Hive will keep the hold label until a human removes it. Operators can make a deliberate one-off release during an ACMM level change with release_level_holds=true, but level changes never release this hold automatically.

@github-actions

Copy link
Copy Markdown
Contributor

Please add a kind label with /kind feature, /kind failing-test or /kind cleanup.

@mrbobbytables mrbobbytables left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review performed under the maintainer's explicit authorization to update, review, release reviewed holds, and merge eligible PRs in this cleanup.

The existing wrapped-failure assertions now retain the underlying GitHub refusal instead of matching only a generic prefix; changes remain test-only.

Verified successful build-test, e2e-coverage and DCO results on head 8511d84. Any folded issue findings remain assigned to the canonical destinations in the updated scope tables.

@mrbobbytables mrbobbytables added kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. and removed hold Indicates that a PR should not merge because someone has issued a /hold command. needs-kind labels Oct 21, 2026
@mrbobbytables
mrbobbytables merged commit f570c48 into main Oct 21, 2026
17 checks passed
@mrbobbytables
mrbobbytables deleted the quality/test-error-paths-cause branch October 26, 2026 20:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant