test(e2e): resolve Slack proof workspace through the real OpenClaw root - #11000
test(e2e): resolve Slack proof workspace through the real OpenClaw root#11000AzeelSajjad wants to merge 3 commits into
Conversation
The Slack installed-runtime proof discovered the OpenClaw package root with path.resolve, so it kept the symlink /usr/local/lib/node_modules/openclaw. createExternalProofRoot then linked hoisted sibling packages from that symlink's parent, which holds only openclaw and mcporter, never the real install root /usr/local/lib/nemoclaw/openclaw-runtime/node_modules. The proof workspace therefore never received fast-uri, hono, minipass, or tar. Only fast-uri surfaced, because only ajv runs at Slack provider start and fast-uri moved out of node_modules/openclaw in NVIDIA#10892. Slack startup failed with Cannot find module 'fast-uri' before provider behavior could be validated. Resolve the discovered OpenClaw root to its real path so the install root's hoisted production dependencies reach the proof workspace. Fold the resolution and linking into the exported SLACK_PROOF_WORKSPACE_SOURCE block so an e2e-support test can exercise it against a synthetic installed tree instead of the source workspace. The committed production closure was already complete: openclaw-locked-install verifies all 307 resolved specs including fast-uri@3.1.6. Fixes NVIDIA#10968 Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015wNtxvpyZWnorTQSSGoL9A Signed-off-by: Azeel Sajjad <aasajjad05@gmail.com>
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: trueComment |
…claw-fast-uri-10968
|
PR Review Advisor finished for commit |
|
Closing because this work merged through #11011. #11011 cherry-picked the signed fix from this PR: Thank you, @AzeelSajjad, for isolating the symlink and dependency-hoisting root cause, documenting it thoroughly, and providing the failing-first regression coverage. That work directly contributed to the merged fix. |
Outcome
The Slack installed-runtime proof now resolves the OpenClaw package root to its real path, so the proof workspace links the OpenClaw install root's hoisted production dependencies. Before, the workspace was built from a symlink parent that held only
openclawandmcporter, sofast-urinever reached it and Slack startup failed withCannot find module 'fast-uri'before any provider behavior could be validated.Reason
Messaging providersfails the Slack case onmain. The published dependency closure is not incomplete:test/agents/openclaw/openclaw-locked-install.test.tsalready verifies all 307 resolved specs includingfast-uri@3.1.6. The failure is a hoisting assumption in the E2E proof workspace.PR #10892 relocated
fast-uriinagents/openclaw/openclaw-runtime/package-lock.json:resolveOpenClawSlackApiLocationselected the OpenClaw root withpath.resolve, keeping the symlink/usr/local/lib/node_modules/openclaw.createExternalProofRootthen linked hoisted siblings frompath.dirnameof that symlink instead of the real install root/usr/local/lib/nemoclaw/openclaw-runtime/node_modules.Seven dependency edges escape the
node_modules/openclaw/subtree in the committed lock:tar,hono(x2),minipass(x2), andfast-uri. The proof workspace linked none of them. Onlyfast-urisurfaced, because onlyajvruns at Slack provider start, and until #10892fast-urisat insidenode_modules/openclawwhere the workspace did link it.tar,hono, andminipasshave been hoisted since #9929 and #8862 with Slack working, which is why the lockfile itself is not the defect.Related issues
Fixes #10968
Relates to #10892
Changes
test/e2e/live/messaging-providers-slack-runtime-proof.ts: resolve the discovered OpenClaw package root throughfs.realpathSync, falling back to the candidate path when the link is missing, socreateExternalProofRootderives the true install root. This repairs all seven hoisted dependencies, not onlyfast-uri.test/e2e/live/messaging-providers-slack-runtime-proof.ts: fold the workspace resolution and linking helpers into the existing exportedString.rawblock and rename itSLACK_PROOF_WORKSPACE_SOURCE. This adds no new mechanism and no new generated probe block; it reuses the extraction pattern the block already used for managed npm project discovery so ane2e-supporttest can exercise the workspace against a built tree.test/e2e/support/messaging-providers-runtime-proofs.test.ts: addlinks hoisted OpenClaw install-root dependencies into the Slack proof workspace, which builds a synthetic installed tree (nestedajv, hoistedfast-urisibling, global symlink, Slack extension with its own peer symlink) and evaluates the workspace source in a child Node process. It asserts on constructed workspace state, not on terminal output, and resolves from an installed tree shape rather than the source workspace.test/e2e/mock-parity.json: addmessaging-providers-slack-runtime-proof.tsto theliveSourcesof themessaging-providers.test.tsentry, as required for a changed live helper.No lockfile, Dockerfile, or assertion-budget change. A package-scoped override was evaluated as a way to keep
fast-urinested and rejected: it resolves tofast-uri@3.1.2, a version without the GHSA-5jgf-p345-68v8, GHSA-f65p-4m7j-42xc, GHSA-fph4-wmhf-6fwf, and GHSA-jqff-g426-hqxp patches.Verification
Selected and run by
nemoclaw-contributor-implement-issue:npx vitest run --project e2e-support test/e2e/support/messaging-providers-runtime-proofs.test.ts— 43 passedAssertionError: expected [ '@openclaw', 'ajv', ...(2) ] to include 'fast-uri'— 1 failed, 42 passednpx vitest run --project integration test/agents/openclaw/openclaw-locked-install.test.ts— 14 passed, confirming the published closure already containsfast-uri@3.1.6across 307 resolved specsnpx vitest run --project integration test/automation/pull-requests/growth-guardrails.test.ts— 39 passednpx vitest run test/automation/e2e/e2e-mock-parity.test.ts— 15 passednpm run e2e:assertions:check— passed, 1975 direct expect calls across 86 test files, budget unchangednpm run test:projects:check— exact, 2574 candidate files across 7 projectsnpm run checks:repository— all checks passednpm run validate:pr— passed against base41f54637b317487397c5aa2dd47f7ff2271ad58a, includingpre-commit,commitlint, andpre-pushTypeScript (CLI)Live
Messaging providersE2E is maintainer-dispatched and has not been run for this candidate.The diff contains no secrets, API keys, or credentials;
gitleakspassed.Review notes
Issue #10968 carries
needs: triagewith no recordedAccept. This is a regression fix to existing test infrastructure with no new product surface, so it is submitted under the low-risk-fix carve-out of the product scope gate. A maintainer may want that decision recorded before merge.Separate from this change:
scripts/find-source-shape-tests.mts:90listsworktreesinSKIP_DIRS, but matches relative to the repository root, so it skips a top-levelworktrees/and not.claude/worktrees/. That is not touched here.I have
READpermission on this repository, so a maintainer must assign the PR.Signed-off-by: Azeel Sajjad aasajjad05@gmail.com