Conversation
This was referenced Sep 13, 2026
Open
Contributor
Author
|
@MrAlders0n please review this change with your Claude agent as part of the September 13 Beacon review batch. The current candidate is Early review is requested on the HTTP-only delta linked in the description. Keep this draft until #146, #147 and #148 are accepted and the branch is rebased. Please check auth, validation/status handling, duplicate active names and soft-deactivation behavior. Issue #60 remains open. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this PR does
Add authenticated account create/list/get/soft-deactivate routes for #60. Names are validated before storage, POST accepts one bounded JSON object containing only the name, and errors use Beacon's existing envelope without database details. All account routes remain inside BearerAuth with no-store responses; existing public reads and config inspection remain available as before.
Dependent draft: requires #146, #147 and storage PR #148. The branch reuses those prerequisites; this commit is the HTTP-only review delta. Rebase to accepted prerequisites before leaving draft.
Create returns 201, get/list return 200 and deactivation returns an empty 204. Duplicate active names and repeated deactivation return 409; missing accounts return 404. The record remains readable after deactivation and its name can be reused by a new account. These are operator records, not logins, sessions or token issuance. Runtime configuration writes remain separate #60 work.
Type of change
Checklist
Testing notes
Local full checks and focused race checks pass. HTTP tests cover validated/trimmed names, malformed/extra/trailing JSON, body-size and media-type limits, missing/invalid IDs, error classification, error-detail suppression, empty/inactive lists, rejected anonymous access and top-level router wiring. Real PostgreSQL tests in #148 exercise concurrent create/deactivate and name reuse; native and exact-binary runtime evidence accompanies the combined preview.
Native candidate/combined full tests, CI and CodeQL pass. A temporary private instance of the exact combined binary passed create/read/list/deactivate/repeat/name-reuse and auth checks using an ephemeral key, without live MQTT. Its two test records, container and key file were removed; the key was absent from logs. The Canadaverse preview includes both candidates, with public admin access disabled and zero live account rows. Public account GET/POST/DELETE denial, ordinary API reads, WebSockets, both feeds and matching corresponding source pass. Existing schema objects were unchanged by the additive table migration.
AI-assisted implementation/testing under the contributor's standing authorization; no separate human review of this final diff is claimed.