Skip to content

engine: keep flow order and reach every reference in patches - #1072

Merged
bpowers merged 2 commits into
mainfrom
sweep/patch-sharing
Oct 3, 2026
Merged

bpowers merged 2 commits into
mainfrom
sweep/patch-sharing

Conversation

@bpowers

@bpowers bpowers commented Oct 2, 2026 •

Copy link
Copy Markdown
Owner

Why

A fresh-eyes review of the structural-sharing work that landed between e6f95a6b and 5f2b7f94 (SharedVec, patch sharing, the undo-copy path) found that the mechanism was sound, and that the patch layer under it changed models in ways an edit never asked for. Each item below started as a failing probe test.

  • Patches sorted a stock's inflow and outflow lists. Every UpsertStock and UpdateStockFlows sorted them, and a flow rename sorted every stock's. XMILE 1.0 section 4.2 makes that order the inflows' priority and a queue's outflow priority, and the queue and conveyor passes read it. Renaming an unrelated flow swapped which of two queues a conveyor served first (waiting_a went from 0, 2, 4, 6, 8 to all zeros), and moved a queue's <overflow/> outflow to the front, which does not compile.
  • A rename missed references. It rewrote a variable's equation and ACTIVE INITIAL only: a conveyor whose <len> named the variable stopped compiling, a macro's parameter list went stale (a call went from 43 to 3), and renaming a sub-model's output left its parents reading a name that no longer existed.
  • SharedVec::edit_each rested on a convention. It kept a shared element's edit only when the closure returned true. Four of the rename's arms could report false after changing their text without any test failing, and "shared" is the state a host with undo history is in.
  • Datamodel == was not reflexive on NaN, so a lookup table holding one was set again, and its variable recompiled, on every sync.

What

  • Flow lists keep the order they were given. A renamed flow keeps its position; only stocks that name the flow are touched.
  • One owner each of where a variable holds expression text (Variable::expression_texts) and where a model holds a variable's name (Model::map_variable_names, by NameRole). Both destructure without .., so a new field fails to compile until it is classified.
  • A rename resolves references through module instances (patch::Rename, mirroring db::DepScope::resolve), so it reaches equations, module src/dst and flow lists in every model that can name the variable. It splices the new name into the text at each reference's span, so spacing, builtin case and every other name come back byte for byte; a text longer than a u16 span reaches is respelled by the printer. A delete unwires a module reference either end of which starts at the deleted variable, in any spelling.
  • SharedVec::update(|&T| -> Option<T>) replaces edit_each. A pass that reads an element and returns its replacement cannot change one and leave it out.
  • Datamodel equality is bit for bit (bitwise_eq!, which refuses an unmarked float), every datamodel type is Eq, and the separate Identical trait is gone.
  • db::sync skips a variable whose Arc is the one its input was last set from. InputMemory is the one statement of when that memory may be trusted.
  • Two models known by one name are refused (canonical name, an unnamed model being main): by the compile, by one project-level diagnostic, and by AddModel. AddModel also refuses a name under the stdlib prefix, and a project model named for a stdlib model gets inputs of its own instead of overwriting the db's.
  • SetSimSpecs clears the default model's own specs (Project::default_model), so the edit is what the run reads.
  • libsimlin's add_model stages its edit, so a refused add changes nothing; the diagram editor compares model names as the engine does.

Decisions worth a reviewer's eye

  • A rename refuses rather than guess what a bracketed identifier means. The compiler reads an identifier inside a subscript three ways: the dependency walk skips a dimension or an element of any dimension, a static subscript takes an element of its axis, and a range takes its ends as elements only when both are. An earlier attempt in this change to mirror "the compiler's rule" broke two shapes that ran on main, because it is not one rule. So a rename is refused, changing nothing, when the old or new name is a dimension's (XMILE 3.7.1 forbids such a variable), or is an element of a dimension and the variable is written alone in a subscript. Everywhere else there is no ambiguity. Unifying the compiler's reading is separate work, after which the refusal can be lifted. One of 7,590 corpus variables is named like a dimension or element.
  • A rename does not give a variable the name of one of the run's clock slots (time, the time step, the initial and final time). The compiler resolves such a name written quoted, so this is deliberately stricter than it: a variable of that name takes the slot's key in the results, where every host reads the clock. A model that already declares one keeps it and can rename it away.
  • Duplicate canonical model names are ill-formed rather than last-wins, because last-wins runs a model other than the one a patch edits. A stored project that has one is now refused with a diagnostic; none of the 484 corpus projects does.
  • RenameVariable leaves diagram labels, in every view, until a view edit or a diagram sync that carries the patch relabels them. That is main's behavior; the rustdoc now says so.
  • The sync skip trusts a state's memory only while that state is of the inputs' latest sync, because a rollback re-syncs with a state older than the inputs.

Evidence

  • Flow order: a row per ModelOperation variant; the two fixtures whose series depend on list order are unchanged by an unrelated rename (on main they flipped).
  • Rename: a_rename_is_refused_or_changes_no_series, 26 rows checked against Refusal::ALL: a refused rename leaves the project byte-equal, a carried-out one leaves every series identical. A row per expression field and per name role, each with an oracle that is not the function under test. In the gates, 1,095 renames across the corpus leave every series identical.
  • Sync: db/sync_differential_tests.rs: after any sequence of syncs, staged syncs and rollbacks over a 47-project pool that varies every field the sync writes, the db holds what a fresh db holds (inputs in the default suite; every diagnostic, series, expanded input and loop count in the gates, over 500 random sequences and every ordered pair).
  • Sharing: every patch operation and both special-stock expansions leave what they do not change in its allocation, and land the same on a shared and an unshared project (two models by default, the corpus in the gates). The generator matches ModelOperation and ProjectOperation without a wildcard.
  • Cost: db.sync after a one-variable edit on C-LEARN, 617.5 us and 10,784 allocations before, 322.4 us and 4,150 after; World3 169.1 us to 101.1 us. The default suite gains about 0.6 CPU-seconds in debug.
  • Review: two adversarial reviews ran against this change (the first found the sync skip running a stale model for two same-named models, and the splice corrupting text past 64 KiB; the second found the resolver disagreeing with the compiler). Their findings and surviving mutations are fixed and pinned; the mutations of the final mechanisms are each killed by a named test.
  • A rename to a zero-argument builtin's name (pi) changes no series, now that the printer quotes such a name (engine: one equation normal form and a sound save check #1073).
  • The pre-commit hook passed in full: Rust, TypeScript and pysimlin, on this branch rebased onto main as of engine: read tables by kind and keep projects in protobuf #1071 and engine: count a run's steps and read its rows by time #1075.
  • setting_the_sim_specs_of_a_stored_project_changes_its_run (added by engine: read tables by kind and keep projects in protobuf #1071 as an expected failure waiting on this change) passes, and its marker is removed.

What this does not establish

  • The subscript refusals rest on fixture rows; the corpus sample holds no such name.
  • tools::resolve_datamodel_model, analysis::model_snapshot and libsimlin's simlin_project_get_model do not yet use Project::default_model, and the db files an unnamed model under "" rather than main.
  • Spans in texts over 64 KiB are still wrong for error snippets; only the rename is protected.
  • Whether any stored production project has two models of one canonical name.
  • No browser journey was run. The one UI change is the model-name check, covered by unit tests and an engine-backed test.

🤖 Generated with Claude Code

https://claude.ai/code/session_01LYR7N9WZwQuFnZFW8JDUgx

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 2, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-02T17:06:23.911444Z 4e06575 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@codecov

codecov Bot commented Oct 2, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 98.41566% with 17 lines in your changes missing coverage. Please review.
✅ Project coverage is 92.66%. Comparing base (610cb2c) to head (3dbedc2).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
src/simlin-engine/src/datamodel.rs 94.73% 9 Missing ⚠️
src/simlin-engine/src/patch.rs 99.04% 6 Missing ⚠️
src/simlin-engine/src/db/sync.rs 98.49% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1072      +/-   ##
==========================================
+ Coverage   92.62%   92.66%   +0.03%     
==========================================
  Files         308      308              
  Lines      187921   188506     +585     
==========================================
+ Hits       174061   174673     +612     
+ Misses      13860    13833      -27     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@claude

claude Bot commented Oct 2, 2026

Copy link
Copy Markdown

Review

No blocking bugs found. The PR's mechanics check out across the areas most sensitive to the change:

  • Flow order (patch.rs): canonical_flow_list no longer sorts, every op that writes a stock's lists keeps the modeler's order, and canonicalize_stock_references/canonicalize_module_references preserve shared allocations when the result equals the current value.
  • Rename (patch::Rename, Reader, Walk): models_reaching reaches every parent of the renamed variable's model; target matches db::DepScope::resolve with the ReadAs::Port branch for module dst; splice ordering (sort_by_key(Reverse(start)) then right-to-left replace_range) is correct for non-overlapping spans; the SPAN_REACH = u16::MAX fallback to print_eqn is decided on text length before any span is read; the three refusal rules (dimension name, dimension-element in a subscript index, dimension·element new spelling, implicit-global clock names) are enforced before anything is written.
  • SharedVec::update(|&T| -> Option<T>): the Option<T> return makes it impossible for a pass to change an element and omit it from the result; share_identical relies on T: Eq plus bitwise_eq! so NaN values are reflexive and -0.0 is not replaced by 0.0.
  • Datamodel equality (bitwise_eq!, Dt, LinkShape): the macro destructures without .., and the manual PartialEq for Dt/LinkShape compares the floats bit-for-bit. No datamodel type is used as a HashMap key, so NaN-reflexivity does not create cache corruption.
  • db/sync.rs: generation/latest via Arc<AtomicU64> correctly invalidates InputMemory after a rollback; first_visit prevents trusting a second write to the same input in one sync; filed_models keeps the last of duplicates and the stdlib model is reinstated when a project no longer shadows it.
  • AddModel and project_duplicate_models: canonical_model_name is applied symmetrically, so an unnamed model is main from either side; the stdlib-prefix refusal uses the canonical form.
  • libsimlin simlin_project_add_model: stages the add on a copy and only replace()s on success, so a refused add doesn't advance the revision or drop the hit index (pinned by RejectedAddModel).
  • Diagram name helpers: canonicalModelName('') → 'main' matches engine; unusedCopyName materialises the iterable once.

Overall correctness

Correct. The surviving edge cases the PR itself calls out (printer not yet quoting zero-argument builtins for a rename to pi; subscript rules enforced only on fixture rows; spans past 64 KiB for error snippets outside the rename path) are documented as follow-ups, not defects in this change.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 4e06575579

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/simlin-engine/src/patch.rs Outdated
Comment on lines +663 to +665
let end = canonicalize(end);
let (_, path) = split_scope_prefix(&end);
path.split(MODULE_SEPARATOR).next() == Some(ident.as_ref())

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Preserve wiring for dotted local names on delete

When the deleted variable is a supported dotted local name such as x.foo and x is not a module instance, its canonical identifier is x·foo and the compiler resolves that entire spelling as the local variable. This predicate instead splits at · and compares only x against x·foo, so a module reference whose src is x.foo survives the deletion and leaves the project with an unknown dependency. Check the whole resolved local name before interpreting the first segment as a module-instance path.

AGENTS.md reference: src/simlin-engine/AGENTS.md:L178-L181

Useful? React with 👍 / 👎.

Comment thread src/diagram/module-wiring.ts Outdated
Comment on lines +19 to +20
export function canonicalModelName(name: string): string {
return name === '' ? 'main' : canonicalize(name);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Canonicalize model separators like the engine

When equivalent model names use . and · spellings—for example, an existing model named a·b and a module ident a.b—this helper reports the requested name as unused because the TypeScript canonicalize leaves . unchanged, while the Rust engine canonicalizes it to ·. The create-model handler then submits AddModel("a.b"), which the engine rejects as a duplicate, so creating or duplicating the module model fails despite this preflight helper being intended to choose a usable name.

Useful? React with 👍 / 👎.

Comment thread src/simlin-engine/src/datamodel.rs Outdated
Comment on lines +2279 to +2283
pub fn canonical_model_name(name: &str) -> std::borrow::Cow<'_, str> {
if name.is_empty() {
return std::borrow::Cow::Borrowed("main");
}
crate::common::canonicalize(name)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Treat canonically empty model names as main

When a project already has the common unnamed model and a caller adds a nonempty spelling that canonicalizes to empty, such as whitespace-only " ", this function returns "main" for the former but "" for the latter. AddModel therefore accepts both and project_duplicate_models reports no collision, while db::sync::filed_models keys both with ordinary canonicalize and silently keeps only the later model; compilation can consequently run a different, potentially empty model instead of rejecting the project. Apply the main substitution after canonicalization so every empty canonical form receives the same key.

AGENTS.md reference: src/simlin-engine/AGENTS.md:L63-L63

Useful? React with 👍 / 👎.

@bpowers

bpowers commented Oct 2, 2026

Copy link
Copy Markdown
Owner Author

Follow-up commit 816cf35 for the Codex review:

  • Dotted local names on delete: taken. A path starts at its first segment only when that segment is a module instance; otherwise the whole spelling is one local name, as DepScope::resolve reads it. Pinned by a_delete_unwires_what_starts_at_the_deleted_variable_as_the_compiler_reads_it.
  • Canonically empty model names: taken. canonical_model_name and the editor's canonicalModelName decide empty on the canonical form, so a blank name is the unnamed model's; rows added to add_model_refuses_a_name_whose_canonical_form_is_taken and the TypeScript model-name tests.
  • Model separators in the editor: correct, and not fixed here. src/core/canonicalize.ts is not the engine's canonicalize (it does not map an unquoted . to the module separator or a quoted one to the literal-period sentinel), which predates this change and reaches every caller in the editor. It gets its own change: the TypeScript function made the engine's, with one fixture table both languages test against.

@claude

claude Bot commented Oct 2, 2026

Copy link
Copy Markdown

Review Summary

I reviewed the main structural changes in this PR (patch rename logic in patch.rs, SharedVec::update, BitEq/bitwise_eq! in datamodel.rs, InputMemory/filed_models in db/sync.rs, conveyor Pass 2, and simlin_project_add_model). The design is sound and the implementation looks careful:

  • The rename resolver traces references through module instances consistently with db::DepScope::resolve, respells via text splicing within SPAN_REACH and reprints past it, and refuses deliberately where the compiler's subscript rule is non-trivial.
  • SharedVec::update correctly reads elements by &T and only unshares via Arc::new on change. The conveyor Pass 2 translation preserves the prior semantics while narrowing what gets copied, and the (v != *original).then_some(v) guard keeps allocations stable when the pass is a no-op.
  • BitEq/bitwise_eq! is a solid foundation for datamodel Eq: destructuring without .. makes a new field a compile error, and the : float marker refuses an unmarked float via total_eq: T: Eq. The hand-written PartialEq for LinkShape and Dt correctly compare floats by bits.
  • simlin_project_add_model stages against a cloned datamodel and only replaces on success, so a refused add leaves the project and revision untouched.
  • The flow-order fix (patch ops stop sorting inflow/outflow lists) matches XMILE 1.0 §4.2 and is covered by patch_flow_order_tests.rs and the TypeScript view-invariants update.

Potential inconsistency (not blocking)

One minor pre-existing inconsistency the PR surfaces: filed_models in src/simlin-engine/src/db/sync.rs:357-370 keys models by canonicalize, but db::diagnostic::project_duplicate_models keys by datamodel::canonical_model_name. For a project holding both an unnamed model (name = "") and a model literally named main, the diagnostic reports them as duplicates (correctly refused by compile) while filed_models files them under distinct keys "" and main, so the sync creates two sets of inputs for one logical model. The compile gate refuses the project so this does not affect simulation, but subsequent syncs do not reclaim the extra inputs. The pre-PR sync_from_datamodel had the same behavior (via plain canonicalize on project.models.iter()), so this is not a regression -- just a documentation/code mismatch worth cleaning up in a follow-up by having filed_models use canonical_model_name.

Verdict

Overall correctness: the patch is correct. No blocking issues found.

A patch sorted a stock's inflow and outflow lists, and a flow rename
sorted every stock's. That order is the flows' priority (XMILE 1.0
section 4.2): renaming an unrelated flow swapped which of two queues a
conveyor served first, and put a queue's overflow outflow first, which
does not compile. Lists keep the order they were given.

A rename missed references: a conveyor's parameters, a leak's fraction,
a macro's parameters, and every read of a sub-model's variable from the
models that instantiate it. Variable::expression_texts and
Model::map_variable_names state once where a variable holds expression
text and where a model holds a name; one resolver says what a reference
names through module instances, as DepScope::resolve does; and the new
name is spliced into the text at each reference's span, so the rest
comes back as written. The compiler reads an identifier inside a
subscript's brackets three ways, so a rename that would have to choose
(a dimension's name, or an element written alone in a subscript, before
or after) is refused and changes nothing, rather than replaying a rule
that is not one rule. A rename does not give a variable one of the
engine's clock names, deliberately more strictly than the compiler
resolves them.

SharedVec::edit_each kept a shared element's edit only when its closure
said so; update takes a pass that reads an element and returns its
replacement, which cannot change one and leave it out. Datamodel
equality compares floats bit for bit, so a table holding a NaN equals
itself and is set once, and db::sync skips a variable whose allocation
is the one its input was last set from. InputMemory states when that
memory may be trusted, and a db after any sequence of syncs, staged
syncs and rollbacks is held to what a fresh one holds.

Two models known by one name (canonical, an unnamed model being main)
are refused at compile and by AddModel, because the db files both under
one name and would run a model other than the one a patch edits; only
the last is synced. A project model named for a stdlib model gets
inputs of its own. SetSimSpecs clears the default model's own specs, so
the edit is what the run reads. libsimlin's add_model stages its edit,
and the editor compares model names as the engine does.
A delete unwired a module reference by the first segment of its path,
so deleting a variable named `x.foo` left a read of it wired (a
dependency on a variable the model no longer has), and deleting `x`
took the wiring of `x.foo` with it. A path starts at its first segment
only when that segment is a module instance; otherwise the whole
spelling is one local name, as DepScope::resolve reads it.

canonical_model_name decided "empty" on the name as written, so a
blank name was not the unnamed model's, AddModel accepted both, and
the db filed both under the one empty key and kept only the later.
Empty is decided on the canonical form, in the engine and in the
editor's twin.
@bpowers
bpowers force-pushed the sweep/patch-sharing branch from 0844832 to 3dbedc2 Compare October 3, 2026 04:35
@bpowers
bpowers merged commit afdc027 into main Oct 3, 2026
16 checks passed
@bpowers
bpowers deleted the sweep/patch-sharing branch October 3, 2026 04:41
bpowers added a commit that referenced this pull request Oct 3, 2026
## Why

A fresh-eyes review of the MDL (Vensim) reader and writer found that a
save could re-import as a different model: arrayed variables changed
dimensions, elements were respelled, `PULSE` and `INTEGER`/`MODULO` had
the wrong meaning, and a variable named `dt` was written `dt = dt`. Some
saves were equations Vensim refuses, and some files aborted the reader.

## What

- **Reader:**
- a per-axis dimension rule: a named dimension of exactly the elements
defined, else the smallest, first declared; canonical element keys; a
deterministic build order;
  - one space normalization for definitions and references;
- a variable the model declares as `dt` or `pi` is read as the variable;
  - number lists, including with `:EXCEPT:`;
- `INTEGER`/`MODULO` as the engine's `TRUNC`/`REM`, and `QUANTUM` for a
quantum at or below zero (Vensim's `fn_integer`, `fn_modulo`,
`fn_quantum` pages; the `rounding` and `subscripted_round` outputs in
`test/`);
- `PULSE`/`PULSE TRAIN` per `fn_pulse`, `fn_pulse_train` and
`pulsetrain.dat`;
- sketch elements kept in a map, a bound on subscript ranges and
products, and two XMILE reader panics fixed, so a file's contents do not
abort a host.
- **Writer:**
- number lists, grouped left-hand sides, and `:EXCEPT:` over the
variable's dimensions or a subrange its default names, else element
equations with a warning;
- references spelled as definitions; builtins as Vensim's keywords;
`VMAX`/`VMIN`/`VECTOR RANK`; bit-exact numbers;
- warnings for `NaN`, a nested `ACTIVE INITIAL`, functions Vensim lacks,
and partial arrays.
- **Engine:** `TRUNC`/`REM` builtins; `QUANTUM`/`REM` arguments must
share units; `TRUNC` propagates link polarity; the LTM zero-slot
classifier reads builtin signatures.
- **Agent docs:** the MCP Vensim syntax skill's tables corrected.

## Decisions worth a reviewer's eye

- **Where Vensim's behavior could not be checked, the engine does the
simple thing and says so in one line:** `PULSE` widths of half a step or
less, `MODULO` with a negative divisor, an excepted element nothing
defines (it stays undefined), a wrong-length number list (refused).
- **The writer does not re-read its own output.** An earlier round had a
write-time read-back guard; it caught nothing and was deleted. The
corpus save gate and the property test are the check, offline.
- **"The smallest declared dimension holding the defined elements" is
Simlin's rule,** not Vensim's: Vensim has no per-variable dimension.
- **`trunc` and `rem` are now reserved call names,** and `QUANTUM(x, q
<= 0)` returns its input for every format.

## Evidence

- **Corpus gates, in release:** every corpus `.mdl` keeps its datamodel
through a save, with no exceptions listed, and every written equation
obeys Vensim's subscript-range rule. On the save-meaning table, 64 MDL
saves that used to change their model now keep it; 51 rows remain, each
with a cause. The Vensim-truth gate pins each differing series by name
(667 series) and fails both when a listed series starts matching and
when an unlisted one differs.
- **Parity with Vensim's own output:** measured by the adversarial
reviewer over all 509 corpus files against main: 500 series newly match
and none that matched was lost. No XMILE-origin series moves, bit for
bit, across 247 files. `INTEGER`/`MODULO`/`QUANTUM` account for 35 of
the moved series, in 2 files, all closer to Vensim.
- **Property tests:** what is generated reads back, and the first save
is a fixed point in text and in datamodel (clean at 4,000 cases).
- **Robustness:** 153,000 mutated corpus inputs read and 47,000 projects
written with no panic in the MDL reader or writer; 1,052 fuzz inputs
replayed through both readers after the last round, 0 panics.
- **LTM:** World3's 1,314 LTM series are bit-identical under the
signature-driven classifier and the previous name list.
- **Review:** two adversarial passes by a reviewer that did not write
the code. The first found a reader abort and `:EXCEPT:` equations that
broke Vensim's rule; the second found two saves the fix round had
regressed. All are fixed and pinned.
- Rebased onto main as of #1071, #1072 and #1075: with #1071's lookup
fix, `subscripted_lookups` moves from differing to matching Vensim, and
the three `DELAY FIXED` models move from differing to refused.
- The pre-commit hook passed in full on the rebased branch.

## What this does not establish

- That Vensim reads a saved file: no save was run in Vensim.
- Rules taken from Vensim's pages rather than its output: `PULSE` widths
of half a step or less, `PULSE TRAIN` intervals, `MODULO` with a
negative divisor.
- The `dt`/`pi` reading moves no corpus series, so it rests on the rule,
not on Vensim output.
- Warned rather than exact: functions Vensim lacks (`ROUND`, `INT`,
`MOD`), conveyors and queues, an `:EXCEPT:` default naming a mapped
range (written as element equations), variables over some elements of a
dimension.
- An XMILE `PULSE` saved as MDL can still differ for intervals that are
not binary fractions; the writer's expression should be rewritten
against the engine's pulse rule as #1075 states it, which is a
follow-up.
- The corpus gates are ignored tests that no CI job runs yet.

Fixes #1059

🤖 Generated with [Claude Code](https://claude.com/claude-code)

https://claude.ai/code/session_01LYR7N9WZwQuFnZFW8JDUgx
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant