fix(make): route docs lifecycle through WHAT

Merged
MA
4mo ago
+716-518

Summary

  • move docs actions, default, mutability, and report directory into typed codegen config
  • generate both Make surfaces from WHAT and remove the public DOCS_PHASE path
  • prove config-derived dispatch, mutation flags, invalid selection, reports, and generation fixed point

Validation

  • make codegen WHAT=apply APPLY=Y
  • make codegen WHAT=check
  • make test PYTEST_TARGETS="tests/unit/basemk tests/unit/workspace/test_workspace_root_make_contract.py tests/integration/test_infra_integration.py" (93 passed)
  • make check CHECK_GATES=lint,format,pyrefly
  • make check CHECK_GATES=pyright,mypy MYPY_MEMORY_LIMIT_MB=6144
  • manual make docs WHAT=all|generate|fix|audit|build|validate, mutable actions with and without APPLY=Y, and invalid WHAT failure

Known baseline

Full make test currently reports 2146 passed and 76 unrelated pre-existing standalone topology/fixture failures; the complete affected suites above are green.


Summary by cubic

Routes the docs lifecycle through WHAT and removes DOCS_PHASE, aligning with Linear MRO-1O6T-10. Also generates WORKSPACE_ROOT isolation and docs policy via templates, provisions uv in CI/Docker (plus rustup), and tightens setup and validation ergonomics.

  • Bug Fixes

    • Docs lifecycle uses WHAT=all|generate|fix|audit|build|validate (default all); generate/fix are guarded by APPLY=Y; outputs go to .reports/docs; help text updated; removed docs check.
    • Make templates now receive MakeDocsSpec; generated Markdown starts with a level-one heading; audit enforces absolute cross-project links; custom.mk validation supports backslash-continued lines.
    • Branch ancestry checks only apply to the current worktree and active checkouts; detached worktrees and non-active local/remote branches are excluded.
    • Submodule setup reconciles governed gitlinks and enforces declared branches with clean trees; tests set local git identity for CI.
    • Setup uses uv from PATH (no Makefile-managed mise); CI installs jdx/mise-action and astral-sh/setup-uv on macOS/Windows; Docker images install mise, run mise install, install uv, add rustup for cargo-backed tools, and soft-pass the known external uv.lock/flext-core blocker.
    • Workspace/runtime hygiene: added external_dependency_paths to the workspace schema; runtime ignores include .bin/ and .tools/; tracked files and VS Code excludes updated; WORKSPACE_ROOT isolation is generated across rendered surfaces.
    • Dev tooling: pinned flext-tests from git; added mypy, pyright, and rumdl for markdown checks; improved coverage sources; fixed template macro to use passed mise.
  • Migration

    • Replace DOCS_PHASE with WHAT. Example: make docs WHAT=generate APPLY=Y.
    • make docs runs all actions by default; use WHAT to target one.
    • Docs policy (actions, default, mutable actions, reports dir, cross-project link rule) is defined in config/codegen.yaml.