Skip to content

fix: restore postpublish verifier typecheck#109812

Closed
steipete wants to merge 1 commit into
mainfrom
fix/script-error-format-types
Closed

fix: restore postpublish verifier typecheck#109812
steipete wants to merge 1 commit into
mainfrom
fix/script-error-format-types

Conversation

@steipete

Copy link
Copy Markdown
Contributor

What Problem This Solves

Fixes an issue where the scripts typecheck fails after the npm postpublish verifier moved to the isolated error-format.mjs helper. TypeScript cannot infer that JavaScript module's exported signature without its matching declaration.

Why This Change Was Made

Adds the standard adjacent .d.mts declaration for the existing helper. This preserves the release-tooling isolation introduced by 8858944a81c5 without routing the verifier back through production source.

User Impact

No product behavior changes. Maintainer CI and postpublish-verifier validation can pass the scripts typecheck again.

Evidence

AI-assisted maintainer fix. I reviewed and understand the change.

@openclaw-barnacle openclaw-barnacle Bot added scripts Repository scripts size: XS maintainer Maintainer-authored PR labels Jul 17, 2026
@steipete
steipete force-pushed the fix/script-error-format-types branch from 403c633 to dadebb5 Compare July 17, 2026 08:27
@clawsweeper clawsweeper Bot added rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. labels Jul 17, 2026
@clawsweeper

clawsweeper Bot commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs real behavior proof before merge. Reviewed July 17, 2026, 4:32 AM ET / 08:32 UTC.

Summary
Adds the adjacent TypeScript declaration for the isolated scripts/lib/error-format.mjs helper.

PR surface: Other +1. Total +1 across 1 file.

Reproducibility: yes. from source and validation evidence: current main imports the isolated JavaScript helper without a declaration, while the changed scripts gate passes after adding the matching signature.

Review metrics: none identified.

Merge readiness
Overall: 🦞 diamond lobster
Proof: 🦞 diamond lobster
Patch quality: 🦞 diamond lobster
Result: ready for maintainer review.

Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch.

Next step before merge

  • [P1] No repair lane is needed; the submitted patch is correct and only awaits normal protected-label maintainer handling and required checks.

Security
Cleared: The declaration adds no runtime execution, dependency, permission, secret, workflow, or supply-chain behavior.

Review details

Best possible solution:

Keep the postpublish verifier isolated from production source and land the adjacent declaration after the remaining required checks finish.

Do we have a high-confidence way to reproduce the issue?

Yes from source and validation evidence: current main imports the isolated JavaScript helper without a declaration, while the changed scripts gate passes after adding the matching signature.

Is this the best way to solve the issue?

Yes. An adjacent declaration is the narrowest maintainable fix because it restores static typing without undoing the deliberate release-tooling isolation.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 92e5a10f1a95.

Label changes

Label changes:

  • add P3: This is a low-risk maintainer-tooling typecheck repair with no product runtime behavior change.
  • add rating: 🦞 diamond lobster: Overall readiness is 🦞 diamond lobster; proof is 🦞 diamond lobster and patch quality is 🦞 diamond lobster.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: The external-contributor proof gate does not apply because repository documentation identifies the author as an official maintainer; the PR still supplies focused Testbox and test output.

Label justifications:

  • P3: This is a low-risk maintainer-tooling typecheck repair with no product runtime behavior change.
  • rating: 🦞 diamond lobster: Overall readiness is 🦞 diamond lobster; proof is 🦞 diamond lobster and patch quality is 🦞 diamond lobster.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: The external-contributor proof gate does not apply because repository documentation identifies the author as an official maintainer; the PR still supplies focused Testbox and test output.
Evidence reviewed

PR surface:

Other +1. Total +1 across 1 file.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 0 0 0 0
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 1 1 0 +1
Total 1 1 0 +1

What I checked:

  • Declaration matches the helper contract: The branch declares formatErrorMessage(error: unknown): string, matching the existing helper usage without changing runtime behavior. (scripts/lib/error-format.d.mts:1, dadebb5d62c5)
  • Current-main regression boundary: Current main contains the isolated JavaScript error formatter but lacks its adjacent declaration, leaving the TypeScript scripts lane without an exported signature. (scripts/lib/error-format.mjs, 92e5a10f1a95)
  • Isolation provenance: The PR identifies commit 8858944 as the change that moved the postpublish verifier onto the isolated script helper; the declaration preserves that owner boundary rather than reconnecting release tooling to production source. (scripts/openclaw-npm-postpublish-verify.mjs, 8858944a81c5)
  • Focused verification: The PR reports 40 passing postpublish-verifier tests, a successful changed-surface Testbox scripts/tooling gate, and a clean diff check. (test/openclaw-npm-postpublish-verify.test.ts, dadebb5d62c5)
  • Repository ownership signal: The repository contributor documentation identifies steipete as an official project maintainer, so the maintainer proof exception applies despite the compact GitHub association value. (github.com) (CONTRIBUTING.md, 92e5a10f1a95)

Likely related people:

  • steipete: The isolation provenance and this repair both trace to their work, and repository documentation identifies them as the project lead. (role: feature owner and release-tooling contributor; confidence: high; commits: 8858944a81c5, dadebb5d62c5; files: scripts/openclaw-npm-postpublish-verify.mjs, scripts/lib/error-format.mjs, scripts/lib/error-format.d.mts)
What the crustacean ranks mean
  • 🦀 challenger crab: rare, exceptional readiness with strong proof, clean implementation, and convincing validation.
  • 🦞 diamond lobster: very strong readiness with only minor maintainer review expected.
  • 🐚 platinum hermit: good normal PR, likely mergeable with ordinary maintainer review.
  • 🦐 gold shrimp: useful signal, but proof or patch confidence is still limited.
  • 🦪 silver shellfish: thin signal; proof, validation, or implementation needs work.
  • 🧂 unranked krab: not merge-ready because proof is missing/unusable or there are serious correctness or safety concerns.
  • 🌊 off-meta tidepool: rating does not apply to this item.

Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

How this review workflow works
  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

@steipete

Copy link
Copy Markdown
Contributor Author

Superseded while this was in the merge gate: f656d96fc3e6 landed the same declaration on main, including the matching documentation comment. Closing this duplicate; the exact scripts typecheck repair is now canonical.

@steipete steipete closed this Jul 17, 2026
@steipete
steipete deleted the fix/script-error-format-types branch July 17, 2026 08:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

maintainer Maintainer-authored PR P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. scripts Repository scripts size: XS 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.

1 participant