Summary
A program whose main is synthesised from trailing top-level statements
emits output that differs from the byte-identical-looking explicit-main version
by a single trailing space on the last line. This breaks the byte-for-byte
golden comparison the differential harness relies on.
Repro
examples/tested/effects/algebraic_effects_comprehensive — de-maining the
.ospml/.osp pair (removing the fn main() / main () = wrapper and letting
main be synthesised from the trailing statements) produces output that is
identical to the .expectedoutput golden except for one trailing space on the
final line. Diff is whitespace-only:
< ...last line>·
---
> ...last line>
(· = trailing space present only in the synthesised-main output.)
Expected
Synthesised main and explicit main must emit byte-identical bytes, including
trailing whitespace / final-newline handling. No spurious trailing space.
Impact
- Blocks de-maining
algebraic_effects_comprehensive (kept its explicit main
only to avoid corrupting the golden).
- Any program relying on synthesised
main may carry a stray trailing space,
silently failing byte-exact output assertions.
Notes
Surfaced while removing needless main wrappers. Likely in the codegen path that
synthesises main from trailing statements (crates/osprey-codegen, the
trailing-statement → synthesised-main lowering). Low severity but a correctness
/ reproducibility bug for the differential harness.
Summary
A program whose
mainis synthesised from trailing top-level statementsemits output that differs from the byte-identical-looking explicit-
mainversionby a single trailing space on the last line. This breaks the byte-for-byte
golden comparison the differential harness relies on.
Repro
examples/tested/effects/algebraic_effects_comprehensive— de-maining the.ospml/.osppair (removing thefn main()/main () =wrapper and lettingmainbe synthesised from the trailing statements) produces output that isidentical to the
.expectedoutputgolden except for one trailing space on thefinal line. Diff is whitespace-only:
(
·= trailing space present only in the synthesised-mainoutput.)Expected
Synthesised
mainand explicitmainmust emit byte-identical bytes, includingtrailing whitespace / final-newline handling. No spurious trailing space.
Impact
algebraic_effects_comprehensive(kept its explicitmainonly to avoid corrupting the golden).
mainmay carry a stray trailing space,silently failing byte-exact output assertions.
Notes
Surfaced while removing needless
mainwrappers. Likely in the codegen path thatsynthesises
mainfrom trailing statements (crates/osprey-codegen, thetrailing-statement → synthesised-
mainlowering). Low severity but a correctness/ reproducibility bug for the differential harness.