chore(drivers): remove the Device Support package format from Core - #1432
Conversation
FTW and srcfl/device-drivers are one track; Zap and the Device Support register are another, with no coupling in schemas, code paths or automation (owner decision 2026-09-25). device-drivers already dropped its package pilot and specs (#133). Remove the sourceful.driver-index/v1 index, package and envelope support from driverrepo and config, the package-only ManifestDriver and catalog fields, the driver control opt-in, the device-support-contract CI job and its private-repo token, and the package fixtures and tests. The ftw.manifest/v1 channel and its read-only runtime policy stay. Stored state: a listed package repository is dropped at load with one warning and deleted from stored settings; an active package install is deactivated at startup so the release's own driver runs, and is never offered again; a control opt-in is dropped with a warning instead of stopping its driver. Also update docs that still called the bundled drivers an offline recovery set. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MuerPFZFG88kgu8sWVHeq7
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: 438c0c2cd7
ℹ️ 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".
| out = append(out, driverinventory.RepositoryArtifact{ | ||
| LogicalPath: installed.LogicalPath, | ||
| InstalledPath: installed.InstalledPath, | ||
| DriverID: installed.DriverID, | ||
| Version: installed.Version, |
There was a problem hiding this comment.
Preserve managed provenance in driver inventory
For every active signed-channel driver, this now creates a RepositoryArtifact without PackageID or PackageChannel. driverinventory.inspectDriver only labels an artifact managed when both fields identify a package/channel; otherwise it emits source: "legacy_repository" (go/internal/driverinventory/inventory.go:192-198). Consequently, after retiring the package format, current FTW-channel installations are reported to Nova/fleet inventory as legacy repositories and lose their channel provenance. Update the inventory classification to recognize the remaining signed manifest format rather than depending on removed package fields.
Useful? React with 👍 / 👎.
Owner decision
Fredrik, 2026-09-25: FTW and its driver repository
srcfl/device-driversare one track. Zap and the Device Support register are a separate track. There must be no direct coupling between them in schemas, code paths or automation. Knowledge can move across by hand.srcfl/device-drivershas already removed its Device Support package pilot and the package format specs (srcfl/device-drivers#133).This PR removes from Core the Device Support package format and everything that existed only for it.
Removed
sourceful.driver-index/v1index,sourceful.driver-package/v1package and both envelope formats. That coversrefreshSourceful,cachedSourcefulManifest,sourcefulManifest,sourcefulPackageDriver, the package-contract validators, the Sourceful canonical JSON verifier, the package cache undercache/<repo>/packages/, and writingsourceful-package.envelope.jsonnext to an install. The RuntimePolicy branch for installed packages is gone, including control-v2 policy construction.sourceful.gois nowruntime_policy.goand holds only the channel's policy code.package_id,target,artifact_id,runtime_*,host_api_profile,package_key_id,package_envelope_*,commands,default_mode,lease_policy. The device-drivers beta/stable manifests use none of these; I checked the livedrivers-betamanifest.package_id,runtime_abiandhost_api_profileondrivers.CatalogEntry, which only a package could fill. The Diagnose report inweb/diagnostics-modal.jslooked forpackage_id, so channel installs showed asunknown. It now reports them asmanaged, with their channel and artifact SHA-256.DriverRepositoryFormatSourcefulIndexV1, its validation, and the per-drivercontrolopt-in (DriverControlOptIn), which only a control-v2 package could satisfy.device-support-contractjob, which checked out a private repository withSOURCEFUL_CI_REPO_TOKENand built packages with itsdriver_package.py. It is also gone from the aggregate job'sneedsand from itsRESULTSlist.go test + vetis the only required check onmaster(checked withgh api .../branches/master/protection/required_status_checks), so branch protection needs no change.testdata/device-support-baseline.json,testdata/device-support-v1/**,TestDeviceSupportPythonContract(the test that read theFTW_DEVICE_SUPPORT_*variables),sourceful_test.go,installed_policy_format_test.go, the package cases inretained_package_format_test.go, the two package-entry cases inlegacy_format_upgrade_test.go, and thecontrol_v2_opt_inscenario inlegacy_startup_test.go.sourceful.driver-index/v1" (docs/architecture.md,docs/device-repository.md,docs/writing-a-driver.md).VISION.md,docs/roadmap.mdandSUPPORT.mdhad no such sentences.Kept, and why
ftw.manifest/v1signed channel as it is. That includesdirectManifestRuntimePolicy,recordDirectManifestFormat,FTWSigned, the retained-format rules forftw.manifest/v1, and the read-only policy with its permissions, auth POST path and config secrets.TestHistoricalDirectManifestAllowsVerifiedReinstallAndDefaultmoved intolegacy_format_upgrade_test.go.com.sourceful.driver.<id>identity on read-only channel policies.drivers.RuntimePolicy.validaterequires that form of a read-only artifact, so the channel path still needs it. Changing it would mean editing the control/runtime code ingo/internal/drivers, which this PR leaves alone.go/internal/drivers. It is not deleted here; see "Unreachable code" below.Stored state
format: sourceful.driver-index/v1still loads, from YAML and from stored settings. Loading drops the entry and startup logs oneslog.Warnnaming it.DropRetiredSettings, the existing retired-settings path used for Ask why, then deletes the entry from the stored settings. If that was the only repository listed, the site gets FTW's default signed channel, the same as a site that lists none. The write path stays strict: saving that format is refused as unsupported.control:loads without error. Before,control.enabledon anything other than a package stopped that driver from starting. The block is dropped at load, startup warns once (naming the drivers) that it has no effect, andDropRetiredSettingsdeletes it from stored settings.sourceful.driver-index/v1, or an older unrecorded row whose directory still holdssourceful-package.envelope.json, is deactivated at startup throughManager.Deactivate. Startup logs a warning.driver-repository/effectiveis rebuilt from the remaining active selections, so the release's own driver runs. Such installs stay on disk but are no longer listed inInstalledVersions/AvailableVersions, cannot be activated, and cannot be a rollback target.RuntimePolicyrefuses one that is somehow active.Also in this PR, at the coordinator's request: the docs and code comments that still called the bundled drivers an "offline recovery" set now describe them as the release's own drivers, and describe the local → owner's selection → release resolution order (README,
docs/architecture.md,docs/device-repository.md,docs/writing-a-driver.md, comments inapi.go,config.go,manager.go).Unreachable code, for the owner to decide
With packages gone, nothing produces a
RuntimePolicywithIsControlV2() == true. This control-v2 code stays in the tree but no longer runs in production:go/internal/drivers/control_v2.go: the control branch ofRuntimePolicy.validate, the fieldsCommands,DefaultMode,Lease,SiteEnabledandMaxWrites,DriverCommandV1/DriverCommandResultV1, command/lease validation andparseLuaCommandResult.go/internal/drivers/lua.go:CommandV2,DefaultModeV2,commandResult, and the v2 branches at the lifecycle and context sites (IsControlV2()checks).go/internal/drivers/registry.go:controlV2Runtime,luaRuntime.CommandV2/DefaultModeV2, the v2 startup default, v2 lease expiry,dispatchV2Command,recordCommandResultandCommandResultSink.go/internal/drivers/host.go: the v2 write scope (IsControlV2check).go/cmd/ftw/main.goreg.CommandResultSink→state.RecordDriverCommandResultand thedriver_command_resultstable (go/internal/state).Two other things now always take the same branch:
driverinventory(sourceful.driver-inventory/v1) still has amanagedsource andpackage_id/package_channelthat only a package could fill. Channel installs keep reportinglegacy_repository, exactly as before. I left it unchanged because it is the Nova wire contract, and dropped the per-artifactAvailableVersionslookup inmain.gothat only fed it.go/internal/integration/device_simulator_lua_test.goskips with "run through Zap tools/lua_lab/run_device_simulator_chain.sh". That is Zap automation driving an FTW test, and outside this PR's scope.Test evidence
make verify(all Go suites, compose migration, container boundary, release workflow and native solver checks,go vet ./...,go build ./...): clean. 68 Go packages pass, none fail.LC_ALL=C.UTF-8 npm test: 635 pass, 0 fail.TestLoadDropsDeviceSupportRepositoryAndControlOptInandTestLoadKeepsTheDefaultChannelWhenOnlyADeviceSupportSourceWasListed(YAML load).TestStoredDeviceSupportSettingsLoadAndAreDeleted(stored settings: load, startup check, deletion, idempotent second run).TestDeviceRepositoryRejectsUnknownFormats(write path).TestDeviceSupportPackageIsDeactivatedAtStartupAndTheBundledDriverRuns, for both the recorded-format and the envelope-only row. It asserts that the package is refused as-is, deactivated on the next start, gone fromactive/andeffective/, and that the path resolves to the release's copy and that copy runs in the registry. It also asserts the package is never offered or activated again. This test fails when the startup retirement step is disabled.managedinstead ofunknownfor channel installs; noPackage:line). A person needs to look at it in a browser before merge.config.go,docs/architecture.md) and Propose Jev as typed judgments for Ask why and household intents #1292 (docs/roadmap.md) already conflict withmasterin those files.git merge-treeshows this branch adds no new conflict hunks for them.🤖 Generated with Claude Code
https://claude.ai/code/session_01MuerPFZFG88kgu8sWVHeq7