Skip to content

Release v0.5.4: debug-table-gen emits STRING / WSTRING#167

Merged
thiagoralves merged 2 commits into
mainfrom
development
Jun 2, 2026
Merged

Release v0.5.4: debug-table-gen emits STRING / WSTRING#167
thiagoralves merged 2 commits into
mainfrom
development

Conversation

@thiagoralves
Copy link
Copy Markdown
Contributor

Promote development to main for v0.5.4 release.

Carries:

  • fix(debug): emit STRING / WSTRING entries into the debug table #165 — emit STRING / WSTRING entries into the debug table. v0.5.3 shipped the runtime impl but addLeaf in debug-table-gen.ts explicitly skipped STRING / WSTRING (Phase 4a guard) so they were never in the debug table at all — handle_read() had nothing to dispatch. End-to-end live-verified against the simulator: editor now decodes the wire bytes correctly.
  • chore(release): v0.5.4 bump.

Test plan

  • CI green (lint, typecheck, test matrix, extension build, build, smoke).
  • After tag: bump editor + web; STRING / WSTRING values render in debug watch.

🤖 Generated with Claude Code

thiagoralves and others added 2 commits June 2, 2026 17:57
v0.5.3 shipped the runtime side of debugger STRING / WSTRING reads —
real `read_string` / `read_wstring` / `write_*` / `force_*` impls
against `IECStringVar<254>` / `IECWStringVar<254>`.  Verified with a
direct C++ smoke test (read/write/force/unforce all round-trip
correctly).

End-to-end against the simulator still showed `-` in the editor's
debug watch panel.  Live-tracing the wire bytes (instrumented
`decodeWireValue` to log every poll) revealed the actual culprit was
on the EMITTER side, not the runtime: `debug-table-gen.ts::addLeaf`
explicitly early-returned for `tagName === "STRING" || "WSTRING"`
with `reason: "string types deferred to Phase 4b"`.  No Entry row was
ever placed into the generated debug table, so the runtime's read
path never fired — `handle_read()` never saw a STRING entry to
dispatch.

Remove the skip and update `IEC_NAME_TO_SIZE` for STRING / WSTRING to
the actual wire widths (127 / 253 bytes — `1 + DEBUG_STRING_CAP` and
`1 + DEBUG_STRING_CAP * 2`), matching `DEBUG_STRING_WIDTH` /
`DEBUG_WSTRING_WIDTH` in `runtime/include/debug_dispatch.hpp`.  These
sizes flow into both the per-Entry `size` field (for the editor's
batch-byte arithmetic) and the debug-map manifest the editor consumes.

Also extend `debug-table-gen.test.ts` with a regression guard that
asserts STRING and WSTRING leaves get emitted with the correct
type/size and that the generated C++ source carries the matching
`TAG_STRING` / `TAG_WSTRING` rows.

Live-verified end-to-end against the simulator: with the codegen fix
+ the v0.5.3 runtime, the editor's polling loop receives
`[11, 'h','e','l','l','o',' ','w','o','r','l','d']` for a STRING var
initialized to 'hello world' and decodes it as `"hello world"`.

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@thiagoralves thiagoralves merged commit 80d1405 into main Jun 2, 2026
6 checks passed
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