Skip to content

Fix composite tree record structure in WASM test plugin#89

Merged
jlantz merged 2 commits into
claude/adapt-agent-standards-KzMkwfrom
copilot/sub-pr-71
Feb 4, 2026
Merged

Fix composite tree record structure in WASM test plugin#89
jlantz merged 2 commits into
claude/adapt-agent-standards-KzMkwfrom
copilot/sub-pr-71

Conversation

Copilot AI commented Feb 4, 2026

Copy link
Copy Markdown
Contributor

The test_bridge_composite_tree_operation integration test was failing with INVALID_REQUEST: invalid tree records: missing field 'referenceId' from Salesforce.

Root Cause

The WASM test plugin constructed composite tree records with referenceId nested inside the attributes object:

{
  "attributes": {
    "type": "Account",
    "referenceId": "account1"  // ❌ Wrong location
  },
  "Name": "Test Account"
}

Salesforce's Composite Tree API requires referenceId at the record's top level, not nested in attributes:

{
  "attributes": {
    "type": "Account"
  },
  "referenceId": "account1",  // ✅ Correct location
  "Name": "Test Account"
}

Changes

  • tests/wasm-test-plugin/src/lib.rs: Moved referenceId from attributes to top level for both Account and Contact records in test_composite_tree function

This structure matches the format documented in sf-wasm-types test examples and the CompositeTreeRecord type definition in sf-rest.


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Co-authored-by: jlantz <1697127+jlantz@users.noreply.github.com>

Copilot AI commented Feb 4, 2026

Copy link
Copy Markdown
Contributor Author

Just as a heads up, I was blocked by some firewall rules while working on your feedback. Expand below for details.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • test.salesforce.com
    • Triggering command: /home/REDACTED/work/busbar-sf-api/busbar-sf-api/target/debug/deps/integration-be4e63186ef2e308 /home/REDACTED/work/busbar-sf-api/busbar-sf-api/target/debug/deps/integration-be4e63186ef2e308 bridge::test_bridge_composite_tree_operation --nocapture /home/REDACTED/work/busbar-sf-api/busbar-sf-api/target/debug/deps/libproc_macro_crate-f2f845307f546243.rlib /home/REDACTED/work/busbar-sf-api/busbar-sf-api/target/debug/deps/libtoml_edit-ff8b5c3ab5b11859.rlib /home/REDACTED/work/busbar-sf-api/busbar-sf-api/target/debug/deps/libtoml_parser-46bc58924ce9b017.rlib /home/REDACTED/work/busbar-sf-api/busbar-sf-api/target/debug/deps/libwinnow-1d4599c7b57498b8.rlib 0/src/lib.rs /home/REDACTED/work/busbar-sf-api/busbar-sf-api/target/debug/deps/libindexmap-7361d7b6f6e02819.rlib /home/REDACTED/work/busbar-sf-api/busbar-sf-api/target/debug/deps/libequivalent-af0261�� /home/REDACTED/work/busbar-sf-api/busbar-sf-api/target/debug/deps/libserde_core-44a64442e2c8e223.rlib /home/REDACTED/work/busbar-sf-api/busbar-sf-api/target/debug/deps/libhashbrown-dfdf3853f3325b27.rlib 64-u�� 64-REDACTED-linux-gnu/lib/librustc_std_workspace_alloc-e793bd15fd20f0af.rlib 64-REDACTED-linux-gnu/lib/libminiz_oxide-7aaf0cb5e2293c31.rlib 0c02f-cgu.12.rcg/home/REDACTED/work/busbar-sf-api/busbar-sf-api/target/debug/deps/async_trait-7e27-t: 0c02f-cgu.13.rcgcc 0c02f-cgu.14.rcg-Wl,--version-script=/tmp/rustcTGBreu/list rget/debug/build-Wl,--no-undefined-version known-linux-gnu/-m64 (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Copilot AI changed the title [WIP] Add WASM bridge for sandboxed Salesforce API access Fix composite tree record structure in WASM test plugin Feb 4, 2026
Copilot AI requested a review from jlantz February 4, 2026 01:10
@jlantz jlantz marked this pull request as ready for review February 4, 2026 01:11
@jlantz jlantz merged commit ce003f8 into claude/adapt-agent-standards-KzMkw Feb 4, 2026
@jlantz jlantz deleted the copilot/sub-pr-71 branch February 4, 2026 01:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants