Skip to content

Fix subscribe arg ordering so fresh args override stale descriptor-backed instance properties#2175

Merged
einari merged 2 commits into
mainfrom
copilot/fix-issue-2174
Apr 28, 2026
Merged

Fix subscribe arg ordering so fresh args override stale descriptor-backed instance properties#2175
einari merged 2 commits into
mainfrom
copilot/fix-issue-2174

Conversation

@einari
Copy link
Copy Markdown
Contributor

@einari einari commented Apr 28, 2026

Fixed

einari and others added 2 commits April 28, 2026 10:40
…cked instance properties

In multiplexed mode, connectionQueryArguments was built by spreading parameterValues
(instance property values) AFTER the caller-supplied args, meaning a stale instance
property would silently overwrite a fresh value passed directly to subscribe().

Reorder the spread so parameterValues comes first and caller-supplied args win:
  { ...parameterValues, ...(directMode ? unusedParameters : args), ...paging }

In direct mode the route parameters are already embedded in the URL path, so only
the non-route (unused) parameters are appended as query arguments — unchanged.
In multiplexed mode the full args object is included so route-derived parameters
reach the server in the subscribe payload — also unchanged in intent.

Fixes #2174.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…params

Two new specs cover the scenarios fixed in the preceding commit:

- with_hub_mode_and_stale_descriptor_backed_instance_property: verifies that
  fresh args passed to subscribe() override stale descriptor-backed instance
  property values (filter = 'stale-filter' → 'fresh-filter' wins in payload).

- with_hub_mode_and_multiple_required_route_parameters: verifies that all
  route-derived parameters (userId, category from /api/filter/{userId}/{category})
  appear in the multiplexed subscribe payload.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@einari einari added the patch label Apr 28, 2026
@einari einari merged commit d8f1147 into main Apr 28, 2026
6 checks passed
@einari einari deleted the copilot/fix-issue-2174 branch April 28, 2026 08:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant