The repository installs mbake unpinned and shipped no .bake.toml, so the
Makefile's final newline depended on the mbake version:
- mbake 1.4.6 (e.g. the pkgmgr venv that wins on a host PATH) defaults
to ensure_final_newline = false: `mbake format` strips the newline and
`mbake format --check` accepts the stripped file.
- mbake 1.5.0 (what pip installs today) rejects the same file with
"Missing final newline", which is what CI reported on PR #1255.
So a local `make autoformat` could strip the newline, the local
lint-makefile stayed green, and CI failed; 6f653ce633 and #1262 had to
restore the newline by hand.
The tracked .bake.toml sets only ensure_final_newline = true, so every
other formatter rule keeps its default. autoformat.sh and makefile.sh
pass it with --config, so the result no longer depends on the version
or on the directory mbake runs from. Checked with both versions: main's
Makefile passes `--check --config .bake.toml`, and a copy without the
final newline fails it with "Missing final newline".
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The reference at scripts/lint/makefile.sh:4 pointed at
github.com/mavyhq/bake which 404s; pypi metadata (mbake project) lists
the canonical homepage as github.com/EbodShojaei/bake.
Reason: tests/external/repository/test_urls_reachable.py was failing
with HTTP 404 on the stale URL.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Makefile lint integration:
* scripts/install/lint.sh: replace the prior checkmake binary install with
ensure_mbake (mbake is pip-installable, parses our Makefile correctly
whereas checkmake bailed on .ONESHELL: / .SHELLFLAGS: / ifneq).
* scripts/lint/makefile.sh: new runner — `mbake format --check Makefile`
reports formatting drift and missing .PHONY declarations.
* scripts/lint/autoformat.sh: add a two-pass `mbake format Makefile`
(mbake's formatter is not strictly idempotent on the first pass).
* Makefile: split the multi-line `.PHONY:` block into 18 single-line
`.PHONY:` declarations so mbake's parser can validate it; add the
previously-missing `install-python-dev` and `build-dependency` PHONY
targets; add `lint-makefile` aggregate-and-direct target.
* .pre-commit-config.yaml: new make-lint-makefile hook scoped to
`^Makefile$`.
* .github/workflows/lint-makefile.yml: new CI workflow (pip-install mbake
+ make lint-makefile).
* .github/workflows/ci-orchestrator.yml: wire lint-makefile into
lint-gate.needs.
Misc:
* .gitignore: add roles/importer_result.json (tooling artefact written by
galaxy-importer when it runs in roles/).
Plus working-tree drift across roles/, group_vars/, inventories/, and
tasks/ that accumulated from the make-test setup phase regenerating
generated artefacts during recent test runs.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>