Skip to content

fix: unblock m-stdlib CI (M default + changelog path drift)#3

Merged
rafael5 merged 2 commits into
mainfrom
fix/makefile-m-default-on-path
May 10, 2026
Merged

fix: unblock m-stdlib CI (M default + changelog path drift)#3
rafael5 merged 2 commits into
mainfrom
fix/makefile-m-default-on-path

Conversation

@rafael5
Copy link
Copy Markdown
Collaborator

@rafael5 rafael5 commented May 10, 2026

Summary

Repairs two pre-existing CI failures on main that have been blocking every PR (including PR #2 / Track B). Both fixes are independent one-file changes; bundled because they unblock the same downstream merge.

1. Makefile:14M defaulted to a maintainer-local absolute path. 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, which doesn't exist on the runner — every target invoking $(M) failed with No such file or directory. Switched default to M ?= m (matches the m-cli and m-standard convention). Maintainers who keep an unactivated venv can override per-shell or per-invocation: make fmt-check M=$HOME/projects/m-cli/.venv/bin/m.

2. tools/gen-manifest.pyread_stdlib_version() looked at the old changelog path. Commit 90e694e moved CHANGELOG.md -> docs/tracking/changelog.md (per the four-bucket tracking-doc model) 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). Probe the new path first, fall back to the old one for back-compat with checkouts predating the move.

Unblocks PR #2 (phase0-B repo.meta.json).

Test plan

  • Local PATH=$HOME/projects/m-cli/.venv/bin:$PATH make fmt-check -> exits 0, 81 files formatted.
  • Local PATH=$HOME/projects/m-cli/.venv/bin:$PATH make manifest -> wrote dist/stdlib-manifest.json (32 modules, 284 public labels) with stdlib_version: "v0.5.0"; git diff --stat dist/ is empty (regen matches committed dist exactly).
  • CI on this branch (commit 36dccbd): both jobs green (m-stdlib (latest-master), iris-portability-check), mergeable CLEAN.
  • After merge: rebase / merge main into phase0-B-repo-meta; expect PR phase0-B: add repo.meta.json + manifest drift gate #2's CI to flip from UNSTABLE to CLEAN.

Co-Authored-By: Claude Opus 4.7 (1M context) noreply@anthropic.com

rafael5 and others added 2 commits May 10, 2026 19:36
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>
`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>
@rafael5 rafael5 changed the title fix: default M to bare m so CI's PATH lookup works fix: unblock m-stdlib CI (M default + changelog path drift) May 10, 2026
@rafael5 rafael5 merged commit fa58585 into main May 10, 2026
2 checks passed
@rafael5 rafael5 deleted the fix/makefile-m-default-on-path branch May 10, 2026 23:47
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>
rafael5 added a commit that referenced this pull request May 10, 2026
* phase0-B: add repo.meta.json + manifest drift gate

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>

* fix: unblock m-stdlib CI (M default + changelog path drift) (#3)

* 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>

---------

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant