fix(endpoints): unique stable per-pipe endpoint URLs ({host}/{type}/{project_id}/{source})#1557
fix(endpoints): unique stable per-pipe endpoint URLs ({host}/{type}/{project_id}/{source})#1557kgarg2468 wants to merge 3 commits into
Conversation
Advertised chat/dropper/webhook URLs now embed the task identity as
{host}/{type}/{project_id}/{source}; additive path routes accept data
POSTs and resolve the task from the path. Legacy routes and ?auth=
resolution unchanged.
Fixes rocketride-ai/rocketride-saas#262
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
🤖 Internal: Discord sync markerAuto-managed by the Discord notification workflow. Stores the linked Discord message ID and forum thread ID. Do not edit or delete. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughProject and source identifiers are propagated through webhook, chat, dropper, and task-data URLs. Task data can resolve tokens from path parameters, task notes support project/source substitution, and documentation reflects the new and legacy routes. ChangesProject-scoped webhook flow
Estimated code review effort: 3 (Moderate) | ~20 minutes Sequence Diagram(s)sequenceDiagram
participant Client
participant WebhookRoute
participant task_Data
participant TaskControl
participant Task
Client->>WebhookRoute: POST /webhook/{project_id}/{source}
WebhookRoute->>task_Data: forward request with path parameters
task_Data->>TaskControl: resolve control by project and source
TaskControl-->>task_Data: return task token
task_Data->>Task: process task data and update notes
Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@packages/ai/src/ai/modules/task_http/task_data.py`:
- Around line 476-480: Update the exception handling around
get_task_control_by_project in the task request flow so it no longer swallows
RuntimeError or unrelated failures. Catch the specific expected missing-task
RuntimeError and preserve the token=None fallback, or propagate it as the
appropriate client error; allow unexpected exceptions to propagate instead of
using a broad except Exception.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro
Run ID: 9001db3e-426c-46a3-8995-3ae8e31eab92
📒 Files selected for processing (6)
nodes/src/nodes/webhook/IEndpoint.pynodes/src/nodes/webhook/README.mdpackages/ai/src/ai/modules/task/task_engine.pypackages/ai/src/ai/modules/task_http/__init__.pypackages/ai/src/ai/modules/task_http/task_data.pypackages/docs/content-static/examples/webhook-pipeline.md
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
@coderabbitai Addressed in 7663b84 — the fallback now catches only |
|
Tip For best results, initiate chat on the files or code changes. 🧩 Analysis chain🏁 Script executed: #!/bin/bash
cd rocketride-server 2>/dev/null || true
git fetch origin pull/1557/head:pr1557 2>/dev/null
git log --oneline -5 7663b847 2>/dev/null || true
git show 7663b847 -- packages/ai/src/ai/modules/task_http/task_data.py 2>/dev/nullLength of output: 1918
|
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
CI build failures fixed in the latest push — the placeholder substitution now uses |
Two pipes with same-typed source nodes advertise the same endpoint URL
Endpoint URLs are derived only from the source node type (
{host}/chat,{host}/dropper,{host}/webhookinwebhook/IEndpoint.py), so any two pipes with same-typed sources show identical URLs — users can't tell endpoints apart and rely on the opaque?auth=token for disambiguation (reported in rocketride-ai/rocketride-saas#262).Fix — additive, no breaking changes:
{host}/{type}/{project_id}/{source}(e.g./chat/<project-uuid>/chat_1).project_id+sourceis exactly the engine's task identity and the same input that already deterministically derives thepk_/tk_tokens — stable across restarts, no secret in the path.task_enginesubstitutes the new{project_id}/{source}placeholders alongside the existing{public_auth}./webhook/{project_id}/{source}and/task/data/{project_id}/{source}→task_Data, which resolves the task from the path when no explicit token param is supplied. Existing auth precedence unchanged.?auth=resolution untouched — every currently-deployed URL keeps working.assetPrefixis absolute, and the SPAs identify their task from?auth=, not the path). Docs updated (webhook-pipeline example + webhook README).Testing
/webhook/proj-a-262/webhook_1vs/webhook/proj-b-262/webhook_1); POST to each pretty path → 200 into the correct pipe; POST to legacy/webhookwith Bearer token → 200; relaunch → byte-identical URLs and tokens (deterministic identity confirmed).Linked Issue
Fixes rocketride-ai/rocketride-saas#262
🤖 Generated with Claude Code
Summary by CodeRabbit
POST /task/data/{project_id}/{source}and/webhook/{project_id}/{source}aliasing.{project_id}and{source}placeholders.?auth=behavior.