Repository navigation
fix: keep active-turn steering across automatic auth rotation - #138516
NianJiuZst wants to merge 1 commit into
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs real behavior proof before merge. Reviewed September 23, 2026, 12:57 AM ET / 04:57 UTC (Revision 2). ClawSweeper reviewWhat this changesThe PR lets follow-up messages steer an active turn across automatic credential rotation while preserving distinctions for explicitly selected profiles. Merge readiness⛔ Blocked before merge - 2 items remain The fix remains necessary on current main and the latest release. No introduced correctness defect was found; the outstanding production-path proof request remains unresolved. Priority: P1 Review scores
Verification
How this fits togetherThe reply runner compares incoming messages with the active turn’s execution policy before injecting them or queuing another turn. Authentication selection supplies the credential provenance used in that comparison. flowchart LR
A[Incoming follow-up] --> C[Steering fingerprint]
B[Credential selection and tool policy] --> C
C --> D{Matches active turn?}
D -->|Yes| E[Runtime injection checks]
E --> F[Active turn receives input]
D -->|No| G[Queue successor turn]
Before merge
Agent review detailsSecurityNone. PR surfaceSource +2, Tests +80. Total +82 across 3 files. View PR surface stats
Review metrics
Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Technical reviewBest possible solution: Keep normalization in the shared fingerprint owner, preserving explicit credential and policy boundaries; the added type member and invariant comment justify the two production lines. Do we have a high-confidence way to reproduce the issue? Yes, from source: two automatically selected profile IDs produce different hashes on current main, causing an otherwise equivalent active-turn follow-up to queue. No runtime reproduction was executed in this review. Is this the best way to solve the issue? Yes for the code repair: the shared fingerprint owner already receives selection provenance, so normalizing there avoids bypassing downstream guards or changing credential selection. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 094f165494ce. LabelsLabel changes: No label changes. Label justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (1 earlier review cycle)
|
|
This fix is incorporated in merged #158699 (13747e0), including contributor credit for NianJiuZst. Current main represents automatic credential selection separately from explicit/legacy profile IDs and preserves the full route/tool/permission boundary. I compared this PR with current main and reran the authority/fallback/followup regression group: 53 tests passed, including automatic rotation and the negative account-pin/permission cases. No remaining product behavior unique to this PR was found. Closing it as superseded by the landed implementation. Thank you for the report and focused fix. |
Closes #138388
What Problem This Solves
Fixes an issue where users sending a follow-up to an active run in
steermode would have that message queued as a successor when automatic authentication rotation selected a different profile. The active turn therefore could not see the follow-up, including attached images, even though its provider, model, and tool authority were unchanged.Why This Change Was Made
Automatic profile selection is now represented as one stable steering-authority class instead of fingerprinting the rotating profile ID. A dedicated
nullsentinel keeps that class distinct from having no profile, while explicit user-selected and legacy source-undefined profile IDs remain authority-significant. Provider, model, capability policy, allowlists, overrides, elevation, workspace/session scope, client capabilities, and tool bindings remain unchanged in the fingerprint.This uses the existing auth-selection source and reply-authority owner; it adds no configuration, protocol, persistence, dependency, or fallback surface.
User Impact
Follow-ups can continue steering into the active turn when OpenClaw automatically rotates credentials for the same provider/model. Explicit profile changes and missing-profile transitions still queue rather than crossing credential boundaries.
Evidence
a1cbd6f360cde90c9ba3401054e549b958e54925, rebased on9b95e87c4b2b506cc35c62e714f05cce4b71c61d.node scripts/run-vitest.mjs src/auto-reply/reply/reply-run-registry.test.ts— 103 passed.node scripts/run-vitest.mjs src/auto-reply/reply/agent-runner.runreplyagent.e2e.test.ts— 173 passed after rebuilding the E2E runtime from the final head.node scripts/check-changed.mjs -- src/auto-reply/reply/reply-tool-authority.ts src/auto-reply/reply/reply-run-registry.test.ts src/auto-reply/reply/agent-runner.runreplyagent.e2e.test.ts— passed all selected core and core-test gates.+3/-1; tests+80/-0.A live channel run with two external provider credentials was not performed because it requires credentialed external side effects and a concurrent in-flight turn. The run-level E2E covers the changed owner boundary with an image-bearing steer, verifies injection, and verifies no successor enqueue.