Skip to content

test(rest): cover encoded resource paths over HTTP - #1328

Open
Linux2010 wants to merge 1 commit into
a2aproject:mainfrom
Linux2010:codex/encode-rest-resource-ids
Open

Linux2010 wants to merge 1 commit into
a2aproject:mainfrom
Linux2010:codex/encode-rest-resource-ids

Conversation

@Linux2010

@Linux2010 Linux2010 commented Nov 14, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Upstream #1373 now validates resource IDs and encodes intercepted IDs through the shared HttpEndpoint.pathSegment helper. Rebased onto that implementation and removed this PR's duplicate encoder; the remaining diff is a regression test using a real local HTTP server to inspect REST request paths.

Cover spaces, percent signs, colons and Unicode in permitted task IDs, history-length query parameters, cancellation and subscription action suffixes, and task/push-configuration paths. Adapt the regression to the new validation contract: dot segments, slashes, backslashes, query separators and fragment separators are rejected as invalid IDs.

Validation

  • mvn -B -pl client/transport/rest -am clean install: 780 tests passed across the REST reactor and dependency modules (REST module: 82 tests).
  • git diff --check.

The production REST transport is unchanged from upstream #1373. Remote checks on this rebased head are tracked separately from the local test results.

@Linux2010

Copy link
Copy Markdown
Contributor Author

Rebased onto current main to resolve the conflict introduced by #1333. The path-segment encoding now applies to the post-interceptor effective payload (so it composes with #1333's interceptor URL handling) rather than to the raw params. ./docs/mvnw -pl client/transport/rest -am -DskipDockerTests=true clean test passes locally (69 tests in the REST module, including RestResourcePathTest and RestInterceptorWireTest); git diff --check clean. The earlier red build (ubuntu-latest, 25) was ReplicatedQueueManagerTest.initializationError due to Docker/Podman not being available on the runner and is unrelated to this diff.

Signed-off-by: andy <linux2011@qq.com>
@Linux2010
Linux2010 force-pushed the codex/encode-rest-resource-ids branch from e3b6bd1 to ef61fb7 Compare December 5, 2026 01:21
@Linux2010 Linux2010 changed the title fix: encode REST resource IDs as path segments test(rest): cover encoded resource paths over HTTP Dec 5, 2026

This branch has not been deployed

No deployments
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.

1 participant