fix(review): skip actuation lock for first draft conversion to prevent double-counting on retry - #4016
Conversation
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
|
Caution 🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥 🛑 Gittensory review result - fixes requiredReview updated: 2026-07-07 11:35:47 UTC
🛑 Suggested Action - Manual Review
Why this is blocked
CI checks failing
Review context
Contributor next steps
Signal definitions
🟩 Safe / merged · 🟦 Advisory · 🟨 Held for review · 🟥 Blocked / closed 💰 Earn for open-source contributions like this. Gittensor lets GitHub contributors earn for the work they already do — register to start earning →. Checked by Gittensory, a quiet PR intelligence layer for OSS maintainers.
|
b3eac5a to
cdeb26c
Compare
❌ 51 Tests Failed:
View the top 3 failed test(s) by shortest run time
View the full list of 48 ❄️ flaky test(s)
To view more test analytics, go to the Test Analytics Dashboard |
cdeb26c to
8c1459a
Compare
Motivation
converted_to_draftdelivery increments the per-PR counter, then fails acquiring the actuation lock and is retried, causing the same delivery to be counted twice and incorrectly treated as a repeated conversion.Description
maybeCloseRepeatedDraftCyclingwhendraftConversionCount < 2so the handler does not claim the per-PR actuation lock for a first-time conversion and therefore cannot be double-counted on retry.test/unit/queue.test.tsto add a regression case proving the first conversion returns before claiming the repeated-cycle lock and to keep coverage for the lock-contention retry on later conversions.src/queue/processors.ts,test/unit/queue.test.ts.Testing
npx vitest run test/unit/queue.test.ts -t "repeated ready<->draft cycling", and the targeted tests passed.git diff --check, lint/migration/schema checks and startednpm run test:coverage) which progressed, but the fullnpm run test:cicoverage run was long-running and was interrupted before completion during this session.npm audit --audit-level=moderatewas attempted but the registry audit endpoint returned403 Forbidden, so the dependency-audit step could not complete here.Codex Task