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
The AMICODE_PULSE_META / AMICODE_ITER / AMICODE_PULSE grammar (#66, self-labeled prototype-grade at solve_template.jl:45) is encoded three independent times:
@printf in packages/extension/templates/solve_template.jl
regexes in packages/extension/src/run_dir_reader.ts
The #78 smoke corpus proves fake ↔ parser agreement (wiring). It does not guard template ↔ parser: if solve_template.jl changes its emit format and the parser isn't updated, fake-julia doesn't change either, so the suite stays green while real solves silently break.
Why the existing roundtrip does not already cover this
packages/schema/julia/emit_fixture.jl is a 14-line, TOML-stdlib-only stub. Its lone AMICODE line is a hardcoded literal —
— that exists only so amico-run's tail has something to drain while producer_roundtrip.sh validates result.toml against the schema. It is not the template's emit code, and it is never fed to the TS parser. So producer_roundtrip.sh guards TOML↔schema only; there is no consumer-side (parser) step in it today. This is new coverage modeled on the schema fixture pattern — not an extension of that script.
One canonical fixture (one sample line per type) checked in once, that both sides reference — same mechanism as the schema test fixtures.
Two small tests + AC6 perturbation:
Julia: the emit helpers reproduce exactly the fixture lines.
TS: run_dir_reader parses the fixture lines into the expected records.
Perturb the fixture → both must fail. That's what makes template↔parser format drift impossible to land green on the shared emit path.
Point fake-julia at the same fixtures (generate from / diff against) so the fake can't drift from the template either — all three encodings trace to one source.
Format drift only, not semantic drift. A row-major↔column-major flip in a=, or a dt unit change, still parses — green — but means something different. A format roundtrip cannot catch that.
"Impossible to land green" holds only for emit that goes through the shared helper. A new inline @printf in the template bypasses the guard (same residual as hand-writing TOML instead of using the schema writer).
Optional slow-tier canary (one real tiny Julia solve, nightly/on-demand) is the only thing that exercises genuine end-to-end emit — but it earns its Julia cost only if it asserts parsed pulse values, not liveness. A canary that checks "ran + FINISHED" catches nothing the format roundtrip doesn't. Specify golden-value assertions or skip it.
Sequencing & placement
Land with the 1.3 grammar rework, not now. The grammar is prototype-grade and still moving; the emit code is already open during that rework, and the format is closer to freezing then. Hardening a moving target now buys change-friction on every prototype iteration.
Same species as #81 (formulation.toml additive contract) and the readTerminal/ingestRunDir duplication caught in #70 review: parallel copies of one truth drift. The repo already knows the cure (SchemaPackage + fixture roundtrip); this applies it to the last uncovered piece of the run-dir contract.
Surfaced by the #78 smoke-corpus review (finding #1).
Problem
The run-dir contract has three producer↔consumer boundaries. Two are guarded; the stdout grammar is the one that escaped the discipline.
producer_roundtrip.sh+ SchemaPackageAMICODE_*stdout)solve_template.jl(@printf)run_dir_reader.ts(regex)The
AMICODE_PULSE_META/AMICODE_ITER/AMICODE_PULSEgrammar (#66, self-labeled prototype-grade atsolve_template.jl:45) is encoded three independent times:@printfinpackages/extension/templates/solve_template.jlpackages/extension/src/run_dir_reader.tspackages/extension/test/corpus/fake-julia(1.4a: smoke corpus — seconds-scale end-to-end fixtures (Scheduler → executor → RunsManager → Inspector) #78)The #78 smoke corpus proves fake ↔ parser agreement (wiring). It does not guard template ↔ parser: if
solve_template.jlchanges its emit format and the parser isn't updated,fake-juliadoesn't change either, so the suite stays green while real solves silently break.Why the existing roundtrip does not already cover this
packages/schema/julia/emit_fixture.jlis a 14-line, TOML-stdlib-only stub. Its lone AMICODE line is a hardcoded literal —— that exists only so amico-run's tail has something to drain while
producer_roundtrip.shvalidatesresult.tomlagainst the schema. It is not the template's emit code, and it is never fed to the TS parser. Soproducer_roundtrip.shguards TOML↔schema only; there is no consumer-side (parser) step in it today. This is new coverage modeled on the schema fixture pattern — not an extension of that script.Proposed fix (right-sized to 3 line types)
emit_pulse_meta/emit_iter/emit_pulse— sosolve_template.jlhas one emit site instead of scattered@printf(mirrors theemit_formulationhelper from feat(contract): pre-solve formulation.toml (additive; scoped counterpart to #64) #81).run_dir_readerparses the fixture lines into the expected records.fake-juliaat the same fixtures (generate from / diff against) so the fake can't drift from the template either — all three encodings trace to one source.Explicit non-goals / limits (so a future reader doesn't over-trust it)
a=, or adtunit change, still parses — green — but means something different. A format roundtrip cannot catch that.@printfin the template bypasses the guard (same residual as hand-writing TOML instead of using the schema writer).Sequencing & placement
Relationship
Same species as #81 (formulation.toml additive contract) and the
readTerminal/ingestRunDirduplication caught in #70 review: parallel copies of one truth drift. The repo already knows the cure (SchemaPackage + fixture roundtrip); this applies it to the last uncovered piece of the run-dir contract.Surfaced by the #78 smoke-corpus review (finding #1).