Skip to content

feat(setup): say how well tested a driver is before an operator picks it#671

Merged
frahlg merged 2 commits into
masterfrom
671-show-driver-provenance-when-picking
Jul 26, 2026
Merged

feat(setup): say how well tested a driver is before an operator picks it#671
frahlg merged 2 commits into
masterfrom
671-show-driver-provenance-when-picking

Conversation

@frahlg

@frahlg frahlg commented Jul 26, 2026

Copy link
Copy Markdown
Member

The signed channel now carries 80 drivers. 37 have run on customer sites for months; 43 have never been on hardware at all. Both appeared in the same dropdown, described identically, so choosing between them was guesswork.

Web-only change

Every driver already states verification_status in its own DRIVER table, and /api/drivers/catalog already returns it along with the version and where the file came from. Nothing on screen used any of it. No Go change was needed.

Before

Sungrow Sungrow SH Hybrid Inverter (modbus, meter+pv+battery)
Acrel Acrel Meter (modbus, meter)

After

Sungrow SH Hybrid Inverter (modbus, meter+pv+battery) — verified on hardware
  version 1.4.0 · signed driver channel
  verified on hardware — Battery control + telemetry in continuous use on homelab-rpi.

Acrel Meter (modbus, meter) — untested
  version 1.0.2 · signed driver channel
  untested — Signed community source; check the catalog for current hardware evidence.

Selecting a driver now shows its version, whether it came from an operator override, the signed channel or this build, and whatever the driver says about its own testing.

Two details

The description is built from elements, not innerHTML. Verification notes come out of a driver file, and a driver file is not a trusted source of markup. A test pins that.

The manufacturer is no longer doubled. Several drivers already begin their name with it, which read as "Sungrow Sungrow SH Hybrid Inverter".

Tests

web/driver-provenance.test.mjs pins the distinction, since the whole point is that an untested driver must not look as trustworthy as a proven one. Full suite: 110 passed. make verify clean.

Not in this PR

GET /api/device_repository/drivers/{id}/versions exists and no UI calls it. Rollback in Settings goes back exactly one step, so an operator cannot pick a specific older version even though the channel keeps 110 history entries for exactly that. Worth its own change.

🤖 Generated with Claude Code

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 932091ec82

ℹ️ 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".

Comment thread web/setup.js
Comment on lines +153 to +158
// DRIVER.verification_status, in words an operator can act on.
function verificationLabel(status) {
if (status === 'production') return 'verified on hardware';
if (status === 'beta') return 'in testing';
if (status === 'experimental') return 'untested';
return '';

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Add the required changeset

This introduces user-visible setup-wizard behavior but the commit contains no .changeset/*.md entry. When release automation determines the next core version and release notes, this feature will therefore be omitted from the versioning metadata; add a changeset covering the new driver provenance labels.

AGENTS.md reference: AGENTS.md:L72-L76

Useful? React with 👍 / 👎.

frahlg added 2 commits July 26, 2026 11:29
The signed channel now carries 80 drivers. 37 have run on customer sites for
months; 43 have never been on hardware at all. Both appear in the same
dropdown, described identically, so choosing between them was guesswork.

Every driver already states verification_status in its own DRIVER table, and
/api/drivers/catalog already returns it along with the version and where the
file came from. Nothing on screen used any of it. This is a web-only change.

The dropdown option now ends in plain words -- "verified on hardware",
"in testing", "untested" -- rather than an enum or nothing. Selecting a driver
shows its version, whether it came from an operator override, the signed
channel or this build, and whatever the driver says about its own testing.

The description is assembled from elements rather than innerHTML. Verification
notes come out of a driver file, and a driver file is not a trusted source of
markup.

Also stops the label reading "Sungrow Sungrow SH Hybrid Inverter": several
drivers already begin their name with the manufacturer.

web/driver-provenance.test.mjs pins the distinction, since the whole point is
that an untested driver must not look as trustworthy as a proven one.

Signed-off-by: Fredrik Ahlgren <fredrik@sourceful-labs.com>
Signed-off-by: Fredrik Ahlgren <fredrik@sourceful-labs.com>
@frahlg
frahlg force-pushed the 671-show-driver-provenance-when-picking branch from 8abb9ab to 9517d1a Compare July 26, 2026 09:30
@frahlg
frahlg merged commit f83c6df into master Jul 26, 2026
11 checks passed
@frahlg
frahlg deleted the 671-show-driver-provenance-when-picking branch July 26, 2026 09:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant