Skip to content

cli: a systems stock named time is dropped from the output #440

Closed

Description

@bpowers

A systems-format stock named time simulates correctly, but the CLI silently drops its column and prints the clock under time instead.
What to do about it is an owner decision: reject the name, or print the stock under another header.
Equations are fine: the translator quotes builtin names, so time(10) > B @ 1 runs exactly like the same model with the stock called A (#1073).

print_filtered_tsv and print_filtered_tsv_comparison in the CLI always print the clock as the time column and skip any stock whose name is time, so that stock's series never appears, with no warning.
The engine's patch rename already refuses clock names (time, dt, initial_time, final_time) for the same reason: a variable with that name takes the clock's key in the results.

Fix

Recommended: have the systems importer reject a stock named after a clock slot with a clear error, matching the rename rule (db::is_implicit_global); other builtin names such as pi stay allowed.
Alternative: keep accepting it and print the stock under a distinct header.

Seen only in constructed tests; no real systems model is known to name a stock time.

Pointers

  • src/simlin-cli/src/main.rs: print_filtered_tsv, print_filtered_tsv_comparison
  • src/simlin-engine/src/systems/translate.rs: test a_stock_named_like_a_builtin_is_read_as_the_stock

Activity

  1. added
    engine
    on Jun 8, 2026
  2. added
    bug
    on Oct 12, 2026
  3. changed the title [-]Systems translator does not reject stocks named after engine-reserved identifiers[/-] [+]engine: systems stock named time or dt clashes with the clock[/+] on Oct 12, 2026
  4. changed the title [-]engine: systems stock named time or dt clashes with the clock[/-] [+]cli: a systems stock named time is dropped from the output[/+] on Oct 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugengine

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions