Commit Graph
100 Commits
Author SHA1 Message Date
archvillainette 91ab34ddff Fix validator screaming about new columns 2026-05-24 12:06:47 +02:00
archvillainette 334cd427c0 Targeted stale wiki cache reuse fix
**Scope Audited**
`module/` release/wiki wrapper flow and `toolkit/` wiki generation cache logic.

**Changes Made**
Root cause was stale wiki cache reuse. The generator cache considered digest + page count, but not generator version, so a restored VPS cache with old generated output could skip regeneration.

Changed [wiki_native.go](/home/vicky/Projects/nwnee-shadowsoverwestgate/toolkit/internal/topdata/wiki_native.go:29) to bump the wiki generator to `nodebb-tiptap-html-v3`, and changed [wiki_native.go](/home/vicky/Projects/nwnee-shadowsoverwestgate/toolkit/internal/topdata/wiki_native.go:268) so cached pages are current only when `state.version` matches.

**Configuration/Schema Impact**
No YAML/config/schema changes. Existing `.cache/wiki/state.json` files with `nodebb-tiptap-html-v2` will be invalidated and regenerated.

**Compatibility Impact**
This is compatible with existing caches; it only forces one regeneration when the new toolkit runs. After that, normal digest-based skipping resumes.

**Tests Added**
Added [TestBuildWikiRegeneratesOldGeneratorCache](/home/vicky/Projects/nwnee-shadowsoverwestgate/toolkit/internal/topdata/wiki_native_test.go:183), which simulates a `v2` cache and verifies `build-wiki` regenerates it.

**Validation Performed**
- Confirmed new test failed before the fix with `wiki status "skipped"`.
- `go test ./internal/topdata -count=1` passes.
- `./build-tool.sh` succeeds.
- `SOW_TOOLS_DEV_BINARY=../toolkit/tools/sow-toolkit ./build-wiki.sh` now reports:
  - `wiki pages: 1163`
  - `wiki status: generated`
- Local generated race pages: `17`.

**Remaining Risk / VPS Next Step**
The VPS release job must use this rebuilt/published toolkit. On the next run, you should see the wiki build regenerate once before deploy, and deploy should load `1163` local pages instead of `1092`, including `races:*` pages.
2026-05-24 10:13:52 +02:00
archvillainette 153f46fbc8 Fix race pages deploy 2026-05-24 09:45:57 +02:00
archvillainette 58b8955e07 Pagination deploy fix 2026-05-24 09:25:11 +02:00
archvillainette 6ac18e36c8 Wipe metadata 2026-05-24 08:22:32 +02:00
archvillainette 89d2da6f11 Formatting fix? 2026-05-24 07:52:33 +02:00
archvillainette 418cd2fa69 Goodbye legacy DokuWiki translators... 2026-05-24 07:32:56 +02:00
archvillainette 025995815d Dry runs? Pls... 2026-05-23 22:11:36 +02:00
archvillainette e275422b91 Deploy cursor fix? 2026-05-23 21:40:56 +02:00
archvillainette 3d42fc70bc Fixing release queue 2026-05-23 21:28:52 +02:00
archvillainette ed2ad4f9a0 BAB tables 2026-05-23 20:53:58 +02:00
archvillainette 3f36ed529a Class skillls/list splitting 2026-05-23 20:10:01 +02:00
archvillainette 22d7fa5e6f Add managed namespace wiki reset deploy 2026-05-23 17:51:27 +02:00
archvillainette 1221156084 Fix wiki deploy stale purge ordering 2026-05-23 16:59:28 +02:00
archvillainette 7288d7e2b7 Fix topdata lock file generation 2026-05-23 00:52:16 +02:00
archvillainette 44e6fab372 Asset-owned topdata 2026-05-23 00:29:04 +02:00
archvillainette 82bd075ae4 autogen cached models 2026-05-23 00:24:47 +02:00
archvillainette a17477cff1 Page generation to use title instead of key 2026-05-22 13:21:08 +02:00
archvillainette 835d1153f0 Canonical path adherence (#10)
Reviewed-on: https://gitea.westgate.pw/ShadowsOverWestgate/sow-tools/pulls/10
Co-authored-by: vickydotbat <vickydotbat@tutamail.com>
Co-committed-by: vickydotbat <vickydotbat@tutamail.com>
2026-05-22 12:37:00 +02:00
archvillainette f4d92a9766 Fix Wiki Generation Not Running 2026-05-22 09:38:46 +02:00
archvillainette e6fdcdec87 Available Feats Support 2026-05-22 01:29:07 +02:00
archvillainette afd40f0682 Revise class progression feat availability design 2026-05-22 01:18:18 +02:00
archvillainette 55794a9fde Document class progression feat availability design 2026-05-22 01:14:28 +02:00
archvillainette a0af6315b9 Further wiki slug normalization 2026-05-21 22:17:56 +02:00
archvillainette 43fee721db Slug joiner normalization 2026-05-21 22:06:52 +02:00
archvillainette 96afb64c7a Wiki List Support 2026-05-21 21:54:07 +02:00
archvillainette 4495feb128 Wiki Template-First Rendering (#9)
Reviewed-on: https://gitea.westgate.pw/ShadowsOverWestgate/sow-tools/pulls/9
Co-authored-by: vickydotbat <vickydotbat@tutamail.com>
Co-committed-by: vickydotbat <vickydotbat@tutamail.com>
2026-05-21 21:45:21 +02:00
archvillainette 6790274d95 Title normalization hot fix 2026-05-21 21:14:25 +02:00
archvillainette 74c5ea34e1 Normalize feat names (#8)
Reviewed-on: https://gitea.westgate.pw/ShadowsOverWestgate/sow-tools/pulls/8
Co-authored-by: vickydotbat <vickydotbat@tutamail.com>
Co-committed-by: vickydotbat <vickydotbat@tutamail.com>
2026-05-21 21:03:23 +02:00
archvillainette 59ec5cb41d Stale manifest recovery (#7)
Reviewed-on: https://gitea.westgate.pw/ShadowsOverWestgate/sow-tools/pulls/7
Co-authored-by: vickydotbat <vickydotbat@tutamail.com>
Co-committed-by: vickydotbat <vickydotbat@tutamail.com>
2026-05-21 20:02:45 +02:00
archvillainette 8cebf718b7 Canonical Wiki Paths Enforcement (#6)
### Summary
- Change generated topdata wiki links to target public wiki namespace and canonical slug paths.
- Add generated public path metadata to wiki page generation and page-index output.
- Add YAML-driven generated slug overrides and public-target collision validation.

### Details
- Generated relation links now render public targets such as:
  - `[[feat/hardiness-vs-enchantments|Hardiness vs. Enchantments]]`
  - `[[feat/favored-enemy-elves|Favored Enemy: Elves]]`
- Topdata page IDs remain the internal identity for output layout, managed markers, deploy state, and bookkeeping.
- Generated managed markers now include the effective public slug:
  - `<!-- sow-topdata-wiki:page=... wiki_slug=... -->`
- Page-index entries now include:
  - `public_slug`
  - `public_target`
- Added parsing and validation for `page_paths.slug_overrides` from `topdata/wiki/wiki.yaml`.
- Generated public targets are validated for duplicate namespace-local collisions.
- Table link helpers now derive public targets from target page titles when available, so display aliases do not accidentally change link destinations.

### Tests
- Added and updated coverage for:
  - public target rendering
  - marker `wiki_slug` output
  - page-index public metadata
  - duplicate generated public target rejection
  - slug override parsing and validation
  - override-driven target selection
  - target title slugging independent of display labels

### Validation
- `go test ./...`
- `gofmt -w` on changed Go files
- `./build-tool.sh`
- `git diff --check`

Reviewed-on: https://gitea.westgate.pw/ShadowsOverWestgate/sow-tools/pulls/6
Co-authored-by: vickydotbat <vickydotbat@tutamail.com>
Co-committed-by: vickydotbat <vickydotbat@tutamail.com>
2026-05-21 19:21:02 +02:00
archvillainette d0e5e42090 Chained feat prereq wiki visibility fix 2026-05-21 16:09:13 +02:00
archvillainette 23ef63ca7b Prerequisite reachability filters
**Scope Audited**
- Module wiki visibility config and docs.
- Toolkit wiki expression engine and visibility tests.
- Feat prerequisite rendering/reference behavior.

**Changes Made**
- Added `hidden_ref(Field, "dataset")` and `all_hidden_refs(..., "dataset")` helpers in [wiki_tables.go](/home/vicky/Projects/nwnee-shadowsoverwestgate/toolkit/internal/topdata/wiki_tables.go:914).
- Added feat visibility exclusions in [visibility.yaml](/home/vicky/Projects/nwnee-shadowsoverwestgate/module/topdata/wiki/visibility.yaml:44) for:
  - `PREREQFEAT1`
  - `PREREQFEAT2`
  - `REQSKILL`
  - `REQSKILL2`
  - `OrReqFeat0..OrReqFeat4`
- Documented the helpers in [README.md](/home/vicky/Projects/nwnee-shadowsoverwestgate/module/topdata/wiki/README.md:53).
- Added coverage in [wiki_native_test.go](/home/vicky/Projects/nwnee-shadowsoverwestgate/toolkit/internal/topdata/wiki_native_test.go:646).

**Configuration/Schema Impact**
- No schema file change. `visibility.yaml` can now use the two new expression helpers.

**Compatibility Impact**
- Existing visibility expressions are unchanged.
- Missing or `****` prerequisite fields are ignored.
- Present references that resolve to hidden or missing wiki rows are treated as unreachable.

**Tests/Validation**
- Confirmed the new test failed before implementation on unknown helper.
- Ran `go test ./internal/topdata -run TestWikiVisibility`.
- Ran `go test ./internal/topdata`.
- Rebuilt toolkit with `./build-tool.sh`.
- Ran module wiki build with local toolkit:
  `SOW_TOOLS_DEV_BINARY=../toolkit/tools/sow-toolkit ./build-wiki.sh`
  Result: `wiki pages: 771`.
2026-05-21 16:04:18 +02:00
archvillainette f57a3c6ff2 Generated Wiki Stale Purge Method (#5)
Reviewed-on: https://gitea.westgate.pw/ShadowsOverWestgate/sow-tools/pulls/5
Co-authored-by: vickydotbat <vickydotbat@tutamail.com>
Co-committed-by: vickydotbat <vickydotbat@tutamail.com>
2026-05-21 14:58:51 +02:00
archvillainette a64dbfb085 docs: plan generated wiki stale purge 2026-05-21 14:20:23 +02:00
archvillainette cbec7f9aa0 docs: design generated wiki stale purge 2026-05-21 14:12:50 +02:00
archvillainette 057ed19276 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>
2026-05-21 13:45:06 +02:00
archvillainette 499d7773cd chore: ignore local worktrees 2026-05-21 13:18:35 +02:00
archvillainette 282b5d271b Fix wiki deploy 2026-05-20 20:28:58 +02:00
archvillainette c37b27b720 Immutable Extracts 2026-05-20 20:20:07 +02:00
archvillainette b1b7a08848 Extraction of other resource mappings 2026-05-20 19:27:27 +02:00
archvillainette 4c8faf40ec Generic user_bottom wiki block 2026-05-20 16:02:26 +02:00
archvillainette 3feea8df81 Phase 2 wiki template refactor 2026-05-20 13:48:38 +02:00
archvillainette 11f0863d0a Phase 1 Wiki Template refactor 2026-05-20 13:31:27 +02:00
archvillainette 92770bbaa0 Fix base parts not generating 2026-05-17 15:33:21 +02:00
archvillainette b5a3a715a4 Sorting changes 2026-05-17 14:43:09 +02:00
archvillainette 574349b929 Automated parts sorting 2026-05-17 14:21:05 +02:00
archvillainette d7704c5f68 Migrate parts data to assets repo 2026-05-17 13:46:09 +02:00
archvillainette faf1459dba Wiki title prefix policy 2026-05-16 23:58:46 +02:00
archvillainette d34a640efe Fix preflight adoption 2026-05-16 23:23:55 +02:00
archvillainette 3dc69bb070 Edit lock acquisition 2026-05-16 23:05:42 +02:00
archvillainette 8da3f42c2f Wiki deploy manifest fix 2026-05-16 20:16:48 +02:00
archvillainette 28bea40038 Error on duplicate keys 2026-05-15 23:02:33 +02:00
archvillainette 505afb5ac5 Wiki pipeline audit
Changes Made

- page-index.json now includes generated meta/status pages, not just entity pages.
- Wiki page count now comes from the final page index, so wiki pages: matches generated HTML files.
- Page IDs now normalize /, \, and _ to : to prevent duplicate index entries for slash-bearing keys.
- Added page-index validation for duplicate page_id and duplicate output_path.
2026-05-15 09:41:54 +02:00
archvillainette 9b2084344d Wiki pipeline (#3)
Implemented the wiki pipeline to a shippable local state across `toolkit/`, `module/`, and the NodeBB wiki plugin.

**Scope Audited**
- Toolkit config/project loading, wiki renderer, deployer, app command wiring.
- Module `nwn-tool.yaml`, wiki source/docs, release script, topdata docs.
- Plugin sanitizer/API storage contract docs and sanitizer tests.

**Changes Made**
- Added topdata-owned wiki declarations under `module/topdata/wiki/`.
- Added `topdata.wiki.*` config fields, validation, effective config output.
- Switched generated wiki pages to `.html` with HTML comment managed/manual markers.
- Added `page-index.json` generation and deterministic metadata.
- Added manual-section merge preservation and stale page `report`/`archive` handling.
- Added namespace `category_env` loading from `topdata/wiki/namespaces.yaml`, while keeping `--category`/`NODEBB_WIKI_CATEGORIES` overrides.
- Updated release deployment to keep dry-run first and make stale cleanup opt-in via `SOW_MODULE_WIKI_DEPLOY_STALE_POLICY`.
- Updated plugin sanitizer to preserve only `sow-topdata-wiki` comments.

**Configuration/Schema Impact**
- `module/nwn-tool.yaml` now declares wiki source, renderer, link strategy, templates, manual sections, managed marker policy, and stale policy.
- Deploy manifest entries now support stale/archive metadata: `stale`, `last_seen_hash`, `archived_hash`, `title`, `namespace`, `tid`, `pid`, `cid`.

**Compatibility Impact**
- Legacy Markdown managed markers are still readable for migration.
- Generated output is now HTML, not Markdown.
- Existing mapped pages update by `pid`; creates still require explicit `--create`.

**Tests Added/Updated**
- Go tests for wiki config validation, HTML rendering, page index, manual merge, stale report/archive, app summary output.
- Plugin sanitizer test for generated topdata bot HTML markers/subset.

**Validation Performed**
- `go test ./internal/project ./internal/topdata ./internal/app` passed.
- `./build-tool.sh` passed.
- `SOW_TOOLS_DEV_BINARY=../toolkit/tools/sow-toolkit ./validate-topdata.sh` passed.
- `SOW_TOOLS_DEV_BINARY=../toolkit/tools/sow-toolkit ./build-wiki.sh --force` passed, generating 1345 entity pages.
- `deploy-wiki --dry-run --create` with dummy endpoint/token and namespace CID env vars passed locally: 1377 planned creates, 0 stale/drift.
- `node tests/wiki-html-sanitizer.test.js` passed.

**Remaining Risks**
- Full plugin `npm test` is blocked by an existing unrelated drawer CSS contract failure in `tests/wiki-article-drawers.test.js`.
- Controlled live migration was not performed because it requires a non-production NodeBB namespace and credentials.
- Direct `PUT /api/v3/posts/{pid}` save-filter behavior is documented as needing live confirmation against the deployed NodeBB/plugin stack.

Reviewed-on: https://gitea.westgate.pw/ShadowsOverWestgate/sow-tools/pulls/3
Co-authored-by: vickydotbat <vickydotbat@tutamail.com>
Co-committed-by: vickydotbat <vickydotbat@tutamail.com>
2026-05-15 09:09:37 +02:00
archvillainette d767ec0a25 Support for unique prefixes on 2da conversion 2026-05-15 08:05:42 +02:00
archvillainette f2ade14967 More tests 2026-05-14 21:20:31 +02:00
archvillainette 59994c8b29 Closing gaps and cleaning house 2026-05-14 21:08:38 +02:00
archvillainette 4199d615a3 Unit test 2026-05-14 19:59:15 +02:00
archvillainette e39d539585 Fix stale tag considerations 2026-05-14 19:49:42 +02:00
archvillainette 961a518d66 Wrapper fixes 2026-05-14 19:04:07 +02:00
archvillainette 0e1001657a Fix id flip 2026-05-14 18:50:10 +02:00
archvillainette 9384d905d1 Enable plain TTY logging mode + loose-data processing 2026-05-14 15:11:08 +02:00
archvillainette 2cef662e8e Validation hardening 2026-05-14 15:01:04 +02:00
archvillainette 651336d48e Key lock honoring? 2026-05-14 14:16:02 +02:00
archvillainette baa81f6cb7 Praying for deliberately deleted entries to STOP BEING PARSED AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 2026-05-14 13:45:16 +02:00
archvillainette c9e2b9fdc4 Fix deliberate deletion reuse 2026-05-14 12:54:09 +02:00
archvillainette 393e9a4e59 Lockfile priority normalization 2026-05-14 12:21:47 +02:00
archvillainette 4449fa4f0e Fix override precedence 2026-05-14 11:43:52 +02:00
archvillainette 8fcf0863cc Fix: replaced keys become stale 2026-05-14 11:25:13 +02:00
archvillainette e616ea5043 Fixed freshness check 2026-05-14 10:19:45 +02:00
archvillainette d61ab33aa4 Class skill injection now points to authored entries 2026-05-14 09:29:55 +02:00
archvillainette 18066ee0dd Lock normalization 2026-05-14 08:34:50 +02:00
archvillainette c66b7dcb2b Fix Toolkit Overriding Semantics
- key: null and key: "****" now mean “remove this row's identity”
  - only "null": true blanks the whole row
  - explicit id remains authoritative on id + key overrides
  - when a row claims a key from another row, the key and lock entry can move with it if the old row
    loses that key
2026-05-14 00:15:58 +02:00
archvillainette 985bffa8fb Null key overrides add null rows 2 2026-05-13 22:22:20 +02:00
archvillainette f3885cf93f Null key overrides generate null rows 2026-05-13 22:21:56 +02:00
archvillainette 14313b7ac9 Updated documentation for wrappers 2026-05-13 20:20:15 +02:00
archvillainette 4fd0375608 replaced explicit masterfeats/feat base+lock path branches 2026-05-13 20:14:27 +02:00
archvillainette 4b55628ac8 Explicit masterfeats/feats removal 2026-05-13 19:32:41 +02:00
archvillainette 03e2320788 Conversion to full YAML 2026-05-13 19:22:07 +02:00
archvillainette 7d286551b3 Wrapper tool hardening and cleanup 2026-05-13 19:06:24 +02:00
archvillainette 53cb1e6996 Portrait reservation fix? 2026-05-12 17:36:19 +02:00
archvillainette 838d632a28 Changelog fixes 2026-05-10 18:34:16 +02:00
archvillainette 7919ded8b4 Model compilation contract 2026-05-10 09:11:06 +02:00
archvillainette dee53e8eb4 Model compilation contract 2026-05-08 22:29:46 +02:00
archvillainette c7fd63a80c Music Pipeline Configuration Hardening 2026-05-08 11:22:57 +02:00
archvillainette 75942b0940 Normalize Log Linebreaks 2026-05-08 09:14:27 +02:00
archvillainette 4732947db8 Compile pipeline fix 2026-05-08 09:05:06 +02:00
archvillainette 91c90793a2 Extraction Hardening 2026-05-08 01:26:41 +02:00
archvillainette fa4c9116ae Hardening audit
Key hardening changes:

  - Config validation now rejects paths.source: . and paths.assets: ., so source/asset roots cannot
    resolve to the repository root.
  - apply-hak-manifest now refuses to run when paths.source is unset or unsafe, instead of potentially
    writing under a root-level module/.
  - Inline flags across utility parsers now reject empty values consistently, e.g. --dataset=, --hak=,
    --endpoint=, --output=.
  - build-changelog now supports --flag=value inline syntax like the other utilities.
2026-05-08 00:31:17 +02:00
archvillainette 9f16aa8872 Fix paths asset regression 2026-05-08 00:23:41 +02:00
archvillainette 4dc16793cd Restore Spinner 2026-05-07 23:08:26 +02:00
archvillainette d1b20684f5 Configuration hardening 2026-05-07 21:33:53 +02:00
archvillainette bba0d2fb45 Music Pipeline Refactor 2026-05-07 18:17:40 +02:00
archvillainette 6ab5f05c41 Log Refactor Phase 2 2026-05-07 15:36:40 +02:00
archvillainette 26db69c9eb Script Wrapper Contract 2026-05-07 15:12:00 +02:00
archvillainette b39bdf13e8 Configuration Hardening 2
What changed:

  - Added visible runtime override reporting with masking for sensitive values.
  - Expanded effective config for build cleanup, script compiler discovery/env, extract layout/cleanup/
    HAK discovery, wiki deploy defaults, autogen cache policy, and release-source env names.
  - Wired configured values into build, script compiler resolution, extract, autogen cache refresh/max
    age, parts manifest release source, wiki generation/deploy, and TLK output naming.
  - Added config sources override output and validation-rule hints in config explain.
  - Added CONFIGURATION_HARDENING_AUDIT.md.
  - Updated README.md with config commands, schema defaults, and JSON artifact boundaries.
  - Added regression tests for override visibility/masking, compiler/extract/wiki/autogen config,
    configured HAK discovery, and config sources output.
2026-05-07 14:22:47 +02:00
archvillainette 60d2de9f2d Configuration Hardening
Key changes:

  - Added internal/project/effective.go with normalized effective config, defaults, provenance, and
    JSON output.
  - Added config subcommands:
      - config validate
      - config effective [--json|--yaml]
      - config inspect [<key>]
      - config explain <key>
      - config sources
  - Added YAML schema fields for configurable outputs, cache roots, script cache, inventory extensions,
    topdata output/wiki paths, and autogen cache root.
  - Routed existing hardcoded paths through effective config wrappers for module archives, HAK
    manifests/archives, script cache, music cache/credits, topdata outputs, and autogen caches.
  - Added validation for unsafe generated output/cache paths.
  - Updated command descriptions to avoid fixed build/, .cache, sow_top, etc.
  - Added regression tests for defaults, provenance, deterministic effective config, YAML-controlled
    derivation, config commands, and invalid paths.
2026-05-07 14:09:20 +02:00
archvillainette 000d31ad24 YAML Configuration Refactor 2026-05-07 13:44:46 +02:00
archvillainette 7abcbf1a38 Log Refactor 2026-05-07 13:33:25 +02:00