Skip to content

fix: pr1048-ci-integration-build - #1057

Closed
0xPlayerOne wants to merge 5 commits into
mainfrom
fix/pr1048-ci-integration-build
Closed

0xPlayerOne wants to merge 5 commits into
mainfrom
fix/pr1048-ci-integration-build

Conversation

@0xPlayerOne

@0xPlayerOne 0xPlayerOne commented Oct 10, 2026 •

Copy link
Copy Markdown
Member

Scope and issue linkage

Integration-lane fix for the Validation / Test / Integration failure reported on PR #1048 (Cannot find module '@control-plane/profile-portability' from the root-level integration files).

Change

  • scripts/run-integration-tests.mjs: builds @control-plane/profile-portability through turbo before the unsharded root-level integration files run.
  • tests/integration-runner-lifecycle.test.mjs: remote-lane bun invocation count 3 → 4 (the added build), plus a new test asserting the build runs before the root-level file.
  • tests/j1-unfinished-child-process.fixture.mjs: evidence poller parses only newline-terminated rows.

Changed paths vs PR base: 3 files, +38 / −2.

Tested head

bd16941c3bdf14fcc52ffcfd1d2741dcab3eb48a (fix/pr1048-ci-integration-build). Clean worktree at validation time.

Commands and results (this head, local, Bun 1.4.2)

Command Result
bun install --frozen-lockfile exit 0, lockfile unchanged
bun run build exit 0, 45/45 tasks
bun run format:check exit 0
bun run lint exit 0, 45/45 turbo lint tasks; oxlint --deny-warnings tests: no issues in 1034 files; boundaries: no issues in 45 packages; canonical ordering: pass. Existing lint warnings in contracts and local-control-plane are not failures.
bun run type-check exit 0, 47/47 tasks (openapi, db, compatibility, requirements, architecture, infra typecheck)
bun run test:integration exit 0. Turbo 43/43. database 208 tests across 23 files passed. Root-level files: 34 pass, 0 fail across 3 files. Cloud and Postgres drills completed.
tests/repository.test.mjs + tests/integration-shards.test.mjs 37 pass, 0 fail
tests/j1-unfinished-child-process-restart.test.mjs 10 pass, 0 fail (this run)
tests/integration-runner-lifecycle.test.mjs 18 pass, 1 fail. The failing test is a host-timing failure that varies per run (5 s / 10 s budgets under host load 60–180). The new ordering test passed. On origin/main the same file fails 2 of 2 runs under the same load, so this is pre-existing on this host, not introduced here.

Earlier evidence on the same tree (not repeated here): bun test unit group 3126 pass / 0 fail across 369 files; test:group:e2e 320 pass.

Known gaps and dependencies

0xPlayerOne and others added 5 commits October 9, 2026 14:28
Executable evidence for M17.02.2 (#1025), proof-only — no source changes.

- tests/profile-recovery-crash-restore.test.mjs: crash/restart through the
  real LocalControlPlaneComposition (lease abandonment, fencing, single
  recovery at attempt 2, terminal outcomes never reclaimed), portable
  backup/restore with active-work and digest fail-closed paths, physical
  snapshot total-loss restore, and the hosted/self-hosted fail-closed
  binding matrix (no silent Hosted→local fallback). The hosted-server
  Postgres total-loss restore is integration-gated (RUN_DATABASE_INTEGRATION).
- tests/profile-recovery-fenced-rollback.test.mjs: one attempt owner via
  WorkflowJobStore lease tokens, stale channel-generation rejection and
  heartbeat fencing, evaluateRuntimeEligibility reconnect-grant
  revalidation, exact rollback input binding with typed parent mismatch,
  interrupted/repeated operations with stored-command replay, and the
  interrupted local→hosted-server import rollback through applyPortableImport.
- tests/profile-qualification.test.mjs: the qualification facts — profile
  mapping, exact wake dispatcher binding, topology/authority guard
  fail-closed instances, CLOUD_PROFILE_UNQUALIFIED, no implicit fallback.
- docs/profile-recovery-acceptance-map.md: clause→test→result map with the
  per-profile supported/unproven matrix and explicit remainders.

Registered additively in the smoke lane (tests/repository.test.mjs and
scripts/run-bun-test-group.mjs). Ordinary sessions stay Pi-independent; no
Pi-owned surfaces, recovery engines, or cross-harness transplants.
…1025)

- Register the self-hosted-server PostgreSQL restore as an integration test
  (tests/profile-recovery-postgres-restore.integration.test.mjs) in the
  unsharded integration runner, the shard-3 root group, and the repository
  integration inventory. Disposal of every provisioned database runs after
  partial setup or body failure, and disposal failures surface.
- Dispose every LocalControlPlaneComposition before its directory is removed,
  and surface failures from every release step.
- Add a local graceful-drain proof: close() waits for an in-flight scheduled
  reconciliation pass before storage closes.
- Route the local backup/restore proof through the composition's persistence.
- Consolidate the adapter-level rollback fence and managed-Pi rebind proofs
  from PR #1046 (tests/profile-recovery-rebind-fencing.test.mjs). Its
  restore-binding test duplicates packages/profile-adapters and is not carried.
- Remove fixture-only duplicates already pinned by package tests:
  tests/profile-qualification.test.mjs, lease-fencing, cancellation,
  import-rollback, topology, and hosted fail-closed cases.
- Correct docs/profile-recovery-acceptance-map.md to the exact tests and
  results; drain and upgrade remain partial or unproven.

Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
The drain proof held a reconciliation pass open and released it only after its
assertions. A failing assertion left the pass pending and the close unsettled.
Release the gate in finally and settle the drain before the assertions after
it run. Verified: a deliberately failing assertion now fails the test in about
2s instead of hanging.

Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
The Validation integration lane runs `turbo run test:integration`, whose
tasks depend only on their dependencies' builds (^build). The profile
recovery restore file runs as a root-level bun test afterwards and imports
@control-plane/profile-portability through its package exports (dist/),
but nothing builds that package in this lane, so the import fails with
"Cannot find module" and the lane goes red.

Build the consumed package explicitly in the unsharded runner before the
root-level files. The remote lifecycle expectation rises from three to
four bun invocations to account for the build, and a new test pins that
the build precedes the root-level file.
The J1 evidence poller parses process-evidence.jsonl while live child
processes append to it. The CI failure for run 37985178251 reports
JSON.parse rejecting an unterminated fragment at column 11, which fits a
poll that reads a row before its newline is written. Only
newline-terminated rows are complete, so parse those and leave any
fragment for the next poll, the same way the stdout reader already
buffers lines.

This is a hardening change. The partial-row mechanism was not reproduced
locally; the J1 concurrent-recovery flake that does reproduce is a
different failure mode and is not addressed by this commit.
@0xPlayerOne

Copy link
Copy Markdown
Member Author

Closing as superseded. All five commits on this branch are ancestors of PR #1048 head 98bde39 (0 commits missing, verified by git ancestry). The Integration profile-portability build step is present on #1048 (scripts/run-integration-tests.mjs). The J1 evidence-reader change was superseded on #1048 by 2120fda. The profile-recovery tests and acceptance map are byte-identical. #1048 remains draft. This PR does not close or merge any issue. Branch fix/pr1048-ci-integration-build is retained.

@0xPlayerOne
0xPlayerOne deleted the fix/pr1048-ci-integration-build branch October 11, 2026 20:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant