feat(feedback): POST /v1/feedback files crash and bug reports as Gitea issues #147

Open
sharang wants to merge 3 commits from feat/feedback-endpoint into main
pull from: feat/feedback-endpoint
3 Commits
Author SHA1 Message Date
Sharang ParnerkarandClaude Opus 5.5 c5a6c0d20e fix(feedback): let the CLIs' user tokens reach /v1/feedback
ci / shared (pull_request) Successful in 12s
ci / test (pull_request) Successful in 6m39s
ci / image (pull_request) Skipped
The deployed AUTHZ_RULES give werkpilot-cli and firmwerk-cli only
licences and usage, so the new feedback group answered FORBIDDEN_CLIENT.
A user token from a client holding licences now passes for feedback too;
other clients still need the feedback group, and service tokens are
refused by the handler.

Refs platform/werkpilot#86

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Q9inRayW7ztyk1uAtwMJPR
2026-11-23 13:57:21 +01:00
Sharang ParnerkarandClaude Opus 5.5 dfc9f72a24 fix(feedback): turn line breaks in one-line fields into spaces
ci / shared (pull_request) Successful in 12s
ci / test (pull_request) Successful in 6m49s
ci / image (pull_request) Skipped
A crash title built from a multi-line panic message was refused with 400.
Control characters (and U+2028/U+2029) in title, product, version and
device now become spaces, so the report files and the provenance block
still cannot be forged.

Refs platform/werkpilot#86

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Q9inRayW7ztyk1uAtwMJPR
2026-11-23 13:53:03 +01:00
Sharang ParnerkarandClaude Opus 5.5 553f4c52fe feat(feedback): POST /v1/feedback files crash and bug reports as Gitea issues
ci / shared (pull_request) Successful in 15s
ci / test (pull_request) Successful in 6m48s
ci / image (pull_request) Skipped
A CLI user sends a crash report or /bug report with their own token; the
registry files it as an issue in the private feedback repo, titled
"[<tenant slug>] <kind>: <title>", with a provenance block (tenant, user,
product, version, device, kind, time received) above the body. The caller
gets the issue number only.

- route group "feedback"; user tokens only; tenant from the principal
- 10 reports per person and hour (in memory)
- FEEDBACK_GITEA_URL / _REPO / _TOKEN; no token answers 503
- Gitea errors become 502 feedback_failed without body, URL or token
- audit event feedback.submitted

Refs platform/werkpilot#86

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Q9inRayW7ztyk1uAtwMJPR
2026-11-23 13:49:00 +01:00