Skip to content

fix(doctor): warn about missing profiles in saved auth order - #193541

Closed
roboclaw-bot wants to merge 1 commit into
mainfrom
roboclaw/hi-193517-doctor
Closed

roboclaw-bot wants to merge 1 commit into
mainfrom
roboclaw/hi-193517-doctor

Conversation

@roboclaw-bot

@roboclaw-bot roboclaw-bot commented Nov 5, 2026 •

Copy link
Copy Markdown
Collaborator

Related: #193517

What Problem This Solves

Doctor's auth-profile check misses a provider-order reference when its profile is absent from the agent's effective auth store.

User Impact

Doctor now warns about that missing reference and points to the affected agent's available profiles. Shared and inherited profiles count as present; existing static, native, and credentialless routes retain their behavior. This diagnostic does not edit orders, credentials, bindings, authorization, or automation jobs.

The broader upgrade/automation failure in #193517 remains unresolved and evidence-dependent. An empty local credential table does not establish lost credentials. Legacy automation account adoption already exists and is unchanged. The existing reporter evidence request is not repeated.

Why This Change Was Made

The existing finding owner checks saved provider-order IDs against the complete runtime/effective store. When a same-store health read lacks an ordered ID, it resolves normal shared inheritance before deciding that the profile is missing. Existing health and cooldown reporting keep their prior store view; no synthetic credential rows or new health-summary shape are introduced.

Evidence

Candidate: d61b864320614aff1fa7a89ba2380c33ecd1658a.

  • Corrected canonical CI uses supported validation_tier=full, release_scope=full, trusted main workflow 30db562cc5390d62835f8f9ce8e4db8ff1f4a2ea, and the exact candidate target. Preflight, Doctor auth shard, and the complete build-artifacts job succeeded. Checkout logs verify the candidate SHA; workflow SHA is kept separate. No check from the earlier invalid main-tier dispatch is reused.
  • Doctor auth shard: Node and Bun each passed 125 tests across 11 files. Explicit rows show shared-health: 18 passed per runtime, profile-health: 11 passed per runtime, including the new absent effective profile, inherited/shared, API-key, token, native and credentialless controls. Shard command wall: 155.28 s; Node duration 101.81 s, Bun duration 42.72 s. Per-file standalone wall time is not exposed.
  • Build-artifacts: SUCCESS, including build, runtime packaging/upload and built-artifact checks. Core runtime artifact is bound to the candidate by build-info verification. It excludes platform dependencies/bundled plugin trees and is not full package or Doctor CLI acceptance proof.
  • Readiness blocker: format checks fail on src/commands/doctor-auth.shared-health.test.ts in check-docs and check-lint. Lint itself, all five core lint stripes and core test typechecks passed. The frozen head is unchanged. Other broad jobs also failed and remain unclassified; the overall CI run is not green.
  • Full independent P0–P3 source review of this unchanged range found no actionable code defects and was not repeated. Hosted review also has no correctness findings; its older execution-proof assessment is superseded by the results above. Its empty-order test-consolidation advice is recorded for a later source change.
  • Remaining proof: red-on-base execution, real isolated Doctor CLI missing/inherited output, and latest-stable upgrade preservation. No new lease or local test/build/staging run was started for this proof update.

Author simplification retained one finding owner: production delta +34/-1; tests +66 lines with a dedicated allocation. No bindings, credential policy, stored orders, or automation migration changed. The broader #193517 report remains unresolved.

Draft remains unready. Native review records the actual passing tests/build but stays NEEDS WORK because formatting and the remaining product/upgrade proof are unresolved. No ready, prepare, or merge action has been taken; parent owns the final decision.

Report order-only missing effective profiles without changing credentials or orders.

Co-authored-by: steipete <[email protected]>
@clawsweeper

clawsweeper Bot commented Nov 5, 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.

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation commands Command implementations size: S labels Nov 5, 2026
@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. P2 Normal backlog priority with limited blast radius. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Nov 5, 2026
@clawsweeper

clawsweeper Bot commented Nov 5, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

Doctor warns when a saved provider order references a profile absent from the effective auth store.

Example: Agent alpha orders diagnostic-provider:shared, which exists in neither local nor shared credentials.

  • Before: The order-only reference produces no auth-health finding.
  • After: Doctor reports a warning and suggests listing alpha's available provider profiles.

Review scores

Measure Result What it means
Overall readiness 🧂 unranked krab (1/6) The implementation is focused and source-consistent, but no behavioral execution or focused validation establishes readiness.
Proof confidence 🧂 unranked krab (1/6) Real behavior proof is not required for maintainer- or bot-authored pull requests.
Patch quality 🦐 gold shrimp (3/6) No actionable review findings were identified.

Product

Kind: Bug fix · Worth it: Yes · Fix scope: Partial
User problem: Doctor can omit a warning for a saved auth-order reference whose credential is unavailable even after shared inheritance.
Reason: This maintainer-authored diagnostic repair has a concrete source-visible target and appropriately uses Related rather than closing the broader automation report.

Merge readiness

✅ Ready for maintainer review

Keep this PR open: it addresses a source-visible Doctor diagnostic gap, preserves existing credential ownership, and has no definite introduced correctness finding.

Priority: P2
Reviewed head: d61b864320614aff1fa7a89ba2380c33ecd1658a

Before merge

None.

Findings

None.

Tests

  • Low-value test src/commands/doctor-auth.shared-health.test.ts: Consolidate the native-command and credentialless empty-order variants into one no-order control: both exercise the same empty iteration, and their provider configuration does not affect the added diagnostic.
  • Missing end-to-end proof: Supply isolated Doctor CLI output for missing and inherited ordered profiles, red-on-base/green-on-head regression results, and a latest-stable upgrade run preserving existing auth state.
Agent review details

How this fits together

Doctor reads shared and agent-local auth stores, resolves inherited credentials, and emits structured findings for lint and normal diagnostic output.

flowchart TD
  A[Doctor CLI] --> B[Auth health targets]
  B --> C[Shared and local stores]
  C --> D[Effective credential loader]
  D --> E[Auth finding collector]
  E --> F[Lint and normal Doctor output]
Loading

Technical review

Best possible solution:

Retain the focused effective-store diagnostic in the existing finding owner and leave automation recovery to the linked issue.

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

Current main's collector and profile-only health summary establish how an order-only missing effective profile escapes detection; no runtime reproduction was executed.

Is this the best way to solve the issue?

The patch uses the existing collector and runtime inheritance owner, preserving same-store expiry and cooldown reporting without adding storage or competing credential policy.

AGENTS.md: found and applied where relevant.

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

Provenance checked

  • Shared and agent-local auth-health ownership keeps the original intent (177eabf: Report shared authentication independently of a default agent while keeping local cooldowns and avoiding duplicate shared credential refresh.)
  • Agent attribution keeps the original intent (7ed17e3: Inspect configured agent stores and preserve useful agent-specific attribution.)
  • Structured finding classification and aggregation keeps the original intent (5e6d56a: Prioritize unresolved actionable findings while preserving structured lint results.)

Testing

Proof path: none.

Security

None.

Evidence

What I checked:

Likely related people:

  • Peter Steinberger: Raw commit 177eabf adds src/commands/doctor-auth.ts:195 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 177eabfae3ca; files: src/commands/doctor-auth.ts)
  • Gio Della-Libera: Raw commit 7ed17e3 adds src/commands/doctor-auth.ts:165 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 7ed17e3174e9; files: src/commands/doctor-auth.ts)
  • Dallin Romney: Raw commit 5e6d56a adds src/commands/doctor-auth.ts:392 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 5e6d56ae46f4; files: src/commands/doctor-auth.ts)

PR surface

Source +33, Tests +66, Docs +3, Other +2. Total +104 across 4 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 1 34 1 +33
Tests 1 66 0 +66
Docs 1 3 0 +3
Config 0 0 0 0
Generated 0 0 0 0
Other 1 2 0 +2
Total 4 105 1 +104

Preflight source

Source unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified.

Labels

Label changes:

  • add P2: This PR repairs a limited diagnostic omission without changing credential selection or the broader automation failure.
  • add rating: 🧂 unranked krab: Overall readiness is 🧂 unranked krab; proof is 🧂 unranked krab and patch quality is 🦐 gold shrimp.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Label justifications:

  • P2: This PR repairs a limited diagnostic omission without changing credential selection or the broader automation failure.
  • rating: 🧂 unranked krab: Overall readiness is 🧂 unranked krab; proof is 🧂 unranked krab and patch quality is 🦐 gold shrimp.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Rank-up moves

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

  • Run the focused auth-health regressions and targeted static checks on the candidate.
  • Supply the Doctor CLI and upgrade evidence described in the proof assessment.
  • Consolidate the redundant empty-order controls.

Rating scale

6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

Reviewed November 5, 2026, 10:26 AM ET / 15:26 UTC.

@roboclaw-bot

Copy link
Copy Markdown
Collaborator Author

Closing this diagnostic-only draft in favor of #193570, which covers the missing saved-order profile warning and inherited/shared-profile guard along with the broader legacy cron repair. The remaining multi-provider diagnostic-context edge and useful regression controls were handed to that PR owner; see the handoff comment there. No merge or credential/binding change was made here. The exact-head build and named Node/Bun test evidence remain in this PR history; live CLI/latest-stable upgrade proof was not completed. Thanks to kip-claw for the report and Peter for the broader fix.

This pull request was closed.
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 P2 Normal backlog priority with limited blast radius. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. size: S 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