phase0-B: add repo.meta.json + manifest drift gate#2
Merged
Conversation
Phase 0 tier-1 contract for m-stdlib per
.github/docs/phase0-plan.md §3 (Track B).
Changes:
- dist/repo.meta.json — hand-edited manifest with $schema pointing
at the org-level schema (Track A, pending push); exposes the
generated payloads modules + errors; verification_commands match
AGENTS.md.
- CLAUDE.md → AGENTS.md (git mv) with CLAUDE.md re-symlinked to
AGENTS.md. Appended the five required sections (Setup, Test,
Build / generate, Verify, Guardrails); existing project-context
body preserved verbatim.
- Makefile — new `check-manifest` target wraps the existing
`manifest-check` and additionally asserts dist/repo.meta.json
is tracked + clean. Composes rather than duplicates the existing
gate.
- .github/workflows/ci.yml — CI's "Manifest drift check" step now
runs `make check-manifest` (was `make manifest-check`). The
new wrapper subsumes the old behavior.
- tools/gen-manifest.py — read changelog from
docs/tracking/changelog.md (the file moved out of repo root
per the four-bucket tracking model). Old location still
checked as a fallback for back-compat. Without this,
`make manifest` produced an empty stdlib_version and
manifest-check failed on every fresh clone.
B1 audit:
- dist/stdlib-manifest.json + dist/errors.json regenerated by
`make manifest` (tools/gen-manifest.py).
- CLAUDE.md existed at repo root; AGENTS.md adopted as
canonical.
- CI workflow is .github/workflows/ci.yml on push to main +
pull_request; already had a manifest drift step at line 72,
now widened to `make check-manifest`.
- dist/ is NOT in .gitignore — payload files are committed
as designed.
Verification:
- Schema validation against the local repo.meta.schema.json
in m-dev-tools/.github/profile/ exits 0 with --no-resolve.
Full resolve-mode verification deferred until Track A is
pushed and the validator's path-resolution mode is
reconciled with the "relative to repo root" convention
described in the schema.
- `make check-manifest` is green on the post-commit tree.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
4 tasks
rafael5
added a commit
that referenced
this pull request
May 10, 2026
* fix: default M to bare `m` so CI's PATH lookup works CI installs m-cli into /tmp/venv and prepends /tmp/venv/bin to PATH, so `m` is resolvable as a bare name. The Makefile defaulted M to $(HOME)/projects/m-cli/.venv/bin/m — a maintainer-local absolute path that doesn't exist on the GitHub-hosted runner — so every target that invokes $(M) (fmt, fmt-check, lint, test, coverage) failed with "No such file or directory" before the underlying tool ran. CI has been failing on main for several commits because of this. Switch the default to `M ?= m` (matches the convention m-cli and m-standard already use). Maintainers who keep an unactivated m-cli venv can override per-shell or per-invocation: make fmt-check M=$HOME/projects/m-cli/.venv/bin/m Verified locally with `PATH=$HOME/projects/m-cli/.venv/bin:$PATH make fmt-check` → exits 0, 81 files formatted. Unblocks PR #2 (phase0-B repo.meta.json), which inherited the pre-existing main breakage. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * fix(gen-manifest): look at moved changelog path `read_stdlib_version()` was reading `CHANGELOG.md` at the repo root, but commit 90e694e moved that file to `docs/tracking/changelog.md` without updating the generator. CI's `make manifest-check` therefore regenerated `dist/stdlib-manifest.json` with `stdlib_version=""`, diffing against the committed `v0.5.0` value (last regenerated in 7e33e6b — before the move). The maintainer's local runs likely got lucky with a stale cache or a CHANGELOG symlink. Fix: probe the new path first, fall back to the old one for back- compat with checkouts predating the move. Verified locally — `make manifest` produces zero drift against the committed dist/. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* fix: default M to bare `m` so CI's PATH lookup works CI installs m-cli into /tmp/venv and prepends /tmp/venv/bin to PATH, so `m` is resolvable as a bare name. The Makefile defaulted M to $(HOME)/projects/m-cli/.venv/bin/m — a maintainer-local absolute path that doesn't exist on the GitHub-hosted runner — so every target that invokes $(M) (fmt, fmt-check, lint, test, coverage) failed with "No such file or directory" before the underlying tool ran. CI has been failing on main for several commits because of this. Switch the default to `M ?= m` (matches the convention m-cli and m-standard already use). Maintainers who keep an unactivated m-cli venv can override per-shell or per-invocation: make fmt-check M=$HOME/projects/m-cli/.venv/bin/m Verified locally with `PATH=$HOME/projects/m-cli/.venv/bin:$PATH make fmt-check` → exits 0, 81 files formatted. Unblocks PR #2 (phase0-B repo.meta.json), which inherited the pre-existing main breakage. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * fix(gen-manifest): look at moved changelog path `read_stdlib_version()` was reading `CHANGELOG.md` at the repo root, but commit 90e694e moved that file to `docs/tracking/changelog.md` without updating the generator. CI's `make manifest-check` therefore regenerated `dist/stdlib-manifest.json` with `stdlib_version=""`, diffing against the committed `v0.5.0` value (last regenerated in 7e33e6b — before the move). The maintainer's local runs likely got lucky with a stale cache or a CHANGELOG symlink. Fix: probe the new path first, fall back to the old one for back- compat with checkouts predating the move. Verified locally — `make manifest` produces zero drift against the committed dist/. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Implements Track B of the Phase 0 plan (
.github/docs/phase0-plan.md§3).git mv CLAUDE.md AGENTS.md+ re-symlinkedCLAUDE.md → AGENTS.md. The five required sections (Setup/Test/Build / generate/Verify/Guardrails) appended; the existing project-context body is preserved verbatim.dist/repo.meta.jsonauthored —\$schemapoints at the org-level Track A schema;exposesdeclaresmodules → dist/stdlib-manifest.jsonanderrors → dist/errors.json;consumes: [tool:m-test-engine];verification_commands: [make manifest, make test, make check-manifest].make check-manifestadded — wraps the existingmanifest-check(regen + git-diff drift gate) and additionally assertsdist/repo.meta.jsonis committed and schema-shaped.tools/gen-manifest.py— small tweak in support of the gate..github/workflows/ci.yml:72widened tomake check-manifest..gitignore—dist/is already not ignored here; payloads ship committed as designed.Validation status (2026-05-10)
Track A is published. Verified against the live Track A schema:
Test plan
make check-manifestgreen locallydist/repo.meta.jsonvalidates against the live Track A schemaexposes.*payload exists; both.jsonpayloads parsemainhas been red for unrelated reasons (containersafe.directory/ YDB workspace setup; see commits betweenf17acce–3ca830b). Themanifest-check/check-manifeststep itself runs late in the job and should reflect Phase-0 status accurately once the earlier failure is sorted.