Skip to content

The transcript fingerprints the symbolic form but never parameter VALUES, so a frozen or shared parameter is invisible #772

Closed as not planned

Description

@lmoresi

What

The transcript records which equation a part solves and how the solve went, but never what values the parameters had. So two solves of the same form at different parameter values are indistinguishable in the record — and so are two solves that were supposed to differ but didn't.

The part record's fingerprint is the symbolic residual, and it is written once per part:

{"kind": "part", "part": "SNES_Stokes#7", "fingerprint":
 "Matrix([[0], [2*cos(pi*N.x)]])Matrix([[\\eta*\\uplambda*({Ut}_{ 0,0} + ...) - {Pt} ...]])"}

\eta appears as a SYMBOL. Changing its value does not change the form text, so
_describe_part's "write a new record if it differs" never fires.

The step rows carry outcome and wall time, no parameters:

# step        t       dt   wall/s  outcome   operators, in order
      0     0.1      0.1     3.85  ok        Stokes(Ut)
      1     0.2      0.1     0.00  ok        Stokes(Ut)
      2     0.3      0.1     0.06  ok        Stokes(Ut)

Demonstrated with eta set to 1.0, 1.0, then 50.0 across three steps: one part record, no value anywhere, three interchangeable rows.

Why it matters

This is the class of failure the transcript is best placed to catch, because it is invisible everywhere else:

  1. A frozen parameter. A continuation ladder whose parameter update silently fails produces a smooth, plausible sweep — identical results at every rung, each solve reporting CONVERGED with real iteration counts. Found the hard way: a driver had two definitions of set_floor, Python kept the second, and it wrote a dead field instead of the parameter expression. Every rung ran at the build-time floor. The transcript recorded the run as three normal steps.
  2. Cross-model parameter sharing (uw.expression: the name-interning path runs __init__ on the cached object and silently overwrites its value AND description #767). Two models built in one process share their parameter expressions, so the second build retroactively changes the first's physics. A value in the record would show both models carrying the same number.
  3. A stale expression that a rebuild was supposed to refresh.

The data already exists

_pack_constants packs the constants manifest — non-dimensional values, in index order — on every solve, via
unwrap_expression(expr, mode='nondimensional'). So the values are in hand at exactly the moment a solve event is recorded.

Suggested: add a manifest digest to each solve event — a hash over (name, packed value) pairs — and optionally the values themselves for the terms a solver _declared_terms reports. Then:

  • consecutive rows with an identical digest where the driver intended a change = a frozen parameter;
  • two parts with the same digest = shared parameters;
  • uw.transcript_report can show a "parameters changed" column, which is what a reader scanning a ladder actually wants to know.

A digest keeps the record small; the full values could be gated behind record_every or a flag for runs that want them.

Acceptance

A test that runs the same solver twice with one parameter changed and asserts the two solve events carry DIFFERENT manifest digests — and twice with nothing changed, asserting they carry the same one.

Activity

  1. lmoresi commented on Sep 21, 2026

    @lmoresi
    MemberAuthor

    Reframing, per Louis (2026-09-22): "the transcript is there to see past the symbols where needed so we can see they are changed. Or record the change".

    So this is a gap against the transcript's own purpose, not a feature request against a design that deliberately omitted values. The record exists precisely so a reader can get behind the symbols; today it stops at them.

    Of the two routes, recording the CHANGE is the better one — cheaper than digesting the manifest on every solve, and strictly more informative:

    • Instrument the mutation, not the state. UWexpression.sym's setter is a single code path, and it is the only way a parameter's value legitimately changes. Recording an event there — {"kind": "parameter", "symbol": "\\eta_{\\min}", "from": 0.01, "to": 0.3} — gives an audit trail with provenance, rather than a hash that says only "something differs".
    • A frozen ladder becomes obvious by ABSENCE. The failure that motivated this produced no parameter events at all while the driver believed it was stepping a floor 30x. A digest-diff shows "unchanged"; a change log shows "you never changed it", which is the actionable statement.
    • It catches uw.expression: the name-interning path runs __init__ on the cached object and silently overwrites its value AND description #767's cross-model sharing with attribution. A single shared expression would show a change event while a second model is being built — i.e. the record names the culprit, not just the symptom.
    • Cost is proportional to reassignments, which are rare, rather than to solves, which are not. No per-solve hashing of the whole manifest.

    A digest is still worth having as the backstop, because it catches a value that changed through some path the setter does not see (a .data write into a field a parameter reads, say). But the change log is what a reader scanning a continuation ladder actually needs, and it is the cheaper of the two.

    Suggested acceptance, revised: assigning expr.sym inside a model.step writes a parameter event carrying the symbol, the old value and the new one; a ladder that reassigns nothing produces none; and uw.transcript_report surfaces them per step so a sweep's parameter history reads off the record.

  2. added
    roadmap
    enhancement
    on Nov 13, 2026
  3. lmoresi commented on Nov 13, 2026

    @lmoresi
    MemberAuthor

    This is a planning item and not a defect of its own (it carries the roadmap label), so it moves to the roadmap project and this issue is closed.

    Roadmap item: "The transcript records a change of a parameter's value, not only the symbolic form", in the Underworld roadmap, status Inbox. The item says what is asked for and what would settle it. The history and the measurements stay here.

    The close reason reads "not planned" because GitHub has no state for "moved to the roadmap"; the work is not rejected. If something here turns out to be a defect, it gets an issue of its own.

    Underworld development team with AI support from Claude Code

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

    enhancementroadmap

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions