Skip to content

fix(ztrace): give each from-object ztrace its own point list and alignment - #173

Merged
dustenhubbard merged 3 commits into
mainfrom
fix/ztrace-default-points
Nov 3, 2026
Merged

dustenhubbard merged 3 commits into
mainfrom
fix/ztrace-default-points

Conversation

@dustenhubbard

Copy link
Copy Markdown
Member

createZtrace defaulted z_points to a list and appended to it. A default argument is created once, so after the first ztrace made from an object, the next call in the same session saw a non-empty list: it named the ztrace after the object with no _zlen, generated no points, and replaced any ztrace of that name with the first object's points. The default is now None and each call starts from an empty list. The from-object branch also filled z_points before the alignment check ran, so every ztrace took the current alignment; the call now records that it came from an object before any points are added and uses the object's alignment.

createZtrace defaulted z_points to a list and appended to it. A default argument is created once, so after the first ztrace made from an object, the default held that object's points. The next call in the same session saw a non-empty list: it named the ztrace after the object with no "_zlen", generated no points, and replaced any ztrace of that name with the first object's points. The default is now None, and each call starts from an empty list.
createZtrace chose the alignment with "if not z_points", but by then the from-object branch had already filled z_points, so the test was always false and every ztrace took the current alignment. It now records whether the call is from an object once, before any points are added, and uses that for the name, the point generation, and the alignment.
@dustenhubbard dustenhubbard added the reviewed A human authorized this merge (vcs-guard Gate 1 evidence) label Nov 3, 2026
@dustenhubbard
dustenhubbard merged commit e70ef60 into main Nov 3, 2026
6 checks passed
@dustenhubbard
dustenhubbard deleted the fix/ztrace-default-points branch November 3, 2026 19:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

reviewed A human authorized this merge (vcs-guard Gate 1 evidence)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant