Skip to content

test(leyline): gate leyline-schema/binary version parity (mache-b8af69)#469

Merged
jamestexas merged 1 commit into
mainfrom
dx/mache-b8af69-leyline-version-parity
Jul 2, 2026
Merged

test(leyline): gate leyline-schema/binary version parity (mache-b8af69)#469
jamestexas merged 1 commit into
mainfrom
dx/mache-b8af69-leyline-version-parity

Conversation

@jamestexas

Copy link
Copy Markdown
Contributor

Executable drift guard. mache carries two independent leyline versions:

  • the go.mod pin of the Go schema client (…/clients/go/leyline-schema, currently v0.5.6)
  • the leylineBinaryVersion const (the daemon binary mache downloads, currently v0.5.7)

Per socket.go's design note the patch may float (a daemon-only LSP fix ships a binary with no wire change), but major.minor must match because that's the wire/schema format the Go client decodes. Today only a comment + a human keeping two pins in lockstep enforce it — the exact setup that produced the stale-cached-0.4.1 skew (mache-0acdf6).

This test parses the leyline-schema require line from go.mod and the leylineBinaryVersion const and fails if their major.minor disagree. 0.5 == 0.5 today (passes); a future minor/major bump to one without the other reddens CI.

Complements the runtime handshake mache-8kif (blocked on LLO shipping a daemon version op — ley-line-open-b9db7f); this is the cheap build-time half that needs no LLO change.

Verification: go test ./internal/leyline/ -run TestLeylineSchemaBinaryVersionParity → PASS; go vet → clean.

…ty (major.minor)

mache carries two independent leyline versions — the go.mod leyline-schema
client pin and the leylineBinaryVersion const (daemon binary). Per socket.go
the patch may float but major.minor must match (the wire format). Until now
only a comment + a human kept them in lockstep — the setup that produced the
stale-cached-0.4.1 skew (mache-0acdf6). This makes the invariant executable:
a minor/major bump to one without the other fails CI. Complements the runtime
handshake (mache-8kif, blocked on LLO version op).
@github-actions

github-actions Bot commented Jul 2, 2026

Copy link
Copy Markdown

find_smells (advisory)

Scoped to files changed in this PR. Rules below run on the standalone (no-LLO) cross-ref tables; _ast rules (cyclomatic_complexity, long_function, long_file, magic_int_in_comparison) are not exercised here.

No structural smells in changed files. ✓

Rules: the registry is cmd/smell_rules.go (source of truth); see the authoring guide to add one. Advisory only — these are heuristics, not gates.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds an executable “drift guard” test to ensure the Go leyline-schema client version pinned in go.mod stays compatible with the pinned leyline daemon binary version (leylineBinaryVersion) by enforcing major.minor parity.

Changes:

  • Introduce TestLeylineSchemaBinaryVersionParity that reads go.mod, extracts leyline-schema’s vMAJOR.MINOR and compares it to leylineBinaryVersion’s vMAJOR.MINOR.
  • Add a small repoRoot helper to locate the module root (by walking up to go.mod) so the test can reliably read the pinned module version.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@jamestexas jamestexas merged commit 965ccde into main Jul 2, 2026
16 checks passed
@jamestexas jamestexas deleted the dx/mache-b8af69-leyline-version-parity branch July 2, 2026 01:00
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.

2 participants