Skip to content

Reuse Lua vararg and native caller artifacts with shared receipt encoding - #1592

Merged
Frotty merged 4 commits into
masterfrom
codex/lua-helper-receipts
Oct 30, 2026
Merged

Frotty merged 4 commits into
masterfrom
codex/lua-helper-receipts

Conversation

@Frotty

@Frotty Frotty commented Oct 30, 2026 •

Copy link
Copy Markdown
Member

Body-only edits in functions using Math.min/max or rewritten native helpers can now stay on the incremental Lua backend. Retain producer-selected helper graphs, bindings, structural types, source locations and native roles as detached artifacts, while rerunning compile-time execution and retaining the existing invalidation and cold-admission checks.

Compute exact and shape receipts from one schema encoding and share UTF-8 token bytes between their hashes. This removes duplicate receipt work as more ordinary callers become eligible.

Validation:

  • A failing work-count repro showed 26 receipt encodings for 16 input nodes; the fixed encoder visits each node once.
  • 696 targeted checks passed with ownership checks and both backend variants. Coverage includes literal/structural receipt invariants, helper-body/arity invalidation, fresh output equality and payload execution through an unchanged caller.
  • A fresh 500-program / 1,500-edit hot-reload fuzz campaign passed with anonymous insertion enabled and zero failures.
  • All 12 matching-base real-map trials matched independent fresh Lua, full manifests and payloads exactly. Each published a one-function payload.

Three trials per variant in separate JVMs, in baseline/new/new/baseline/baseline/new order, against master 2b5cd9c0b:

Edit Baseline median New median Reduction
Castle Fight sync threshold, control 8.129 s 6.009 s 26.1%
Zombie Defense armor cost using nested Math.min/max 12.664 s 5.832 s 54.0%

Both edits now lower/emit one runtime function. The control was already incremental; its regression is removed by sharing receipt encoding. The armor edit previously took batch lowering/readmission. Full samples, cold-oracle costs and remaining whole-program work are recorded in docs/MAP_COMMIT_REPLAY.md.

Timings cover reconciliation through payload publication on Windows, excluding editor queueing and Warcraft application. Current game application and macOS execution remain unverified; Ubuntu CI runs on this PR. Three trials with overlapping control ranges do not establish a p95 bound. Arity, helper-body, declaration and unsupported structural edits retain the batch path.

@Frotty
Frotty marked this pull request as ready for review October 30, 2026 17:32
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 30, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-30T17:34:55.976617Z b0a7c86 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@Frotty
Frotty merged commit 61db266 into master Oct 30, 2026
2 checks passed
@Frotty
Frotty deleted the codex/lua-helper-receipts branch November 25, 2026 08:58
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