Skip to content

feat(site): show the vendor documents a driver was built from - #62

Merged
HuggeK merged 1 commit into
srcfl:mainfrom
HuggeK:feat/site-upstream-docs
Jul 31, 2026
Merged

feat(site): show the vendor documents a driver was built from#62
HuggeK merged 1 commit into
srcfl:mainfrom
HuggeK:feat/site-upstream-docs

Conversation

@HuggeK

@HuggeK HuggeK commented Jul 31, 2026

Copy link
Copy Markdown
Collaborator

upstream_docs landed in #48: the manifests record the vendor documents a
driver was decoded from, and a weekly workflow watches them. But the field
never reached the catalog page — the one artefact most people actually open.
The page named 80 drivers without once saying where any of them came from,
which is the question the field was added to answer.

Each declared document is now a link in the driver's card, under its title,
with the kind and what url_stability claims:

Vendor documents this driver was built from
NIBE S-series myUplink register/parameter changelog (nibe-n.pdf) ↗
CHANGELOG · URL STABLE IN PRACTICE

Watched weekly: when one of these changes or stops resolving, the repository
opens an issue to review the driver against it. A change is a prompt to look,
not evidence that this driver is wrong.

Two drivers declare documents today (nibe_local, myuplink); a driver with
none grows no empty heading.

Why the stability wording is spelled out instead of printed as the enum

url_stability describes whether the URL stays put, not whether the
registers behind it are settled. Printed bare next to a link, "stable" reads
as the second thing — which is the opposite of why the field exists, since a
watched document is watched precisely because its contents may move. So the
page renders stable as "URL stable in practice", committed as "Vendor
commits to this URL", and so on.

The accompanying note exists for the same reason: the watcher detects a
raw-byte change, which is a prompt to review, not proof a driver is wrong.

Why the generator re-checks the URL scheme

validate_manifest.py already holds upstream_docs[].url to http(s), and
it runs in CI. But it is a different tool run at a different time, and this
generator is where the value becomes an href a reader clicks — the one place
where trusting the input is not free. test_a_document_url_must_be_http
covers it.

How the rendering is tested, given the page renders in the browser

test_upstream_docs_reach_the_page would pass just as well if the payload
carried the documents and the card silently dropped them — which is precisely
the state before this change. So test_the_card_renders_the_documents_it_collects
asserts against driverCard's own source that it calls the builder.

Locally I also ran the page's actual shipped script under Node against a DOM
shim and asserted on the HTML it produces: both drivers' href, link text,
kind and stability line appear in the card, the link survives into the
whole-page render, and a driver with no documents grows no empty section.
That harness is a local check, not committed.

No manifest, driver or version changes: this only renders data already in the
repository, so nothing reaches the signed channel.

🤖 Generated with Claude Code

upstream_docs reached the manifests and the weekly watcher but never the
catalog page, so the artefact most readers actually open still named 80
drivers without saying where any of them came from. The field exists to
make that source findable again; leaving it off the page left it findable
only by reading the YAML.

Each declared document is now a link in the driver's card, with its kind
and what url_stability claims. The stability wording is spelled out
rather than printed as the bare enum -- "stable" beside a link reads as a
promise that the registers are settled, which is the opposite of why the
field exists -- and a note says a flagged change is a prompt to review,
not evidence the driver is wrong.

The generator re-checks the http(s) scheme it renders. validate_manifest
holds the same line, but it is a different tool run at a different time,
and this is where the value becomes an href somebody clicks.

test_the_card_renders_the_documents_it_collects guards the rendering
rather than the payload: collecting the documents and dropping them from
the card is the exact state this change exists to end.

Signed-off-by: HuggeK <48095810+HuggeK@users.noreply.github.com>
Co-authored-by: HuggeK <48095810+HuggeK@users.noreply.github.com>
@HuggeK
HuggeK marked this pull request as ready for review July 31, 2026 10:25
@HuggeK
HuggeK merged commit 6f77142 into srcfl:main Jul 31, 2026
6 checks passed
HuggeK added a commit to HuggeK/device-drivers that referenced this pull request Jul 31, 2026
srcfl#62 landed the catalog page's vendor-document section on main. Both
branches wrote to CHANGELOG.md and git merged them without conflict; this
also closes a stray blank line inside the Fixed list.

The two changes meet here for the first time, so both were checked
together: myuplink's card now carries the Heat pump badge and its vendor
document link, the generators reproduce every catalog file unchanged, and
the channel still reports myuplink as the one driver whose bytes moved.

Signed-off-by: HuggeK <48095810+HuggeK@users.noreply.github.com>
Co-authored-by: HuggeK <48095810+HuggeK@users.noreply.github.com>
HuggeK added a commit to HuggeK/device-drivers that referenced this pull request Jul 31, 2026
This branch was cut before srcfl#48, srcfl#57, srcfl#62 and srcfl#63 landed. Five files
conflicted; all five were additions on both sides and keep both:

  CHANGELOG.md          both wrote under the same ### Added heading
  spec/manifest-v2.md   Connectivity/Setup beside main's DER Types, and
                        the numbered validation list renumbered so the
                        upstream_docs rule survives
  manifests/myuplink.yaml  connectivity/setup from here, ders [heatpump]
                        and 1.1.1 from srcfl#63 -- the empty ders this branch
                        was written against no longer exists
  tools/generate_site.py   Reach labels beside the vendor-document labels
  index.yaml            regenerated rather than hand-merged

Also records V2.4 in the migration ledger. The branch adds two manifest
fields and updated the field table and validation rules, but never
recorded the version the way V2.3 did for upstream_docs.

The claim that neither field reaches the signed artifact is checked
rather than trusted: with all 80 manifests carrying connectivity,
stripping both fields back out moves no artifact digest, so no driver
needs a version bump.

Signed-off-by: HuggeK <48095810+HuggeK@users.noreply.github.com>
Co-authored-by: HuggeK <48095810+HuggeK@users.noreply.github.com>
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.

2 participants