Skip to content

fix(tsgo): unblock baseline type errors#31873

Merged
Takhoffman merged 1 commit intomainfrom
fix/baseline-tsgo-unblock
Mar 2, 2026
Merged

fix(tsgo): unblock baseline type errors#31873
Takhoffman merged 1 commit intomainfrom
fix/baseline-tsgo-unblock

Conversation

@Takhoffman
Copy link
Contributor

Summary

Describe the problem and fix in 2–5 bullets:

  • Problem: latest main fails pnpm tsgo on two unrelated baseline errors.
  • Why it matters: these baseline failures block landing unrelated PRs, including the fix(exec): resolve PATH key case-insensitively for Windows pathPrepend #28821 replacement.
  • What changed: moved chatId initialization before first usage in Zalo user monitor and aligned ensureConfigReady test typing to the imported function signature.
  • What did NOT change (scope boundary): no runtime behavior changes beyond fixing an obvious variable-ordering bug in logging path; no config flow logic changed.

Change Type (select all)

  • Bug fix
  • Feature
  • Refactor
  • Docs
  • Security hardening
  • Chore/infra

Scope (select all touched areas)

  • Gateway / orchestration
  • Skills / tool execution
  • Auth / tokens
  • Memory / storage
  • Integrations
  • API / contracts
  • UI / DX
  • CI/CD / infra

Linked Issue/PR

User-visible / Behavior Changes

None.

Security Impact (required)

  • New permissions/capabilities? (Yes/No): No
  • Secrets/tokens handling changed? (Yes/No): No
  • New/changed network calls? (Yes/No): No
  • Command/tool execution surface changed? (Yes/No): No
  • Data access scope changed? (Yes/No): No
  • If any Yes, explain risk + mitigation:

Repro + Verification

Environment

  • OS: macOS
  • Runtime/container: Node 22 / pnpm
  • Model/provider: N/A
  • Integration/channel (if any): zalouser + CLI program tests
  • Relevant config (redacted): N/A

Steps

  1. On pre-fix baseline, run pnpm tsgo.
  2. Observe TS errors in extensions/zalouser/src/monitor.ts and src/cli/program/config-guard.test.ts.
  3. Apply this patch and rerun checks.

Expected

  • Typecheck and repo checks pass.

Actual

  • pnpm tsgo and pnpm check both pass.

Evidence

Attach at least one:

  • Failing test/log before + passing after
  • Trace/log snippets
  • Screenshot/recording
  • Perf numbers (if relevant)

Human Verification (required)

What you personally verified (not just CI), and how:

  • Verified scenarios: pnpm tsgo, pnpm check, pnpm test extensions/zalouser/src/monitor.test.ts src/cli/program/config-guard.test.ts.
  • Edge cases checked: missing senderId log path still references stable thread id variable; config-guard tests still execute/passed.
  • What you did not verify: full pnpm test suite.

Compatibility / Migration

  • Backward compatible? (Yes/No): Yes
  • Config/env changes? (Yes/No): No
  • Migration needed? (Yes/No): No
  • If yes, exact upgrade steps:

Failure Recovery (if this breaks)

  • How to disable/revert this change quickly: revert this commit.
  • Files/config to restore: extensions/zalouser/src/monitor.ts, src/cli/program/config-guard.test.ts.
  • Known bad symptoms reviewers should watch for: pnpm tsgo regressions on the same two files.

Risks and Mitigations

List only real risks for this PR. Add/remove entries as needed. If none, write None.

  • Risk: test typing alignment could conceal future signature drift.
    • Mitigation: typing now exactly follows imported signature constraints, so drift surfaces in compile-time checks.

@Takhoffman Takhoffman merged commit 1ea42eb into main Mar 2, 2026
10 checks passed
@Takhoffman Takhoffman deleted the fix/baseline-tsgo-unblock branch March 2, 2026 16:09
@openclaw-barnacle openclaw-barnacle bot added channel: zalouser Channel integration: zalouser cli CLI command changes size: XS maintainer Maintainer-authored PR labels Mar 2, 2026
@greptile-apps
Copy link
Contributor

greptile-apps bot commented Mar 2, 2026

Greptile Summary

Fixed two TypeScript baseline errors that were blocking PR merges.

  • Fixed variable-ordering bug in extensions/zalouser/src/monitor.ts where chatId was referenced in a log statement before initialization
  • Aligned test type definition in src/cli/program/config-guard.test.ts to match the actual ensureConfigReady function signature (commandPath made optional, runtime typed as RuntimeEnv)

Both changes are straightforward correctness fixes with no runtime behavior impact beyond fixing the Zalo logging bug.

Confidence Score: 5/5

  • This PR is safe to merge with no risk
  • Both changes are minimal, correct fixes for TypeScript errors. The monitor.ts fix resolves a real variable-ordering bug, and the test file fix properly aligns types with the actual function signature. No logic changes, no security implications, and changes are well-scoped.
  • No files require special attention

Last reviewed commit: d8e8e6e

Linux2010 pushed a commit to Linux2010/openclaw that referenced this pull request Mar 2, 2026
mrosmarin added a commit to mrosmarin/openclaw that referenced this pull request Mar 2, 2026
* main: (174 commits)
  refactor(gateway): unify control-ui and plugin webhook routing
  fix(exec): resolve PATH key case-insensitively for Windows pathPrepend (openclaw#25399) (openclaw#31879)
  fix(tsgo): unblock baseline type errors (openclaw#31873)
  fix(security): harden sms.send dangerous-node defaults
  fix(gateway): let POST requests pass through root-mounted Control UI to plugin handlers
  fix(browser): fail closed navigation guard with env proxy
  test(perf): reduce timer teardown overhead in cron issue regressions
  refactor: split browser context/actions and unify CDP timeout policy
  test(perf): cache redact hints and tune guardrail scan concurrency
  docs(changelog): credit sessions_spawn agentId validation fix (openclaw#31381)
  fix(agents): validate sessions_spawn agentId format (openclaw#31381)
  fix(agents): add strict format validation to sessions_spawn for agentId
  fix(logging): log timestamps use local time instead of UTC (openclaw#28434)
  test(perf): remove redundant module reset in system presence version tests
  test(perf): avoid module reload churn in config guard tests
  fix(gateway): fail closed plugin auth path canonicalization
  docs(changelog): credit sandbox mkdirp boundary fix (openclaw#31547)
  fix(sandbox): allow mkdirp boundary checks on existing directories (openclaw#31547)
  fix(sandbox): allow mkdirp boundary check on existing directories
  fix: preserve dns pinning for strict web SSRF fetches
  ...
execute008 pushed a commit to execute008/openclaw that referenced this pull request Mar 2, 2026
dawi369 pushed a commit to dawi369/davis that referenced this pull request Mar 3, 2026
OWALabuy pushed a commit to kcinzgg/openclaw that referenced this pull request Mar 4, 2026
zooqueen pushed a commit to hanzoai/bot that referenced this pull request Mar 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

channel: zalouser Channel integration: zalouser cli CLI command changes maintainer Maintainer-authored PR size: XS

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant