feat(arch): m arch check — waterline G1 gate (+ land T0.1 VistaEngine & SDK dedupe)#5
Merged
Conversation
Add VistaEngine — m-cli's engine that reaches a live VistA via the neutral engine-driver contract instead of an in-process yottadb/iris invocation. m-cli stays vendor-neutral (driver-contract §1/§11: subprocess + JSON envelope, "zero changes to m-cli" to add an engine); the driver owns the wire (m-ydb local/docker/SSH, m-iris Atelier REST). - internal/driver: a Client that runs `m-<engine> <axis> <verb> --output json` and parses the clikit envelope (reads stdout, falls back to stderr for the current Fail-path envelope); engineError surfaced as data, not a Go error. Locate() resolves the driver binary per §4 ($M_<ENGINE>_BIN → next to m → sibling dist/ → PATH). Injectable CmdRunner/LocateDeps seams; table tests. - internal/engine/vista.go: VistaEngine implements engine.Engine (RunXCmd→eval, RunRoutine→run, EnsureLoaded→load) + Probe() = lifecycle status (the portable reachability + version gate; the cross-engine W $ZV equivalent, since IRIS exec doesn't capture device output). Additive — in-process engines untouched (D3 delete stays conformance-gated). - main.go + vista_cmd.go: `m vista status|exec --engine ydb|iris --transport …`. - go.mod: pin m-driver-sdk v0.2.0. Live-proven: `m vista status --engine iris` → m-iris driver → live m-test-iris returned the real IRIS 2026.1 version banner. YDB path is code-identical + unit-tested; live (FOIA vehu over docker/SSH) is the user's to run. Gates: gofmt, go vet, go test -race ./... all green. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Complete step 4 of the m-driver-sdk v0.3.0 ceremony (the seam's transport
monopoly, waterline rule 3): m-cli now imports the SDK's reference engine
Client instead of carrying its own copy.
- go.mod: m-driver-sdk v0.2.0 -> v0.3.0 (default online proxy, sumdb-verified
go.sum).
- delete internal/driver/{client,locate}.go + tests — the byte-identical
originals now live in the SDK (pkg mdriver) as of v0.3.0.
- consumers switched to mdriver: vista_cmd.go build() -> mdriver.Locate /
DefaultLocateDeps / NewClient; internal/engine/vista.go field + NewVista ->
*mdriver.Client; vista_test.go -> mdriver.NewClient.
- cleared two pre-existing revive unused-parameter findings in the touched
engine files (RunScript ctx/script, TestVista_SatisfiesEngine t).
make all green: lint clean, race tests pass, build OK. No duplicate engine
client remains (waterline G3 transport-monopoly).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Wire the first waterline gate (m-v-waterline-adr.md §3.2 G1, dependency-direction): dependency flows one way, v → m, never the reverse. The lowest-effort/highest-value gate the ADR §5.4 says to land first. - internal/arch: ResolveLayer reads the repo's declared layer from a committed meta artifact (dist/repo.meta.json, dist/v-contract.json, or root repo.meta.json) or a --layer override. Check runs two arms for an m-layer repo: the Go dependency closure (go list -deps -json → fail on any vista-cloud-dev/v-* module) and the M source (scan .m for VSL* references). A v-layer repo passes G1 trivially (v → m allowed). - m arch check command (clikit): exit 3 + violation list on any m → v edge; clean otherwise. Text and JSON output. - repo.meta.json: m-cli self-declares layer m (its dist/ is gitignored, so the tag lives at root) and self-gates in `make all` (new arch target). TDD: internal/arch 85.7% cover. Proven live — m-cli passes clean; v-cli checked as (false) layer m flags v-pkg + v-cli, exit 3. Co-Authored-By: Claude Opus 4.8 (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.
Lands the m/v waterline G1 dependency-direction gate (
m arch check) plus the two already-verified commits this branch was stacked on.Commits
internal/arch, TDD 85.7%): reads a repo's declaredlayerand fails (exit 3) on anym → vedge — Go dep closure (go list→ novista-cloud-dev/v-*) + M source (^VSL*refs);vpasses trivially. Wired intomake all; m-cli self-declareslayer: m(rootrepo.meta.json).m vista(VSL T0.1) — the VistaEngine transport.The latter two are done/verified per the VSL trackers; they ride along because the arch work was stacked on
sdk-client-dedupe.Why
Required so
m arch checkis on m-climain, which the reusable org CI workflow (.githubarch-waterline.yml) installs viago install …@main.Verified:
make allgreen (lint + race-test + build + arch self-gate); G1 proven red against v-cli (falsely as layer m, exit 3).