docs: make the driver page a host reference, not a second authoring guide - #727
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 4e3d4a5f93
ℹ️ 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".
miravoss26
left a comment
There was a problem hiding this comment.
Turns docs/writing-a-driver.md from a second authoring guide into a host reference: sends authors upstream to srcfl/device-drivers for source, manifests and the authoring guide, and keeps this page for what the FTW host actually gives a driver (host API table, capability grants, sign convention, lifecycle).
- Docs-only, one file, CI green.
- The relocated authoring content (metadata/lifecycle/blueprint) now lives in device-drivers, which matches the "don't keep two guides that drift" intent. The host-side reference that stays is accurate against the old text it condenses: the
http_patchdouble-gate (capabilities.http.allow_writeon top of the plainhttpgrant) plus its no-redirect rationale,driver_default_modefor stale telemetry, and the sign convention all read correctly. - No security surface.
Good split and reads well. Safe to merge from my read.
935f3fd to
2bbf206
Compare
…uide FTW and srcfl/device-drivers both carried a "how to write a driver" guide, 220 and 268 lines. They overlap on the entry points, the DRIVER block, the sign convention and the build-and-test loop, and there is no mechanism that keeps them agreeing. The upstream copy is built around blueprint/BLUEPRINT.lua and is the one a driver author reaches for, so the FTW copy is the one that quietly goes stale — and #720 is currently moving the website's "Write a driver" link upstream, which makes that worse. Split by what each repository actually owns. Authoring moves upstream, and this page keeps what only FTW can answer: what its host registers, how a capability is granted, when the host calls driver_default_mode, where FTW resolves a driver file from, and how to test one against a running instance. The host API is now a table generated from what lua.go registers, including http_patch and its allow_write gate from #716. Every name in it was checked against host.RawSetString in lua.go; the two Blixt L1 aliases stay in the prose below the table rather than the table itself. Removed content is covered elsewhere: entry points, sign convention, manifest and make targets upstream, and the drivers-beta promotion paragraph was already a duplicate of device-repository.md, which this page links to. README is untouched — #720 is editing the same section and has right of way. Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
2bbf206 to
d862008
Compare
FTW and
srcfl/device-driversboth carry a "how to write a driver" guide — 220 lines here, 268 upstream. They overlap on the entry points, theDRIVERblock, the sign convention and the build-and-test loop, and nothing keeps them agreeing.The upstream copy is built around
blueprint/BLUEPRINT.luaand says outright that the blueprint is the specification, so it is the one a driver author reaches for. That makes the FTW copy the one that quietly goes stale — and #720 is moving the website's "Write a driver" link upstream right now, which removes the last reason anyone would open this one first.The split
Divide by what each repository can actually answer.
Upstream owns authoring, and this page now links there in its first section: entry points, sign convention, what never to fabricate, the manifest/
DRIVERversion agreement,make test-driver,make check.This page keeps what only FTW knows:
driver_default_mode— stale telemetry, reloads, removal, shutdown — which is a safety invariant of core, not a driver-authoring detail;set_make/set_snmatter (durable state is keyed by hardware identity, not the YAML name);220 → 159 lines.
Verification
host.RawSetStringingo/internal/drivers/lua.go: 45 documented, 0 that do not exist. The only registered names not in the table arewriteandwrite_registers, the Blixt L1 aliases, which are covered in the prose below it rather than listed as canonical.http_patchand itscapabilities.http.allow_writegate are included, from feat(drivers): host.http_patch write verb for device REST writes (#537) #716 earlier today.drivers-betapromotion paragraph was already a duplicate ofdocs/device-repository.md, which this page links to.Scope
README.mdis deliberately untouched. #720 is editing the same Drivers section and has right of way; its "Start with docs/writing-a-driver.md" sentence still reads correctly, since this remains the right first page for the host side. Any README rewording belongs in a follow-up after #720 lands.Documentation only, so the changeset gate exempts it.