feat(api): add runtime auxiliary scale connections - #862
Merged
tadelv merged 2 commits intoSep 16, 2026
Merged
Conversation
tadelv
requested changes
Sep 16, 2026
tadelv
left a comment
Member
There was a problem hiding this comment.
The implementation direction looks sound and matches the architecture agreed on #833: ScaleController remains the only brewing/primary scale owner, auxiliaries are generic runtime-only sessions, the same physical ID cannot occupy both roles, Bengle keeps its integrated primary while allowing explicit external auxiliaries, and the new per-ID routes follow the opaque-ID boundary from #858. I did not find a substantiated code-level blocker in those paths.
There are still repository hard gates that prevent approval:
- The required Contributor Responsibility acknowledgement is still unchecked in the PR body.
AGENTS.mdmakes the required PR-template fields a hard pre-PR gate, and the currentContribution policyjob fails on exactly this. Because that job fails first, format/analyze/tests/build are currently skipped in GitHub CI. - This is an external contribution (
author_association: CONTRIBUTOR), and #833 currently has neitherready-for-agentnorready-for-human. The contribution-policy workflow requires at least one referenced open issue with one of those labels.Related #833is a valid reference, but after the acknowledgement is fixed the gate will still reject #833 until a maintainer marks the issue accepted (or the PR references another accepted issue). - #858 has now merged to
main, while this branch is still based on the pre-#858 main and carries the #858 stack in its PR diff. Please update the branch onto currentmainand rerun the checks so CI validates the actual auxiliary-scale change against the dependency that is now canonical.
Once those gates are cleared and the real CI run is green, I do not currently see another change I would require from the implementation.
tadelv
force-pushed
the
feature/auxiliary-scale-connections
branch
from
September 16, 2026 09:15
febec3f to
aebf7af
Compare
tadelv
marked this pull request as ready for review
September 16, 2026 09:15
tadelv
approved these changes
Sep 16, 2026
This was referenced Sep 16, 2026
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.
Summary
Adds runtime-only auxiliary scale connections for issue #833.
ScaleControllerremains the sole primary connection. A new registry owns auxiliary sessions by device ID, including independent snapshots, tare routing, pending/closing reservations, cancellation fencing, and cleanup after delayed connection completion.Generic connect accepts optional
connectionRole: omitted means primary andauxiliaryexplicitly selects an external auxiliary. Inventory reports localconnectionRole.PUT /api/v1/scales/{id}/tareandws/v1/scales/{id}/snapshotsupport both primary and auxiliary IDs; legacy singular routes remain primary-only. Bengle’s integrated scale remains the primary scale while explicit external auxiliary discovery and connect remain available. No dosing settings, purposes, endpoints, or persisted role assignment are introduced.Linked Issue
Related #833.
This change depends on the shared opaque path component boundary from #858. The multi-device Skale consumer is #859; the first-stage single-device driver remains in #846.
Verification
Impact
Adds public role-aware connection and per-ID API behavior, OpenAPI/WebSocket specification updates, device-management documentation, and runtime lifecycle state held in memory only. Existing primary ScaleController behavior and legacy primary routes remain compatible. No database migration is required.
Contributor Responsibility
AI-assisted development is allowed. The submitter remains responsible for the submitted work.