Skip to content

v0.8.0

Choose a tag to compare

@ivorpad ivorpad released this 21 Oct 06:30
· 10 commits to main since this release
  • pyokka run --follow-objects (also debug --follow-objects and review start --follow-objects, MCP
    follow_objects, launch.json followObjects) records each
    change at the statement that made it, a change in place included, and gives it to every other
    name that holds the changed object. why bill in a program where two orders share one dict now
    reaches the line that changed it, and says how bo holds it and since when:
    [bo['lines'][0] is line, shared since #17 catalog.py:5 new_order]. var TEMPLATE lists the
    change made through line. A for loop's target belongs to its iteration step, once per
    iteration. --follow-objects-in NAME traces only the named functions. The cost is per traced statement:
    a 240,000-step loop records in 6.7 s against 1.9 s for a plain recording, whether its function is
    traced alone or with every other one. The events come from sys.monitoring, with sys.settrace
    as the fallback when no monitoring tool id is free.

  • why links a function or class a statement read to its definition: discount = ? is now
    discount = <function discount at 0x…> def main.py:1, in both recordings. A decorated function
    links to its own def (its first decorator's line), not the decorator's wrapper. Recorded locals
    carry it as defined: {fileId, line}, only for files the run instrumented. At module level a class
    of the program is now recorded, and a function or class imported from a file the run did not
    instrument no longer is.

  • With --follow-objects, why and var take a statement's reads from the names it loaded, so
    name = tier or fallback no longer lists fallback when tier was truthy. Each why node has
    resolution: "seen" or "guessed", and a tree that mixes the two prints (guessed) after
    the guessed nodes; a snapshot recording prints as before.

  • launch.json knows recordFrom and followObjects: VS Code completes them and no longer
    underlines them as unknown properties.

  • var, why, origin and history print a note: line when the run hit the 100,000-entry
    cap on recorded locals, with the last step kept. A change after it was shown as no change at all.

  • review start --only PATH (MCP only) on files with no changed function no longer refuses. It
    starts the session with an empty agenda, as the same diff without --only already did.

  • An empty agenda in a review in the debugger (start, state, view) no longer suggests
    review ask, which that review refuses. Its stops: none planned line names the same route as
    ask's refusal: pyokka break --live FILE:LINE, pyokka continue --live, then
    review stop --say TEXT.

  • Whole value is now Rerun value: it runs the program again, where a replay in Pyokka (HTTP
    Replay, the Time Machine's replay session) runs nothing. The button, its tooltip, its pending
    label (Rerunning), its summaries ("The rerun took the same 55 steps …") and the guide say so.

  • Agents get the rerun value: pyokka why --live STEP NAME --rerun prints the why tree, then the
    value on its first line, copied whole by running the program again, with the panel's status
    label, its summary and the value as indented Python-like text (--json gives the view; MCP:
    pyokka_value why with rerun: true). Wherever var, why, step or context print a
    recorded value that was cut, a hint: line names the command with the step and the name to
    give it. The program runs again, so the flag's help, the hint, the tool's description
    and the line after the label say so, and pyokka_value is no longer marked read-only. A saved
    run is refused: it has no runner to run it again in. The bridge's why takes rerun, and
    0.7.0's whole request is still answered for one release.

  • Rerun value fixes from a review of 0.7.0. A change was sometimes read at the start of its own
    step, which holds the value from before it, and that older value could read Checked; a change
    is now read where its snapshot came from. The Why header replayed the value from before its
    step's statement when that statement made the value; it now replays the value on the tree's
    first line. A program that iterates a set of strings replayed in another order (every
    interpreter salts string hashing with its own seed), so a session now pins one seed for its
    runs and their replays and takes it back out of the program's environment. Code typed in the
    Debug Console at a pause left steps and clock readings in the recording, and before a
    --record-from start it moved the statement the replay starts at; requests served at a pause
    now run off the recording, and a console write is named in the summary.

  • why said "not assigned yet at #2, first assigned at #3" for a name assigned at #0 whose value
    was not recorded, which is every run without recorded locals, the default. It now says so only
    when every local was recorded from the start; otherwise x = ? not recorded. A recording that
    began at a pause says both: "made before #0, where the recording started, or first assigned at
    #3".