feat(setup): say how well tested a driver is before an operator picks it#671
Conversation
There was a problem hiding this comment.
💡 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".
| // 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 ''; |
There was a problem hiding this comment.
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 👍 / 👎.
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>
8abb9ab to
9517d1a
Compare
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_statusin its ownDRIVERtable, and/api/drivers/catalogalready 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
After
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.mjspins 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 verifyclean.Not in this PR
GET /api/device_repository/drivers/{id}/versionsexists 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