Skip to content

fix(doctor): skip cleanup hints for active gateway and downgrade exec SecretRef errors to warnings#52515

Open
daniel-knox wants to merge 1 commit into
openclaw:mainfrom
daniel-knox:fix/doctor-cleanup-hints
Open

fix(doctor): skip cleanup hints for active gateway and downgrade exec SecretRef errors to warnings#52515
daniel-knox wants to merge 1 commit into
openclaw:mainfrom
daniel-knox:fix/doctor-cleanup-hints

Conversation

@daniel-knox

Copy link
Copy Markdown

Fixes #52510

Problem

openclaw doctor has two false-positive issues:

  1. Cleanup hints suggest removing the active gateway - When doctor detects ANY extra gateway-like services (e.g., an unrelated imessage-watcher), it unconditionally generates cleanup commands for the main gateway plist. Following these hints kills the running gateway and causes downtime.

  2. SecretRef exit code 1 - Doctor exits with code 1 when encountering exec:keychain: SecretRef values in config. These are resolved at gateway runtime and are expected to be unavailable during doctor execution.

Changes

Bug 1: src/daemon/inspect.ts + src/commands/doctor-gateway-services.ts

  • renderGatewayServiceCleanupHints() now takes the actual detected extra services as input
  • Generates per-service cleanup commands based on what was actually found
  • Returns empty array when no services are provided
  • Call site passes only non-legacy extra services

Bug 2: src/config/types.secrets.ts + src/commands/doctor.ts

  • Doctor sets OPENCLAW_ALLOW_EXEC_SECRETREF_FAILURES=true during execution (with proper try/finally cleanup)
  • assertSecretInputResolved() detects doctor context and downgrades exec: SecretRef failures to warnings instead of throwing
  • Original throwing behavior preserved for all non-doctor contexts

Testing

  • Existing tests use mocked renderGatewayServiceCleanupHints, so signature change is safe
  • Manually verified: doctor no longer suggests removing active gateway when only non-gateway extras are detected
  • Manually verified: doctor completes with exit 0 when exec:keychain: SecretRefs are present

@daniel-knox daniel-knox requested a review from a team as a code owner March 22, 2026 23:25
@openclaw-barnacle openclaw-barnacle Bot added gateway Gateway runtime commands Command implementations size: S labels Mar 22, 2026
@greptile-apps

greptile-apps Bot commented Mar 22, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR fixes two false-positive issues in openclaw doctor: cleanup hints incorrectly targeting the active gateway, and exec: SecretRef failures causing an early exit with code 1. Both fixes are well-reasoned and the core logic is sound.

Key changes:

  • renderGatewayServiceCleanupHints now takes concrete ExtraGatewayService objects, generating per-service cleanup commands only for services that were actually detected as non-legacy extras — preventing the active gateway plist from being included.
  • doctorCommand sets a lenient-mode env flag inside a try/finally block to scope forgiving SecretRef handling to the doctor run, restoring the original value on exit (including early-return paths).
  • assertSecretInputResolved reads the env flag to downgrade exec: SecretRef failures to console.warn instead of throwing.

Issues found:

  • The process.argv.some(arg => arg.includes('doctor')) fallback in assertSecretInputResolved is fragile: any argument containing the string "doctor" (e.g. a config file named doctor-config.json) would silently suppress a real exec SecretRef error in a non-doctor context. The env-flag mechanism already covers all cases within doctorCommand, making the argv fallback unnecessary and risky.
  • The env parameter in the refactored renderGatewayServiceCleanupHints is dead code — it was used in the old implementation to resolve a profile-based label, but the new code reads the label directly from each service object.

Confidence Score: 4/5

  • Safe to merge after addressing the process.argv false-positive; the primary fix logic is correct.
  • The two core bug fixes are solid: the cleanup-hints scoping is correct and the try/finally env-var pattern is robust. The one P1 concern — the process.argv fallback creating silent failure suppression in non-doctor contexts — is a one-line removal to resolve. The dead env parameter is a minor cleanup. No data-loss or security risk introduced.
  • src/config/types.secrets.ts — the process.argv fallback in isDoctorContext needs to be removed.
Prompt To Fix All With AI
This is a comment left during a code review.
Path: src/config/types.secrets.ts
Line: 143-145

Comment:
**`process.argv` fallback causes false-positive doctor detection**

The `process.argv.some(arg => arg.includes('doctor'))` fallback will incorrectly set `isDoctorContext = true` whenever any CLI argument happens to contain the string `"doctor"` — for example, a config file named `doctor-config.json`, a task argument like `run doctor-task`, or any test harness whose path includes "doctor".

In those non-doctor contexts, a genuinely unresolved `exec:` SecretRef would be silently downgraded to a `console.warn` instead of throwing, making failures invisible.

The env-var approach already covers all code paths triggered from within `doctorCommand` (it's set before the `try` block), so this fallback is both redundant and risky. Consider removing it:

```suggestion
  const isDoctorContext = params.allowExecFailuresInDoctor ?? 
    (process.env.OPENCLAW_ALLOW_EXEC_SECRETREF_FAILURES === 'true');
```

How can I resolve this? If you propose a fix, please make it concise.

---

This is a comment left during a code review.
Path: src/daemon/inspect.ts
Line: 28-31

Comment:
**Dead `env` parameter in refactored function**

The `env` parameter is kept in the signature with its default value, but it is never referenced anywhere in the new function body. The old implementation read `env.OPENCLAW_PROFILE` to derive the gateway label; the new implementation receives concrete `ExtraGatewayService` objects whose `label` is already resolved, making `env` entirely unused.

```suggestion
export function renderGatewayServiceCleanupHints(
  services: ExtraGatewayService[] = [],
): string[] {
```

How can I resolve this? If you propose a fix, please make it concise.

Reviews (1): Last reviewed commit: "fix(doctor): skip cleanup hints for acti..." | Re-trigger Greptile

Comment thread src/config/types.secrets.ts Outdated
Comment on lines +143 to +145
const isDoctorContext = params.allowExecFailuresInDoctor ??
(process.env.OPENCLAW_ALLOW_EXEC_SECRETREF_FAILURES === 'true' ||
process.argv.some(arg => arg.includes('doctor')));

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 process.argv fallback causes false-positive doctor detection

The process.argv.some(arg => arg.includes('doctor')) fallback will incorrectly set isDoctorContext = true whenever any CLI argument happens to contain the string "doctor" — for example, a config file named doctor-config.json, a task argument like run doctor-task, or any test harness whose path includes "doctor".

In those non-doctor contexts, a genuinely unresolved exec: SecretRef would be silently downgraded to a console.warn instead of throwing, making failures invisible.

The env-var approach already covers all code paths triggered from within doctorCommand (it's set before the try block), so this fallback is both redundant and risky. Consider removing it:

Suggested change
const isDoctorContext = params.allowExecFailuresInDoctor ??
(process.env.OPENCLAW_ALLOW_EXEC_SECRETREF_FAILURES === 'true' ||
process.argv.some(arg => arg.includes('doctor')));
const isDoctorContext = params.allowExecFailuresInDoctor ??
(process.env.OPENCLAW_ALLOW_EXEC_SECRETREF_FAILURES === 'true');
Prompt To Fix With AI
This is a comment left during a code review.
Path: src/config/types.secrets.ts
Line: 143-145

Comment:
**`process.argv` fallback causes false-positive doctor detection**

The `process.argv.some(arg => arg.includes('doctor'))` fallback will incorrectly set `isDoctorContext = true` whenever any CLI argument happens to contain the string `"doctor"` — for example, a config file named `doctor-config.json`, a task argument like `run doctor-task`, or any test harness whose path includes "doctor".

In those non-doctor contexts, a genuinely unresolved `exec:` SecretRef would be silently downgraded to a `console.warn` instead of throwing, making failures invisible.

The env-var approach already covers all code paths triggered from within `doctorCommand` (it's set before the `try` block), so this fallback is both redundant and risky. Consider removing it:

```suggestion
  const isDoctorContext = params.allowExecFailuresInDoctor ?? 
    (process.env.OPENCLAW_ALLOW_EXEC_SECRETREF_FAILURES === 'true');
```

How can I resolve this? If you propose a fix, please make it concise.

Comment thread src/daemon/inspect.ts Outdated
Comment on lines 28 to 31
export function renderGatewayServiceCleanupHints(
services: ExtraGatewayService[] = [],
env: Record<string, string | undefined> = process.env as Record<string, string | undefined>,
): string[] {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Dead env parameter in refactored function

The env parameter is kept in the signature with its default value, but it is never referenced anywhere in the new function body. The old implementation read env.OPENCLAW_PROFILE to derive the gateway label; the new implementation receives concrete ExtraGatewayService objects whose label is already resolved, making env entirely unused.

Suggested change
export function renderGatewayServiceCleanupHints(
services: ExtraGatewayService[] = [],
env: Record<string, string | undefined> = process.env as Record<string, string | undefined>,
): string[] {
export function renderGatewayServiceCleanupHints(
services: ExtraGatewayService[] = [],
): string[] {
Prompt To Fix With AI
This is a comment left during a code review.
Path: src/daemon/inspect.ts
Line: 28-31

Comment:
**Dead `env` parameter in refactored function**

The `env` parameter is kept in the signature with its default value, but it is never referenced anywhere in the new function body. The old implementation read `env.OPENCLAW_PROFILE` to derive the gateway label; the new implementation receives concrete `ExtraGatewayService` objects whose `label` is already resolved, making `env` entirely unused.

```suggestion
export function renderGatewayServiceCleanupHints(
  services: ExtraGatewayService[] = [],
): string[] {
```

How can I resolve this? If you propose a fix, please make it concise.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: a7bb02f63c

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment on lines +441 to +442
const nonLegacyExtraServices = extraServices.filter((svc) => !svc.legacy);
const cleanupHints = renderGatewayServiceCleanupHints(nonLegacyExtraServices);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Keep legacy services in the manual cleanup hint list

When doctor finds only legacy services and the user does not remove them automatically (or cleanup is skipped for system-scope entries), this filter drops every detected service before rendering hints. In that path maybeScanExtraGatewayServices() still reports the legacy service, but it no longer prints any actionable cleanup commands, so the fallback guidance disappears exactly when automatic cleanup did not happen.

Useful? React with 👍 / 👎.

Comment thread src/daemon/inspect.ts Outdated
Comment on lines +29 to +33
services: ExtraGatewayService[] = [],
env: Record<string, string | undefined> = process.env as Record<string, string | undefined>,
): string[] {
const profile = env.OPENCLAW_PROFILE;
switch (process.platform) {
case "darwin": {
const label = resolveGatewayLaunchAgentLabel(profile);
return [`launchctl bootout gui/$UID/${label}`, `rm ~/Library/LaunchAgents/${label}.plist`];
}
case "linux": {
const unit = resolveGatewaySystemdServiceName(profile);
return [
`systemctl --user disable --now ${unit}.service`,
`rm ~/.config/systemd/user/${unit}.service`,
];
}
case "win32": {
const task = resolveGatewayWindowsTaskName(profile);
return [`schtasks /Delete /TN "${task}" /F`];
if (services.length === 0) {
return [];

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Pass detected extra services into status cleanup hint rendering

renderGatewayServiceCleanupHints() now returns [] unless a service list is supplied, but src/cli/daemon-cli/status.print.ts:309 still calls it with no arguments. As a result, openclaw status/openclaw gateway status will report extra gateway-like services yet never show any cleanup hint, which regresses the existing troubleshooting flow for that command.

Useful? React with 👍 / 👎.

@daniel-knox daniel-knox force-pushed the fix/doctor-cleanup-hints branch from a7bb02f to 806935a Compare March 22, 2026 23:33

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 806935a8be

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread src/daemon/inspect.ts
break;
}
case "linux": {
hints.push(`systemctl --user disable --now ${svc.label}`);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Use system-manager commands for system-scoped extra units

When doctor --deep finds an old gateway-like unit in /etc/systemd/system, /usr/lib/systemd/system, or /lib/systemd/system, findExtraGatewayServices() marks it scope: "system" and still routes it through this hint builder. systemctl --help documents --user as “Connect to user service manager”, so this command never disables the system unit that was actually detected. In that case doctor now prints a cleanup recipe that looks exact but leaves the conflicting service installed.

Useful? React with 👍 / 👎.

… SecretRef errors to warnings

- Fix false cleanup hints: renderGatewayServiceCleanupHints() now takes detected services as input and generates per-service hints instead of hardcoded main gateway hints
- Fix SecretRef exit code 1: assertSecretInputResolved() now downgrades exec: SecretRef resolution failures to warnings during doctor execution
- Doctor sets OPENCLAW_ALLOW_EXEC_SECRETREF_FAILURES=true to enable lenient handling for unresolvable keychain/exec refs when gateway isn't running

Fixes openclaw#52510
@daniel-knox daniel-knox force-pushed the fix/doctor-cleanup-hints branch from 806935a to 8c2069b Compare March 22, 2026 23:48
@openclaw-barnacle openclaw-barnacle Bot added the docs Improvements or additions to documentation label Mar 22, 2026

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 8c2069be8e

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread src/daemon/inspect.ts
Comment on lines +38 to +42
hints.push(`launchctl bootout gui/$UID/${svc.label}`);
const plistPath = svc.detail.startsWith("plist:")
? svc.detail.slice(6).trim()
: `~/Library/LaunchAgents/${svc.label}.plist`;
hints.push(`rm "${plistPath}"`);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Use the system launchctl domain for system plists

When findExtraGatewayServices({ deep: true }) reports an extra plist from /Library/LaunchDaemons as scope: "system", this helper still emits launchctl bootout gui/$UID/... plus a plain rm. That recipe only targets the logged-in user's GUI domain, so openclaw doctor --deep gives macOS users cleanup commands that do not unload or remove the detected LaunchDaemon, leaving the duplicate gateway in place.

Useful? React with 👍 / 👎.

@openclaw-barnacle

Copy link
Copy Markdown

This pull request has been automatically marked as stale due to inactivity.
Please add updates or it will be closed.

@openclaw-barnacle openclaw-barnacle Bot added the stale Marked as stale due to inactivity label Apr 29, 2026
@clawsweeper

clawsweeper Bot commented Apr 29, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs real behavior proof before merge. Reviewed June 6, 2026, 12:46 AM ET / 04:46 UTC.

Summary
Review failed before ClawSweeper could summarize the requested change.

PR surface: Source +42, Generated 0. Total +42 across 6 files.

Reproducibility: unclear. The review failed before ClawSweeper could establish a reproduction path.

Review metrics: none identified.

Merge readiness
Overall: 🌊 off-meta tidepool
Proof: 🌊 off-meta tidepool
Patch quality: 🌊 off-meta tidepool
Result: rating does not apply to this item.

Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch.

Risk before merge

  • [P1] No close action taken because the review did not complete.

Maintainer options:

  1. Decide the mitigation before merge
    Retry the Codex review after fixing the execution failure.
  2. Pause or close
    Do not merge this PR until maintainers decide whether the risk is worth taking.

Next step before merge

  • [P1] Review did not complete, so no work-lane recommendation was made.
Review details

Best possible solution:

Retry the Codex review after fixing the execution failure.

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

Unclear. The review failed before ClawSweeper could establish a reproduction path.

Is this the best way to solve the issue?

Unclear. Retry the review first so ClawSweeper can evaluate the actual issue and fix direction.

AGENTS.md: unclear because the file could not be read completely.

Codex review notes: model gpt-5.5, reasoning high; reviewed against 9313471fa579.

Label changes

Label changes:

  • add rating: 🌊 off-meta tidepool: Overall readiness is 🌊 off-meta tidepool; proof is 🌊 off-meta tidepool and patch quality is 🌊 off-meta tidepool.
  • remove P2: Current review triage priority is none.
  • remove rating: 🧂 unranked krab: Current PR rating is rating: 🌊 off-meta tidepool, so this older rating label is no longer current.
  • remove merge-risk: 🚨 compatibility: Current PR review selected no merge-risk labels.
  • remove merge-risk: 🚨 security-boundary: Current PR review selected no merge-risk labels.
  • remove merge-risk: 🚨 availability: Current PR review selected no merge-risk labels.
  • remove status: 📣 needs proof: Current PR status no longer selects a status label.

Label justifications:

  • rating: 🌊 off-meta tidepool: Overall readiness is 🌊 off-meta tidepool; proof is 🌊 off-meta tidepool and patch quality is 🌊 off-meta tidepool.
Evidence reviewed

PR surface:

Source +42, Generated 0. Total +42 across 6 files.

View PR surface stats
Area Files Added Removed Net
Source 4 330 288 +42
Tests 0 0 0 0
Docs 0 0 0 0
Config 0 0 0 0
Generated 2 3 3 0
Other 0 0 0 0
Total 6 333 291 +42

What I checked:

  • failure reason: codex execution failed.
  • codex failure detail: Codex review failed for this PR with exit 1.
  • codex stdout: Per-item Codex failure; continuing with the rest of the shard.

Likely related people:

  • unknown: Codex failed before it could trace repository history. (role: review did not complete; confidence: low)
What the crustacean ranks mean
  • 🦀 challenger crab: rare, exceptional readiness with strong proof, clean implementation, and convincing validation.
  • 🦞 diamond lobster: very strong readiness with only minor maintainer review expected.
  • 🐚 platinum hermit: good normal PR, likely mergeable with ordinary maintainer review.
  • 🦐 gold shrimp: useful signal, but proof or patch confidence is still limited.
  • 🦪 silver shellfish: thin signal; proof, validation, or implementation needs work.
  • 🧂 unranked krab: not merge-ready because proof is missing/unusable or there are serious correctness or safety concerns.
  • 🌊 off-meta tidepool: rating does not apply to this item.

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.

How this review workflow works
  • 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.

@clawsweeper

clawsweeper Bot commented Apr 29, 2026

Copy link
Copy Markdown
Contributor

Codex review: found issues before merge.

What this changes:

The PR changes doctor gateway cleanup hints to render from detected extra services, wraps doctor execution in a process env flag that downgrades unresolved exec SecretRefs to warnings, and updates generated plugin SDK API baselines.

Maintainer follow-up before merge:

This is an open implementation PR with real product value, but it has concrete blocking review findings and touches security-sensitive exported SecretRef behavior that requires maintainer/secops judgment rather than an automated replacement PR.

Review findings:

  • [P2] Keep status cleanup hints wired to detected services — src/daemon/inspect.ts:29-30
  • [P2] Preserve manual hints for unremoved legacy services — src/commands/doctor-gateway-services.ts:441-442
  • [P2] Honor service scope in cleanup commands — src/daemon/inspect.ts:38-46
Review details

Best possible solution:

Revise the fix so cleanup hints are rendered from actual detected service metadata in both doctor and status, commands honor user vs system service scope, unremoved legacy services still get actionable manual guidance, and doctor SecretRef warnings use an explicit read-only inspection path while exported strict helpers remain strict for runtime and plugin callers.

Full review comments:

  • [P2] Keep status cleanup hints wired to detected services — src/daemon/inspect.ts:29-30
    renderGatewayServiceCleanupHints() now returns [] when called without a service list, but status.print.ts still calls it with no arguments after reporting extraServices. That makes openclaw status --deep report extra gateway-like services without any cleanup hints, regressing that troubleshooting path.
    Confidence: 0.93
  • [P2] Preserve manual hints for unremoved legacy services — src/commands/doctor-gateway-services.ts:441-442
    Filtering out every svc.legacy before rendering hints drops the only manual cleanup guidance when legacy cleanup is skipped by policy, declined, fails, or is system-scoped. In those paths doctor still reports the legacy service but no longer gives the user a command to remove it.
    Confidence: 0.88
  • [P2] Honor service scope in cleanup commands — src/daemon/inspect.ts:38-46
    The new helper receives svc.scope but always emits launchctl bootout gui/$UID/... and systemctl --user .... For doctor --deep findings from /Library/LaunchDaemons or system systemd directories, those commands target the wrong service manager and leave the detected system service installed.
    Confidence: 0.9

Overall correctness: patch is incorrect
Overall confidence: 0.88

Acceptance criteria:

  • pnpm test src/commands/doctor-gateway-services.test.ts src/cli/daemon-cli/status.print.test.ts src/config/types.secrets.resolution.test.ts extensions/telegram/src/token.test.ts extensions/telegram/src/doctor.test.ts
  • pnpm check:changed

What I checked:

  • PR discussion already identified unresolved defects: Existing review comments flagged the status no-argument cleanup-hint call, legacy-service hint filtering, scope-insensitive system cleanup commands, and SecretRef review concerns after the PR author force-pushed the branch. (8c2069be8e23)
  • Current main still renders cleanup hints from the active profile: The current helper derives the launchd/systemd/task name from OPENCLAW_PROFILE and returns commands for that profile service, not for the detected extra service metadata. (src/daemon/inspect.ts:43, e46dccb35374)
  • Doctor currently calls cleanup helper without detected services: maybeScanExtraGatewayServices reports filtered extraServices, then calls renderGatewayServiceCleanupHints() with no service list, preserving the active-profile cleanup hint behavior on main. (src/commands/doctor-gateway-services.ts:642, e46dccb35374)
  • Status still calls cleanup helper without detected services: The status printer reports extraServices and then calls renderGatewayServiceCleanupHints() with no arguments, so the PR's new empty-default helper would suppress status cleanup hints entirely. (src/cli/daemon-cli/status.print.ts:342, e46dccb35374)
  • PR head makes no-service cleanup calls return empty: On the PR head, renderGatewayServiceCleanupHints(services = []) returns [] when no service list is passed, which breaks the unchanged status call path. (src/daemon/inspect.ts:28, 8c2069be8e23)
  • PR head filters legacy services out of manual hints: The PR filters extraServices with !svc.legacy before rendering hints, even though legacy cleanup may be skipped by policy, fail, or be system-scoped and only reported as skipped. (src/commands/doctor-gateway-services.ts:441, 8c2069be8e23)

Likely related people:

  • openclaw/secops: CODEOWNERS routes src/config/secret.ts and nested secret files to this team, and the PR changes exported SecretRef resolution behavior in src/config/types.secrets.ts. (role: required reviewer / security-sensitive owner; confidence: high; files: .github/CODEOWNERS, src/config/types.secrets.ts, docs/.generated/plugin-sdk-api-baseline.json)
  • steipete: Current checkout blame for the central doctor gateway-service, daemon inspection, status printer, and SecretRef helper lines points to Peter Steinberger's recent gateway maintenance snapshot. (role: recent maintainer / current-main owner signal; confidence: medium; commits: 34d11d57579d; files: src/daemon/inspect.ts, src/commands/doctor-gateway-services.ts, src/cli/daemon-cli/status.print.ts)

Remaining risk / open question:

  • The PR changes exported SecretRef helper behavior through process-level doctor state, so unresolved exec refs could be downgraded outside the intended read-only inspection path unless secops reviews the final boundary.
  • The cleanup-hint refactor does not update status output and does not handle legacy cleanup skip/failure or system-scope launchd/systemd services correctly.
  • The PR body cites manual verification, but the affected doctor, status, SecretRef strictness, and generated SDK API surfaces need focused regression tests before merge.

Codex review notes: model gpt-5.5, reasoning high; reviewed against e46dccb35374.

@openclaw-barnacle openclaw-barnacle Bot removed the stale Marked as stale due to inactivity label Apr 30, 2026
@clawsweeper clawsweeper Bot added rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. P2 Normal backlog priority with limited blast radius. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. merge-risk: 🚨 security-boundary 🚨 May affect sandboxing, authorization, credentials, or sensitive data. merge-risk: 🚨 availability 🚨 May cause crashes, hangs, restart loops, stalls, or process outages. labels May 19, 2026
@openclaw-barnacle openclaw-barnacle Bot added the triage: needs-real-behavior-proof Candidate: external PR needs after-fix proof from a real setup. label May 19, 2026
@clawsweeper

clawsweeper Bot commented May 20, 2026

Copy link
Copy Markdown
Contributor

ClawSweeper PR egg

🎁 Pass real behavior proof to wake the egg and unlock a hatchable treat.

Where did the egg go?
  • The egg game starts only after the PR passes the real-behavior proof check.
  • Before that, no creature or rarity is rolled. The treat waits for real proof.
  • This is still just collectible flavor: proof affects review readiness, not creature quality.

@openclaw-barnacle

Copy link
Copy Markdown

This pull request has been automatically marked as stale due to inactivity.
Please add updates or it will be closed.

@openclaw-barnacle openclaw-barnacle Bot added the stale Marked as stale due to inactivity label Jun 6, 2026
@clawsweeper clawsweeper Bot added rating: 🌊 off-meta tidepool PR readiness rating does not apply to this item. and removed rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. labels Jun 6, 2026
@openclaw-barnacle openclaw-barnacle Bot removed the stale Marked as stale due to inactivity label Jun 7, 2026
@clawsweeper clawsweeper Bot added rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. and removed rating: 🌊 off-meta tidepool PR readiness rating does not apply to this item. labels Jun 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

commands Command implementations docs Improvements or additions to documentation gateway Gateway runtime merge-risk: 🚨 availability 🚨 May cause crashes, hangs, restart loops, stalls, or process outages. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. merge-risk: 🚨 security-boundary 🚨 May affect sandboxing, authorization, credentials, or sensitive data. P2 Normal backlog priority with limited blast radius. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. size: L status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. triage: needs-real-behavior-proof Candidate: external PR needs after-fix proof from a real setup.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

doctor: false positive cleanup hint for active gateway LaunchAgent plist

1 participant