Repository navigation
fix(functions): add path parameters to req.query, as deployed functions do - #324
Merged
Merged
Conversation
…ns do Deployed AWS functions build req.query from the query string and the path parameters. Serve now does the same, so a function reading a path parameter from req.query gets it locally too.
… the same name Document in AGENTS.md that request.query holds the path parameters on AWS and serve, and only request.params on Azure and GCP (V1). Refresh the .talismanrc checksums of the two touched files.
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
🔒 Security Scan Results
⏱️ SLA Breach Summary
ℹ️ Vulnerabilities Without Available Fixes (Informational Only)The following vulnerabilities were detected but do not have fixes available (no upgrade or patch). These are excluded from failure thresholds:
✅ BUILD PASSED - All security checks passed |
siddharth-kulkarni-cs
approved these changes
Dec 4, 2026
Harshi-Shah-CS
approved these changes
Dec 4, 2026
dhruv-parekh-cs
approved these changes
Dec 4, 2026
tejas-contentstack
pushed a commit
that referenced
this pull request
Dec 4, 2026
Brings in PR #324 (cloud-functions path parameters in request.query). Conflicted file: .talismanrc, the AGENTS.md checksum entry, resolved by keeping both sides' AGENTS.md changes and refreshing its checksum. #claude_code# 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What was wrong
Deployed AWS functions (
lambda-node-bridge/cf-sv-with-helpers.ts) buildreq.queryfrom the query string with the path parameters spread over it:{ ...parseQS(rawQueryString), ...pathParameters }. Underlaunch:functions:serve, path parameters were only inreq.params, so a function readingreq.query.idon a[id].jsroute gotundefinedlocally and the value on AWS.This is CL-8970 gap 5.
The change (
src/functions/cloud-functions.ts)request.query = { ...request.query, ...request.params }./items/abc?id=zzzgivesreq.query.id === 'abc'.req.paramsis unchanged.AGENTS.md. The approved V1 differences now say this, and that Azure and GCP (V1) keep path parameters only inrequest.params..talismanrc. Refreshed checksums forcloud-functions.test.tsandAGENTS.md(test code and prose, no credentials).Tests
src/functions/cloud-functions.test.ts:adds path parameters to the query, as deployed functions do:/api/items/abc?x=1givesquery { x: '1', id: 'abc' }andparams { id: 'abc' }. It failed before the change.lets a path parameter win over a query value of the same name, as deployed functions do:/api/items/abc?id=zzzgives{ id: 'abc' }. Swapping the spread order turns it red.Full suite in the pre-push hook: 189 suites, 3827 tests passed. Every hook ran, with no
--no-verify.E2E (http-sanity cloud-functions checks, AWS expectations)
Against
launch:functions:serve, with the checks from e2e PR contentstack/contentfly-e2e-tests#499:query { x: '1' };query { id: 'zzz' }).path params are also in req.queryand the newa path param wins over a query value of the same nameboth pass, and no check got worse.The new check runs only with
LAUNCH_E2E_CLOUD_FUNCTION_PARITY=on. Azure and GCP keep the query value, recorded as a CL-8970 known gap.Not changed
/items/a%20b→a b); AWS splits the raw path.req.querycarries the same value asreq.params. Whether AWS decodes is not verified, and that is the existingreq.paramsbehaviour, outside this gap.req.queryis a getter there, so this assignment would needObject.defineProperty. launch-cli pins Express 4.Jira: https://contentstack.atlassian.net/browse/CL-8970
Generated by Claude Code