feat: accept erobot's desk events on the gateway's ingest route - #97
Conversation
erobot posted its observations to the desk backend directly, with a shared token on a private link. It now uses the same write pipeline as every other desk client: POST /private-api/curation-desk/ingest with the @ecency signed code in the body, which the gateway validates and strips before forwarding the envelope under the validated username to curation/desk/ingest. The envelope is checked for the shape the backend accepts (version 1, one of the four event types, an id within the backend's column, an object payload); the sender's retry counter stays behind.
|
ⓘ Qodo reviews are paused because your trial has ended. Ask your workspace admin to add credits to resume reviews. Manage billing |
PR Summary by QodoRoute erobot desk events through the signed gateway ingest
AI Description
Diagram
High-Level Assessment
Files changed (4)
|
Code Review by Qodo
1.
|
The matrix covers the token, the 503 before validation, the identity forwarding, the routing and the no-store answer of every signed write; the new handler was missing from it.
|
Warning Review limit reachedNext included review available in 54 minutes. View limit detailsLimit details: You’ve used the included review currently available. You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Review configuration: ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Team Run ID: 📒 Files selected for processing (1)
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Team Run ID: 📒 Files selected for processing (4)
Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review. 📝 WalkthroughWalkthroughThe PR adds a signed Curation Desk ingest endpoint. It validates event envelopes, forwards approved fields through the signed-write pipeline, registers parity cases, and adds tests for forwarding, rejection, and event ID limits. ChangesCuration Desk ingest
Estimated code review effort: 3 (Moderate) | ~20 minutes Merge Risk: ⚪ Minimal · up to This adds the signed Curation Desk ingest endpoint while validating accepted event envelopes and forwarding only approved fields. No concrete current-head merge-blocking risk remains. Sequence Diagram(s)sequenceDiagram
participant Client
participant Routes
participant CurationDeskIngest
participant SignedWritePipeline
participant Backend
Client->>Routes: POST /private-api/curation-desk/ingest
Routes->>CurationDeskIngest: Invoke handler
CurationDeskIngest->>SignedWritePipeline: Validate and submit envelope
SignedWritePipeline->>Backend: Forward v, type, id, ts, and payload
Backend-->>SignedWritePipeline: Accept or reject event
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1📝 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 |
feruzm
left a comment
There was a problem hiding this comment.
Reviewed at 481ef2d, including the follow-up that adds ingest to the shared signed-write handler matrix. The route authenticates through the existing HiveSigner path, forwards only v/type/id/ts/payload under the validated username, drops code and attempts, enforces the backend event/type/id shape, and targets the esync /curation/desk/ingest route correctly. Local verification passed all 475 .NET tests and diff checks; GitHub test is green. No blocking findings in the current diff.
erobot posted its observations (post cards, trail votes, curator votes, flags) to the desk backend directly with a shared token. It now uses the same write pipeline as every other desk client.
POST /private-api/curation-desk/ingestwith the @ecency signed code in the body. The gateway validates and strips the code and forwards the envelope under the validated username tocuration/desk/ingest; the backend decides whether that account may ingest.tsand an objectpayload. The sender's retry counter stays behind.Test plan:
dotnet test(475 passing): the route joins the whitelist and identity checks every desk write has, the envelope is forwarded as an object withoutattemptsorcode, and twelve malformed envelopes plus the id length bound are refused with the same messages the backend would use.Summary by CodeRabbit