Skip to content

Make packaged Windows Connect smoke lifecycle bounded and path-redacted #2051

Closed

Description

@integry

Objective

Make the real packaged ProPR Connect desktop smoke reach an exact validated ready outcome and always terminate its owned Windows Electron process tree and fixture cleanly within bounded time, without masking failures or disclosing paths.

Authoritative evidence

PR #1988 was intentionally merged only into transport sub-epic 1953-epic-desktop-transport-api at merge commit 1af8b44c1eb300dd807729c31e9b23c68dea3647; propagation to the top epic remains blocked.

Exact Windows x64 job 99993860611 in run 33549108145 proves the PS5.1 helper/owner/exact-DACL regression and desktop packaging pass. The ordinary-user packaged smoke then runs for the full 300-second child bound. Its timeout handler calls only child.kill(SIGKILL) and rejects before buffered records are parsed or the child tree is drained. Final fixture cleanup fails with EBUSY unlinking the Electron user-data database, masks the original timeout, and emits the raw fixture path. The main process is designed to log desktop.renderer.connect_discovery.ready and call app.quit, but current evidence cannot distinguish readiness followed by shutdown hang from discovery never reaching ready.

Required correction

  • Replace the race-prone reject-on-timeout promise with a single-settlement bounded lifecycle state machine covering spawn error, fixed ready proof, child exit, timeout, intentional shutdown, stream drain, and cleanup. Preserve the primary outcome through every later cleanup operation.
  • Incrementally parse only bounded captured JSON records. Validate the existing ready record using exact platform, architecture, authority mechanism, and renderer schema before treating discovery as proven. Never treat a partial, malformed, secret-bearing, or unallowlisted record as success.
  • If exact ready proof arrives, request normal application shutdown where supported, then after a short bound terminate the complete owned Windows process tree using an argument-array, shell:false, bounded native mechanism such as taskkill /PID <validated numeric pid> /T /F. Ignore or classify its captured streams without emitting them, await close and stream drain, and prove no owned child remains. A forced post-proof shutdown may be an intentional harness outcome, but spontaneous failure or timeout before proof must remain failure.
  • On timeout or early failure, terminate the full tree before cleanup, drain bounded output, and emit one fixed path-free diagnostic containing only outcome category, capture complete/truncated, and the existing allowlisted child diagnostic records. Do not expose PID, raw output, path, username, SID, argument, environment, exception message, stack, command line, or taskkill output.
  • Authorize fixture removal only through the canonical temporary-parent identity, exact generated leaf, and non-link directory proof. Retry Windows removal with a short explicit bound after tree exit. Cleanup failure must be a fixed redacted secondary category and must never replace the primary timeout/spawn/child/ready-validation result.
  • Preserve the 300-second overall ceiling or tighten it with phase-specific bounds; never add an unbounded wait. Preserve ordinary-user execution, exact package/Connect proof, zero secret/path leakage, ACL/owner/canonical-path security, and all non-Windows behavior.
  • Do not target or merge into main or the top desktop epic.

Tests and gates

Add deterministic tests for ready-then-clean-exit, ready-then-hung-descendant, timeout-before-ready, spawn error, close/timeout races, truncated/malformed records, tree-termination failure, EBUSY retry, cleanup failure with primary preservation, and complete path/secret redaction. Require real packaged Connect smoke status 0 on Windows x64 and ARM64 plus Full Suite, Audit/package, Native Windows durability, ordinary-user Windows discovery, and all Darwin/Linux package lanes.

Coordinate with #2050, which owns privileged artifact staging and ordinary-user pre-spawn accessibility. This issue owns readiness, timeout, process-tree termination, output draining, removal retry, and primary-error preservation.

Blocking #1953, #2035, and final #1950 integration. Do not merge the generated PR automatically; it requires 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: 2051/gpt-5.6-sol-make-packaged-windows-con-20260901-2205-5rn
    • Base Branch: 1953-epic-desktop-transport-api
    • Worktree: issue-2051-20260901-2205-gpt-5.6-sol-5rn

    🔍 Track Task Execution

  3. added a commit that references this issue on Sep 1, 2026
  4. integry commented on Sep 4, 2026

    @integry
    OwnerAuthor

    Implemented by #2054, merged into 1953-epic-desktop-transport-api (7bcfcff). Closing the completed child issue during epic issue/PR reconciliation. Final desktop integration and delivery remain tracked by #1950 / #1970; this does not claim a main-branch release.

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