fix(cloud): require explicit intent header for connect endpoint#77
Conversation
|
Warning Rate limit exceeded
You’ve run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (5)
✨ Finishing Touches🧪 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 |
The connect tests built a full daemon AppState via the process-global data-dir override, racing parallel tests on the shared asset index. Each test now builds state with an explicit, owned temp data dir.
d7f2756 to
7e61e60
Compare
Motivation
POST /api/v1/cloud/connection/connectcould be triggered from a cross-origin web page and start a persistent cloud socket in unsecured (no API key) loopback deployments.Description
x-hypercolor-connect-intent: manualon theconnecthandler before any state-changing cloud connect logic runs, returning400 Bad Requestif missing (added incrates/hypercolor-daemon/src/api/cloud.rs).DaemonClient::post_with_headersto send extra headers from the client (crates/hypercolor-cli/src/client.rs).hypercolor cloud connection --connectcommand to send the required intent header (crates/hypercolor-cli/src/commands/cloud.rs).crates/hypercolor-cli/tests/request_shape_tests.rs,crates/hypercolor-daemon/tests/cloud_api_tests.rs).Testing
cloud_api_testsandrequest_shape_tests).cargo test -p hypercolor-daemon --test cloud_api_tests(targeted connect tests) and compilation started, but the full run did not complete within this environment due to long compile time / artifact lock contention, so no final pass/fail could be observed here.cargo test -p hypercolor-cli --test request_shape_testsand the run was blocked on artifact directory lock contention, so the test outcome could not be observed in this environment.Codex Task