Skip to content

fix(plan): pre-intern static string literals - #933

Merged
justinjoy merged 2 commits into
mainfrom
agent/fix-issue-932-static-string-interning
Jul 30, 2026
Merged

fix(plan): pre-intern static string literals#933
justinjoy merged 2 commits into
mainfrom
agent/fix-issue-932-static-string-interning

Conversation

@justinjoy

Copy link
Copy Markdown
Collaborator

Summary

  • pre-intern static string literals from filter, projection, and aggregate expressions during plan generation
  • prevent evaluation order from changing symbol IDs across otherwise identical easy sessions
  • add plan-level and paired-session regression coverage for output-only projections

Root cause

WL_PLAN_EXPR_CONST_STR values were first interned by the evaluator. When a delta session evaluated a projection before its mirrored read session, its interner consumed extra IDs. A later host-provided symbol then received different IDs in the two sessions, causing the wyrelog engine pair to fail even though the underlying inserts succeeded.

Moving static literal interning into plan generation makes the IDs stable before either session evaluates the program. The serialized plan format and public API remain unchanged.

Validation

  • meson test -C build wirelog:plan_gen wirelog:wirelog_easy wirelog:wirelog_advanced --print-errorlogs — 3/3 passed
  • meson test -C build --suite abi --print-errorlogs — 32/32 passed
  • standalone paired-session reproduction — read/delta late-symbol IDs remain equal
  • wyrelog issue/614-explicit-permission-plane test-decide against the rebuilt library — passed

Closes #932

@justinjoy
justinjoy marked this pull request as ready for review July 30, 2026 12:16
@justinjoy
justinjoy enabled auto-merge (rebase) July 30, 2026 12:17
@justinjoy
justinjoy force-pushed the agent/fix-issue-932-static-string-interning branch from 3a350ee to 0eeec6a Compare July 30, 2026 12:17
@justinjoy
justinjoy merged commit 5df8cdf into main Jul 30, 2026
26 checks passed
@justinjoy
justinjoy deleted the agent/fix-issue-932-static-string-interning branch July 30, 2026 13:07
@justinjoy justinjoy mentioned this pull request Jul 30, 2026
5 tasks
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.

Incremental wirelog_easy_insert returns WIRELOG_ERR_UNKNOWN (255) when program contains a standalone permission_plane projection

1 participant