Skip to content

fix(child-sessions): close cancelled acquisitions and retain current progress evidence #428

Description

@tt-a1i

Problem

A post-#426 current-main audit at eaf470b reproduced child startup ownership and progress-projection defects:

  • Interrupting ordinary Pi child acquisition while the session factory is pending allows the late child to bind extensions after cancellation, with no abort/shutdown/dispose owner.
  • Cancelling Workflow during git worktree add leaves an empty checkout/branch because the cancellation throw precedes its cleanup try/finally.
  • With twenty 16-KiB tool results followed by an error, the 256-KiB transcript projection retains older results and drops the newest failure despite its first/newest retention contract.
  • Tool previews split an entire growing output buffer although only the first nonempty line is displayed; a bounded scan is under measurement.

Scope and validation

Deliver one bounded repair PR: preserve Pi lifecycle, user configuration, permissions and canonical messages; no new configuration or orchestration framework. Add deterministic acquisition/cancellation regressions, mixed-size latest-evidence tests, and an execution-shaped preview performance probe. Validate check/full tests and two independent reviews. Keep existing viewport/hydration/shell/terminal-artifact work in its own PRs (#327, #319, #423, #386).

Runtime provenance: this is an audit of current main in an isolated worktree. The user's configured Pi still reports openpi-main-runtime at c8f2c13; installed behavior is not automatically changed by a source merge.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions