Skip to content

fix(ci): expose package deps to Telegram QA harness#72680

Merged
vincentkoc merged 4 commits into
mainfrom
fix/ci-node-shard-timeouts
Apr 27, 2026
Merged

fix(ci): expose package deps to Telegram QA harness#72680
vincentkoc merged 4 commits into
mainfrom
fix/ci-node-shard-timeouts

Conversation

@vincentkoc

Copy link
Copy Markdown
Member

Summary

  • Link installed OpenClaw package dependencies into /app/node_modules before running the mounted package Telegram QA harness.
  • Point the QA Lab gateway RPC helper at the published SDK runtime subpath so package E2E does not import unpublished QA-only SDK shims.
  • Harden empty-turn replay metadata handling so missing metadata is treated as unsafe instead of crashing or retrying side-effectful turns.
  • Keep the plugin-update Docker smoke on the current state-managed install ledger shape so config migration does not trip the no-op assertion.

Root Cause

Package Acceptance with telegram_mode=live-frontier mounts extensions/qa-lab as QA harness source while the SUT is the installed package candidate. The container only linked /app/node_modules/openclaw, so package-local QA harness imports such as zod could not resolve from /app/extensions/qa-lab/**.

The mounted harness also pulled a QA-only SDK shim through the gateway RPC client. Package E2E should use the published browser-node runtime entrypoint directly.

A later CI shard exposed a separate retry-path assumption: empty assistant turns could arrive without replay metadata, and the retry guard tried to read fields from undefined. Missing metadata is now explicitly replay-unsafe.

The package plugin-update smoke was also seeding deprecated plugins.installs config, then hashing the config before the CLI's legitimate state-ledger migration stripped it. The fixture now starts from the current plugins/installs.json ledger shape.

Validation

  • OPENCLAW_LOCAL_CHECK_MODE=throttled pnpm test:serial test/scripts/npm-telegram-live.test.ts extensions/qa-lab/src/gateway-rpc-client.test.ts src/agents/pi-embedded-runner/run.empty-error-retry.test.ts src/agents/pi-embedded-runner/run.incomplete-turn.test.ts test/scripts/plugin-update-unchanged-docker.test.ts
  • Blacksmith Testbox tbx_01kq6w98jnnqr9nrstawan22a7: OPENCLAW_LOCAL_CHECK_MODE=throttled pnpm check:changed
  • Blacksmith Testbox tbx_01kq6ssfvkhewwvtx487pc60vw: pnpm test:docker:plugin-update
  • Package Acceptance with live Telegram: https://github.com/openclaw/openclaw/actions/runs/24980714002 passed, including Telegram package acceptance / Run package Telegram E2E and Docker product acceptance / Docker E2E targeted lanes.
  • Final clean rebase sanity: git diff --check origin/main...HEAD

@openclaw-barnacle openclaw-barnacle Bot added scripts Repository scripts docker Docker and sandbox tooling agents Agent runtime and tooling extensions: qa-lab size: S maintainer Maintainer-authored PR labels Apr 27, 2026
@greptile-apps

greptile-apps Bot commented Apr 27, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR fixes the Package Acceptance CI harness by linking installed package dependencies into /app/node_modules, redirecting the QA gateway RPC client to the published SDK subpath, hardening empty-turn replay metadata handling to treat missing metadata as unsafe, and updating the plugin-update smoke fixture to use the current state-ledger shape.

  • scripts/e2e/npm-telegram-live-docker.sh: The new link_installed_package_dependency helper uses ln -sfn without -T or a preceding rm -rf, unlike the existing pattern in the same file. If any target path already exists as a real directory, ln will silently create the symlink inside the directory rather than replacing it, leaving the module unresolvable.

Confidence Score: 3/5

Mostly safe; one symlink-creation inconsistency in the Docker E2E script may silently fail if target directories already exist.

All TypeScript changes are well-guarded and consistent. The P1 finding is in the shell script helper — ln -sfn without -T or rm -rf deviates from the established pattern directly above it and can silently mis-link when the target exists as a real directory, causing the dependency linking to fail quietly.

scripts/e2e/npm-telegram-live-docker.sh — specifically the link_installed_package_dependency helper's ln invocation.

Prompt To Fix All With AI
This is a comment left during a code review.
Path: scripts/e2e/npm-telegram-live-docker.sh
Line: 289-291

Comment:
**`ln` flag inconsistency vs. existing symlink pattern**

The new `link_installed_package_dependency` helper uses `ln -sfn "$source" "$target"` without the `-T` flag or a preceding `rm -rf`, but the immediately-preceding loop (line 276) always does `rm -rf "/app/node_modules/$dependency_name"` then `ln -sfnT`. If any of the three target paths already exist as a real directory (e.g. `yaml` or `zod` bundled in the base image), `ln -sfn` without `-T` will silently create the symlink _inside_ that directory rather than replacing it, leaving the module unresolvable.

```suggestion
  mkdir -p "$(dirname "$target")"
  rm -rf "$target"
  ln -sfnT "$source" "$target"
```

How can I resolve this? If you propose a fix, please make it concise.

Reviews (1): Last reviewed commit: "fix(ci): keep plugin update smoke migrat..." | Re-trigger Greptile

Comment on lines +289 to +291
fi
mkdir -p "$(dirname "$target")"
ln -sfn "$source" "$target"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

P1 ln flag inconsistency vs. existing symlink pattern

The new link_installed_package_dependency helper uses ln -sfn "$source" "$target" without the -T flag or a preceding rm -rf, but the immediately-preceding loop (line 276) always does rm -rf "/app/node_modules/$dependency_name" then ln -sfnT. If any of the three target paths already exist as a real directory (e.g. yaml or zod bundled in the base image), ln -sfn without -T will silently create the symlink inside that directory rather than replacing it, leaving the module unresolvable.

Suggested change
fi
mkdir -p "$(dirname "$target")"
ln -sfn "$source" "$target"
mkdir -p "$(dirname "$target")"
rm -rf "$target"
ln -sfnT "$source" "$target"
Prompt To Fix With AI
This is a comment left during a code review.
Path: scripts/e2e/npm-telegram-live-docker.sh
Line: 289-291

Comment:
**`ln` flag inconsistency vs. existing symlink pattern**

The new `link_installed_package_dependency` helper uses `ln -sfn "$source" "$target"` without the `-T` flag or a preceding `rm -rf`, but the immediately-preceding loop (line 276) always does `rm -rf "/app/node_modules/$dependency_name"` then `ln -sfnT`. If any of the three target paths already exist as a real directory (e.g. `yaml` or `zod` bundled in the base image), `ln -sfn` without `-T` will silently create the symlink _inside_ that directory rather than replacing it, leaving the module unresolvable.

```suggestion
  mkdir -p "$(dirname "$target")"
  rm -rf "$target"
  ln -sfnT "$source" "$target"
```

How can I resolve this? If you propose a fix, please make it concise.

@vincentkoc
vincentkoc merged commit 75c52b6 into main Apr 27, 2026
82 of 84 checks passed
@vincentkoc
vincentkoc deleted the fix/ci-node-shard-timeouts branch April 27, 2026 07:33
vincentkoc added a commit that referenced this pull request Apr 27, 2026
* 'main' of https://github.com/openclaw/openclaw:
  docs: point maintainer triage at gitcrawl
  fix: clean runtime deps backup owner marker
  test(browser): close hanging attach-only sockets
  fix(plugins): normalize windows override imports
  fix: preserve live runtime deps temp dirs
  fix(lmstudio): promote bracketed tool calls
  Add Google Meet realtime consult agentId (#72381)
  fix: normalize lazy service override imports
  test: split ui unit tests from generic lane
  feat(migrations): add plugin-owned Hermes import
  fix(ci): expose package deps to Telegram QA harness (#72680)
  fix: hide bundled runtime npm windows
ogt-redknie pushed a commit to ogt-redknie/OPENX that referenced this pull request May 2, 2026
* fix(ci): expose package deps to telegram QA harness

* fix(ci): link QA package runtime deps

* fix(agents): guard replay metadata in empty retries

* fix(ci): keep plugin update smoke migration-stable
ogt-redknie pushed a commit to ogt-redknie/OPENX that referenced this pull request May 2, 2026
* 'main' of https://github.com/openclaw/openclaw:
  docs: point maintainer triage at gitcrawl
  fix: clean runtime deps backup owner marker
  test(browser): close hanging attach-only sockets
  fix(plugins): normalize windows override imports
  fix: preserve live runtime deps temp dirs
  fix(lmstudio): promote bracketed tool calls
  Add Google Meet realtime consult agentId (openclaw#72381)
  fix: normalize lazy service override imports
  test: split ui unit tests from generic lane
  feat(migrations): add plugin-owned Hermes import
  fix(ci): expose package deps to Telegram QA harness (openclaw#72680)
  fix: hide bundled runtime npm windows
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request May 9, 2026
* fix(ci): expose package deps to telegram QA harness

* fix(ci): link QA package runtime deps

* fix(agents): guard replay metadata in empty retries

* fix(ci): keep plugin update smoke migration-stable
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request May 9, 2026
* 'main' of https://github.com/openclaw/openclaw:
  docs: point maintainer triage at gitcrawl
  fix: clean runtime deps backup owner marker
  test(browser): close hanging attach-only sockets
  fix(plugins): normalize windows override imports
  fix: preserve live runtime deps temp dirs
  fix(lmstudio): promote bracketed tool calls
  Add Google Meet realtime consult agentId (openclaw#72381)
  fix: normalize lazy service override imports
  test: split ui unit tests from generic lane
  feat(migrations): add plugin-owned Hermes import
  fix(ci): expose package deps to Telegram QA harness (openclaw#72680)
  fix: hide bundled runtime npm windows
globalcaos pushed a commit to globalcaos/tinkerclaw that referenced this pull request May 13, 2026
* fix(ci): expose package deps to telegram QA harness

* fix(ci): link QA package runtime deps

* fix(agents): guard replay metadata in empty retries

* fix(ci): keep plugin update smoke migration-stable
globalcaos pushed a commit to globalcaos/tinkerclaw that referenced this pull request May 13, 2026
* 'main' of https://github.com/openclaw/openclaw:
  docs: point maintainer triage at gitcrawl
  fix: clean runtime deps backup owner marker
  test(browser): close hanging attach-only sockets
  fix(plugins): normalize windows override imports
  fix: preserve live runtime deps temp dirs
  fix(lmstudio): promote bracketed tool calls
  Add Google Meet realtime consult agentId (openclaw#72381)
  fix: normalize lazy service override imports
  test: split ui unit tests from generic lane
  feat(migrations): add plugin-owned Hermes import
  fix(ci): expose package deps to Telegram QA harness (openclaw#72680)
  fix: hide bundled runtime npm windows
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request May 24, 2026
* fix(ci): expose package deps to telegram QA harness

* fix(ci): link QA package runtime deps

* fix(agents): guard replay metadata in empty retries

* fix(ci): keep plugin update smoke migration-stable
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request May 24, 2026
* 'main' of https://github.com/openclaw/openclaw:
  docs: point maintainer triage at gitcrawl
  fix: clean runtime deps backup owner marker
  test(browser): close hanging attach-only sockets
  fix(plugins): normalize windows override imports
  fix: preserve live runtime deps temp dirs
  fix(lmstudio): promote bracketed tool calls
  Add Google Meet realtime consult agentId (openclaw#72381)
  fix: normalize lazy service override imports
  test: split ui unit tests from generic lane
  feat(migrations): add plugin-owned Hermes import
  fix(ci): expose package deps to Telegram QA harness (openclaw#72680)
  fix: hide bundled runtime npm windows
jameslcowan pushed a commit to jameslcowan/openclaw that referenced this pull request Jun 2, 2026
* fix(ci): expose package deps to telegram QA harness

* fix(ci): link QA package runtime deps

* fix(agents): guard replay metadata in empty retries

* fix(ci): keep plugin update smoke migration-stable
jameslcowan pushed a commit to jameslcowan/openclaw that referenced this pull request Jun 2, 2026
* 'main' of https://github.com/openclaw/openclaw:
  docs: point maintainer triage at gitcrawl
  fix: clean runtime deps backup owner marker
  test(browser): close hanging attach-only sockets
  fix(plugins): normalize windows override imports
  fix: preserve live runtime deps temp dirs
  fix(lmstudio): promote bracketed tool calls
  Add Google Meet realtime consult agentId (openclaw#72381)
  fix: normalize lazy service override imports
  test: split ui unit tests from generic lane
  feat(migrations): add plugin-owned Hermes import
  fix(ci): expose package deps to Telegram QA harness (openclaw#72680)
  fix: hide bundled runtime npm windows
sablehead pushed a commit to sablehead/openclaw that referenced this pull request Jun 10, 2026
* fix(ci): expose package deps to telegram QA harness

* fix(ci): link QA package runtime deps

* fix(agents): guard replay metadata in empty retries

* fix(ci): keep plugin update smoke migration-stable
sablehead pushed a commit to sablehead/openclaw that referenced this pull request Jun 10, 2026
* 'main' of https://github.com/openclaw/openclaw:
  docs: point maintainer triage at gitcrawl
  fix: clean runtime deps backup owner marker
  test(browser): close hanging attach-only sockets
  fix(plugins): normalize windows override imports
  fix: preserve live runtime deps temp dirs
  fix(lmstudio): promote bracketed tool calls
  Add Google Meet realtime consult agentId (openclaw#72381)
  fix: normalize lazy service override imports
  test: split ui unit tests from generic lane
  feat(migrations): add plugin-owned Hermes import
  fix(ci): expose package deps to Telegram QA harness (openclaw#72680)
  fix: hide bundled runtime npm windows
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling docker Docker and sandbox tooling extensions: qa-lab maintainer Maintainer-authored PR scripts Repository scripts size: S

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant