Skip to content

fix: stop shell profiles from corrupting installer and Docker tests - #146897

Merged
steipete merged 1 commit into
mainfrom
codex/test-shell-isolation
Sep 13, 2026
Merged

steipete merged 1 commit into
mainfrom
codex/test-shell-isolation

Conversation

@steipete

@steipete steipete commented Sep 13, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Fixes installer and Docker helper tests that fail when Bash startup or logout files run inside fixture shells, including 16 failures found during maintainer-requested main-branch stress testing.

User Impact

No user-visible runtime change. Installer, heartbeat cleanup, and watchdog tests now exercise their intended fixtures consistently across shell nesting levels.

Why This Change Was Made

Run shell snippets without login/profile initialization and clear inherited startup hooks after fixture environment overrides. Share the Docker invocation policy across its snippet callers and register watchdog fixture signal traps before reporting readiness. Production installers and process cleanup behavior are unchanged.

Evidence

  • Regression proof: original installer launch policies fail 3 of 4 new isolation cases; the original Docker login-shell policy fails both new isolation cases. All six pass with the fix.
  • Full affected suites at SHLVL=0 on macOS: 693 passed, two Linux-only cases skipped. This includes all 13 previously failing nvm cases and the Docker heartbeat/watchdog cases.
  • Changed-file formatting, typecheck, lint, guards, and dead-export checks passed.
  • Independent Codex review through P2 found no actionable issues.
  • Linux AWS Crabbox on the exact candidate: 693 passed at each of SHLVL=0 and SHLVL=1 (two macOS-only skips per pass); all 20 alternating-shell-level stress rounds passed. Build and CLI smoke passed. The independent full-suite run remains in progress and is not green: it exposed two unchanged managed-media cap failures and eight backup-fixture failures. The backup failures reproduce under umask 0002 and are being handled separately. Aggregate JSON capture also rejects the inline UI browser project, which requires a separate invocation. These results are retained; no full-suite pass is claimed.
  • Exact-head CI is green. ClawSweeper dispatch recovered after a transient GitHub HTTP 500 during app-token creation.

@clawsweeper

clawsweeper Bot commented Sep 13, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

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

ClawSweeper review in progress

ClawSweeper is reviewing this revision. This supersedes any previous blocked status.

View the workflow run.

@openclaw-barnacle openclaw-barnacle Bot added size: M maintainer Maintainer-authored PR labels Sep 13, 2026
@steipete
steipete marked this pull request as ready for review September 13, 2026 09:11
@steipete

Copy link
Copy Markdown
Contributor Author

@clawsweeper review

The PR body now includes passing Linux affected-suite, repeated stress, build, CLI, and exact-head CI evidence. Please review the current head; the broader full-suite run remains in progress.

@clawsweeper

clawsweeper Bot commented Sep 13, 2026

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event exact_review_queue).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

@clawsweeper

clawsweeper Bot commented Sep 13, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Sep 13, 2026
@clawsweeper

clawsweeper Bot commented Sep 13, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed September 13, 2026, 5:45 AM ET / 09:45 UTC.

ClawSweeper review

What this changes

The PR isolates installer and Docker test shells from inherited startup files, adds shared regression coverage, and registers watchdog fixture signal handlers before reporting readiness.

Merge readiness

✅ Ready for maintainer review

Keep open as useful, maintainer-owned work. No actionable introduced defect was found, and the linked CI passed on the reviewed head. Current main still lacks the complete isolation fix.

Priority: P2
Reviewed head: e132212358de36c2c21948501c6cb397bfc3155a

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused repair with meaningful regression coverage, successful exact-head CI, and no actionable correctness or security finding.
Proof confidence 🌊 off-meta tidepool Not applicable: The external-contributor proof gate does not apply to this verified repository administrator's test-only repair; reported macOS/Linux shell-fixture runs and exact-head CI support the changed launch behavior.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: The external-contributor proof gate does not apply to this verified repository administrator's test-only repair; reported macOS/Linux shell-fixture runs and exact-head CI support the changed launch behavior.
Evidence reviewed 8 items Introduced scope: The pinned merge-base-to-head diff changes only test launchers, shared test coverage, and a watchdog fixture. Production installers, dependencies, workflows, and authorization behavior are unchanged.
Isolation and regression contract: Both installer launchers disable profile loading and clear BASH_ENV/ENV after fixture overrides. The shared contract exercises SHLVL 0 and 1, checks the requested HOME and exit status, and verifies startup hooks did not run.
Watchdog readiness ordering: The fixture installs its TERM/HUP handlers before writing the PID readiness files consumed by the test; cancellation assertions and expected exit statuses remain intact.
Findings None None.
Security None None.

How this fits together

Installer and Docker script tests launch Bash processes with controlled fixtures and inspect their output, exit status, and cleanup. Inherited shell hooks can alter those fixtures and make otherwise correct script behavior fail validation.

flowchart TD
 A[Test fixture and environment] --> B[Shell test launcher]
 B --> C[Disable profiles and inherited hooks]
 C --> D[Installer or Docker shell snippet]
 D --> E[Output and process cleanup]
 E --> F[Regression assertions]
Loading

Before merge

None.

Agent review details

Security

None.

PR surface

Tests +61. Total +61 across 4 files.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 4 203 142 +61
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 4 203 142 +61

Review metrics

Metric Value Why it matters
Production versus test growth Production +0; tests and test support net +61 lines Growth is confined to shared launch policy and executable isolation regressions.

Technical review

Best possible solution:

Keep shell initialization policy in the test launchers so fixtures control their environment without changing production installer or cleanup behavior.

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

Yes: current-main installer CLI tests inherit BASH_ENV, while Docker snippets use login shells; the added hook fixtures directly exercise those launch paths. This review verified source, not a local failing execution.

Is this the best way to solve the issue?

Yes: fixing the test launch boundary preserves fixture environments and existing behavioral assertions, while the readiness-order repair removes the watchdog fixture race without weakening cancellation checks.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against a8a9114fb787.

Labels

Label changes:

  • add P2: This repairs environment-dependent validation failures with a bounded test-only change and no user-runtime impact.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: The external-contributor proof gate does not apply to this verified repository administrator's test-only repair; reported macOS/Linux shell-fixture runs and exact-head CI support the changed launch behavior.

Label justifications:

  • P2: This repairs environment-dependent validation failures with a bounded test-only change and no user-runtime impact.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: The external-contributor proof gate does not apply to this verified repository administrator's test-only repair; reported macOS/Linux shell-fixture runs and exact-head CI support the changed launch behavior.

Evidence

What I checked:

Likely related people:

  • steipete: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

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
steipete merged commit 58dce76 into main Sep 13, 2026
182 of 183 checks passed
@steipete
steipete deleted the codex/test-shell-isolation branch September 13, 2026 10:10
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

vincentkoc added a commit that referenced this pull request Sep 13, 2026
* refs/heads/temp/pr-146883: (159 commits)
  fix: retain route ownership while discovering conversations (#146927)
  refactor: reuse plugin fixture shell runner (#146920)
  fix(worker): stop preparing disabled live previews (#146896)
  fix(runtime): support Bun across tooling suite (#146807)
  chore(i18n): refresh native locales (#146924)
  perf(secrets): limit expiry metadata to transient credentials (#146882)
  fix(ui): preserve queued refreshes during session discovery (#146535)
  test(ui): wait for quiet scrolling and close named file tabs (#146836)
  fix(ui): prevent Usage hour filters from freezing during DST (#146919)
  test(ui): share browser page cleanup across layout fixtures (#146805)
  ci: balance complete PR runtime test groups (#146916)
  improve(infra): reduce scheduling work for session notice bursts (#146818)
  improve: prepare Gateway skill commands asynchronously (#146812)
  improve(agents): skip unused assistant delivery parsing (#146858)
  improve(ui): reuse date formatters across timestamp lists (#146789)
  fix(tests): isolate installer and Docker shell snippets (#146897)
  test(heartbeat): share explicit channel configuration fixtures (#146853)
  fix: retain conversation reply claims through write admission (#146866)
  perf(sessions): bound history reads and stabilize cursor paging (#146770)
  fix(ui): let slow dashboard downloads finish before recovery (#146881)
  ...
vincentkoc added a commit that referenced this pull request Sep 13, 2026
* refs/heads/temp/pr-146833: (43 commits)
  fix(memory): preserve newer indexes and disclose automatic rebuild costs (#146908)
  fix: retain route ownership while discovering conversations (#146927)
  refactor: reuse plugin fixture shell runner (#146920)
  fix(worker): stop preparing disabled live previews (#146896)
  fix(runtime): support Bun across tooling suite (#146807)
  chore(i18n): refresh native locales (#146924)
  perf(secrets): limit expiry metadata to transient credentials (#146882)
  fix(ui): preserve queued refreshes during session discovery (#146535)
  test(ui): wait for quiet scrolling and close named file tabs (#146836)
  fix(ui): prevent Usage hour filters from freezing during DST (#146919)
  test(ui): share browser page cleanup across layout fixtures (#146805)
  ci: balance complete PR runtime test groups (#146916)
  improve(infra): reduce scheduling work for session notice bursts (#146818)
  improve: prepare Gateway skill commands asynchronously (#146812)
  improve(agents): skip unused assistant delivery parsing (#146858)
  improve(ui): reuse date formatters across timestamp lists (#146789)
  fix(tests): isolate installer and Docker shell snippets (#146897)
  test(heartbeat): share explicit channel configuration fixtures (#146853)
  fix: retain conversation reply claims through write admission (#146866)
  perf(sessions): bound history reads and stabilize cursor paging (#146770)
  ...
vincentkoc added a commit that referenced this pull request Sep 13, 2026
…ssion-list-roster-batch-20260913

* commit 'f513c0f345f7f2514c49ccfbc00adc3f78b9a755': (46 commits)
  chore(i18n): refresh native locales (#146924)
  perf(secrets): limit expiry metadata to transient credentials (#146882)
  fix(ui): preserve queued refreshes during session discovery (#146535)
  test(ui): wait for quiet scrolling and close named file tabs (#146836)
  fix(ui): prevent Usage hour filters from freezing during DST (#146919)
  test(ui): share browser page cleanup across layout fixtures (#146805)
  ci: balance complete PR runtime test groups (#146916)
  improve(infra): reduce scheduling work for session notice bursts (#146818)
  improve: prepare Gateway skill commands asynchronously (#146812)
  improve(agents): skip unused assistant delivery parsing (#146858)
  improve(ui): reuse date formatters across timestamp lists (#146789)
  fix(tests): isolate installer and Docker shell snippets (#146897)
  test(heartbeat): share explicit channel configuration fixtures (#146853)
  fix: retain conversation reply claims through write admission (#146866)
  perf(sessions): bound history reads and stabilize cursor paging (#146770)
  fix(ui): let slow dashboard downloads finish before recovery (#146881)
  fix: share Doctor lifecycle coordination with SQLite workers (#146714)
  fix: retain native session model provenance (#146801)
  fix: settle embedded transcript repairs before session cleanup (#146842)
  feat(macos): improve agent navigation and chat layout (#146531)
  ...
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

maintainer Maintainer-authored PR P2 Normal backlog priority with limited blast radius. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: M 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