Repository navigation
feat(setup): complete onboarding from a new box through MCP - #1747
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b9b939850f
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| writeJSON(w, http.StatusUnprocessableEntity, map[string]string{"error": "Keep a positive main fuse while control is active. Save measurement mode, restart, then change unknown connection values."}) | ||
| return | ||
| } | ||
| if oldCfg.MeasurementOnly() && !newCfg.MeasurementOnly() { |
There was a problem hiding this comment.
Revalidate meter changes while control remains configured
After a measurement-only configuration is saved with measurement_only=false, the saved config changes immediately even though the runtime remains measurement-only until restart. A second POST /api/config before that restart—or a later edit while control is active—can change the site-meter endpoint or scaling while leaving the flag false, causing this condition to skip SetupControlReady. Since validation binds only the fuse digest and stored hardware identity, the restart can then enable dispatch using a meter configuration that was never measured or commissioned; run the readiness check whenever a control-enabled save changes the site-meter configuration, not only on the boolean transition.
Useful? React with 👍 / 👎.
A new owner can start an empty box in measurement mode, claim it with a house password and continue setup through MCP. The box returns its full configuration schema and missing questions, keeps answers in a resumable draft, and supports explicit discovery, private connection tests and draft-bound MyUplink sign-in. The final control review binds the physical connection to the live meter and requires fresh measurements before restart.
Optional annual electricity and solar inputs improve cold-start estimates without creating history or discarding measured learning. Existing goal requests choose mode, planning style and car departure schedules while equipment control remains blocked. Access shows Cloud consent, pending requests, weekdays and the box time zone. A setup grant never accepts Cloud terms or creates owner access.
Paired with srcfl/ftw-cloud#44; this change uses existing setup.edit actions and introduces no wire or registry change. Minor capability requested by the owner. Keep the release beta and coordinate publication with the active release chat. No live box was updated for this PR.
Validation:
make verify: passed.npm test: 864 passed.Hardware commissioning and a complete novice trial through two live MCP clients remain beta acceptance work. A driver that needs an undeclared authentication/subscription write may need metadata changes before it can read in measurement mode. Local vendor fixtures do not establish vendor or physical-device support.