71 Commits
Author SHA1 Message Date
archvillainette faee2cde95 fix failing checks + cosmetic renames (#13)
test / test (push) Successful in 1m23s
build-binaries / build-binaries (push) Successful in 2m7s
build-image / publish (push) Successful in 52s
Reviewed-on: #13
Co-authored-by: vickydotbat <vickydotbat@tutamail.com>
Co-committed-by: vickydotbat <vickydotbat@tutamail.com>
2026-06-21 07:40:46 +00:00
archvillainette 13c8ced5e8 clean brittle tests (#9)
build-binaries / build-binaries (push) Successful in 2m7s
test-image / build-image (push) Successful in 43s
test / test (push) Successful in 1m26s
Reviewed-on: #9
Reviewed-by: xtul <mpiasecki720@protonmail.com>
Co-authored-by: vickydotbat <vickydotbat@tutamail.com>
Co-committed-by: vickydotbat <vickydotbat@tutamail.com>
2026-06-20 10:32:20 +00:00
archvillainette f1fd03ee83 pipeline: reject resref collisions when chunking; document erf post-write hashing (#8)
test-image / build-image (push) Successful in 47s
test / test (push) Successful in 1m27s
build-binaries / build-binaries (push) Successful in 2m14s
build-image / publish (push) Successful in 13s
## What

Two correctness fixes surfaced in review of the direct-depot HAK artifact work.

### Reject resref+type collisions in `chunksFromManifest`

A manifest can name two distinct source paths that collapse to the same
`resref+type` (e.g. `creature/foo.tga` and `placeable/foo.tga` — resref is the
lowercase basename minus extension). The ERF writer keys resources on
`Name:Type`, so the second silently shadowed the first: an asset would vanish
from the packed HAK with no error.

`chunksFromManifest` now runs `ensureUniqueChunkResources` per chunk and fails
the build on a duplicate. This guards **both** build paths — the legacy
`--source-manifest` flow and the direct content-addressed flow
(`chunksFromSourceManifest` → `chunksFromManifest`).

### Document erf post-write hash coupling

`writeResourceData` streams the source into the output while hashing, so
size/SHA mismatches are only detected *after* the bytes are written. A non-nil
return therefore means the writer holds partial, unverified output and the
caller must discard it. Added a comment making that contract explicit;
`writeHAKArchive` already honours it (writes to a temp file, removes on any
Write error, never renames a bad archive into place).

## Tests

- `TestChunksFromManifestRejectsResrefCollision`: collision → error, distinct
  resrefs → clean. Asserts only error presence/absence — silent asset loss is
  the contract, not any specific wording.
- `go vet ./internal/erf/ ./internal/pipeline/` clean.
- `go test ./internal/erf/ ./internal/pipeline/` green.

## Follow-up

A new crucible release must be cut after this merges so the guard ships in the
binary `sow-assets-manifest` pins.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

Reviewed-on: #8
Co-authored-by: vickydotbat <vickydotbat@tutamail.com>
Co-committed-by: vickydotbat <vickydotbat@tutamail.com>
2026-06-20 07:53:04 +00:00
archvillainette cdbbba3181 add content-addressed hak source mode (#7)
test-image / build-image (push) Successful in 46s
test / test (push) Successful in 1m26s
build-binaries / build-binaries (push) Successful in 2m20s
build-image / publish (push) Successful in 31s
Reviewed-on: #7
Co-authored-by: vickydotbat <vickydotbat@tutamail.com>
Co-committed-by: vickydotbat <vickydotbat@tutamail.com>
2026-06-19 20:56:36 +00:00
archvillainette 56c67132f3 claude: fold in old sow-tools 2026-06-13 09:49:29 +02:00
archvillainette 97f8427c4b Phase 5: scaffold Crucible (sow-tools) — dispatcher + builder shims, container, PR-first CI, fail-closed (D11, D19). 2026-06-11 20:36:13 +02:00
archvillainette f3ed13ce19 feat: remove NWScript compiler support 2026-06-09 17:57:57 +02:00
archvillainette d0e065536c sow-head-vfx -> sow-accessory-vfx 2026-05-31 15:40:45 +02:00
archvillainette 39f329343b Change head_visualeffects to accessory_visualeffects 2026-05-31 15:24:50 +02:00
archvillainette 3e169276f7 Categories with underscore 2026-05-31 14:49:52 +02:00
archvillainette aa47532ef1 VFX Category Label Generation 2026-05-31 13:47:14 +02:00
archvillainette a5dbad4ff9 Autogen configuration enabled 2026-05-29 22:13:17 +02:00
archvillainette 311bb8a3d0 Accessories unhardcoded 2026-05-28 09:58:35 +02:00
archvillainette 44e6fab372 Asset-owned topdata 2026-05-23 00:29:04 +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 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 7d286551b3 Wrapper tool hardening and cleanup 2026-05-13 19:06:24 +02:00
archvillainette c7fd63a80c Music Pipeline Configuration Hardening 2026-05-08 11:22:57 +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 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 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
archvillainette 13a615dbd7 Credits Caching Pipeline Test 2026-05-07 12:13:03 +02:00
archvillainette b717b9cce2 Panic Fix 2026-05-07 09:09:41 +02:00
archvillainette fa3dde4293 .cache used for credits 2026-05-07 09:04:20 +02:00
archvillainette f6bb4fe3d7 Music Pipeline Implementation 2026-05-07 08:51:42 +02:00
archvillainette 4009931fd0 Dev Testing + AutoGen Activation 2026-04-25 08:57:10 +02:00
archvillainette 831d3b47da Refactor build and topdata path resolution through project config 2026-04-24 19:11:10 +02:00
archvillainette 899534e9cd Fix Destructive Extract v2 2026-04-21 19:21:44 +02:00
archvillainette c4c32fb463 Fix Destructive Extracts 2026-04-21 19:16:01 +02:00
archvillainette 2c2dce7e41 Add Extract Ignore Lists 2026-04-21 19:10:29 +02:00
archvillainette b690135057 Allow Optional Args With Extract 2026-04-21 19:04:58 +02:00
archvillainette f249108cf0 Changed sow-tools HAK split planning to preserve previous split membership 2026-04-18 18:39:15 +02:00
archvillainette 8e7ffd8f4f Resolve LFS objects from git common dir 2026-04-18 16:03:49 +02:00
archvillainette 6f6bf7080a Move Generation Destinations 2026-04-18 10:24:34 +02:00
archvillainette ef431bc8ae Cache Git Log 2026-04-15 15:11:31 +02:00
archvillainette 787ba0728c Build with CreatedAt time instead of ChangedAt 2026-04-15 15:03:55 +02:00
archvillainette ab18baf067 build-haks now accepts --source-manifest <path>
When that flag is used, sow-tools:
- collects only the assets referenced by that manifest subset
- skips full-project chunk planning for the per-archive run
- reconstructs just the requested archive chunks from the manifest
2026-04-14 12:12:42 +02:00
archvillainette 9577bc853b Patch Content Requirements Blocker
Root cause:

build-haks --archive ... was still collecting content requirements for
the entire asset inventory before chunk filtering.
So even when building sow_over_01, it demanded downloaded LFS objects
from unrelated groups like appr.
2026-04-14 11:48:31 +02:00
archvillainette 9dbb533241 Parse LFS Pointers Quickly
sow-tools no longer relies on git lfs ls-files --json for planning. It
now parses the checked-out LFS pointer files directly, so split sizing
and content_hash use the real LFS oid and size.
2026-04-14 11:40:38 +02:00