Add configurable topdata wiki visibility policy (#4)
## Summary - add YAML-backed generated wiki visibility policies for topdata datasets - centralize page and reference eligibility through a visibility index - cover eligibility helpers, metadata precedence, derived feat sets, and link suppression with toolkit tests ## Verification - go test ./... - module ./validate-topdata.sh with the feature toolkit binary - module ./build-wiki.sh --force with the feature toolkit binary Companion module branch: codex-wiki-visibility. Reviewed-on: https://gitea.westgate.pw/ShadowsOverWestgate/sow-tools/pulls/4 Co-authored-by: vickydotbat <vickydotbat@tutamail.com> Co-committed-by: vickydotbat <vickydotbat@tutamail.com>
This commit is contained in:
@@ -273,6 +273,7 @@ topdata:
|
||||
link_strategy: preserve_westgate_wiki_links
|
||||
namespaces_file: namespaces.yaml
|
||||
tables_file: custom-tables.yaml
|
||||
visibility_file: visibility.yaml
|
||||
templates_dir: templates
|
||||
manual_sections_dir: manual-sections
|
||||
deploy_manifest: wiki-manifest.json
|
||||
@@ -347,6 +348,9 @@ autogen:
|
||||
if got, want := effective.TopData.Wiki.TablesFile, "custom-tables.yaml"; got != want {
|
||||
t.Fatalf("expected wiki tables file %q, got %q", want, got)
|
||||
}
|
||||
if got, want := effective.TopData.Wiki.VisibilityFile, "visibility.yaml"; got != want {
|
||||
t.Fatalf("expected wiki visibility file %q, got %q", want, got)
|
||||
}
|
||||
if got, want := effective.TopData.Wiki.TemplatesDir, "templates"; got != want {
|
||||
t.Fatalf("expected wiki templates dir %q, got %q", want, got)
|
||||
}
|
||||
@@ -876,6 +880,7 @@ func TestValidateLayoutRejectsInvalidTopDataWikiConfig(t *testing.T) {
|
||||
StatusListingScope: "global",
|
||||
NamespacesFile: "../namespaces.yaml",
|
||||
TablesFile: "../tables.yaml",
|
||||
VisibilityFile: "../visibility.yaml",
|
||||
TemplatesDir: ".",
|
||||
ManualSectionsDir: "../manual",
|
||||
StalePages: TopDataWikiStalePagesConfig{
|
||||
@@ -898,6 +903,7 @@ func TestValidateLayoutRejectsInvalidTopDataWikiConfig(t *testing.T) {
|
||||
"topdata.wiki.status_listing_scope",
|
||||
"topdata.wiki.namespaces_file",
|
||||
"topdata.wiki.tables_file",
|
||||
"topdata.wiki.visibility_file",
|
||||
"topdata.wiki.templates_dir",
|
||||
"topdata.wiki.manual_sections_dir",
|
||||
"topdata.wiki.stale_pages.default",
|
||||
|
||||
Reference in New Issue
Block a user