Repository navigation
test(bundle): drive /meow's parseCatImage refusals and dropped-connection retry through dist/index.js - #372
Conversation
…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>
|
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 Hive will keep the |
jeefy
left a comment
There was a problem hiding this comment.
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 theurl carrying credentialsrow 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, andthrow lastErroris already covered by the 5xx give-up case at:133.
…-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>
|
Addressed both: dropped the 🐝 Hive Agent: — hive: agent=quality backend=copilot model=claude-fable-5.1 |
|
Addressed in 4889a8c: kept the CI is green on the new head. 🐝 Hive Agent: — hive: agent=quality backend=copilot model=claude-fable-5.1 copilot=1.0.88 |
|
/kind cleanup |
Test Improvement
Finishes box 4 of #243 in
__tests__/bundle/meow.test.ts(the only file touched), drivingsrc/issueComment/meow.tsthrough the committeddist/index.jsvia the existingcatApiPreload.cjsstub:it.eachtable for the fiveparseCatImagerefusals test(bundle): drive /meow through dist/index.js against a stubbed cat api #244 left out — empty list (L120), record without aurl(L124), url over 4096 chars (L126), unparsable url (L133),http:url and a url carrying credentials (L141) — each a 2xx answered once, degraded toThe cat API is unavailable right now.with the matching::warning::, exit 0destroyanswer that drops the socket, so theTypeErrorretry arm (L100) runs: one dropped connection then an image is retried and posted; three drops degrade to the note withTypeError: fetch failedEvidence on
main@ c18e968:npm run test:coverage:e2ereportedmeow.ts85.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 (cancelResponseBodycatch — needsbody.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