Repository navigation
test(bundle): drive tide's verdict arms (unknown-retry exhaustion, moved head, 405/409 refusals, merged/closed/locked, check_suite guards, once-per-run) through dist/index.js - #347
Conversation
Adds __tests__/bundle/tideVerdictArms.test.ts: a mergeability still unknown after every retry, a head that moves while it is computed, a merge refused with 405 (merged concurrently) or 409 (base/head moved), a refused merge whose re-read fails too, pull requests GitHub reports as merged, closed or locked, tideOnComment on a closed pull request, tideOnCheckSuite without a head sha and with nothing to evaluate, and the once-per-run skip when the sweep and lgtm jobs share a pull request. src/plugins/tide.ts e2e lines: 158/195 -> 173/195 under npm run test:coverage:e2e. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> 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.
All 13 cases add coverage.
tideVerdictArms.test.ts:159–162: usetoHaveLength(2)plus fragments (merge exploded,could not merge pull request(s) #1) instead of comparing both::error::lines withtoEqual.- Not blocking: the L77 case spends about 7.3s waiting through real 1s+2s+4s retries, which makes this the slowest bundle file. If there's a way to shorten the backoff for tests, use it.
Signed-off-by: quality <quality@hive.kubestellar.io>
|
Addressed: the two 🐝 Hive Agent: — hive: agent=quality backend=copilot model=claude-fable-5.1 |
|
Addressed in 3acb2a0: CI is green on the new head. 🐝 Hive Agent: — hive: agent=quality backend=copilot model=claude-fable-5.1 copilot=1.0.88 |
jeefy
left a comment
There was a problem hiding this comment.
The error lines are now fragments. On current main one row adds nothing:
tideVerdictArms.test.ts:61: drop the['closed', …]row, and remove "closed" from the header comment at :14. #363 merged after the first review, and approveReviewShortCircuits.test.ts:72 now reaches tide.ts:401–402.- Optional: the 7s backoff can be shortened without touching src. meow.test.ts:78 already loads a test-only script into the child process with
NODE_OPTIONS=--require, and a similar script could shorten the 1000/2000/4000mssetTimeoutwaits.
…ackoff with a preload Signed-off-by: quality <quality@hive.kubestellar.io>
|
Addressed in 5235110:
🐝 Hive Agent: — hive: agent=quality backend=copilot model=claude-fable-5.1 copilot=1.0.88 |
|
/kind cleanup |
Test Improvement
Adds
__tests__/bundle/tideVerdictArms.test.ts(13 tests, new file only — no production, harness or config change), drivingsrc/plugins/tide.ts's verdict arms throughdist/index.jsagainst the fake GitHub:fetchMergeability: mergeability stillunknownafter the 1 s / 2 s / 4 s retries →skipping pr #1: not mergeable (unknown)(lines 99, 108–111)head moved during evaluation(208)pr #1 was merged concurrently, exit 0 (219)base branch moved/head moved(223, both regex arms)could not merge pr #1: …, run fails (439)blockedReason: a pull request GitHub reports asalready merged,closed,locked, skipped before its binding or mergeability is read (399, 402, 405)tideOnCommenton a closed pull request after/hold(496–497)tideOnCheckSuitewithout a head sha (520) and naming no pull request with the listing finding none (564–565)evaluateMergeonce:schedulewithjobs: 'sweep lgtm'merges the shared pull request once and the other job skips it asalready evaluated in this run(175)check_suitewithpull_requests: [{ number: 1 }]is the vehicle for the merge-path arms: tide is its only handler, so every recorded request is tide's and the sequences are asserted exactly (including the onePOST /graphqldequeue check a gate skip makes on an event, sincetide.merge_queuedefaults toauto).Measured with
npm run test:coverage:e2eonmain@ 3fc21f2:src/plugins/tide.ts158/195 → 173/195 lines from__tests__/bundlealone.npx vitest run __tests__/bundle/tideVerdictArms.test.tspasses (13/13);npx eslintclean;npm run test:coveragepasses all 1652 tests (the only red is the pre-existing unhandledERR_TLS_CERT_ALTNAME_INVALIDfrom__tests__/issueCommentTest/meow.test.ts, tracked in #294 and fixed by #287).Disjoint from every open
__tests__/bundlePR: these lines stay uncovered with all 33 held bundle PRs (#242–#345) applied together, and the file name is new. It does not use #246'srepoLabelshelper so it does not depend on that PR landing.Related Issue
Closes #346
Filed by quality agent (hold-gated mode). Human review required.
— hive: agent=quality backend=copilot model=claude-fable-5.1