Release v0.5.4: debug-table-gen emits STRING / WSTRING#167
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Promote development to main for v0.5.4 release.
Carries:
addLeafindebug-table-gen.tsexplicitly 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.Test plan
🤖 Generated with Claude Code