The language version is a property of the ENGINE that runs a program, not of this module.
There are two engines. The tree-walker in interpret.ts IS language version 1 and stays so
forever: it is the replay engine for every run recorded under 1, and a v1 record has nowhere else
to go. The engine in engine/ is version 2 - a different language, not a faster one (log is
data there and refuses code, and the step unit is a transformed-site hit rather than a walker
dispatch), which is exactly what a version bump is for.
SO THE VERSION IS PASSED IN rather than read from here. Bumping a single shared constant was
MEASURED and is not available: the walker would stamp 2 and compare 1, and every walker
fresh-run-then-resume round trip fails - 7 of 18 suites red, the differential gate among them.
Leaving the constant at 1 while the engine speaks 2 fails the other way: 2 suites red on the
checked-in v1 records. Each engine stamping AND comparing its own version breaks neither.
Deliberately NOT the package version. @cotal-ai/lang versions in lockstep with every other
package in the repo, so a release of an unrelated package would otherwise invalidate every open
run in the space — a loud failure with no cause behind it, which is worse than no check at all.
It is pinned at all because source and seed are not sufficient across an upgrade: unchanged
source can take a different branch BEFORE the first effect, where there is no input hash to
compare against and nothing to diverge on.
The language version is a property of the ENGINE that runs a program, not of this module.
There are two engines. The tree-walker in
interpret.tsIS language version 1 and stays so forever: it is the replay engine for every run recorded under 1, and a v1 record has nowhere else to go. The engine inengine/is version 2 - a different language, not a faster one (logis data there and refuses code, and the step unit is a transformed-site hit rather than a walker dispatch), which is exactly what a version bump is for.SO THE VERSION IS PASSED IN rather than read from here. Bumping a single shared constant was MEASURED and is not available: the walker would stamp 2 and compare 1, and every walker fresh-run-then-resume round trip fails - 7 of 18 suites red, the differential gate among them. Leaving the constant at 1 while the engine speaks 2 fails the other way: 2 suites red on the checked-in v1 records. Each engine stamping AND comparing its own version breaks neither.
Deliberately NOT the package version.
@cotal-ai/langversions in lockstep with every other package in the repo, so a release of an unrelated package would otherwise invalidate every open run in the space — a loud failure with no cause behind it, which is worse than no check at all.It is pinned at all because source and seed are not sufficient across an upgrade: unchanged source can take a different branch BEFORE the first effect, where there is no input hash to compare against and nothing to diverge on.