Skip to content

Fix post-runtime blueprint ref hydration - #1818

Merged
chubes4 merged 1 commit into
mainfrom
fix/1812-post-runtime-blueprint-hydration
Jul 16, 2026
Merged

Fix post-runtime blueprint ref hydration#1818
chubes4 merged 1 commit into
mainfrom
fix/1812-post-runtime-blueprint-hydration

Conversation

@chubes4

@chubes4 chubes4 commented Jul 16, 2026

Copy link
Copy Markdown
Collaborator

Summary

Fixes #1812.

  • Keep the prepared-runtime artifact limited to shared runtime materialization.
  • Persist the complete executable blueprint behind a session-bound hydration ref only when a caller supplied post_runtime_blueprint.
  • Cover a cache miss followed by a hit with two distinct SSI import tails, asserting each hydrated DTO has the current tail after shared steps and never the other tail.

Evidence

  • Source relationship: post_runtime_blueprint is intentionally excluded from prepared-runtime hashing in browser_prepared_runtime_contract; it must remain outside reusable cache identity.
  • Change kind: targeted runtime cache/hydration-ref persistence fix plus deterministic PHP smoke regression.
  • Verification capability: the smoke uses in-memory WordPress transient stubs, so it deterministically exercises miss, shared hit, hydration, ordering, and cross-session isolation without external services.
  • Scope: runtime behavior changes only when a non-empty caller tail is present. Shared artifacts still use the existing cache key and hash; tail-bearing blueprints are stored under a hash containing the session and executable blueprint, so they cannot become reusable cache state or leak to another session.

Testing

  1. Run npm run test:php-browser-preview-only-session.
  2. Run php scripts/php-browser-post-runtime-blueprint-smoke.php.
  3. Optionally run php -l packages/wordpress-plugin/src/class-wp-codebox-browser-task-builder.php && php -l packages/wordpress-plugin/src/trait-wp-codebox-abilities-execution.php && php -l scripts/php-browser-preview-only-session-smoke.php.

Compatibility

The public prepared:<cache_key>:<hash> ref format and hydrator contract are unchanged. Sessions without post_runtime_blueprint retain existing shared-cache behavior. Sessions with a caller tail receive a distinct, hydratable ref for their executable blueprint.

AI Disclosure

Implemented with OpenAI Codex assistance; changes and test results were reviewed in the repository.

@chubes4
chubes4 merged commit 950a2ad into main Jul 16, 2026
4 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.

Preserve post-runtime blueprint steps across prepared runtime cache hits

1 participant