feat(codegen): provenance markers for generated artifacts (mro-makp)

Merged
MA
4mo ago
+228-139

Summary

First deliverable of mro-makp: add provenance SECTION markers to the base templates and their generated surfaces so every region declares its source (template / config / computed) and free-region preservation policy.

Changes

  • Makefile.j2 + generated Makefile: annotated header, project identity, workspace members, user overrides, derived paths, WORKSPACE_ROOT isolation, verb dispatch, lint/type paths, infra bootstrap.
  • ci.yml.j2 + generated .github/workflows/ci.yml: annotated header, triggers, permissions, ci job.
  • ci-matrix.yml.j2 + generated .github/workflows/ci-matrix.yml: annotated header, triggers, permissions, concurrency, distro-matrix, macos, windows jobs.
  • .mise.toml.j2 + generated .mise.toml: annotated header and tools section.
  • All distro Dockerfile.j2 + generated ci/docker/*.Dockerfile: annotated header, base packages, managed tool bootstrap, mise install, bootstrap soft-pass.

Validation

  • make codegen WHAT=apply APPLY=Y (regenerated surfaces)
  • make check CHECK_GATES=lint,format,pyrefly (green)

Remaining (next bead/agent)

  • Propagate markers to remaining templates (pyproject.toml.j2, .envrc.j2, .gitignore.j2, base_test_report_recipe.j2, etc.)
  • Add detector/gate that fails on missing provenance markers or project literals outside config-sourced regions.
  • Add round-trip test for Free: preserved regions.

Summary by cubic

Adds provenance SECTION markers across core templates and regenerated artifacts so each region declares its source and free-region policy. Also replaces the codegen verb with a serialized gen flow, strengthens managed submodule setup, pins actions in CI, and updates the beads tool pin.

  • New Features

    • Added managed section markers to Makefile, .github/workflows/ci*.yml, .mise.toml, and ci/docker/*.Dockerfile; no runtime changes.
    • Fused codegen into a new gen verb (serialized); Makefile verbs, help, and defaults updated.
    • Managed submodules: workspace roots use WORKSPACE_MEMBERS; standalone repos auto-discover flext-managed=true in .gitmodules; sync/update recursively, validate nested submodules, and initialize before conform/uv. CI bootstraps via make setup then runs make check/test; all actions resolve from the typed catalog and are pinned.
  • Bug Fixes

    • workspace.yaml now renders role from workspace_repository.role for correct member round-trips.
    • make setup initializes submodules before conform/uv; Windows PATH normalization avoids shim pollution.
    • Tooling: pinned beads via go:github.com/steveyegge/beads/cmd/bd in .mise.toml.