Documentation
¶
Overview ¶
Command ptahdriftcategories keeps support/ptah-drift-categories.json equal to the drift finding categories the pinned Ptah build can emit.
The operator refuses a drift report that names a category outside its closed vocabulary, so a Ptah that grows a category fails Observe for every change in it until the vocabulary follows. The vendored file is what the vocabulary is held to by a unit test that always runs. This program is what holds the vendored file to Ptah: it reads the files that produce the categories at the commit support/ptah.json pins, and compares their digests and the categories they name with the file.
A Ptah bump that leaves those files alone changes nothing here. One that edits them fails until the file is regenerated with -write, and the diff then shows which categories moved. CI runs the comparison where it already has the pinned source, in the job that builds the executor from it.
Usage:
go run ./hack/ptahdriftcategories -ptah <Ptah checkout> [-write]
The checkout has to contain the pinned commit; its working tree is not read.