5.1 Resident pure-M harness (P0–P3)#3
Merged
Merged
Conversation
New internal/harness package — the host-side trigger/render client for the resident pure-M harness (design §3.1/§3.2). SplitFrame splits the deterministic ##-envelope into per-suite ^STDASSERT blocks + the LCOV block + provenance/ summary FrameMeta. It is delimiter-scanning only: no test/coverage parse logic lives here. Each suite Body is verbatim ^STDASSERT fed to the UNCHANGED mtest.ParseOutput; the ##LCOV block is verbatim LCOV fed to mcov. This is what structurally guarantees G4 cross-engine parity — both tiers speak one dialect. - ErrNoFrame (missing header) and ErrTruncated (missing/mismatched trailer, so a dropped connection is detectable); partial results returned alongside. - Unknown ## directives skip gracefully (forward-compat). - mcov.ParseLCOV: inverse of mcov.LCOV, so a coverage payload arriving as text (the ##LCOV block) joins the same ByFile/Percent consumers a host-side mcov.Run produces. Tolerates TN:/LF:/LH: records. Golden-frame tests prove each split block round-trips through the unchanged mtest.ParseOutput and the LCOV block through mcov.ByFile. Host-side, no engine. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…, 5.1) - Trigger(ctx, eng, scope) invokes RUN^STDHARN via the engine adapter and returns the raw result frame (design §3.1 CLI trigger path). Pure delegation; scope rides $ZCMDLINE, the frame comes back on stdout, and the same frame travels over T.1's WebSocket unchanged. - TestResidentParityYDB (opt-in, M_TEST_LIVE) is stage 5.1's gate G4: the SAME *TST suites yield IDENTICAL mtest.Summary file-side (one process per suite) vs resident (one RUN^STDHARN, split via SplitFrame). Pure-M makes this exercisable on YDB with no IRIS. Covers a deliberately-failing fixture (testdata/PARITYFAILTST.m) to prove FAIL-path parity through the no-halt mechanism — the failing suite frames without halting the orchestrator. Verified live against the m-test-engine YDB container: STDMATHTST/STDSTRTST/ STDSEMVERTST/STDHEXTST + PARITYFAILTST all parity-match across both tiers. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…gines) Drive run^STDHARN via RunScript (an M argument) instead of RUN^STDHARN's $ZCMDLINE — IRIS has no $ZCMDLINE (<SYNTAX>), so the script path is engine- portable. Generalize TestResidentParity into an engine-parameterized helper + add TestResidentParityIRIS (stage dir under /tmp on IRIS, IrisStageLoad). Result: the SAME suites + the deliberately-failing fixture yield IDENTICAL mtest.Summary resident vs file-side on BOTH the YDB file-side tier AND the IRIS resident tier — the test half of G4 across both engines. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
- SplitFrame extracts the raw ##MON line-monitor block (alongside suites/LCOV); ##END-MON never closes a suite ##END. TestSplitFrameMonBlock covers it. - mcov.FromMonitor joins a ##MON block (MLINE:routine:line:count) to the parse- tree executable lines — the host-side half of resident IRIS coverage. Shares joinMon with the host-orchestrated runIris, so resident == file-side coverage by construction. TestFromMonitor (host-side, no engine). - harness.TriggerCoverage drives cov^STDHARN (RunScript, portable). Gate (G4 coverage half): TestResidentCoverageParityIRIS proves resident IRIS coverage (cov^STDHARN → ##MON → FromMonitor) ByFile == host-orchestrated IRIS coverage (mcov.Run → %Monitor): STDMATH 29/30, host == resident. With 4.1's host IRIS==YDB LCOV parity, coverage parity holds across both tiers. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Resolves design Q5 (tier marker) and implements the §9.1-Q6 reconciliation. - mtest: TestSuite.Tier + DetectTier read a `;; tier: integration` directive at discovery (untagged ⇒ pure-logic, the safe default that keeps a suite the file-side PR gate). Inline or own-line comment, case-insensitive. - harness.Reconcile: one verdict by provenance — file-side authoritative for pure-logic, resident for integration; resident wins a same-suite conflict (reality); OK = UNION (any failure on either tier ⇒ non-zero exit). - harness.RunResident: trigger → SplitFrame → []mtest.RunResult (OK = summary.OK && ##END exit==0, same rule as mtest.RunSuite); truncated frame ⇒ error. - m test --resident: partitions discovered suites by tier, runs pure-logic file-side + integration via the resident harness, reconciles, reports each suite tagged by tier, exits on the union. Verified live on vista-iris: a pure-logic suite runs file-side and an integration-tagged suite runs resident in one reconciled report; a failing integration suite drives exit 3 (union). Host-side unit tests cover DetectTier, Reconcile (union + conflict), and RunResident (mapping + truncation). 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.
Stage 5.1 — the resident pure-M harness (the last engine-bound piece). Implements the server-side half of run-and-verify per
resident-harness-design.mdand spec §9.The harness's contract is its output frame, not its transport: the resident orchestrator (pure-M, m-stdlib) emits a deterministic
##-envelope of verbatim^STDASSERTper-suite blocks + a verbatim LCOV block that the existingmtest.ParseOutput/mcovconsume unchanged. This Go side is a thin frame-splitter + trigger.Landing incrementally on this branch:
SplitFrame(host-side, no engine). Golden-frame tests: each block round-trips through unchangedmtest.ParseOutput; LCOV via newmcov.ParseLCOV.RUN^STDHARN(pure-M, m-stdlib); G4 parity resident-on-YDB vs file-side.^%MONLBL→##LCOV).m test/coverage --resident+m watchIRIS run-half +Reconcile+;; tier:marker.🤖 Generated with Claude Code