Skip to content

fix: Windows Gateway notification survives npm readback lag - #192579

Closed
chelsealong wants to merge 1 commit into
openclaw:mainfrom
chelsealong:fix/codex-openclaw-192565
Closed

chelsealong wants to merge 1 commit into
openclaw:mainfrom
chelsealong:fix/codex-openclaw-192565

Conversation

@chelsealong

@chelsealong chelsealong commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor

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.

  • Recovery: registry returned 404, then matching name, version, and integrity metadata. Observed 2 registry GETs, 1 valid dispatch POST, CLI exit 0: [email protected]: accepted by GitHub; downstream validation is not awaited (the 204 response came from the local proxy).
  • Deadline exhaustion: registry returned 404 throughout the real 180-second window. Observed 9 registry GETs, 0 dispatch POSTs, CLI exit 1: 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=1 passed 16/16; git diff --check passed. No live npm replication event or actual GitHub dispatch was exercised.

AI disclosure: generated and automatically reviewed with Codex.

@clawsweeper

clawsweeper Bot commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@openclaw-barnacle openclaw-barnacle Bot added scripts Repository scripts size: S labels Nov 4, 2026
@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. P2 Normal backlog priority with limited blast radius. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. and removed clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Nov 4, 2026
@clawsweeper

clawsweeper Bot commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

Retry 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.

  • Before: Notification fails immediately and requires a manual rerun.
  • After: The sender retries, verifies identity and integrity, and attempts one dispatch.

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused, useful repair with production-CLI fault-injection evidence, distinct regressions, green exact-head CI, and no actionable findings.
Proof confidence 🐚 platinum hermit (4/6) Sufficient (live_output): The contributor's recorded CLI output exercises the production sender with Node 24.22.1's real HTTPS client through a local TLS CONNECT proxy, showing 404 recovery followed by one dispatch and deadline exhaustion with none; this resolves the prior rank-up request without claiming live service delivery.
Patch quality 🦞 diamond lobster (5/6) No actionable review findings were identified.

Product

Kind: Bug fix · Worth it: Yes · Fix scope: Complete
User problem: Release operators must manually rerun Windows notification when npm briefly hides a newly published version.
Reason: The maintainer report requests bounded recovery, and this focused repair preserves the original optional-notification contract.

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
Reviewed head: 0fb5a84f1d39092f1e8b16a133262208c1e9c628

Before merge

None.

Findings

None.

Agent review details

How this fits together

The 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]
Loading

Technical review

Best 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

  • Registry readback and optional publication notification keeps the original intent (7d31fe0: Verify each published package's exact identity and integrity before optional notification, preserving publication and avoiding automatic POST retries.)

Testing

Proof path: shipped entry point.

Security

None.

Evidence

What I checked:

PR surface

Tests +45, Other +24. Total +69 across 3 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 1 45 0 +45
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 2 33 9 +24
Total 3 78 9 +69

Root-cause cluster

Relationship: fixed_by_candidate
Canonical: #192565
Summary: Two open PRs address the same one-shot exact-version registry-readback failure using different polling budgets.

Members:

Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything.

Labels

Label changes:

No label changes.

Label justifications:

  • P2: Replication lag creates release-operator recovery work, while npm publication remains complete and nightly reconciliation remains available.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🦞 diamond lobster.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.
  • proof: sufficient: Contributor real behavior proof is sufficient.

Rating scale

6/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.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

History

Review history (1 earlier review cycle)
  • reviewed 2026-11-04T06:14:14.545Z sha 0fb5a84 :: needs real behavior proof before merge. :: none

Reviewed November 4, 2026, 1:33 AM ET / 06:33 UTC (Revision 2).

@chelsealong

Copy link
Copy Markdown
Contributor Author

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

@clawsweeper

clawsweeper Bot commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Nov 4, 2026
@chelsealong chelsealong closed this Nov 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

P2 Normal backlog priority with limited blast radius. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. scripts Repository scripts size: S status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

release: Windows Gateway notification fails on npm replication lag (readback 404)

1 participant