Skip to content

Feishu: fix locale-wrapper post parser test#29576

Merged
vincentkoc merged 1 commit intoopenclaw:mainfrom
vincentkoc:vincentkoc-code/fix-feishu-locale-test-mediakeys
Feb 28, 2026
Merged

Feishu: fix locale-wrapper post parser test#29576
vincentkoc merged 1 commit intoopenclaw:mainfrom
vincentkoc:vincentkoc-code/fix-feishu-locale-test-mediakeys

Conversation

@vincentkoc
Copy link
Member

Summary

  • Problem: extensions/feishu/src/post.test.ts expected objects without mediaKeys in locale-wrapper test cases.
  • Why it matters: parsePostContent now always returns mediaKeys, causing CI test failure.
  • What changed: Added mediaKeys: [] to both locale-wrapper expectations.
  • What did NOT change (scope boundary): No parser/runtime behavior changes; test-only update.

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

  • Closes #
  • Related #

User-visible / Behavior Changes

None.

Security Impact (required)

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

Repro + Verification

Environment

  • OS: macOS
  • Runtime/container: Node 22 + pnpm workspace
  • Model/provider: N/A
  • Integration/channel (if any): Feishu extension tests
  • Relevant config (redacted): default local test config

Steps

  1. Run pnpm vitest extensions/feishu/src/post.test.ts before fix.
  2. Observe locale-wrapper test failure due to unexpected mediaKeys field.
  3. Apply expectation update and rerun the same command.

Expected

  • Test suite passes with parser output shape including mediaKeys.

Actual

  • After fix, all tests in extensions/feishu/src/post.test.ts pass.

Evidence

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

Human Verification (required)

  • Verified scenarios: locale-wrapper expectations and full post.test.ts file run.
  • Edge cases checked: both wrapper styles (post.zh_cn and top-level zh_cn).
  • What you did not verify: full repository test suite.

Compatibility / Migration

  • Backward compatible? (Yes)
  • Config/env changes? (No)
  • Migration needed? (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/feishu/src/post.test.ts.
  • Known bad symptoms reviewers should watch for: none beyond this test regression.

Risks and Mitigations

  • Risk: Minimal; test expectation could hide an unintended API shape change.
    • Mitigation: Change matches current parser contract used in other assertions.

@openclaw-barnacle openclaw-barnacle bot added channel: feishu Channel integration: feishu size: XS maintainer Maintainer-authored PR labels Feb 28, 2026
@vincentkoc vincentkoc marked this pull request as ready for review February 28, 2026 07:57
@vincentkoc vincentkoc merged commit f810932 into openclaw:main Feb 28, 2026
24 checks passed
@greptile-apps
Copy link
Contributor

greptile-apps bot commented Feb 28, 2026

Greptile Summary

Fixed test expectations in extensions/feishu/src/post.test.ts to include mediaKeys: [] in locale wrapper assertions. When the mediaKeys field was added to parsePostContent() output in commit 53a2e72, the locale wrapper tests were not updated because they use .toEqual() for exact object matching.

  • Updated two test expectations on lines 95 and 101 to include mediaKeys: []
  • Aligns test expectations with the actual parser output type PostParseResult
  • Test-only change with no runtime behavior impact
  • Other tests unaffected as they check specific fields rather than full object equality

Confidence Score: 5/5

  • This PR is safe to merge with no risk
  • The change is minimal, correct, and test-only. It fixes a test regression by aligning expectations with the actual parser implementation, which already returns mediaKeys in its output type. No production code is modified.
  • No files require special attention

Last reviewed commit: 47eda14

stolyarchuk pushed a commit to llmxio/openclaw that referenced this pull request Feb 28, 2026
r4jiv007 pushed a commit to r4jiv007/openclaw that referenced this pull request Feb 28, 2026
mylukin pushed a commit to mylukin/openclaw that referenced this pull request Feb 28, 2026
wanjizheng pushed a commit to wanjizheng/openclaw that referenced this pull request Feb 28, 2026
wanjizheng pushed a commit to wanjizheng/openclaw that referenced this pull request Feb 28, 2026
wanjizheng pushed a commit to wanjizheng/openclaw that referenced this pull request Feb 28, 2026
wanjizheng pushed a commit to wanjizheng/openclaw that referenced this pull request Feb 28, 2026
ohmyskyhigh pushed a commit to ohmyskyhigh/openclaw that referenced this pull request Feb 28, 2026
vincentkoc added a commit to Sid-Qin/openclaw that referenced this pull request Feb 28, 2026
vincentkoc added a commit to rylena/rylen-openclaw that referenced this pull request Feb 28, 2026
newtontech pushed a commit to newtontech/openclaw-fork that referenced this pull request Feb 28, 2026
wanjizheng pushed a commit to wanjizheng/openclaw that referenced this pull request Mar 1, 2026
wanjizheng pushed a commit to wanjizheng/openclaw that referenced this pull request Mar 1, 2026
zooqueen added a commit to hanzoai/bot that referenced this pull request Mar 1, 2026
ansh pushed a commit to vibecode/openclaw that referenced this pull request Mar 2, 2026
steipete pushed a commit to Sid-Qin/openclaw that referenced this pull request Mar 2, 2026
safzanpirani pushed a commit to safzanpirani/clawdbot that referenced this pull request Mar 2, 2026
steipete pushed a commit to Sid-Qin/openclaw that referenced this pull request Mar 2, 2026
robertchang-ga pushed a commit to robertchang-ga/openclaw that referenced this pull request Mar 2, 2026
execute008 pushed a commit to execute008/openclaw that referenced this pull request Mar 2, 2026
dorgonman pushed a commit to kanohorizonia/openclaw that referenced this pull request Mar 3, 2026
sachinkundu pushed a commit to sachinkundu/openclaw that referenced this pull request Mar 6, 2026
zooqueen added a commit to hanzoai/bot that referenced this pull request Mar 6, 2026
zooqueen pushed a commit to hanzoai/bot that referenced this pull request Mar 6, 2026
Mateljan1 pushed a commit to Mateljan1/openclaw that referenced this pull request Mar 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

channel: feishu Channel integration: feishu maintainer Maintainer-authored PR size: XS

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant