Skip to content

K7: scope variants, context phases, one execution result family - #1209

Merged
trissim merged 15 commits into
mainfrom
refactor/K7-execution-protocol
Oct 12, 2026
Merged

trissim merged 15 commits into
mainfrom
refactor/K7-execution-protocol

Conversation

@trissim

@trissim trissim commented Oct 11, 2026 •

Copy link
Copy Markdown
Collaborator

K7 · PR #1209 · guards 10/10 · production −1331 +1248 · tests −1462 +1684

Surface K7 of the consolidation refactor. Receipt: docs/refactor/consolidation-20261009/K7-execution-protocol.md.

What changed

  • Component-group scope is a family. UngroupedScope, DynamicGroupScope, StaticGroupScope, SingleKeyScope replace the (keys, component) packing and its six predicates (48 consumer reads, now 0). ArtifactPlan holds one group_scope field instead of group_keys + group_component. PathPlannerGroupScope is deleted.
  • Two compositions. RuntimeValue.compose(values) and compose_groups(values, producer_scope) replace the producer_group_scope=None mode.
  • Context phases are types. CompilingContext → freeze() → immutable CompiledContext → executing(lane) → ExecutingContext with that execution's stores and caches. _is_frozen and its seven checks are deleted. The parent's executed contexts come back on BundleExecutionResults.executed_contexts.
  • One result family. ExecutionSucceeded, ExecutionFailed, ExecutionCancelled replace ExecutionStatus plus optional fields; RuntimeObservationMode is a family (E1's member names).
  • Worker lane commands: already landed in G7; closure note in the receipt.

Behaviour to know about

  • Runtime caches now live for one execution of a compiled context; in-process lanes no longer execute on the parent's context object.
  • Code that read bundle.runtime_contexts[k].runtime_value_store after execution reads results.executed_contexts[k] instead.
  • Failure text reads ExecutionFailed: … where it read error: ….
  • The outcome export schema version is 5.

Deletion certificates and the tests-only list are in the receipt.

Overlap

  • E1 (E1: leftover families, value-to-JSON copies, path identity; enum-dispatch guard #1203) also converts ExecutionStatus and RuntimeObservationMode in execution_result.py. This PR uses E1's mode names; the result subclasses replace E1's status family. Whichever merges second resolves the conflict.
  • Not touched, for their owners: NamedSourceBinding.input_plan (dead, names the deleted plan fields; E1's file) and the ProcessingContext annotations in processing/materialization/ (K8).

Checks

Run locally at f528cb67f against base d597aa224:

  • tests/unit/test_k7_execution_protocol_guards.py: 10 passed. The other 23 guard files: 195 passed, 1 failed (test_cellprofiler_static_deletion_gates.py::test_cellprofiler_projection_enters_only_runtime_slice_projection, which also fails on the base).
  • 191 unit test files touching the changed modules (-n 2): 39 failed, 4616 passed; the base has 40 failed on the same files. Three failures were not on the base: two in test_zmq_runtime_outcome_export.py (fixed afterwards, file now passes) and test_axis_family_witness.py[zmq], whose client reached another worktree's execution server; it passes when run alone.
  • tests/integration/test_main.py disk, three microscopes, direct and ZMQ, with the witness: 19 passed, 1 skipped.
  • Eight integration files that execute compiled bundles: 39 passed, 3 failed; the same 3 fail on the base.
  • Official30 parity under the lock: test_official30_compile_execute_and_match_native_references_over_zmq passed (979 s).
  • Structural ratchet (openhcs, scripts, benchmark): exit 0. nra-r1: "increased": [].

The full unit suite was not run (the session lead verifies centrally).

🤖 Generated with Claude Code

trissim and others added 11 commits October 11, 2026 14:47
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…se split

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Copilot AI balanced review requested due to automatic review settings October 11, 2026 21:05

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

trissim and others added 4 commits October 11, 2026 17:06
Result subclasses replace E1's ExecutionStatus family; E1's observation-mode
family is kept. NamedSourceBinding.input_plan deleted (unused).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… follow-up, caches)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…re progress fixture import

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Materialization annotates ExecutingContext; execution_axis_count lives on it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@trissim
trissim merged commit 77bf7e8 into main Oct 12, 2026
0 of 3 checks passed
trissim added a commit that referenced this pull request Oct 12, 2026
The installed-GUI smoke keeps formbridge's bridge DTO paths and the
datasets widget identity, and reads the action status as the
UiActionInvocationStatus class family from formbridge.bridge.dto.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.

2 participants