Repository navigation
Add ndi.cloud.api.feedback commands and ndi.unittest.cloud.feedbackTest - #1023
Conversation
Client for the in-app problem report endpoints in ndi-cloud-node#158
(PR Waltham-Data-Science/ndi-cloud-node#159):
- ndi.cloud.api.feedback.submitFeedback(app, category, description, ...)
-> POST /feedback, returns the new report id
- ndi.cloud.api.feedback.deleteFeedback(feedbackID)
-> DELETE /feedback/{feedbackId} (reporter withdraws own report)
- implementation classes SubmitFeedback / DeleteFeedback and the
submit_feedback / delete_feedback endpoints in ndi.cloud.api.url
feedbackTest covers submit+delete (and 404 on a second delete), a full
report with every optional field, server validation (400), the log size
cap (413), an unauthenticated POST (401/403), delete of a missing or
malformed id, and the wrapper's own argument validation. Every report a
test creates is deleted, with a teardown as a backstop. The suite skips
itself in an API environment that does not have /feedback deployed yet,
so the daily prod run stays green until prod has it.
Not run: no MATLAB in the authoring environment.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HZqqhYo3AFqWMNXh8Qmiqf
|
CI note: Cloud CI fails because of a problem already on Every cloud test that logs in errors inside The MATLAB on the runner no longer ships There's no fix for this yet. A one-line fix, using MATLAB's built-in decoder instead of Java: % src/ndi/+ndi/+cloud/+internal/decodeJwt.m, line 43
payloadBytes = matlab.net.base64decode(payloadBase64);
Generated by Claude Code |
Brings in the ndi.cloud.api.feedback commands + feedbackTest (#1023) and the cloud login JWT decode fix (#1024). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016wj6cuvAwgAaYN5dNM1o6L
Adds an NDI-matlab client for the new in-app problem report endpoints, plus a cloud unit test for them.
Server side: Waltham-Data-Science/ndi-cloud-node#158, PR Waltham-Data-Science/ndi-cloud-node#159.
New commands
ndi.cloud.api.feedback.submitFeedback(app, category, description, ...)→POST /feedback, returns the new report id.appVersion,datasetId,documentId,environment(struct),state(struct),log,traceback.categorymust be"bug","performance"or"other".ndi.cloud.api.feedback.deleteFeedback(feedbackID)→DELETE /feedback/{feedbackId}. The reporter withdraws their own report; another user's report, or a missing one, is answered with 404.ndi.cloud.api.implementation.feedback.SubmitFeedback/DeleteFeedback, and thesubmit_feedback/delete_feedbackendpoints inndi.cloud.api.url(newfeedback_idoption).ndi.unittest.cloud.feedbackTestlog. The reporter can't read a report back, so redaction itself is checked in the server's tests.schemaVersion.Every report a test creates is deleted again, with a teardown as a backstop. Deleted reports don't count toward the server's limit of 10 reports per user per hour.
Environment gate:
test-cloud-api.ymlruns the cloud tests against both prod and dev every day. The suite first probesDELETE /feedback/not-a-valid-id: the route answers 400 once deployed and the API's catch-all answers 404 before that. On 404 the suite skips instead of failing, so prod runs stay green until ndi-cloud-node#159 reaches prod. The downside is that if the route ever disappeared, this suite would skip rather than fail.Testing
Not run: this was written without access to MATLAB (per AGENTS.md). To verify once ndi-cloud-node#159 is deployed to dev:
🤖 Generated with Claude Code
https://claude.ai/code/session_01HZqqhYo3AFqWMNXh8Qmiqf
Generated by Claude Code