Skip to content

Make Windows cleanup-controller protocol complete and invocation-attributed #2053

Closed as not planned

Description

@integry

Objective

Make every installed Windows workflow-cleanup controller invocation produce an exact bounded, invocation-attributed terminal protocol on x64 and ARM64, including startup failure, timeout, cancellation, partial output, and owned process-tree termination.

Authoritative evidence

PR #2042 is being integrated only into runtime sub-epic 1952-epic-electron-runtime-app; propagation to the top desktop epic remains blocked.

On exact head 01b133f5131af2f569b7f0b252566cfdddee9dc8, Windows ARM64 package job 99995386975 passes the fixed four-class startup protocol and the parser regression, then later fails at generic Invoke-WorkflowCleanupController with exactly PROTOCOL_MISMATCH:LINE_COUNT:1:STDERR_COUNT:0:STARTUP_CLASS:OTHER:PROCESS_EXIT:125:LINE:0. Timing shows it reached a later cleanup path, but the current bounded diagnostic neither identifies the invoking scenario nor preserves the single allowlisted line, so replacement collision, pre-existing-resource, retry, or another controller call cannot be distinguished. The parser failure fixed by 01b133f is not the remaining cause.

Required correction

  • Give every controller callsite a fixed compile-time invocation identifier from a small allowlist covering the actual harness scenarios. Carry only that identifier into parent-side state and failure diagnostics; never transport a path, command, argument, run identifier, resource identity, username, SID, ProductCode, hash, exception message, or raw output.
  • Model controller completion as a strict bounded state machine: process creation, startup record, terminal result record, exit, stdout/stderr drain, timeout/cancellation, and Job Object tree termination. Reject duplicate, reordered, extra, oversized, malformed, partial, or post-terminal records.
  • On a one-line or otherwise partial protocol, emit one fixed diagnostic containing only invocation identifier, observed line category from an allowlist, line count, stderr count, validated exit, timeout/tree-termination category, startup class, and bounded line number. Do not echo the line itself.
  • Ensure the controller body attempts to publish exactly the fixed startup and terminal records with explicit flushes at semantically correct boundaries. Parent timeout or cancellation must terminate the complete owned process tree, drain streams within a short bound, and preserve the primary controller outcome rather than collapsing it into generic startup OTHER.
  • Use the next exact ARM64/x64 evidence to identify the actual invocation and then implement the narrowest semantic correction. Do not guess that a partial protocol is success, extend production timeouts, retry unsafe cleanup blindly, or weaken exact two-line validation.
  • Preserve F10-F24, four-class startup, Job Object ordering, watchdog 124, zero stderr, atomic Core and PS5.1 receipt replacement, schema/identifier/file-authority proofs, manifest retention, owner/resource safety, and no deletion of pre-existing state.
  • Keep product behavior, installer scope, release trust, package formats, lockfile, and ancestry unchanged. Do not target or merge into main or the top desktop epic.

Tests and gates

Add focused regressions for each invocation identifier; one-line stdout; missing terminal record; duplicate/extra/reordered records; timeout before/after startup; stream drain race; cancellation; tree-termination failure; and invalid startup metadata. Require both native Windows x64 and ARM64 installed-app jobs plus the complete six-platform package matrix, Full Suite, and Validate Changes.

Coordinate with #2052, which owns durable authority publication and DURING_OWNERSHIP_CAPTURE semantics. This issue owns controller invocation attribution, framing, process lifecycle, and diagnostic transport.

Blocking #1952 and final #1950 integration. Do not merge the generated PR automatically; require exact-head CI, Ultrafix, and independent audit.

Activity

  1. propr-dev commented on Sep 1, 2026

    @propr-dev
    Contributor

    ❌ Failed to process this issue

    Error Category: git error
    Error Message: Repository integry/propr is corrupted but has active worktrees: error: cannot lock ref 'refs/remotes/origin/1952-epic-electron-runtime-app': is at e3149c2 but expected ee6eb2f
    From https://github.com/integry/propr
    ! ee6eb2f..e3149c2 1952-epic-electron-runtime-app -> origin/1952-epic-electron-runtime-app (unable to update local ref)

    This appears to be a Git-related issue. The system may have encountered a corrupted repository or git operation failure. The issue will be automatically retried, and any corrupted repositories will be cleaned up.

    Processing Stage: Pre-processing (before AI analysis)

    Technical Details
    Error: Repository integry/propr is corrupted but has active worktrees: error: cannot lock ref 'refs/remotes/origin/1952-epic-electron-runtime-app': is at e3149c20c1e5eb21b2f0fb06415757aae3e01f12 but expected ee6eb2fe4c953b3b33c25845c0dda807c7dbee01
    From https://github.com/integry/propr
     ! ee6eb2fe..e3149c20  1952-epic-electron-runtime-app -> origin/1952-epic-electron-runtime-app  (unable to update local ref)
    
        at updateExistingRepo (file:///usr/src/app/packages/core/dist/git/repoManager.js:80... [truncated]
    

    The system will automatically retry this task. If the issue persists, please contact support.

  2. propr-dev commented on Sep 1, 2026

    @propr-dev
    Contributor

    🤖 AI processing has started for this issue using codex agent with gpt-5.6-sol model.

    I'll analyze the problem and work on a solution. This may take a few minutes.

    Processing Details:

    • Agent: codex
    • Model: gpt-5.6-sol
    • Branch: 2053/gpt-5.6-sol-make-windows-cleanup-cont-20260901-2205-5eo
    • Base Branch: 1952-epic-electron-runtime-app
    • Worktree: issue-2053-20260901-2205-gpt-5.6-sol-5eo

    🔍 Track Task Execution

  3. added a commit that references this issue on Sep 1, 2026
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

    AI-donebugllm-codex-gpt56-sol

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions