You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Lab: gndx emmylua test runs cargo fmt --check; dirty-tree lint says "commit, then re-lint" #5
A formatting slip shows up only at lint, after the tests have passed. Running cargo fmt --check (it's cheap) at test catches it earlier.
lint on a dirty tree checks the tree but can't record a verdict for HEAD. Its output doesn't say that, so it reads like a pass that install then refuses.
Want
test runs cargo fmt --check first and reports it, but doesn't block.
lint on a dirty tree ends with "uncommitted changes: verdict not recorded; commit, then re-lint".
Category: enhancement Summary:gndx emmylua test reports cargo fmt --check up front (it never blocks), and gndx emmylua lint on uncommitted changes ends with a verdict line that says it was not recorded and what to do next
Where: the gndx emmylua lab in neospector (myvi). The commands test and lint are in myemmylabcli, the pure parts and LINT_STEPS are in myemmylab, and the ONest tests are in myemmylabtree.
Current behavior:
test runs only cargo test in the capped unit. A formatting slip surfaces later, at lint, after the tests have passed.
lint on a worktree with uncommitted changes runs LINT_STEPS (fmt, clippy) and prints lint: NOT recorded: the verdict is about uncommitted changes, not a commit, but its last line is still lint: PASSES or lint: FAILS. That last line is what a reader (or a | tail) sees. It reads like a pass that builds emmylua install then refuses.
Desired behavior:
test runs the fmt step from myemmylab.LINT_STEPS (the same arguments; one source of truth, not a copy) before cargo test, and prints fmt: PASS or fmt: FAIL (run cargo fmt --all; lint will refuse) with the files that would change. The exit code of test never depends on fmt. If fmt itself can't run, say so and continue.
lint, on uncommitted changes, ends with one verdict line that carries all three facts: the result, that it was not recorded, and the next step. For example lint: PASSES on uncommitted changes, NOT recorded: commit, then run gndx emmylua lint <wt> again, and the same shape for FAILS. On a clean HEAD the output is unchanged.
Exit codes of lint don't change.
Key interfaces:
myemmylab.LINT_STEPS: read by name (fmt). Don't duplicate its args.
A small pure function in myemmylab that builds the final lint verdict line from (pass, dirty, worktree), so it can be tested without cargo.
Acceptance criteria:
An ONest case pins the verdict line: clean+pass and clean+fail keep today's text, and dirty+pass and dirty+fail say "NOT recorded" and "commit, then run … lint … again". The case fails before the change.
An ONest case pins that the fmt arguments test uses are exactly LINT_STEPS's fmt args.
By hand, on a scratch emmylua worktree with a deliberately misformatted file (revert afterwards): gndx emmylua test <wt> --filter <one test> prints fmt: FAIL … and still exits 0 when the test passes; gndx emmylua lint <wt> ends with the dirty verdict line. Record both outputs in the issue.
gndx spector tree passes, and gndx spector check emmylua is clean.
Out of scope:
Running clippy in test (it's slow; it stays in lint).
Auto-formatting anything.
Changing what lint records in the ledger, or install's refusal rules.
lab.lint_step(name): test gets fmt's args from LINT_STEPS through it (lab.TEST_PRE_STEP = 'fmt'). fmt runs via plain exec (it builds nothing), outside the capped unit, so a busy unit can't stop test over it.
lab.fmt_report(ok, out): fmt: PASS / fmt: FAIL (run cargo fmt --all; lint will refuse) plus each file once (both Diff in F:N: and Diff in F at line N:) / fmt: NOT CHECKED (<first line>) when it failed with no diff.
lab.lint_verdict(pass, dirty, wt): clean HEAD unchanged; dirty → one last line. The separate earlier NOT recorded line is gone.
ONest: 6 new cases, all red first. gndx spector tree 1096/1096, gndx spector check emmylua CLEAN.
By hand on the bisect scratch worktree (b5281dea, lib.rs misformatted, reverted after):
$ gndx emmylua test …/bisect --filter test_primitives_and_consts # exit 0
fmt: FAIL (run cargo fmt --all; lint will refuse)
…/bisect/crates/emmylua_code_analysis/src/lib.rs
…/bisect/crates/emmylua_code_analysis/src/semantic_model/infer/vm.rs
test: 1 test(s) of emmylua_code_analysis passed in …/bisect
$ gndx emmylua lint …/bisect # exit 1
FAIL fmt
PASS clippy
lint: FAILS on uncommitted changes, NOT recorded: commit, then run gndx emmylua lint …/bisect again
vm.rs was not part of the probe: b5281dea itself is misformatted there, which the new check catches.
Activity
gndx emmylua, Lua-side gates) #17mareklangiewicz commentedon Nov 17, 2026
Agent Brief
Category: enhancement
Summary:
gndx emmylua testreportscargo fmt --checkup front (it never blocks), andgndx emmylua linton uncommitted changes ends with a verdict line that says it was not recorded and what to do nextWhere: the
gndx emmylualab in neospector (myvi). The commandstestandlintare inmyemmylabcli, the pure parts andLINT_STEPSare inmyemmylab, and the ONest tests are inmyemmylabtree.Current behavior:
testruns onlycargo testin the capped unit. A formatting slip surfaces later, atlint, after the tests have passed.linton a worktree with uncommitted changes runsLINT_STEPS(fmt, clippy) and printslint: NOT recorded: the verdict is about uncommitted changes, not a commit, but its last line is stilllint: PASSESorlint: FAILS. That last line is what a reader (or a| tail) sees. It reads like a pass thatbuilds emmylua installthen refuses.Desired behavior:
testruns the fmt step frommyemmylab.LINT_STEPS(the same arguments; one source of truth, not a copy) beforecargo test, and printsfmt: PASSorfmt: FAIL (run cargo fmt --all; lint will refuse)with the files that would change. The exit code oftestnever depends on fmt. If fmt itself can't run, say so and continue.lint, on uncommitted changes, ends with one verdict line that carries all three facts: the result, that it was not recorded, and the next step. For examplelint: PASSES on uncommitted changes, NOT recorded: commit, then run gndx emmylua lint <wt> again, and the same shape for FAILS. On a clean HEAD the output is unchanged.lintdon't change.Key interfaces:
myemmylab.LINT_STEPS: read by name (fmt). Don't duplicate its args.myemmylabthat builds the final lint verdict line from(pass, dirty, worktree), so it can be tested without cargo.Acceptance criteria:
testuses are exactlyLINT_STEPS's fmt args.gndx emmylua test <wt> --filter <one test>printsfmt: FAIL …and still exits 0 when the test passes;gndx emmylua lint <wt>ends with the dirty verdict line. Record both outputs in the issue.gndx spector treepasses, andgndx spector check emmyluais clean.Out of scope:
test(it's slow; it stays inlint).lintrecords in the ledger, orinstall's refusal rules.mareklangiewicz commentedon Nov 17, 2026
Done in myvi 1f015ab (not pushed yet).
lab.lint_step(name):testgets fmt's args fromLINT_STEPSthrough it (lab.TEST_PRE_STEP = 'fmt'). fmt runs via plain exec (it builds nothing), outside the capped unit, so a busy unit can't stoptestover it.lab.fmt_report(ok, out):fmt: PASS/fmt: FAIL (run cargo fmt --all; lint will refuse)plus each file once (bothDiff in F:N:andDiff in F at line N:) /fmt: NOT CHECKED (<first line>)when it failed with no diff.lab.lint_verdict(pass, dirty, wt): clean HEAD unchanged; dirty → one last line. The separate earlierNOT recordedline is gone.gndx spector tree1096/1096,gndx spector check emmyluaCLEAN.By hand on the
bisectscratch worktree (b5281dea,lib.rsmisformatted, reverted after):vm.rswas not part of the probe: b5281dea itself is misformatted there, which the new check catches.