qwen-code/packages/core
jinye 0501c7165b
Some checks are pending
Qwen Code CI / Lint (push) Waiting to run
Qwen Code CI / Test-2 (push) Blocked by required conditions
Qwen Code CI / Test (push) Blocked by required conditions
Qwen Code CI / Test-1 (push) Blocked by required conditions
Qwen Code CI / Test-3 (push) Blocked by required conditions
Qwen Code CI / Test-4 (push) Blocked by required conditions
Qwen Code CI / Test-5 (push) Blocked by required conditions
Qwen Code CI / Test-6 (push) Blocked by required conditions
Qwen Code CI / Test-7 (push) Blocked by required conditions
Qwen Code CI / Test-8 (push) Blocked by required conditions
Qwen Code CI / Post Coverage Comment (push) Blocked by required conditions
Qwen Code CI / CodeQL (push) Waiting to run
E2E Tests / E2E Test (Linux) - sandbox:docker (push) Waiting to run
E2E Tests / E2E Test (Linux) - sandbox:none (push) Waiting to run
E2E Tests / E2E Test - macOS (push) Waiting to run
SDK Python / SDK Python (3.12) (push) Waiting to run
SDK Python / SDK Python (3.10) (push) Waiting to run
SDK Python / SDK Python (3.11) (push) Waiting to run
fix(telemetry): add bounded shutdown timeout and fix service.version resource attribute (#3813)
* fix(telemetry): add bounded shutdown timeout and fix service.version resource attribute

`shutdownTelemetry()` awaited `sdk.shutdown()` with no time bound, causing
the CLI to hang indefinitely when the OTLP endpoint was unreachable. Wrap it
in a `Promise.race` with a 10-second timeout that fails open (logs a warning
and proceeds with cleanup).

The `service.version` resource attribute was set to `process.version`
(Node.js runtime version) instead of the actual application version. Replace
it with `config.getCliVersion() || 'unknown'` to match the convention used
throughout the codebase.

Closes #3811

🤖 Generated with [Qwen Code](https://github.com/QwenLM/qwen-code)

* fix(telemetry): remove redundant diag.error and add .catch() clarifying comment

- Remove duplicate `diag.error()` in shutdown catch block — a rejected
  shutdown already surfaces as a thrown exception; only `debugLogger.error`
  is needed (consistent with pre-existing behavior).
- Add comment to `.catch()` handler explaining why rejections are silently
  dropped when timeout hasn't fired (they're caught by the try/catch via
  Promise.race).
- Update rejection test to remove stale `diag.error` assertion.

🤖 Generated with [Qwen Code](https://github.com/QwenLM/qwen-code)

* fix(telemetry): use || for getCliVersion fallback and clarify Promise.resolve wrap

- Revert `??` back to `||` for `getCliVersion()` fallback to stay
  consistent with the 6 other call sites across the codebase and
  guard against empty-string misconfiguration.
- Add comment explaining why `Promise.resolve()` wraps `shutdown()`
  (defensive measure for auto-mocked environments).

🤖 Generated with [Qwen Code](https://github.com/QwenLM/qwen-code)

* fix(telemetry): restore diag.error in catch block and add test assertion

- Re-add `diag.error()` to the shutdown rejection catch block so
  the error is visible via OTel diagnostic channel, matching the
  timeout path which uses `diag.warn`.
- Add `diagErrorSpy` assertion to the rejection test so the test
  name ("should log error") is backed by actual log verification.

🤖 Generated with [Qwen Code](https://github.com/QwenLM/qwen-code)

---------

Co-authored-by: jinye.djy <jinye.djy@alibaba-inc.com>
2026-05-05 11:12:13 +08:00
..
scripts
src fix(telemetry): add bounded shutdown timeout and fix service.version resource attribute (#3813) 2026-05-05 11:12:13 +08:00
vendor feat test tool permissions 2026-03-10 16:30:22 +08:00
index.ts fix: Remove remaining ClearcutLogger export from packages/core/index.ts 2026-02-01 14:52:14 +08:00
package.json chore(release): v0.15.6 (#3766) 2026-04-30 15:59:35 +08:00
test-setup.ts feat(memory): managed auto-memory and auto-dream system (#3087) 2026-04-16 20:05:45 +08:00
tsconfig.json fix: upgrade @lydell/node-pty to 1.2.0-beta.10 to fix PTY FD leak 2026-04-01 07:55:56 +08:00
vitest.config.ts