Repository navigation
refactor(state): keep read worker within lint limit - #158661
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 maintainer review before merge. Reviewed September 26, 2026, 1:08 AM ET / 05:08 UTC. ClawSweeper reviewWhat this changesMoves the profile authority query from OpenClaw’s shared-state read worker into its profile identity reader, preserving the role, alias, and display reply while reducing the worker’s lint line count. Merge readiness✅ Ready for maintainer review Current main still has the reported over-limit worker code, and the proposed repair has no evident behavioral regression. This member-authored PR remains useful and is not eligible for automatic closure. Priority: P3 Review scores
Verification
How this fits togetherThe shared-state read worker receives profile authority requests and reads an admitted SQLite connection. It returns current profile facts that the caller checks against its authorization context. flowchart LR
A[Profile authority request] --> B[Shared-state read worker]
B --> C[Admitted SQLite connection]
C --> D[Profile identity reader]
D --> E[Role, aliases, and display reply]
E --> F[Caller authority check]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceSource +3. Total +3 across 2 files. View PR surface stats
Review metrics
Technical reviewBest possible solution: Keep the profile query in the existing admitted read-worker path and land the focused extraction once the native review and check gates pass. Do we have a high-confidence way to reproduce the issue? Yes, at source level: current main retains the original worker query and the repository enforces a 700-line limit; the PR reports 714 counted lines. This review did not run lint. Is this the best way to solve the issue? Yes. Moving the unchanged query into the existing profile reader is a narrow way to reduce the worker’s line count while retaining its admitted connection and reply contract. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 8279835741d0. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
|
Merged via squash auto-merge.
|
What Problem This Solves
Fixes the core lint failure when the shared-state read worker exceeds its 700-line limit.
User Impact
No runtime behavior change. The worker returns the same profile authority and display facts from the same admitted read-only connection.
Why This Change Was Made
Move the existing transactional profile-authority query into the existing profile identity read module. Keep the absent-table guard, alias ordering, transaction boundary, and reply shape unchanged. No lint limits or suppressions change.
This is separate from #158625, which owns the gateway test-file lint repairs.
Evidence
5da1262bc896b89b283788be96b0efa70a5cb647reproduceseslint(max-lines)in the worker: 714 counted lines against 700.git diff --checkpassed.