Skip to content

fix(ci): resolve checks-node-test regressions on main#63995

Closed
corbin-breton wants to merge 2 commits intoopenclaw:mainfrom
corbin-breton:fix/ci-node-test-regressions
Closed

fix(ci): resolve checks-node-test regressions on main#63995
corbin-breton wants to merge 2 commits intoopenclaw:mainfrom
corbin-breton:fix/ci-node-test-regressions

Conversation

@corbin-breton
Copy link
Copy Markdown

@corbin-breton corbin-breton commented Apr 10, 2026

Summary

Three test failures have been breaking checks-node-test on every CI run on main:

  • temp-path-guard: extensions/qa-lab/src/multipass.runtime.ts createVmSuffix() used Math.random() + Date.now() on the same line, triggering the weak-randomness guardrail. Replaced with crypto.randomBytes().
  • delivery-context: The Telegram test in src/utils/delivery-context.test.ts expected the generic channel: prefix for delivery targets, but the bundled Telegram plugin provides resolveDeliveryTarget which returns the raw chatId. Updated the test expectation to match the actual bundled plugin behavior.
  • pi-embedded-helpers mock: run.overflow-compaction.harness.ts listed mock exports explicitly but missed the recently added sanitizeUserFacingText. Spread importActual so new exports are always included.

Test plan

  • checks-node-test passes (temp-path-guard, delivery-context, usage-reporting, incomplete-turn)
  • No regressions in other CI checks

🤖 Generated with Claude Code

Two test failures have been breaking CI on main:

1. temp-path-guard: extensions/qa-lab/src/multipass.runtime.ts used
   Math.random() + Date.now() on the same line, triggering the weak
   randomness guardrail. Replace with crypto.randomBytes().

2. delivery-context: the Telegram test expected the generic "channel:"
   prefix for delivery targets, but the bundled Telegram plugin provides
   resolveDeliveryTarget which returns the raw chatId. Update the test
   expectation to match the actual bundled plugin behavior.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented Apr 10, 2026

Greptile Summary

This PR fixes two CI regressions on main: replacing Math.random() with crypto.randomBytes() in multipass.runtime.ts to satisfy the weak-randomness guardrail, and updating a Telegram test expectation in delivery-context.test.ts to match the actual bundled plugin behavior (getChannelPlugin falls back to getBundledChannelPlugin, so the Telegram plugin's resolveTelegramDeliveryTarget is always reached and returns the raw chatId rather than the generic channel: prefix).

Confidence Score: 5/5

Safe to merge — both changes are minimal, correct, and directly verified against the actual runtime code paths.

The randomBytes(4) replacement is a straightforward fix. The test expectation update is confirmed correct by tracing getChannelPlugingetBundledChannelPluginresolveTelegramDeliveryTargetparseTelegramTopicConversation, which with inputs conversationId: "42" and parentConversationId: "-10099" deterministically returns { to: "-10099", threadId: "42" }. No P0/P1 findings.

No files require special attention.

Reviews (1): Last reviewed commit: "fix(ci): resolve checks-node-test regres..." | Re-trigger Greptile

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: ebf1b52284

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".


function createVmSuffix() {
return `${Date.now().toString(36)}-${Math.random().toString(36).slice(2, 8)}`;
return `${Date.now().toString(36)}-${randomBytes(4).toString("hex")}`;
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Keep VM suffix deterministic under test hooks

Using randomBytes(4) here makes createVmSuffix() nondeterministic even when tests stub Date.now() and Math.random(). In extensions/qa-lab/src/multipass.runtime.test.ts, the missing-multipass test computes expectedVmName via a separate createQaMultipassPlan() call and then filters temp directories by that prefix; after this change those two plan calls can produce different VM names, so leaked transfer dirs may no longer be detected and the test can pass falsely. Please add a controllable seam (or mock randomBytes) so test-time VM name generation stays stable.

Useful? React with 👍 / 👎.

The test harness mock for pi-embedded-helpers.js listed exports
explicitly but missed the recently added sanitizeUserFacingText.
Spread importActual so new exports are always included.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@openclaw-barnacle openclaw-barnacle Bot added the agents Agent runtime and tooling label Apr 10, 2026
@corbin-breton
Copy link
Copy Markdown
Author

Closing - all fixes have been merged into main via #63917 and subsequent commits. No remaining diff.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant