Repository navigation
improve: reduce unnecessary session-history imports - #154740
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: blocked before merge. Reviewed September 21, 2026, 7:10 AM ET / 11:10 UTC. ClawSweeper reviewWhat this changesMoves four persisted-session delivery readers into a module with type-only dependencies, updates callers and test mocks, and preserves public plugin SDK exports. Merge readiness⛔ Blocked before merge - 2 items remain Keep open: the import isolation remains useful and is absent from inspected main and the latest release. No actionable correctness defect was found; current-head validation is still underway. Priority: P3 Review scores
Verification
How this fits togetherSession delivery readers extract stored channel, destination, origin, and route information for history, status, and delivery consumers. Separating these reads from route normalization reduces their runtime import dependencies without changing stored data or routing decisions. flowchart LR
A[Incoming routing facts] --> B[Existing route normalization]
B --> C[Canonical session record]
C --> D[Lightweight delivery readers]
D --> E[History and status consumers]
D --> F[Delivery consumers]
D --> G[Existing plugin SDK exports]
Before merge
Agent review detailsSecurityNone. PR surfacePR surface statistics unavailable: the file list is incomplete. Review metrics
Stored data modelPersistent data-model change detected: 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 pure persisted-field reads independent of normalization runtime while retaining one normalization owner and the existing SDK contract. Do we have a high-confidence way to reproduce the issue? Not applicable as a user-facing bug reproduction; current source directly shows pure readers sharing a module with runtime normalization imports. Is this the best way to solve the issue? Yes. Moving the unchanged readers and migrating their callers removes the dependency coupling without duplicating logic or changing the public SDK. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against e1ce0f531eff. 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.
|
* commit '0883394977d1fb3af657635967f6e447bd7fff9a': (72 commits) fix(ui): await scheduled rail layout in focus test fix(cron): keep healthy active runs from delaying job lists (#154421) fix(plugins): prevent config conflicts during legacy plugin installation (#154539) perf(gateway): reduce repeated session-list work (#154551) fix(tasks): retain admitted work across list retries (#154338) perf(gateway): speed up transcript artifact downloads (#154726) chore(ui): refresh control ui locales (#154580) fix(release): keep two extended-stable months eligible (#154777) fix(tests): avoid avatar descriptor reuse race (#154747) perf(plugins): reduce callback scope overhead (#154625) fix(ui): include final request time in completed work summaries (#149240) fix(ai): avoid retrying conflicting Responses terminal statuses (#149242) fix: identify malformed Code Mode JavaScript as input errors (#149222) fix(doctor): settle imported JSONL transcript leftovers (#154413) fix(cloud): restore node bootstrap with bundled browser runtime (#154654) test(ui): await publication state notifications (#154768) fix(plugins): keep unchanged plugins running across metadata refreshes (#151281) fix: keep chat panel accessibility targets within each pane (#153478) fix: forced Gateway restarts cancel healthy subagent work (#154300) improve: reduce session delivery reader imports (#154740) ...
Closes #154738
What Problem This Solves
Session-history readers load route-normalization dependencies merely to read already persisted delivery fields.
User Impact
No user-visible behavior change is intended. This reduces unnecessary imports in the session-history worker while preserving delivery behavior and the existing public SDK exports. No migration is required.
Compatibility review covers the complete 82-file diff: no configuration keys, defaults, SQLite schemas, migrations, persisted fields, serialization, retention, or database paths change. The four reader function bodies and public SDK signatures are preserved. Upgrading or rolling back requires no data conversion. ClawSweeper's compatibility placeholders were triggered by an incomplete file inventory (
unknown-truncated-pull-files), not an identified configuration or data-model change.Why This Change Was Made
The four delivery readers only select fields from the canonical session record. Moving them into a module with type-only dependencies lets callers read those fields without importing normalization runtime. Normalization keeps its existing owner. The restart-sentinel test fixture moves into its existing support module to keep the changed file within the repository's line limit; its defaults and assertions are preserved.
Evidence
Historical proof for the reviewed candidate based on
591f7bad7e333a6a879e38cfffab7bbc17055800:Candidate commit
309866379668fe5abf0ac13a5cce5740de24f8c1integrates onto4d9c6d9aefa5f3764f109bf8965f6c21a36fa9a3without conflicts: 80 of 82 files are byte-identical to the reviewed candidate. The other two preserve upstream asynchronous delivery-queue lookup and matching test mocks. No unmigrated reader imports were found; whitespace and independent patch-application checks passed. All 82 source hashes match the integrated packet after committing.Current-head GitHub CI passed for
309866379668fe5abf0ac13a5cce5740de24f8c1, and enforced dependency/security/CI gates passed. The native workflow merged that exact head as6f3e8c77bb892f4ba83d6e55301a5805f1d993baand completed cleanup. The historical profiling measurements above remain historical; no new Gateway performance claim is made.