Skip to content

test(app-builder): prove CLI lifecycle cleanup - #149

Merged
kattsushi merged 3 commits into
feat/app-builder-public-cli-success-prooffrom
feat/app-builder-public-cli-negative-lifecycle-proof
Aug 14, 2026
Merged

test(app-builder): prove CLI lifecycle cleanup#149
kattsushi merged 3 commits into
feat/app-builder-public-cli-success-prooffrom
feat/app-builder-public-cli-negative-lifecycle-proof

Conversation

@kattsushi

Copy link
Copy Markdown
Contributor

Closes #148

Part of #131. Depends on #147 Unit 6A.

PR Type

  • Maintenance/tooling (type:chore)

Summary

  • prove a real generated verification failure and a readiness-bound interruption of the generated Nx/Vitest workflow
  • retain the detached process-group identity after the leader closes, then prove TERM/KILL escalation removes a TERM-resistant descendant
  • cancel process-close timeouts truthfully and leave no generated process, workspace, package-store, Verdaccio, or repository-root Nx residue

Changes

Area Change
Generated failure Corrupt generated TypeScript and require the installed public CLI verification path to expose the real Nx typecheck failure.
Interruption readiness Start the generated Vitest workflow and interrupt it only after the generated descendant installs its SIGTERM handler and binds its readiness socket.
Process lifecycle Retain the PGID independently of the direct child, signal the complete group, poll within bounds, and escalate from SIGTERM to SIGKILL after the leader closes when the group still exists.
Timeout truth Own and clear each process-close timeout on resolve, reject, and timeout paths while preserving the original spawn or ProcessTimeoutError.
Cleanup proof Confirm descendant/group disappearance and remove the isolated workspace, package store, Verdaccio process, and root-project contamination.

Test plan

  • CI=true NX_DAEMON=false pnpm nx run-many --target=build --projects=@effectify/app-builder-contracts,@effectify/app-builder-generation,@effectify/app-builder-cli,@effectify/app-builder-nx-plugin --parallel=1 --outputStyle=static --skipNxCache --skipRemoteCache: PASS, all four dependency builds succeeded uncached.
  • CI=true NX_DAEMON=false pnpm nx run-many --target=typecheck --projects=@effectify/app-builder-contracts,@effectify/app-builder-generation,@effectify/app-builder-cli,@effectify/app-builder-nx-plugin --parallel=1 --outputStyle=static --skipNxCache --skipRemoteCache: PASS, all four dependency typechecks and required builds succeeded uncached.
  • CI=true NX_DAEMON=false pnpm nx run-many --target=test --projects=@effectify/app-builder-contracts,@effectify/app-builder-generation,@effectify/app-builder-cli,@effectify/app-builder-nx-plugin --parallel=1 --outputStyle=static --skipNxCache --skipRemoteCache: PASS, contracts 67 tests, generation 29 tests, CLI 9 tests, and Nx plugin 9 tests.
  • CI=true NX_DAEMON=false pnpm nx run-many --target=lint --projects=@effectify/app-builder-contracts,@effectify/app-builder-generation,@effectify/app-builder-cli,@effectify/app-builder-nx-plugin --parallel=1 --outputStyle=static --skipNxCache --skipRemoteCache: PASS, 0 errors; contracts retained 6 pre-existing warnings and the other projects had 0 warnings.
  • CI=true NX_DAEMON=false pnpm nx run-many --targets=build,typecheck,lint,test --projects=@effectify/app-builder-e2e --parallel=1 --outputStyle=static --skipNxCache --skipRemoteCache: PASS, all targets succeeded uncached and the focused E2E matrix passed 1 file / 4 tests.
  • CI=true NX_DAEMON=false pnpm nx run @effectify/repo:format:check --outputStyle=static --skipNxCache --skipRemoteCache: PASS, exactly the 2 changed files are correctly formatted.
  • CI=true NX_DAEMON=false pnpm nx sync:check: PASS, the workspace is up to date with no sync generators.
  • git diff --check dc97f7a09effc1159cc3bcdc92801723a2b78112 and git diff --exit-code -- pnpm-lock.yaml: PASS, no whitespace errors and no lockfile change.
  • Independent macOS arm64 verification-failure probe: PASS, the generated @acme/admin-console:typecheck failed with TS2322, cleanup completed, and Node reached beforeExit/exit at 58,411 ms with a 0 ms tail.
  • Independent macOS arm64 timeout probe: PASS, a real non-closing child rejected as ProcessTimeoutError for the configured 50 ms timeout, reached beforeExit/exit at 79 ms, and retained no Timeout resource.
  • Independent macOS arm64 TERM-resistant interruption probe: PASS, readiness was observed; exit code was 130; the leader closed before SIGKILL; retained PGID 46416 received TERM/KILL escalation; group and descendant disappeared; cleanup completed; Node exited with a 1 ms tail.
  • Independent final validation: PASS for tree 3496af17e4ca93702971e6b6509feb60d4a2483d, binary diff SHA-256 dedb740466ac02d7ee66985dfcc6dd188b7bb7fb900c90dede91f397ac4e5321, report SHA-256 bf51edcd8ae29226d2930b1663802a80d70644919c43abb7d0e5603cdc1b1f5c, and correction evidence SHA-256 792cfe82429e8c8d14ef6fe981590546b13a17ca5505023625474f6f94a22f0b.
  • Linux x64 and Linux arm64 CI gate: run the complete generated failure, readiness-gated TERM-resistant interruption, timeout-resource, process-exit-tail, cleanup, and root-isolation proof. Linux has not yet been claimed as passed for Unit 6B.

Contributor checklist

Chain Context

Field Value
Chain App Builder reusable generation kernel, Feature Branch Chain
Tracker issue #131
Position Unit 6B
Base feat/app-builder-public-cli-success-proof at dc97f7a09effc1159cc3bcdc92801723a2b78112
Depends on #147 Unit 6A, open, non-draft, clean, with all required checks green at publication time
Follow-up Unit 7, not created by this PR
Review budget 362 / 400 changed lines, 317 additions and 45 deletions
Starts at Unit 6A installed public CLI success proof in #147
Ends with Truthful generated failure/interruption lifecycle proof and leak-free POSIX process-group cleanup on the validated macOS candidate, with Linux x64/arm64 retained as an explicit CI gate

Chain Overview

#143 (+ #145) → #147 Unit 6A → 📍 Unit 6B → Unit 7 → frozen #130

Scope

  • Includes: the real generated verification-failure path, readiness-bound generated workflow interruption, TERM-resistant descendant, retained PGID, TERM/KILL escalation after leader close, truthful timeout cancellation, and leak-free cleanup proof.
  • Excludes: Unit 6A success behavior except for regression coverage, the Windows process model, Unit 7 eligibility work, and any mutation, regeneration, retargeting, or review of frozen PR feat(app-builder): regenerate canonical Todo showcase #130.
  • Boundary: this PR begins at dc97f7a09effc1159cc3bcdc92801723a2b78112 and ends at one Unit 6B commit containing exactly two mode-100644 E2E files.
  • Dependency: review this child against feat/app-builder-public-cli-success-proof; Unit 7 follows only after this slice.
  • Linux gate: Linux x64 and Linux arm64 must independently execute the full Unit 6B process-lifecycle proof in CI after publication. This draft does not claim that gate has passed.

Rollback boundary

Revert the single Unit 6B commit to restore exactly packages/app-builder/e2e/src/golden-workspace.ts and packages/app-builder/e2e/tests/golden.e2e.test.ts to Unit 6A at dc97f7a09effc1159cc3bcdc92801723a2b78112. This removes only the negative lifecycle proof without touching #147, Unit 7, or frozen PR #130.

Autonomy

  • This PR has one deliverable scope.
  • This PR can be rolled back through exactly two files without unrelated changes.
  • Independent macOS tests and runtime evidence cover the validated candidate.
  • Linux x64 and Linux arm64 CI must close the remaining publication gate before this draft can be considered ready.

@kattsushi kattsushi added the type:chore Maintenance/tooling work label Aug 13, 2026
@coderabbitai

coderabbitai Bot commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 90ae3e51-d464-4f42-9e2d-a373fea7d484

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@kattsushi
kattsushi marked this pull request as ready for review August 13, 2026 23:49
@kattsushi
kattsushi merged commit fa88569 into feat/app-builder-public-cli-success-proof Aug 14, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type:chore Maintenance/tooling work

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant