Skip to content

fix(build): the moon task graphs' input lists completed — every go:embed target + the test-time reads + the seven missing Python source dirs + the root modules (#712) - #877

Open
gadievron wants to merge 1 commit into
masterfrom
fix/712-moon-task-inputs
Open

gadievron wants to merge 1 commit into
masterfrom
fix/712-moon-task-inputs

Conversation

@gadievron

@gadievron gadievron commented Oct 27, 2026 •

Copy link
Copy Markdown
Collaborator

What

Closes #712 — PR #579 named the Go half as a pre-existing gap ("moon.yml's test/build inputs do not include embedded assets… a future chore") and deferred it. The Python half was worse and unnamed: the test task's inputs were openant/**/* + tests/**/* while the tested tree is core/, utilities/, parsers/, context/, prompts/, report/, github_scanner/ and openant/ — seven of eight source directories outside the input set, plus the root modules the tests import. Nothing runs moon today (no .moon/ workspace root, no CI job), so the gap is latent — but the most common edits on the embedded-asset surface (a template's markup, a regenerated report.css, a ui/*.html page, anything outside openant/) would have been a cache hit serving a stale binary or test result, including for the class-coverage and golden-render guards.

The falsifier (authored at filing): "a moon task graph whose build/test inputs cover the embedded assets and the Python source tree — or a recorded decision that the moon descriptors are unused and should be removed."

The fix — the first disjunct: complete the input lists (the decision recorded)

The completion route is taken and the option-(b) analysis recorded in the Go descriptor's header: the descriptors describe the build this repo actually runs (go build/go test, pytest) and completing their inputs is the prerequisite for any future moon adoption (a .moon/ workspace root, absent today, is the next step); deleting intended-future tooling is the bigger judgment call. The scope is exactly what the falsifier names: the identified input omissions are completed; moon activation remains deferred.

The Go build/test tasks gain every go:embed target — the two report templates, the vendored report.css/chart.js/datalabels, the four ui/*.html pages and their vendored JS — and the test task additionally gains the non-embedded test-time reads the review caught (the tailwind recipe: palette.json/tailwind.config.js/input.css, read by the CSS-freshness suites; the golden-render testdata: browser-smoke/golden_input.md).

The Python test/analyze/parse/report tasks gain the seven missing source directories plus the root modules (experiment.py — tests/test_cwe_tagging.py imports from experiment import _normalize_result; validate_dataset_schema.py) and the run-shaping files (conftest.py, pytest.ini, pyproject.toml, requirements.txt, moon.yml). The install input unchanged.

The pins (tests/test_issue712_moon_task_inputs.py, 9 tests)

  • Every go:embed target is DERIVED from the .go sources (line-anchored, the all:/quoted forms handled, the _test.go embeds included on the test side) — never declared — and asserted covered by both the build and test globs: a new embedded asset outside the globs fires the pin.
  • The source dirs and root modules are derived from the tree and asserted covered: a new source dir or root module outside the globs fires the pin.
  • The recipe/testdata reads pinned on their real paths; the pre-existing inputs kept; the install input unchanged; the recorded decision pinned ("considered and declined" + the workspace-root clause).
  • The glob matcher is a wax-faithful reconstruction — moon uses starbase_utils::glob, which is wax (verified against moon's own source chain + docs): ** matches zero-or-more whole segments end-anchored; * never crosses /. Two false-green defects were caught by executed mutation probes and closed (the fnmatch helper whose * crossed /; a zip() truncation that matched mid-path).

Evidence (runs/712)

  • RED gate at 9143061f..bd2689b8: 9 nodes / 3 witnesses, all assertion-red at base (the data-read route: the tests read the .yml files, the C4 reverts prove the reads load-bearing).
  • C4 at the pushed head: 3/3 moon.yml hunks behavioral (the reverts fail the pins: 1 / 2 / 3 failing tests).
  • fable adversarial review: four rounds — r1 the hunt (the ** semantics verified against moon's own source chain: starbase_utils::glob → wax; the docs; a 1211-file × 8-task sweep: 0 disagreements; ui/**/*.html matches ui/index.html — the trailing-**-file case — so ui/*.html is NOT needed; F1 the root modules the tests import; F2 the Go test task's non-embedded reads its own comment claimed to cover; N1 the fnmatch false-green, caught by a mutation probe); r2 the remediation review (all six verified with isolating controls; the N1-residual: the zip() truncation); r3 TERMINAL DRY (the end-anchor landed; the adversarial pairs False; the isolating control executed); r4 the CI-catch round — the Python tests (windows-latest) lane failed: Path.relative_to() yields backslash-separated paths on Windows, so the derived embed targets matched no forward-slash glob (Two of PR #132's three named retired-model-ID residuals are still live — the unused legacy enhance constant and both JS-parser docs #703's path-separator class, met a second time); fixed with as_posix(), proven by the PureWindowsPath isolating control (11/11 targets: the old rendering fails every glob, the new matches; as_posix == str on POSIX — the other lanes unaffected); TERMINAL DRY at bd2689b8.
  • T8 standing-promises table (4 rows: 3 HIT + 1 disclosed MISS — the matcher-vs-wax oracle gap: a Python reconstruction differential-tested on the whole tracked corpus + 18 adversarial cases, not against the actual Rust crate; the cross-project/future-read boundary out of scope), C2 anchor queries (consumed==total: 4/4, 1/1, 1/1), A4 census (master unmoved at 9143061f; the open PRs fix(rust): the macro-body call scan runs on a tree-sitter token-tree walk — both regexes and the byte budget retired to the differential oracle (#708) #871–fix(report): the finding cross-reference contract — the sanitizer keeps the finding-ref anchors (#711) #876 disjoint), reconciliation (4 rows).

Parity

The legs' own terminal lines, pasted verbatim (the full logs in the bundle — base-parity-full.log, head-parity-settled.log [the WARM run], head-parity-settled-cold.log, head-parity-go.log, collect-diff.txt):

base (at 9143061f, the full core suite):

FAILED tests/patch/test_run_cve_batch.py::test_interrupt_then_resume - Assert...
FAILED tests/test_llm_sdk_contract_floor.py::test_installed_sdks_match_the_requirements_pins
FAILED tests/test_llm_sdk_contract_floor.py::test_anthropic_pin_tied_to_requirements
3 failed, 13280 passed, 38 skipped, 2 xfailed, 1 warning in 1669.17s (0:27:49)

head, warm (at bd2689b8, the same suite): the standing trio identity-matched; the +10 passing over base = the 9-test moon-input suite + the 1 parametrized no-hardcoded-paths guard item; the skips identical (38 = 38):

FAILED tests/patch/test_run_cve_batch.py::test_interrupt_then_resume - Assert...
FAILED tests/test_llm_sdk_contract_floor.py::test_installed_sdks_match_the_requirements_pins
FAILED tests/test_llm_sdk_contract_floor.py::test_anthropic_pin_tied_to_requirements
3 failed, 13290 passed, 38 skipped, 2 xfailed, 1 warning in 1597.39s (0:26:37)

the go module (at the head): head-parity-go.log ends EXIT:0 — all packages ok.

collect-diff: base 13,324 collected → head 13,334 — +10 added / 0 removed, exactly the new moon-input suite's 9 tests + the parametrized guard item (collect-diff.txt).

the cold-run disclosure: the head worktree's FIRST full run showed 3 failed, 13148 passed, 180 skipped — the +142 skips over base are the first-run provisioning class, fully decoded by the warm run above (38 = 38); the cold log retained as head-parity-settled-cold.log.

…d/test tasks gain every go:embed target + the test-time recipe/testdata reads, the Python test task gains the seven missing source dirs + the root modules (#712)

PR #579 named the Go half as a pre-existing gap ('moon.yml's test/build
inputs do not include embedded assets... a future chore') and deferred it.
The Python half was worse: the test task's inputs were openant/**/* +
tests/**/* while the tested tree is core/, utilities/, parsers/, context/,
prompts/, report/, github_scanner/ and openant/ — seven of eight source
directories outside the input set, plus the root modules the tests
import (experiment.py, validate_dataset_schema.py) and the run-shaping
files (conftest.py, pytest.ini). Nothing runs moon today (no workspace
root, no CI job), so the gap is latent — but the most common edits on
the embedded-asset surface (a template's markup, a regenerated
report.css, a ui/*.html page, anything outside openant/) would have been
a cache hit serving a stale binary or test result, including for the
class-coverage and golden-render guards.

The falsifier offered two closings: complete the input lists, or record
the descriptors unused and remove them. The completion route is taken
and the DECISION RECORDED IN THE DESCRIPTOR: the descriptors describe
the build this repo actually runs and completing them is the
prerequisite for any future moon adoption (a .moon/ workspace root,
absent today, is the next step); deleting intended-future tooling is the
bigger judgment call.

The Go test task additionally gains the NON-embedded test-time reads the
review rounds caught: the tailwind recipe (the palette, the config, the
input CSS — read by the CSS-freshness suites) and the golden-render
testdata (the browser-smoke oracle).

Pinned: every //go:embed target (derived from the .go sources
line-anchored, resolved repo-relative, the all:/quoted forms handled,
the _test.go embeds included for the test pin) is covered by both the
build and the test input globs; the recipe + testdata reads covered;
every source directory AND root module (derived from the tree) covered
by the test task's inputs; the analyze/parse/report tasks cover the
source tree; the pre-existing inputs kept; the glob matcher is
WAX-FAITHFUL (moon uses starbase_utils::glob which is wax: ** matches
zero-or-more segments, * never crosses '/') — the r1-N1 catch: the
fnmatch helper false-greened on a narrowed glob.
@gadievron
gadievron force-pushed the fix/712-moon-task-inputs branch from 15e572e to bd2689b Compare October 27, 2026 13:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant