Skip to content

test(bundle): drive /meow's parseCatImage refusals and dropped-connection retry through dist/index.js - #372

Merged
github-actions[bot] merged 3 commits into
mainfrom
quality/test-meow-parse-arms
Oct 9, 2026
Merged

github-actions[bot] merged 3 commits into
mainfrom
quality/test-meow-parse-arms

Conversation

@hivecommons-hive

Copy link
Copy Markdown
Contributor

Test Improvement

Finishes box 4 of #243 in __tests__/bundle/meow.test.ts (the only file touched), driving src/issueComment/meow.ts through the committed dist/index.js via the existing catApiPreload.cjs stub:

  • an it.each table for the five parseCatImage refusals test(bundle): drive /meow through dist/index.js against a stubbed cat api #244 left out — empty list (L120), record without a url (L124), url over 4096 chars (L126), unparsable url (L133), http: url and a url carrying credentials (L141) — each a 2xx answered once, degraded to The cat API is unavailable right now. with the matching ::warning::, exit 0
  • the cat stub gains a destroy answer that drops the socket, so the TypeError retry arm (L100) runs: one dropped connection then an image is retried and posted; three drops degrade to the note with TypeError: fetch failed

Evidence on main @ c18e968: npm run test:coverage:e2e reported meow.ts 85.93 % lines, unhit 28, 35, 100, 112, 120, 124, 126, 133, 141. With this file: 95.31 % lines, unhit 28 (default-parameter remap artefact), 35 (missing issue-number guard, held #343's ground) and 112 (cancelResponseBody catch — needs body.cancel() itself to throw, which no HTTP stub can cause; stays unit-only). Unit coverage of all these arms was already 100 %.

Related Issue

Closes #243


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

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

…tion retry through dist/index.js

#244 drove the foreign-host row of parseCatImage only. Add the other
five refusals (empty list, record without url, excessively long url,
unparsable url, http:/credentialed url) as a table, and teach the cat
api stub to drop the connection so the TypeError retry arm runs: one
drop then an image is retried, three drops degrade to the note.

Closes #243

Signed-off-by: quality <quality@hive.kubestellar.io>
@hivecommons-hive
hivecommons-hive Bot requested a review from jpmcb as a code owner October 7, 2026 21:50
@hivecommons-hive hivecommons-hive Bot added the hold Indicates that a PR should not merge because someone has issued a /hold command. label Oct 7, 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. Non-outreach agents are held at ACMM L3–L5; the outreach agent is always held because it publishes project-facing communication.

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.

@jeefy jeefy 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.

I measured end-to-end coverage against main. Every parseCatImage row except one reaches its own throw (meow.ts:120/124/126/133/141), and the dropped-connection retry reaches meow.ts:100. Two cases add nothing:

  • The http: row and the url carrying credentials row both reach the same throw at meow.ts:141. Keep one.
  • Drop "gives up after three dropped connections" (:216). Its only new line, meow.ts:100, is also reached by the retry case at :204, and throw lastError is already covered by the 5xx give-up case at :133.

quality and others added 2 commits October 8, 2026 04:04
…-up case

Review on #372: the http: and credentials rows both reach the same throw at meow.ts:141, so only the http: row stays; the three-dropped-connections case adds no line the single-retry and 5xx give-up cases do not already reach.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: quality <quality@hive.kubestellar.io>
@hivecommons-hive

Copy link
Copy Markdown
Contributor Author

Addressed both: dropped the url carrying credentials row (the http: row keeps meow.ts:141 covered) and the gives up after three dropped connections case. Merged main as well. npx vitest run __tests__/bundle/meow.test.ts: 15/15 pass.


🐝 Hive Agent: quality | Instance: hosted-available-lke648397-260827-5q9t | SHA: 4889a8c

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

@hivecommons-hive

Copy link
Copy Markdown
Contributor Author

Addressed in 4889a8c: kept the http: row and dropped the credentials row, and dropped the three-drops give-up case.

CI is green on the new head.


🐝 Hive Agent: quality | Instance: hosted-available-lke648397-260827-5q9t | SHA: 1f7d33c

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

@jeefy jeefy 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.

Asks addressed; verified on current main (aa6a0f8) together with the other approved PRs.

@jeefy

jeefy commented Oct 9, 2026

Copy link
Copy Markdown
Member

/kind cleanup
/lgtm
/approve
/hold cancel

@github-actions github-actions Bot added kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. lgtm "Looks good to me", indicates that a PR is ready to be merged. and removed hold Indicates that a PR should not merge because someone has issued a /hold command. labels Oct 9, 2026
@github-actions
github-actions Bot merged commit 8cfeab9 into main Oct 9, 2026
10 checks passed
@mrbobbytables
mrbobbytables deleted the quality/test-meow-parse-arms branch October 9, 2026 17:34
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. lgtm "Looks good to me", indicates that a PR is ready to be merged.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[quality] the bundle e2e suite never drives /meow — src/issueComment/meow.ts has unit coverage only

1 participant