When a Rego policy package is removed from policy/, its generated .adoc file in antora/docs/modules/ROOT/pages/packages/ persists in the repo and published docs. CI doesn't catch this: generate-docs followed by git diff --exit-code only detects additions and modifications, not leftover files from deleted packages.
Same problem as conforma/cli#1512, fixed there in conforma/cli#3383.
The fix here should be simpler than the cli version. All generated per-package files live in the packages/ subdirectory, separate from handwritten pages (index.adoc, authoring.adoc, etc.). So instead of the marker-based approach used in cli, GenerateAsciidoc() could just remove all .adoc files from packages/ before regenerating, since everything in that directory is generated.
Nav partials and top-level policy pages (one per category, fully overwritten each run) are not affected.
When a Rego policy package is removed from
policy/, its generated .adoc file inantora/docs/modules/ROOT/pages/packages/persists in the repo and published docs. CI doesn't catch this:generate-docsfollowed bygit diff --exit-codeonly detects additions and modifications, not leftover files from deleted packages.Same problem as conforma/cli#1512, fixed there in conforma/cli#3383.
The fix here should be simpler than the cli version. All generated per-package files live in the
packages/subdirectory, separate from handwritten pages (index.adoc,authoring.adoc, etc.). So instead of the marker-based approach used in cli,GenerateAsciidoc()could just remove all.adocfiles frompackages/before regenerating, since everything in that directory is generated.Nav partials and top-level policy pages (one per category, fully overwritten each run) are not affected.