Repository navigation
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Enterprise Run ID: 📒 Files selected for processing (7)
🚧 Files skipped from review as they are similar to previous changes (5)
📝 WalkthroughWalkthroughOpenClaw Teams now registers a post-agent-install hook that patches the installed runtime mention parser. The build applier invokes that hook side effect, and tests cover the source rewrite, idempotency, and install-time execution. ChangesOpenClaw MS Teams mention patching
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes Suggested labels
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 3
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@src/lib/messaging/applier/build/messaging-build-applier.mts`:
- Line 621: The raw AAD mention regex in messaging-build-applier.mts is too
permissive and can match ordinary email-like text inside messages; update the
displayNameAadMentionPattern matching and its replacement logic so the generated
`@Name` (uuid) form only anchors at a message boundary such as start-of-string or
whitespace, and preserve that leading separator when rebuilding the text. Check
both occurrences of this pattern in the applier code so the rewrite only
converts real mentions and does not touch inline @ characters in normal text.
In `@test/messaging-build-applier.test.ts`:
- Around line 74-92: The current test is self-fulfilling because
writeAlreadyPatchedMSTeamsRuntime() seeds the Teams runtime with the
normalization marker before the patch step, so the assertion in the messaging
build applier test only verifies that the marker remains present. Update the
fixture to create an unpatched runtime shape for the probe.js file, then
exercise the install/patch flow and assert that the marker is added afterward,
or compare the file contents before and after. Use
writeAlreadyPatchedMSTeamsRuntime, probe.js, and the messaging build applier
test block that checks for the marker to locate and adjust the test.
In `@test/openclaw-msteams-mention-patch.test.ts`:
- Around line 103-113: The temp probe created in the openclaw-msteams-mention
patch test is being imported as ESM but is still named and placed so Node treats
it as CommonJS, causing the dynamic import to fail before the assertions. Update
the test setup around patchInstalledOpenClawMSTeamsMentions and the
runtimeFile/probe fixture creation to ensure the temp directory is recognized as
ESM, either by writing a local package.json with type module or by renaming the
probe file to .mjs, so the import of the probe module succeeds.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Enterprise
Run ID: 2ad3c364-4d8c-462c-bd10-1cd6bde29ec9
📒 Files selected for processing (3)
src/lib/messaging/applier/build/messaging-build-applier.mtstest/messaging-build-applier.test.tstest/openclaw-msteams-mention-patch.test.ts
| const replacement = [ | ||
| "function parseMentions(text) {", | ||
| "\tconst mentionPattern = /@\\[([^\\]]+)\\]\\(([^)]+)\\)/g;", | ||
| "\tconst displayNameAadMentionPattern = /@[\\s\\r\\n]*([^()\\r\\n@][^()\\r\\n]{0,80}?)\\s*\\(([a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12})\\)/gi;", |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟠 Major | ⚡ Quick win
Anchor raw AAD mention matching to a message boundary.
The new regex can rewrite any @ inside ordinary text, e.g. foo@San Dang (${id}), into a Teams mention and ping. Require start/whitespace before the generated @Name (uuid) form and preserve that prefix in the replacement.
Suggested fix
- "\tconst displayNameAadMentionPattern = /@[\\s\\r\\n]*([^()\\r\\n@][^()\\r\\n]{0,80}?)\\s*\\(([a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12})\\)/gi;",
+ "\tconst displayNameAadMentionPattern = /(^|\\s)@[\\s\\r\\n]*([^()\\r\\n@][^()\\r\\n]{0,80}?)\\s*\\(([a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12})\\)/gi;",
...
- "\t\ttext: explicitMentionText.replace(displayNameAadMentionPattern, (match, name, id) => appendMention(name, id) ?? match),",
+ "\t\ttext: explicitMentionText.replace(displayNameAadMentionPattern, (match, prefix, name, id) => {",
+ "\t\t\tconst mentionTag = appendMention(name, id);",
+ "\t\t\treturn mentionTag ? `${prefix}${mentionTag}` : match;",
+ "\t\t}),",Also applies to: 641-641
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@src/lib/messaging/applier/build/messaging-build-applier.mts` at line 621, The
raw AAD mention regex in messaging-build-applier.mts is too permissive and can
match ordinary email-like text inside messages; update the
displayNameAadMentionPattern matching and its replacement logic so the generated
`@Name` (uuid) form only anchors at a message boundary such as start-of-string or
whitespace, and preserve that leading separator when rebuilding the text. Check
both occurrences of this pattern in the applier code so the rewrite only
converts real mentions and does not touch inline @ characters in normal text.
There was a problem hiding this comment.
Thanks @deepujain for your quick contribution. There are few concerns
- San Dang seems doesn't work for teams. I've been testing with this bug. It seems to be an agent issue. The correct format should be "@[San Dang] (205f29da-231e-4a0e-a0b2-b398e6302087) ping"
- You should follow manifest & hooks style. Put patch of Teams in src/lib/messaging/channels/teams
|
✨ Thanks for the proposed fix patching the Related open issues: |
|
Moved the Teams mention patch into the Teams channel hook path and tightened it to the explicit @[Name] (AAD object id) form. The post-install test now starts from an unpatched runtime, and the parser test confirms loose email-like text is left alone. Validation: npm run build:cli; npm run typecheck:cli; npm run lint; focused Vitest for the Teams mention patch, manifest, and build applier. |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@src/lib/messaging/channels/teams/hooks/msteams-mention-patch.ts`:
- Around line 29-71: The exact-string match in
patchMSTeamsMentionEntitiesInSource is too brittle and treats a future upstream
parser change as a failure. Update the logic around the original block match so
it can recognize the already-fixed spaced-mention parseMentions shape (for
example by detecting a spaced mention regex in the source) and return status
"already-applied" instead of "no-match" when the upstream Teams parser has
already adopted the change. Keep the existing error path for truly unrecognized
shapes, but make patchInstalledOpenClawMSTeamsMentions degrade gracefully when
the patch is no longer needed.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Enterprise
Run ID: 02a43ecc-ebb4-4ba7-8b90-4e7aab8a6b24
📒 Files selected for processing (7)
src/lib/messaging/applier/build/messaging-build-applier.mtssrc/lib/messaging/channels/manifests.test.tssrc/lib/messaging/channels/teams/hooks/index.tssrc/lib/messaging/channels/teams/hooks/msteams-mention-patch.tssrc/lib/messaging/channels/teams/manifest.tstest/messaging-build-applier.test.tstest/openclaw-msteams-mention-patch.test.ts
🚧 Files skipped from review as they are similar to previous changes (1)
- src/lib/messaging/applier/build/messaging-build-applier.mts
Fixes NVIDIA#5852 Signed-off-by: Deepak Jain <[email protected]>
Signed-off-by: Deepak Jain <[email protected]>
503f430 to
85f9380
Compare
|
Rebased this branch and handled the latest parser-shape note. The hook now treats an upstream msteams parser that already accepts spaced Teams mentions as already applied, while still failing closed for unknown shapes. Validation: npm run build:cli; npm run lint; focused Vitest for the Teams mention patch, manifest, and build applier. |
|
Thanks for putting this together. I am going to close this in favor of #5956 because the regex patch here only covers the @[Name] (id) spacing variant, while the failure we traced is that the bot can emit plain or multiline text that the Teams extension cannot convert into a Teams mention entity. #5956 keeps the parser unchanged and installs a Teams-owned msteams skill during NemoClaw Teams setup, so OpenClaw is prompted to use the supported @Display Name syntax from the start. That gives us a narrower NemoClaw change with setup, manifest, and build coverage. Appreciate the investigation here; it helped identify the right layer for the fix. |
<!-- markdownlint-disable MD041 --> ## Summary This PR installs a Microsoft Teams-specific OpenClaw runtime preload that keeps native Teams mention syntax next to OpenClaw's `message` tool hints. The preload patches the pinned `@openclaw/msteams` prompt export at its exact package entry while preserving Teams startup if the upstream export changes or is immutable. This supersedes #5864 because the issue is not a parser-spacing variant in NemoClaw. OpenClaw's Teams send path already parses the supported syntax into Teams mention entities; NemoClaw's failure mode is that the bot was often not prompted to use that syntax. ## Related Issue Replaces #5864. Fixes #5852 ## Changes - Add a Teams OpenClaw `msteams-message-hints` runtime preload installed for `boot` and `connect` through the messaging runtime-preload machinery. - Restrict the CommonJS hook to the reviewed `@openclaw/msteams/dist/channel-plugin-api.js` boundary; plugin-shaped child dependencies and unrelated `msteams` paths remain untouched. - Restore the global load hook in `finally` after the exact entry attempt, whether patching succeeds, fails, or the module throws. - Fail open with one bounded static warning when the plugin export cannot be patched; never include upstream error text or make prompt guidance take Teams down. - Recognize the pinned `openclaw.mjs gateway` launcher shape without activating for arbitrary Node children whose third argument is `gateway`. - Cover CommonJS and native `require(esm)` entry loads, the real `dist/index.js` to `channel-plugin-api.js` flow, child-module isolation, idempotency, immutable exports, warning behavior, hook restoration, launcher gating, and unrelated ESM linking. - Remove the local regex reimplementation that previously overstated production Teams sender coverage. - Add a compiled package-contract regression that models the reviewed 2026.5.27 `runtimeExtensions` → OpenClaw `createRequire` → ESM `channel-plugin-api.js` load seam, binds it to the repository OpenClaw pin, records the manually reviewed package-load shape, and asserts the mention contract/order plus hook restoration without vendoring the upstream parser. ## Source Boundary The pinned OpenClaw 2026.5.27 package loads its Teams plugin through `dist/channel-plugin-api.js`, where `msteamsPlugin.agentPrompt.messageToolHints` is exported. NemoClaw changes only that prompt function. It does not fork or modify the Bot Framework sender or mention parser. The manifest keeps the preload asset `optional: false`: a missing or mispackaged compiled file is a NemoClaw build/setup failure. After that asset loads, an upstream export-shape mismatch or immutable plugin is intentionally fail-open so Teams preserves upstream behavior, emits one bounded static warning, and starts without the additional prompt hint. A repository test cannot honestly claim real Teams delivery or Bot Framework mention conversion without a provisioned Teams app, tenant, webhook, and live message. Vendoring third-party package code as a fixture would also create false production proof. The focused tests therefore lock the reviewed package export/lifecycle boundary, while live `channels-stop-start` and `messaging-providers` runs validate adjacent runtime installation and lifecycle. Actual mention conversion remains the pinned upstream package's contract; revalidate this preload whenever the OpenClaw pin changes, and remove it once upstream ships equivalent prompt guidance. Sequencing note: #5595 upgrades the OpenClaw pin and overlaps the Teams manifest/compiler surface. If #5595 lands first or this PR is rebased across it, revalidate this package boundary and keep or remove the shim based on the new pinned package; do not assume the 2026.5.27 contract remains unchanged. ## Release Decision For v0.0.71, this PR is release-deferred. Both required exact-head advisor verdicts remain blocking (`merge_after_fixes` and `needs_rework`), and live Teams Bot Framework delivery proof is unavailable. Maintainers are not overriding either gate; do not merge this PR for v0.0.71. The residual evidence gap is that repository tests cannot prove a Teams UI mention chip or user notification without a provisioned Teams tenant, app, and webhook. This PR changes only always-visible prompt guidance; it does not modify or claim automated proof of the Bot Framework sender/parser. The pinned 2026.5.27 npm package and OpenClaw loader seam were manually reviewed. Hermetic CI enforces the repository pin, reviewed package-load shape, hint contract, and loader restoration, but that evidence does not satisfy the required delivery-proof gate. If production mentions still render raw IDs, the source fix belongs in the upstream Teams send path. ## Type of Change - [x] Code change (feature, bug fix, or refactor) - [ ] Code change with doc updates - [ ] Doc only (prose changes, no code sample modifications) - [ ] Doc only (includes code sample changes) ## Quality Gates <!-- Check all that apply. For any "covered by existing tests", "not applicable", or waiver entry, add a brief justification on the same line or in the Changes section. --> - [x] Tests added or updated for changed behavior - [ ] Existing tests cover changed behavior — justification: - [ ] Tests not applicable — justification: - [ ] Docs updated for user-facing behavior changes - [x] Docs not applicable — justification: this restores expected Teams-native mention prompting automatically and adds no user action, command, configuration, environment variable, or support boundary. - [x] Sensitive paths changed (security, policy, credentials, preflight, onboarding, inference, runner, sandbox, or messaging) - [x] Sensitive-path review completed or maintainer-approved waiver recorded — reviewer/approval link/justification: exact entry scoping, fail-open warning, lifecycle restoration, child-module isolation, and launcher gating were manually audited and regression-tested. - [ ] Non-success, skipped, or missing CI check accepted by maintainer — check name, approval link, and follow-up issue: ## Verification <!-- Check each item you ran and confirmed. Leave unchecked items you skipped. Doc-only changes do not require npm test unless you ran it. --> - [x] PR description includes the DCO sign-off declaration and every commit appears as `Verified` in GitHub - [x] Git hooks passed during commit and push - [x] Targeted tests pass for changed behavior — 47/47 across compiled package-contract, preload, channel-manifest, and compiler tests - [ ] Full `npm test` passes (broad runtime changes only) - [x] Quality Gates section completed with required justifications or waivers - [x] No secrets, API keys, or credentials committed - [ ] `npm run docs` builds without warnings (doc changes only) - [ ] Doc pages follow the style guide (doc changes only) - [ ] New doc pages include SPDX header and frontmatter (new pages only) Exact-head live evidence (head `e120c86d`): - `channels-stop-start` (OpenClaw + Hermes): https://github.com/NVIDIA/NemoClaw/actions/runs/28428153446 — passed Pre-follow-up live evidence (head `8149bce`): - `channels-stop-start`: https://github.com/NVIDIA/NemoClaw/actions/runs/28425570138 - `messaging-providers`: https://github.com/NVIDIA/NemoClaw/actions/runs/28425986489 --- <!-- DCO sign-off is required in this PR description, and every commit must appear as Verified in GitHub. --> Signed-off-by: San Dang <[email protected]> <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Improved Microsoft Teams message tool hints to consistently include native mention guidance. * Added automatic preloading of the Teams hint patch for both initial startup and reconnect phases. * **Bug Fixes** * Ensures the mention hint is injected only once and positioned before the first targeting-related hint. * Applies best-effort patching that won’t break unrelated module loading. * **Tests** * Expanded unit/contract coverage to verify CommonJS/ESM compatibility, idempotency, correct hint ordering, and safe loader behavior. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Signed-off-by: San Dang <[email protected]> Signed-off-by: Carlos Villela <[email protected]> Co-authored-by: Carlos Villela <[email protected]>
<!-- markdownlint-disable MD041 --> ## Summary This PR installs a Microsoft Teams-specific OpenClaw runtime preload that keeps native Teams mention syntax next to OpenClaw's `message` tool hints. The preload patches the pinned `@openclaw/msteams` prompt export at its exact package entry while preserving Teams startup if the upstream export changes or is immutable. This supersedes NVIDIA#5864 because the issue is not a parser-spacing variant in NemoClaw. OpenClaw's Teams send path already parses the supported syntax into Teams mention entities; NemoClaw's failure mode is that the bot was often not prompted to use that syntax. ## Related Issue Replaces NVIDIA#5864. Fixes NVIDIA#5852 ## Changes - Add a Teams OpenClaw `msteams-message-hints` runtime preload installed for `boot` and `connect` through the messaging runtime-preload machinery. - Restrict the CommonJS hook to the reviewed `@openclaw/msteams/dist/channel-plugin-api.js` boundary; plugin-shaped child dependencies and unrelated `msteams` paths remain untouched. - Restore the global load hook in `finally` after the exact entry attempt, whether patching succeeds, fails, or the module throws. - Fail open with one bounded static warning when the plugin export cannot be patched; never include upstream error text or make prompt guidance take Teams down. - Recognize the pinned `openclaw.mjs gateway` launcher shape without activating for arbitrary Node children whose third argument is `gateway`. - Cover CommonJS and native `require(esm)` entry loads, the real `dist/index.js` to `channel-plugin-api.js` flow, child-module isolation, idempotency, immutable exports, warning behavior, hook restoration, launcher gating, and unrelated ESM linking. - Remove the local regex reimplementation that previously overstated production Teams sender coverage. - Add a compiled package-contract regression that models the reviewed 2026.5.27 `runtimeExtensions` → OpenClaw `createRequire` → ESM `channel-plugin-api.js` load seam, binds it to the repository OpenClaw pin, records the manually reviewed package-load shape, and asserts the mention contract/order plus hook restoration without vendoring the upstream parser. ## Source Boundary The pinned OpenClaw 2026.5.27 package loads its Teams plugin through `dist/channel-plugin-api.js`, where `msteamsPlugin.agentPrompt.messageToolHints` is exported. NemoClaw changes only that prompt function. It does not fork or modify the Bot Framework sender or mention parser. The manifest keeps the preload asset `optional: false`: a missing or mispackaged compiled file is a NemoClaw build/setup failure. After that asset loads, an upstream export-shape mismatch or immutable plugin is intentionally fail-open so Teams preserves upstream behavior, emits one bounded static warning, and starts without the additional prompt hint. A repository test cannot honestly claim real Teams delivery or Bot Framework mention conversion without a provisioned Teams app, tenant, webhook, and live message. Vendoring third-party package code as a fixture would also create false production proof. The focused tests therefore lock the reviewed package export/lifecycle boundary, while live `channels-stop-start` and `messaging-providers` runs validate adjacent runtime installation and lifecycle. Actual mention conversion remains the pinned upstream package's contract; revalidate this preload whenever the OpenClaw pin changes, and remove it once upstream ships equivalent prompt guidance. Sequencing note: NVIDIA#5595 upgrades the OpenClaw pin and overlaps the Teams manifest/compiler surface. If NVIDIA#5595 lands first or this PR is rebased across it, revalidate this package boundary and keep or remove the shim based on the new pinned package; do not assume the 2026.5.27 contract remains unchanged. ## Release Decision For v0.0.71, this PR is release-deferred. Both required exact-head advisor verdicts remain blocking (`merge_after_fixes` and `needs_rework`), and live Teams Bot Framework delivery proof is unavailable. Maintainers are not overriding either gate; do not merge this PR for v0.0.71. The residual evidence gap is that repository tests cannot prove a Teams UI mention chip or user notification without a provisioned Teams tenant, app, and webhook. This PR changes only always-visible prompt guidance; it does not modify or claim automated proof of the Bot Framework sender/parser. The pinned 2026.5.27 npm package and OpenClaw loader seam were manually reviewed. Hermetic CI enforces the repository pin, reviewed package-load shape, hint contract, and loader restoration, but that evidence does not satisfy the required delivery-proof gate. If production mentions still render raw IDs, the source fix belongs in the upstream Teams send path. ## Type of Change - [x] Code change (feature, bug fix, or refactor) - [ ] Code change with doc updates - [ ] Doc only (prose changes, no code sample modifications) - [ ] Doc only (includes code sample changes) ## Quality Gates <!-- Check all that apply. For any "covered by existing tests", "not applicable", or waiver entry, add a brief justification on the same line or in the Changes section. --> - [x] Tests added or updated for changed behavior - [ ] Existing tests cover changed behavior — justification: - [ ] Tests not applicable — justification: - [ ] Docs updated for user-facing behavior changes - [x] Docs not applicable — justification: this restores expected Teams-native mention prompting automatically and adds no user action, command, configuration, environment variable, or support boundary. - [x] Sensitive paths changed (security, policy, credentials, preflight, onboarding, inference, runner, sandbox, or messaging) - [x] Sensitive-path review completed or maintainer-approved waiver recorded — reviewer/approval link/justification: exact entry scoping, fail-open warning, lifecycle restoration, child-module isolation, and launcher gating were manually audited and regression-tested. - [ ] Non-success, skipped, or missing CI check accepted by maintainer — check name, approval link, and follow-up issue: ## Verification <!-- Check each item you ran and confirmed. Leave unchecked items you skipped. Doc-only changes do not require npm test unless you ran it. --> - [x] PR description includes the DCO sign-off declaration and every commit appears as `Verified` in GitHub - [x] Git hooks passed during commit and push - [x] Targeted tests pass for changed behavior — 47/47 across compiled package-contract, preload, channel-manifest, and compiler tests - [ ] Full `npm test` passes (broad runtime changes only) - [x] Quality Gates section completed with required justifications or waivers - [x] No secrets, API keys, or credentials committed - [ ] `npm run docs` builds without warnings (doc changes only) - [ ] Doc pages follow the style guide (doc changes only) - [ ] New doc pages include SPDX header and frontmatter (new pages only) Exact-head live evidence (head `e120c86d`): - `channels-stop-start` (OpenClaw + Hermes): https://github.com/NVIDIA/NemoClaw/actions/runs/28428153446 — passed Pre-follow-up live evidence (head `8149bce`): - `channels-stop-start`: https://github.com/NVIDIA/NemoClaw/actions/runs/28425570138 - `messaging-providers`: https://github.com/NVIDIA/NemoClaw/actions/runs/28425986489 --- <!-- DCO sign-off is required in this PR description, and every commit must appear as Verified in GitHub. --> Signed-off-by: San Dang <[email protected]> <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Improved Microsoft Teams message tool hints to consistently include native mention guidance. * Added automatic preloading of the Teams hint patch for both initial startup and reconnect phases. * **Bug Fixes** * Ensures the mention hint is injected only once and positioned before the first targeting-related hint. * Applies best-effort patching that won’t break unrelated module loading. * **Tests** * Expanded unit/contract coverage to verify CommonJS/ESM compatibility, idempotency, correct hint ordering, and safe loader behavior. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Signed-off-by: San Dang <[email protected]> Signed-off-by: Carlos Villela <[email protected]> Co-authored-by: Carlos Villela <[email protected]>
Summary
@openclaw/msteamsruntime after the pinned Teams plugin install so display-name AAD text such as@ San Dang (205f29da-231e-4a0e-a0b2-b398e6302087)becomes Teams mention markup plus amentionentity.@[Name](id)mention syntax working.Evidence it works
The focused runtime test imports the patched Teams sender and checks this issue payload:
It now renders as:
The test also checks that the first activity entity is the Teams
mentionentity for the AAD object ID/display name and that the rawSan Dang (uuid)text is absent from the rendered activity.Testing
npm run build:clinpm run typecheck:clinpx vitest run test/openclaw-msteams-mention-patch.test.ts --silent=false --reporter=defaultnpx vitest run test/messaging-build-applier.test.ts -t "runs pinned installs during agent-install without doctor env injection" --silent=false --reporter=default --testTimeout=20000npm run source-shape:checknpm run test-size:checknpx @biomejs/biome format src/lib/messaging/applier/build/messaging-build-applier.mts test/openclaw-msteams-mention-patch.test.ts test/messaging-build-applier.test.tsgit diff --checkNote: running the full
test/messaging-build-applier.test.tsfile locally reached 20/21 tests passing, but the existing plan-builder helper was killed at its own 10s subprocess timeout on this machine. The affected pinned-install case passes when run directly.Fixes #5852
Signed-off-by: Deepak Jain [email protected]
Summary by CodeRabbit
New Features
Bug Fixes
Tests