Topdata Migration (#2)

Native topdata migration summary

- Replaced the legacy 2dabuilder runtime path with the native topdata builder.
- Native build, validate, compare, and convert flows now cover the canonical topdata pipeline.
- compare-topdata is now a native self-check; legacy reference-builder runtime usage was removed.
- Parts generation follows the native asset-scan contract and uses sow-assets via project asset resolution.
- Generated feat families, class-feat injects, masterfeat/successor expansion, and dataset-derived feat generation were brought to parity and regression-covered.
- Remaining mirrored datasets were migrated into native-owned canonical data while preserving lock IDs.
- normalize-topdata bridge behavior and migration-era ownership markers were removed.
- Documentation was rewritten around the native workflow and active contracts were cleaned up.
- Final hardening pass removed stale validator assumptions and cleaned ignored/generated artifacts for PR readiness.

Reviewed-on: https://gitea.westgate.pw/ShadowsOverWestgate/sow-tools/pulls/2
Co-authored-by: vickydotbat <vickydotbat@tutamail.com>
Co-committed-by: vickydotbat <vickydotbat@tutamail.com>
This commit is contained in:
2026-04-09 07:14:01 +00:00
committed by archvillainette
parent 99f9d29d7a
commit dc93feb176
1402 changed files with 20955 additions and 3405 deletions
+19 -4
View File
@@ -71,14 +71,19 @@ var commands = []command{
},
{
name: "build-topdata",
description: "Build topdata outputs into build/topdata using the reference builder bridge.",
description: "Build canonical topdata outputs from topdata/data into build/topdata.",
run: runBuildTopData,
},
{
name: "compare-topdata",
description: "Compare built topdata outputs against fresh reference-builder output.",
description: "Rebuild topdata natively and compare the current build output against that fresh native result.",
run: runCompareTopData,
},
{
name: "convert-topdata",
description: "Convert between 2DA and native topdata JSON/module formats.",
run: runConvertTopData,
},
}
func Run(args []string) (int, error) {
@@ -357,7 +362,7 @@ func runBuildTopData(ctx context) error {
return err
}
result, err := topdata.BuildReference(p, func(message string) {
result, err := topdata.Build(p, func(message string) {
fmt.Fprintf(ctx.stdout, "[build-topdata] %s\n", message)
})
if err != nil {
@@ -379,7 +384,7 @@ func runCompareTopData(ctx context) error {
return err
}
result, err := topdata.CompareReference(p, func(message string) {
result, err := topdata.Compare(p, func(message string) {
fmt.Fprintf(ctx.stdout, "[compare-topdata] %s\n", message)
})
if err != nil {
@@ -390,10 +395,20 @@ func runCompareTopData(ctx context) error {
fmt.Fprintf(ctx.stdout, "mode: %s\n", result.Mode)
fmt.Fprintf(ctx.stdout, "checked 2da files: %d\n", result.Compared2DA)
fmt.Fprintf(ctx.stdout, "checked tlk files: %d\n", result.ComparedTLK)
fmt.Fprintf(ctx.stdout, "native-pass: %d\n", result.NativePass)
fmt.Fprintf(ctx.stdout, "not-yet-canonical: %d\n", result.NotYetCanonical)
fmt.Fprintf(ctx.stdout, "native-mismatch: %d\n", result.NativeMismatch)
fmt.Fprintf(ctx.stdout, "topdata compare: ok\n")
return nil
}
func runConvertTopData(ctx context) error {
if len(ctx.args) < 2 {
return errors.New("usage: convert-topdata <2da-to-json|2da-to-module|json-to-2da> ...")
}
return topdata.RunConvertCommand(ctx.args[1:], ctx.stdout)
}
func loadProject(cwd string) (*project.Project, error) {
root, err := project.FindRoot(cwd)
if err != nil {