Skip to content

403 replace holonscontextbehavior with transactioncontext execution surface phase 14#413

Merged
evomimic merged 17 commits intomainfrom
403-replace-holonscontextbehavior-with-transactioncontext-execution-surface-phase-14
Mar 2, 2026
Merged

403 replace holonscontextbehavior with transactioncontext execution surface phase 14#413
evomimic merged 17 commits intomainfrom
403-replace-holonscontextbehavior-with-transactioncontext-execution-surface-phase-14

Conversation

@owleyeview
Copy link
Collaborator

Summary

This PR completes the core of Phase 1.4 by consolidating transaction-scoped execution on TransactionContext and removing the legacy context/operations abstractions.

The changes:

  • Remove HolonsContextBehavior and context-routed execution paths.
  • Remove HolonOperationsApi and migrate its execution functions onto TransactionContext + facades.
  • Introduce semantic execution facades:
    • transaction.mutation()
    • transaction.lookup()
  • Keep lifecycle semantics on root TransactionContext (tx_id, state, is_open, commit).
  • Update host/guest/client/loader call sites and tests to use the new execution surface.
  • Consolidate transaction-open entrypoints in TransactionManager around:
    • open_new_transaction(...)
    • open_transaction_with_id(...)

Why

After Phase 1.2/1.3, references and lifecycle were already transaction-centered, but execution still leaked through legacy traits/free functions. This PR removes that split and aligns
execution semantics with the architecture for upcoming MAP Commands and TS SDK work.

Key Implementation Notes

  • Added new facade modules:
    • shared_crates/holons_core/src/core_shared_objects/transactions/mutation_facade.rs
    • shared_crates/holons_core/src/core_shared_objects/transactions/lookup_facade.rs
  • TransactionContext now exposes mutation() and lookup() and serves as the authoritative transaction-scoped execution root.
  • Mutation lifecycle checks were tightened with shared guards in TransactionContext and applied across mutation operations (except new_holon, per current lifecycle policy).
  • Stateless helper utilities were moved out of removed API surfaces:
    • key_from_property_map
    • summarize_holons
      into holon_utils.

Scope / Impact

  • Removes:
    • shared_crates/holons_core/src/reference_layer/context_behavior.rs
    • shared_crates/holons_core/src/reference_layer/holon_operations_api.rs
  • Updates cross-crate call sites in host/happ/tests/sweetests to use TransactionContext + facades.
  • No persistence format changes.
  • No MAP Commands layer changes in this PR.

Known Follow-up / Remaining Debt

Manager internalization is not fully complete yet:

  • TransactionContext still exposes manager-adjacent methods (for example nursery() and some service accessors), and guest init still has manager-level coupling.
  • I’ve documented the “Guest Init Boundary Leak” follow-up to remove GuestHolonService.internal_nursery_access wiring and tighten TransactionContext manager visibility in a subsequent issue(this is currently under review).

@evomimic evomimic force-pushed the 403-replace-holonscontextbehavior-with-transactioncontext-execution-surface-phase-14 branch from 684a851 to aa5fd97 Compare March 2, 2026 16:12
Copy link
Owner

@evomimic evomimic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See comments...

@evomimic evomimic marked this pull request as ready for review March 2, 2026 19:04
@evomimic
Copy link
Owner

evomimic commented Mar 2, 2026

Final Pre-Merge Note

This PR is merge-ready for Phase 1.4 scope as currently defined.

What’s now in place:

  • HolonsContextBehavior removed from execution-facing paths.
  • HolonOperationsApi removed; execution consolidated onto TransactionContext + mutation() / lookup() facades.
  • Host/guest/client call paths updated and validated through build + sweetests + runtime smoke path (load_holons).
  • Rebase regressions resolved and retested.
  • Test-double intent improved in TransactionManager tests (TestHolonService now clearly fail-fast and explicitly out-of-scope for service behavior).

Known intentional follow-up (post-merge):

  • Reduce TransactionContext public API surface and tighten policy encapsulation (public/internal boundary hardening, explicit guard-policy centralization).
  • Keep this separate to avoid delaying 1.4 execution-surface consolidation.

Given current DoD and clarification boundaries, this PR should be safe to merge.

@evomimic evomimic merged commit 7139e57 into main Mar 2, 2026
2 checks passed
@evomimic evomimic deleted the 403-replace-holonscontextbehavior-with-transactioncontext-execution-surface-phase-14 branch March 2, 2026 19:17
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.

Replace HolonsContextBehavior with TransactionContext Execution Surface (Phase 1.4)

2 participants