Repository navigation
fix: Windows Gateway notification survives npm readback lag - #192579
chelsealong wants to merge 1 commit into
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs maintainer review before merge. What this changesRetry exact-version npm 404 responses within a shared three-minute deadline before notifying Windows monitoring. Example: npm initially returns 404 for [email protected], then returns matching package metadata.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review Keep open: this PR repairs a current release-tooling failure, clears the previous proof request, and has no actionable findings. Priority: P2 Before mergeNone. FindingsNone. Agent review detailsHow this fits togetherThe optional release notification job consumes recorded package identities, verifies exact npm metadata, and sends publication events to Windows monitoring. flowchart LR
A[Published package identities] --> B[Optional notification job]
B --> C[Bounded npm readback]
C --> D[Identity and integrity verification]
D --> E[Single Windows dispatch]
C --> F[Recorded failure on exhaustion]
Technical reviewBest possible solution: Keep bounded registry-visibility recovery in the existing sender while preserving exact verification and single-attempt dispatch. Do we have a high-confidence way to reproduce the issue? Current-main source deterministically rejects an initial exact-version 404, matching the maintainer's reported incident; no target code was executed during this read-only review. Is this the best way to solve the issue? The smallest complete fix is bounded polling at the existing readback owner; the two added regressions protect recovery and shared-budget exhaustion without introducing another owner or retrying external effects. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 15e38612b4be. Provenance checked
TestingProof path: shipped entry point. SecurityNone. EvidenceWhat I checked:
PR surfaceTests +45, Other +24. Total +69 across 3 files. Added test files: 0. View PR surface stats
Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. LabelsLabel changes: No label changes. Label justifications:
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment HistoryReview history (1 earlier review cycle)
Reviewed November 4, 2026, 1:33 AM ET / 06:33 UTC (Revision 2). |
|
I added production-CLI transport evidence to the PR description. A loopback HTTPS proxy returned one registry 404 followed by matching metadata: the sender made two registry reads, one dispatch POST, and exited successfully. With persistent 404s, it waited the full three-minute deadline, made nine registry reads, sent no dispatch, and exited with the expected error. The focused suite passed 16/16. No live npm replication or GitHub dispatch was exercised. @clawsweeper re-review |
|
🦞👀 Re-review progress:
|
Closes #192565
What Problem This Solves
A newly published npm version can briefly return 404, causing the Windows Gateway notification to fail and require a manual rerun.
User Impact
Release operators can expect the notification to wait for npm replication during a brief delay.
Why This Change Was Made
Retry exact-version 404 readbacks with bounded backoff and one shared three-minute deadline within the job’s five-minute limit. Exact identity and integrity checks remain required, and dispatch is attempted only once. A 45-line test allocation covers the new regressions.
Evidence
The new 404-then-valid-metadata regression failed on the base and passes with the fix. The deadline test confirms that expiry sends no dispatch. Existing tests for integrity mismatch and ambiguous dispatch also pass. Focused suites previously passed 16/16, 41/41, and 78/78; targeted lint, typecheck, format, test-line ratchet, and diff checks passed.
I ran the unchanged production CLI (
node scripts/gateway-publication-notify.mjs notify) with Node 24.22.1’s real HTTPS client through a task-local TLS CONNECT proxy. The proxy served synthetic responses for the exact npm registry and GitHub dispatch endpoints; it checked the POST payload and authorization header without exposing the synthetic token. No requests went to those external services.[email protected]: accepted by GitHub; downstream validation is not awaited(the 204 response came from the local proxy).Exact registry readback returned HTTP 404 for [email protected].The CLI also reported that published npm versions remain unchanged and nightly reconciliation remains active.After this transport check,
pnpm test test/scripts/gateway-publication-notify.test.ts --maxWorkers=1passed 16/16;git diff --checkpassed. No live npm replication event or actual GitHub dispatch was exercised.AI disclosure: generated and automatically reviewed with Codex.