Commit Graph
43 Commits
Author SHA1 Message Date
archvillainette 3f500dabc8 Generate palette projections at module build (#50)
build-binaries / build-binaries (push) Successful in 2m13s
*palcus.itp files are Toolset-derived snapshots (category skeleton + blueprint descriptors). This makes Crucible the generator: module builds strip stale descriptors from the committed skeletons and inject descriptors computed from the source-tree blueprints (NAME/STRREF + RESREF, plus CR/FACTION for creatures, faction names resolved via repute.fac). Compare applies the same projection; extract never writes *palcus.itp back into source, so local Toolset palette mess stays local.

Companion PR in sow-module strips the committed palcus files down to skeletons.

🤖 Generated with [Claude Code](https://claude.com/claude-code)Reviewed-on: #50

Co-authored-by: vickydotbat <vickydotbat@tutamail.com>
2026-07-23 09:35:45 +00:00
archvillainette f257672427 command and help ux pass (#21)
sync-wrappers / sync (push) Successful in 16s
test / test (push) Successful in 1m22s
build-binaries / build-binaries (push) Successful in 2m7s
build-image / publish (push) Successful in 38s
Reviewed-on: #21
Co-authored-by: vickydotbat <vickydotbat@tutamail.com>
Co-committed-by: vickydotbat <vickydotbat@tutamail.com>
2026-06-25 09:29:39 +00:00
archvillainette eb5d15061c fix(pipeline): make the full module build work for module-only projects (#17)
test / test (push) Successful in 1m23s
build-binaries / build-binaries (push) Successful in 2m9s
build-image / publish (push) Successful in 52s
`crucible module build` runs the full pipeline (module + HAK producer +
topdata). A module-only project consumes prebuilt HAKs and has no
`paths.assets`, so the HAK stage crashed on the unset assets dir: the
music-credits walk hit `filepath.WalkDir("")` (`lstat : no such file or
directory`) and asset collection hit `filepath.Rel(root, "")`.

Guard both on an unset `AssetsDir()`: an absent assets tree simply means
no authored credits and no asset files to collect, so the HAK stage
no-ops cleanly while topdata generated-2DA assets still build. Honors
spec Decision 3 (canonical `crucible module build`, no `build-module`).

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

Reviewed-on: #17
Co-authored-by: vickydotbat <vickydotbat@tutamail.com>
Co-committed-by: vickydotbat <vickydotbat@tutamail.com>
2026-06-24 15:32:01 +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 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 4732947db8 Compile pipeline fix 2026-05-08 09:05:06 +02:00
archvillainette d1b20684f5 Configuration hardening 2026-05-07 21:33:53 +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 7abcbf1a38 Log Refactor 2026-05-07 13:33:25 +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 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
archvillainette bf7c844f2e Build in /tmp and immediately discard 2026-04-14 09:49:36 +02:00
archvillainette b766ff1348 Pipeline Planning 2026-04-14 01:08:38 +02:00
archvillainette 471fbbb55e Allow optional hak releases 2026-04-13 12:41:14 +02:00
archvillainette 29ddf8e3c5 (Potentially Breaking Change) Git-Based Hak Chunk Ordering 2026-04-10 22:08:54 +02:00
archvillainette cecafa9c1f Script Compiler Pathing 2026-04-10 19:50:17 +02:00
archvillainette 543945f099 Fix type extensions 2 2026-04-10 08:43:06 +02:00
archvillainette 75c90de628 Seperate Module and Topdata Pipeline 2026-04-09 22:12:06 +02:00
archvillainette 9e13bb9bab Improved Logging 2026-04-09 21:56:53 +02:00
archvillainette 68aea4ba00 Update BuildAndPackage 2026-04-09 17:23:00 +02:00
archvillainette 4f8bfc133a Native Workflow Support 2026-04-09 11:01:39 +02:00
archvillainette bf87144688 Conservative build-haks
In build.go, build-haks now does conservative chunk reuse instead of
wiping all generated HAKs up front. It plans chunks as before, computes
a deterministic per-chunk content_hash, reuses an existing .hak only
when the prior manifest entry and on-disk archive still match, rebuilds
only changed chunks, and deletes only stale generated HAKs that fall out
of the new plan. I added coverage for unchanged reuse and selective
rebuilds in pipeline_test.go, and go test ./... passes in sow-tools.
2026-04-04 11:51:53 +02:00
archvillainette 38ee1e21e0 Compile referenced NWScript during module builds 2026-04-02 22:04:58 +02:00
archvillainette 7c7eb4dcc0 User-Friendliness 2026-04-02 20:41:48 +02:00
archvillainette 77b21081d7 Tool: Polish Pass 1
In sow-tools, extract now behaves like a real sync by default: it
overwrites changed extracted files, removes stale extracted files that
no longer exist in the built archives, and normalizes extracted resource
filenames to lowercase. I also made validation warn on uppercase
resource filenames so mixed-case names like I_ELVENCHAIN are surfaced
instead of quietly lingering. The extract command output now includes
overwritten and removed counts too.
2026-04-02 20:04:41 +02:00
archvillainette 65b9a3dff8 Fix VPS freeze 2026-04-02 18:28:37 +02:00
archvillainette b7f188779a Initial sow-tools import 2026-04-02 17:19:23 +02:00