Skip to content

test(update): remove imports of private crash assertion - #160263

Closed
steipete wants to merge 1 commit into
mainfrom
deslop/l136-update-cut-exit
Closed

steipete wants to merge 1 commit into
mainfrom
deslop/l136-update-cut-exit

Conversation

@steipete

Copy link
Copy Markdown
Contributor

What Problem This Solves

Core test typechecking fails because two package-update suites import assertReliabilityForcedExit, which is now private to the SQLite reliability process helper.

User Impact

No production behavior changes. The existing package-update crash tests compile again and retain their exact POSIX termination, journal recovery, stdout receipt, and cleanup assertions.

Why This Change Was Made

The new package activation tests in #158491 landed after #159362 made the helper private. Their five call sites already run only on POSIX and self-terminate at precise synchronous crash points, so they can assert the expected SIGKILL result directly with Vitest. Reusing the IPC crash-worker launcher would change those crash points and stdout ownership; restoring an unnecessary export would undo the earlier cleanup.

Evidence

  • CI 36390567736, job 108825843617 reports TS2459 in package-update-activation-journal.test.ts and package-update-activation-lifetime.test.ts.
  • Managed Codex review: no actionable P0–P2 findings.
  • No tests, timers, retries, skips, or production code added. Existing spawn-error, native rollback-journal, exact crash-receipt, recovery, and lifecycle assertions remain in place.
  • Linux Testbox validation, measured test costs, and fresh-head CI are pending. This PR is not ready to land yet.

@clawsweeper

clawsweeper Bot commented Sep 28, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@steipete
steipete marked this pull request as ready for review September 28, 2026 07:53
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Sep 28, 2026
@clawsweeper

clawsweeper Bot commented Sep 28, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs changes before merge. Reviewed September 28, 2026, 4:01 AM ET / 08:01 UTC.

ClawSweeper review

What this changes

The branch changes package-update crash tests to check POSIX child exit results directly instead of importing a private SQLite reliability assertion.

Merge readiness

⛔ Needs changes before merge - 1 item remains

Current main still imports a helper that is private, and no merged fix replaces this PR. The narrow test repair remains useful.

Priority: P2
Reviewed head: 2ff1271bd654416774f746be242c637211ce0144

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) The narrow patch matches the source-level type error and preserves the relevant assertions, but focused execution and test-cost evidence remain pending.
Proof confidence 🌊 off-meta tidepool Not applicable: This test-only PR changes no production behavior or stored-data contract. The captured PR body reports the prior typecheck failure and says focused POSIX suite validation is pending.
Patch quality 🦐 gold shrimp (3/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: This test-only PR changes no production behavior or stored-data contract. The captured PR body reports the prior typecheck failure and says focused POSIX suite validation is pending.
Evidence reviewed 7 items Current-main type error: At the fetched main revision, the lifetime suite imports assertReliabilityForcedExit, while the helper declares it without export. The cited core test-type job failed; its reported TS2459 is consistent with this source mismatch.
Private helper contract: The assertion remains private to the reliability process helper, which uses it inside its own crash-worker operation.
Introduced repair: The pinned introduced diff removes the private import and replaces five calls across the two POSIX suites with direct SIGKILL assertions. The verified test-merge result contains the same two-file change.
Findings None None.
Security None None.

How this fits together

OpenClaw's package-update tests kill isolated child processes at defined crash points, then check the activation journal and recovery behavior. Core test typechecking must resolve the suites' imports before those tests run.

flowchart LR
A[Package update tests] --> B[Isolated child process]
B --> C[Forced crash result]
C --> D[Exit signal assertion]
D --> E[Journal recovery checks]
E --> F[Test result]
Loading

Before merge

  • Complete next step (P2) - Record focused Linux results and measured one-worker wall time for both changed suites in the PR body.
Agent review details

Security

None.

PR surface

Tests +2. Total +2 across 2 files.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 2 17 15 +2
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 2 17 15 +2

Review metrics

None.

Technical review

Best possible solution:

Keep the reliability assertion private while preserving the POSIX crash and recovery checks, then land the focused test repair with measured suite validation.

Do we have a high-confidence way to reproduce the issue?

Yes—source-reproducible: fetched main imports a non-exported helper, and the cited core test-type job failed. This review did not execute the typecheck.

Is this the best way to solve the issue?

Yes. Direct exit assertions in these POSIX-only fixtures remove the invalid import without reopening the helper's public surface or changing the crash points.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 69a2b5094bad.

Labels

Label changes:

  • add P2: A test import that no longer exists breaks core test typechecking, with no production behavior change.
  • add rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🌊 off-meta tidepool and patch quality is 🦐 gold shrimp.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: This test-only PR changes no production behavior or stored-data contract. The captured PR body reports the prior typecheck failure and says focused POSIX suite validation is pending.

Label justifications:

  • P2: A test import that no longer exists breaks core test typechecking, with no production behavior change.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🌊 off-meta tidepool and patch quality is 🦐 gold shrimp.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: This test-only PR changes no production behavior or stored-data contract. The captured PR body reports the prior typecheck failure and says focused POSIX suite validation is pending.

Evidence

What I checked:

Likely related people:

  • Peter Steinberger: Raw commit b107d4a adds src/infra/package-update-activation-lifetime.test.ts:125 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: b107d4af14d7; files: src/infra/package-update-activation-lifetime.test.ts)
  • fuller-stack-dev: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • Record focused Linux results and measured one-worker wall time for both changed test suites.

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

@steipete

Copy link
Copy Markdown
Contributor Author

Closing as superseded by main commit da2efd8, which restores the export needed by the package-update tests. The duplicate-fix check found that repair while this PR was being validated. This PR was not merged; dependent provider work will retain main's repair and drop these test edits.

@steipete steipete closed this Sep 28, 2026
@RomneyDa
RomneyDa deleted the deslop/l136-update-cut-exit branch October 22, 2026 03:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

P2 Normal backlog priority with limited blast radius. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. size: XS status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant