Skip to content

fix(process): retain CLI input cleanup ownership - #10144

Closed
wunianze666-netizen wants to merge 2 commits into
morluto:mainfrom
wunianze666-netizen:codex/process-cli-input-cleanup-owner
Closed

wunianze666-netizen wants to merge 2 commits into
morluto:mainfrom
wunianze666-netizen:codex/process-cli-input-cleanup-owner

Conversation

@wunianze666-netizen

Copy link
Copy Markdown
Contributor

Summary

Keep the typed Process CLI input failure and its live file cleanup owner until the CLI projects the error.

Problem and expected behavior

After 4821aaf, final input cleanup projected its typed error to a JSON object inside the application helper. A caller received the cleanup diagnostics but lost the live error and its descriptor retry leases. Main's Process CLI file suite reported 11 failures covering retained descriptors and combined ownership. Failed shard

Change and scope

Throw the already-classified adapter error at the application boundary. The two direct CLI commands project it at delivery. When the earlier failure has incomplete cleanup authority, preserve the independently known input owner in the cause chain without claiming it covers the whole failure.

Follow the contribution scope.
Unresolved scope, authority, side effects, or required verification block
integration. Link the required maintainer scope decision for new providers or
capabilities involving target execution, injection, mutation, or protection
recovery; ordinary fixes within existing boundaries may state "not applicable".
Draft PRs may leave the scope decision pending and the readiness and merge checklists
unchecked. Maintainers can help resolve open questions.

Contract and boundary impact

  • Semantic owner and earliest changed stage: Process CLI input finalization retains the live error, and the CLI adapter delivers its public projection.
  • Contribution scope fit and linked maintainer decision: correction to the existing input finalization behavior covered by fix(process): retain cleanup ownership through input finalization #10095.
  • CLI and MCP/tool-catalog contract: the compiled CLI retains the same canonical cleanup envelope in the controlled failure case.
  • Provider, bridge, target-format, or platform compatibility: local Windows Node 24.22.1 with controlled input cleanup and dry-run fixtures.
  • Evidence, artifact, provenance, or reconstruction contract: the prior failure and completed partial observation stay attached to their typed owner.
  • Target selection, authority, upstream behavior, and cleanup details (if applicable): leases remain the exact authority to retry the owning descriptors.
  • Generated metadata (docs/public/product-catalog.json), package, or installation impact (CI generates and validates ignored catalogs and skills/; edit authored instructions in .agents/skills/reverse-engineer-anything/ and never commit build outputs): existing CLI error schemas.

Expected effects (check known effects; use documentation-only on its own).
Unchecked items do not establish absence; leave uncertainties visible.

  • Read existing files or captured data.
  • Launch or attach to a process.
  • Inject instrumentation or run scripts/code.
  • Change process memory, registers, files, or configuration.
  • Contact network services.
  • Recover protected code or work around protections.
  • Documentation or usability only; no target interaction.
  • Not sure yet; investigation or maintainer guidance needed.

Evidence and regression coverage

  • Tests added or updated: the existing cleanup cases now assert the typed adapter error, validate its public envelope, and check the original descriptors and retry authority. The dry-run plan fixtures supply controlled platform admission so the tests reach input finalization on Windows.
  • Base reproduction or other evidence: clean 81b305bd1aeb778ec90e2066ba391a93c966ec0a reproduced the open-file owner assertion in one selected test. The same test passes after the change. The fixture still exercises an actual opened descriptor and injected close failure.
  • User-visible CLI/MCP output (if applicable): the actual compiled compare-process-captures invocation returned the same cleanup_incomplete JSON and exit status 1 on both revisions. The isolated input-close fault recorded three attempts on each.
  • Remaining proof gaps: controlled descriptor failures and dry-run admission on Windows. Live target capture and native process ownership are separate provider qualifications.

For boundary fixes, identify the applicable boundary regressions
and lifecycle regressions
covered by the evidence above, and explain relevant gaps.

For evidence-bearing changes:

  • Observed, derived, and inferred claims remain distinguishable.
  • Artifact identity, source provenance, and failed attempts remain preserved.
  • Unsupported, incomplete, unavailable, or uncertain outcomes remain visible.

Validation performed

  • The original selected regression failed on accepted main and passed on the candidate. The other 38 cases were excluded by name in both runs.
  • processCliFileInput.test.ts and cliLogging.test.ts reported 48 passed (48).
  • Actual compiled CLI and a file-specific controlled close failure produced equal JSON on both revisions.
  • Matching build, CI-fast static checks, architecture guards, and git diff --check passed.

Compatibility, safety, and release

  • Breaking changes or migration steps: the internal input-cleanup failure reaches the CLI with its live owner. Existing CLI serialization projects it.
  • Real Hopper/Ghidra, browser, or OS coverage: Windows Node 24.22.1, controlled file cleanup.
  • Package or release metadata impact: process CLI application and adapter.
  • Security, privacy, process, or containment review: the close fixture targets an isolated input file and checks exact cleanup ownership.

Author readiness

Human owner: @wunianze666-netizen

  • I reviewed the final diff and relevant existing code, understand the change and its edge cases, and take responsibility for the complete PR, including AI-assisted work.
  • I checked the evidence above, confirmed it supports the current change, and recorded meaningful validation gaps.
  • I declare this PR ready for initial maintainer review.

Before merge

  • This PR addresses a concrete problem or an agreed enhancement.
  • Material scope and authority questions are resolved, and any required maintainer scope decision covers the final diff.
  • The PR has one focused outcome and the title follows type(scope): outcome.
  • Related issue is linked, or the reason for not linking one is stated above.
  • Tests cover changed observable behavior and meaningful failure paths.
  • Owning docs, contracts, and generated metadata are updated where needed.
  • User-visible CLI/MCP changes include representative output.
  • I checked the final diff for secrets, unrelated cleanup, and unsupported claims.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 11, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-11T23:41:14.617055Z 6619600 New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@morluto

morluto commented Nov 11, 2026

Copy link
Copy Markdown
Owner

Superseded by merged #10147 (6b2f991), which includes the original fix and authorship. Verified the latest PR head, including its main integration, has byte-identical ProcessCli, processCommands, and processCliFileInput files to merged main. The application retains the typed input-cleanup error and exact descriptor leases; both CLI commands project only at delivery. Validation: 373 passed / 3 host-specific skips across 20 focused suites, typecheck/lint passed, and actual compiled capture-process and compare-process-captures both emitted cleanup_incomplete under a controlled input-close failure. Hosted CI remains separate from those local results.

@morluto morluto closed this Nov 11, 2026
@morluto morluto added area: runtime Process capture and runtime observation bug Something isn't working labels Nov 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: runtime Process capture and runtime observation bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants