Skip to content

Own goal toggle behavior in the execution family (Toad1398 pair) - #3844

Merged
trissim merged 1 commit into
mainfrom
fix/goal-execution-toggle
Nov 1, 2026
Merged

trissim merged 1 commit into
mainfrom
fix/goal-execution-toggle

Conversation

@trissim

@trissim trissim commented Nov 1, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Paired Core half of OpenHCSDev/toad#1398, one goal-control overhaul requested in53444/53446. One commit, 2 files, +57/-2; 0 new classes or wire fields. The Toad half deletes both ControlledExecution type tests and its duplicate Pause spelling; Core gains 2 public operations with their default/controlled implementations. Eight regression examples are authored and compiled, UNRUN.

Land this Core API before the new Toad1398 head. Existing Toad remains compatible with the Core change; the new Toad uses the new API and must not be installed against the old Core. Install/behavior qualification remains with the existing integration owner; this is not a new native run or acceptance claim.

Existing family carries its work

Before:

GoalExecution
  BoundGoalExecution
    ControlledExecution: toggle_label + abstract toggle action
      ActiveExecution / RetryableExecution / PausedExecution combinations
Toad ToggleInteraction: isinstance twice -> availability/action selection

After (parents and all constructors unchanged):

GoalExecution: default caption, can_toggle=False, apply_toggle -> unavailable feedback
  BoundGoalExecution
    ControlledExecution: can_toggle=True, apply_toggle -> await change(self.toggle)
      existing leaves retain their existing action/caption differences
Toad ToggleInteraction: asks/invokes GoalExecution, no membership recovery

Formal finding: IMPL-3 / MEMB-2; fact = whether a GoalExecution offers a toggle and which action it invokes; at = old Toad goal_interaction.py:84,93; derive = base-method/subclass; by = GoalExecution / ControlledExecution in goal_presentation.py. Paper1 §1 and Theorems4.6/4.7: the old consumer switches supplied a family fact outside its declaration.

toggle_label = "Pause" moves unchanged to the family root. Retry/Resume overrides and the existing toggle action properties stay exactly where they already belong. No persisted discriminator, feature flag, new control manager, null action class, roster, codec, generation or scheduling authority.

The action receiver and unavailable feedback are typed callables. The family chooses which effect occurs; Toad owns the actual UI flash and goal write. Unsupported executions call only unavailable feedback, with no backend write. Controlled executions await the existing goal change. No new catch or callback exception classification.

Toad's existing GoalSession also owns the shared unavailable feedback previously repeated in the disabled-control and unsupported-toggle paths. ReadAgent and its existing concrete goal defaults remain untouched; no fake fixture methods or abstract-stub requirements.

Complete related source trace

  • Entire Core/Toad production roots searched for ControlledExecution, toggle/caption and GoalExecution consumers, including command/wire outputs, state/generation/wait/turn producers, GoalDisplay, GoalBar, and GoalSession. Core's existing typed execution.toggle assertions retain their API; the UI no longer recovers ControlledExecution membership.
  • After whole-production grep, ControlledExecution occurs only in its Core declaration and the three relevant base declarations. 0 Toad production references.
  • P859: resolve compared field annotations through their declarations #3767's exact e6d5448 delta deletes/moves GoalExecutionSource and related cached-property imports. It does not implement these control operations; this patch does not restore or edit that source carrier.
  • Existing NRA parse/syntax/family/source-index APIs own the bounded map, not a new scanner or resolver. Before/after: 28 modules, 544 raw / 542 canonical classes, 0 parse omissions. Every original ClassDef is recorded and joined by symbol/path/line.
  • Two function-local declarations remain unprojected OPEN: installed-journey Responses and runtime-goal-edit Client. Dynamic imports/factories, rebinding, runtime mutation and arbitrary extensions remain OPEN, not zero debt. No automatic method-movement/native-effect proof is claimed.

Evidence and remaining risk

Artifacts under /home/ts/.cache/agent-scratch/pi-shell-colleague/retry-ui/:

  • toggle-{before,after}-map.json and toggle-production-consumers.txt retain source revisions/hashes, declarations, bases, methods, imports, decisions and use sites.
  • toggle-source-proof-v2.json: all 3 changed paired files compile; 88 existing function/method bodies unchanged; all class bases and other annotated fields unchanged; caption declaration AST-identical at its new owner. No constructor/MRO graph change is claimed as an executed runtime proof.
  • Targeted mypy reads the TWO explicit owned source roots using the existing installed interpreter/read-only dependencies: success, rc0, one Toad source file checked. It does not import/run an overlaid application and is not a whole-project zero-debt claim.
  • First checker stopped before mypy because I incorrectly expected NRA.named_functions to qualify a nested callback by its outer function; it names that callback change. Original failed log is retained as toggle-source-proof.log; corrected expectation is in the distinct v2 result. No production change was made for that assertion.
  • Core rebased onto5f8c3716; toggle-rebased-inputs.json verifies all28mapped source/dependency hashes remain identical. No compiler/test rerun for the unrelated main movement.
  • git diff --check passes in both trees. No pytest, local NRA gate, model/provider, frontend, native process or install was launched. Prior 14/12/brace selections were not repeated.

The new parameterized behavior test covers idle/completed/unresolved no-write fallback, runnable/running/standby Pause, paused Resume and retryable block Retry, including existing MI combinations. All eight cases are UNRUN. Integration's necessary selection is tests/test_goal_execution.py::test_execution_owns_toggle_dispatch_and_unavailability, then existing Toad goal-control cases on the paired sources. The existing read-only observation and previously source-accepted connection/modal fixes remain part of1398's closure.

Assumed: the existing execution constructors/action properties define these state-specific choices; the UI owns its read-only control gate and feedback; the configured-provider audit remains separate3820 work. Native09's controlled-provider acceptance is not transferred to this pair.

hold a GoalExecution
ask it whether it is secretly ControlledExecution
twice
the UI has stopped administering the family census

Copilot AI balanced review requested due to automatic review settings November 1, 2026 20:50

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 insufficient remaining quota. Try requesting a review at a lower effort level.

An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.

@trissim
trissim force-pushed the fix/goal-execution-toggle branch from f4c249e to 4fa21ca Compare November 1, 2026 20:56
@trissim
trissim enabled auto-merge November 1, 2026 21:10
@trissim
trissim added this pull request to the merge queue Nov 1, 2026
Merged via the queue into main with commit b2e141d Nov 1, 2026
9 of 10 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.

2 participants