Skip to content

fix(ci): preserve cleanup boundaries and bounded failure assertions - #1618

Merged
N0zoM1z0 merged 1 commit into
mainfrom
fix/ci-cleanup-boundaries
Oct 10, 2026
Merged

N0zoM1z0 merged 1 commit into
mainfrom
fix/ci-cleanup-boundaries

Conversation

@N0zoM1z0

@N0zoM1z0 N0zoM1z0 commented Oct 10, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Cancel optional CDP domain shutdown promptly while retaining an independent, bounded detach attempt. Repair inherited CI regressions around retained cleanup owners and REA-owned skill removal, without discarding original failure facts or user files.

Found while babysitting #1613: its first shard and another unrelated PR had the same six failures. No separate issue was opened for these directly reproduced blockers. The firmware worker assertion overlaps the correction in #1616; this PR does not implement its workspace recovery feature.

Problem and expected behavior

When cancellation arrives during a hung Page.disable, the optional shutdown currently consumes the entire cleanup budget, preventing Target.detachFromTarget. Cancellation should stop optional shutdown and preserve the remaining detach budget. Already cancelled operations should skip optional domain disabling and still detach; they must never close a user target or browser.

The EVM regression expected an old flattened error and premature workspace deletion, the firmware regression allowed a second unverified worker, and the Qwen regression expected recursive skill-directory deletion. Current ownership rules require preserving the cleanup owner/root, refusing another unverified launch, and removing only managed skill files. The megabyte-sized EVM assertion diff also delayed CI log output by about 25 minutes after the tests had finished.

Change and scope

  • Combine the caller signal with the bounded cleanup signal for optional domain shutdown only; retain the independent signal for detach.
  • Preserve cancellation and external-target assertions. Update the Electron case to expect optional disabling to be skipped after cancellation.
  • Inspect the EVM projected error chain through a bounded test projection, checking original output-limit cause, diagnostic truncation, retained workspace, and successful shutdown after cleanup recovery.
  • Verify all managed Qwen skill files are removed and a user-authored file survives. Keep the uncertain firmware worker/root and reject another launch.

Contract and boundary impact

  • Semantic owner and earliest changed stage: CDP target-session cleanup; integration assertions at process/filesystem boundaries.
  • CLI and MCP/tool-catalog contract: unchanged.
  • Provider, bridge, target-format, or platform compatibility: no native engine/bridge changes; CDP caller cancellation releases optional cleanup before detach.
  • Evidence, artifact, provenance, or reconstruction contract: unchanged; original EVM failure and truncation remain checked through the shared projection.
  • Process execution, authorization, cleanup, or containment impact: preserve the existing one-second cleanup deadline, independent detach authority, and user-target preservation. Retained process cleanup must be confirmed before root removal.
  • Generated metadata, package, or installation impact: none; skill uninstall assertions validate the existing managed-file ownership rule.

Evidence and regression coverage

  • Tests updated: four cancellation cases over actual HTTP/WebSocket transport; EVM real subprocess overflow and retryable cleanup; firmware uncertain-worker admission; both Qwen custom/default-home lifecycles.
  • Base reproduction: all six failures reproduced twice locally, including after rebasing onto current main; the CI log shows the same failures on feat(skills)!: improve Codex onboarding and task recovery #1613 and an unrelated PR. The late-cancellation detach assertion fails before the production change.
  • User-visible CLI/MCP output: no envelope changes; successful capture and cancelled analysis retain their prior result status.
  • Remaining proof gaps: the cancellation peer and firmware/Qwen fixtures are controlled boundary tests; native firmware-engine and live Qwen-model behavior are unverified. CI also passed normal real Chrome 154 CLI/stdio MCP and real Web runtime workflows; these do not reproduce a hung domain-disable reply in Chrome.

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

  • Integrated worktree: 149 tests passed (2 skipped) across ten affected and onboarding/evaluation files.
  • Repeated the four previously failing files: 64 tests passed (2 skipped).
  • npm run check — passed typecheck, lint, formatting, metadata, unused-code and architecture checks.
  • CI real-browser and real-web-runtime workflows passed on e4ac2f8a.
  • The five changed files in this branch are byte-identical to the verified integration worktree; CI will validate the standalone branch. No live model pass is claimed.

Compatibility, safety, and release

  • Breaking changes or migration steps: none.
  • Real Hopper/Ghidra, browser, or OS coverage: Linux x64 process/filesystem and actual HTTP/WebSocket boundary tests; CI real Chrome 154 CLI/stdio MCP and real Web runtime lanes passed. No native firmware/Hopper/Ghidra claim.
  • Package or release metadata impact: none.
  • Security, privacy, process, or containment review: no GUI mutation, browser/target close, recursive skill deletion, or new approval authority. Local checks run serially under one CPU core and a 3 GiB process-tree limit.

Review checklist

  • This PR addresses a concrete problem.
  • This PR has one focused outcome and a Conventional Commit title.
  • The reason for not opening a separate issue is stated above.
  • Tests cover changed observable behavior and failure paths.
  • No owning contracts or generated metadata require changes.
  • User-visible result status and unchanged envelopes are described above.
  • The diff was checked for secrets, unrelated cleanup, and unsupported claims.

Interrupt optional CDP domain shutdown on caller cancellation while preserving independent bounded detach. Align EVM, firmware and Qwen boundary regressions with retained cleanup owners and managed-file removal; retain original overflow facts without expanding megabyte-sized assertion diffs.
@N0zoM1z0 N0zoM1z0 added bug Something isn't working area: tests Test suite and verification area: setup Setup, packaging, upgrade, install, Doctor, and client registration labels Oct 10, 2026
@chatgpt-codex-connector

Copy link
Copy Markdown

Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits.
Repo admins can enable using credits for code reviews in their settings.

@N0zoM1z0

Copy link
Copy Markdown
Collaborator Author

Independent review confirms the mid-cleanup cancellation fix and managed-file ownership assertions. I am adding a narrow EVM follow-up here: the outer cleanup error describes the same retained process failure, and its previous-error metadata also duplicates the complete captured stdout. Keep the original output-limit cause, one canonical captured-output copy and the original cleanup resources/owner.

An actual owned subprocess overflow control reduces the projected error from 2,098,769 to 1,049,484 bytes while retaining all 1,048,576 captured stdout bytes, truncation, the original cause and retryable root cleanup. Real small-target CLI/pinned-SDK MCP controls also passed for a five-byte EVM bytecode and a 66-byte Chrome page, including cancellation, external-target preservation and subsequent ping. Those measurements are from the independently verified candidate on main 92a901e0; I will verify the follow-up on this PR source before pushing. Related #1617 and the worker assertion in #1616 overlap; no competing PR is needed.

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

Labels

area: setup Setup, packaging, upgrade, install, Doctor, and client registration area: tests Test suite and verification bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant