Commit Graph
127 Commits
Author SHA1 Message Date
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 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 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 601e89bece Packaging Fix 2026-05-07 07:41:22 +02:00
archvillainette a1bb5b74f8 Normalized Routing 2026-05-04 18:45:51 +02:00
archvillainette c86aa9e2de Honor 'SOW_ASSETS_SERVER_URL and 'SOW_ASSETS_REPO' 2026-05-04 18:06:58 +02:00
archvillainette 18eab086cc Move Wiki Pages to MD 2026-04-30 20:43:53 +02:00
archvillainette 78133efdf4 Fix Wiki Deploy Post Titles 2026-04-30 20:17:02 +02:00
archvillainette f480815e5d Wiki Deploy Code 2026-04-30 19:51:50 +02:00
archvillainette d893785c0c Fix Autogen Lockfile Overrides 2026-04-25 23:36:12 +02:00
archvillainette 88843a1ec1 Refresh Manifests 2026-04-25 09:06:28 +02:00
archvillainette 4009931fd0 Dev Testing + AutoGen Activation 2026-04-25 08:57:10 +02:00
archvillainette b6fff4bed4 Head Accessories AutoGen Configuration 2026-04-25 07:40:17 +02:00
archvillainette 831d3b47da Refactor build and topdata path resolution through project config 2026-04-24 19:11:10 +02:00
archvillainette e0b3164427 Keep wiki deploy dry runs read-only 2026-04-18 18:30:15 +02:00
archvillainette dfde20f679 Add deploy-wiki command for native DokuWiki deployment
- Add DeployWikiWithOptions function in new wiki_deploy.go
- Add deploy-wiki command to sow-toolkit CLI
- Supports DOKUWIKI_RPC_* and GITHUB_REF_NAME env vars
- Includes --dry-run, --source-dir, --manifest options
2026-04-18 12:23:24 +02:00
archvillainette c52311ce5f Add build-wiki command for isolated wiki generation
- Add BuildWikiWithOptions in native.go for building wiki from pre-existing topdata
- Add runBuildWiki and parseBuildWikiArgs in app.go for CLI integration
- Add --force flag to force rebuild even when output is current
2026-04-18 11:13:25 +02:00
archvillainette 5e900d00b5 Flatten Cache Folder 2026-04-18 10:34:18 +02:00
archvillainette 6f6bf7080a Move Generation Destinations 2026-04-18 10:24:34 +02:00
archvillainette 897776f432 Respect Accessibility Fields For Feats 2026-04-18 09:28:08 +02:00
archvillainette 6daf5bf7a7 Opt-In Wiki Generation 2026-04-18 09:11:03 +02:00