Repository navigation
fix(agents): avoid loading transcript storage during model selection - #149079
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 15, 2026, 11:04 PM ET / September 16, 2026, 03:04 UTC (Revision 5). ClawSweeper reviewWhat this changesModel selection now imports the existing lightweight session-routing helper directly, removes its redundant storage-facade export, and adds import-isolation coverage. Merge readiness⛔ Blocked before merge - 3 items remain The fix remains useful: current main still loads the broad transcript module through this resolver. No introduced correctness defect was found; the previously requested regression negative control remains unrecorded. Likely related people: Peter Steinberger and Josh Lehman are low-confidence routing candidates from session-storage history. Priority: P2 Review scores
Verification
How this fits togetherAgent model selection resolves a session routing token and chooses the corresponding session entry before execution. The transcript resolver can perform this step without loading the modules responsible for reading and writing conversation storage. flowchart TD
A[Agent command] --> B[Model selection]
C[Session key and entries] --> B
B --> D[Lazy transcript resolver]
D --> E[Existing pure routing helper]
E --> F[Routing token and selected entry]
F --> G[Agent execution]
Before merge
Agent review detailsSecurityNone. PR surfaceSource -2, Tests +30. Total +28 across 4 files. View PR surface stats
Review metricsNone. Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Keep routing resolution with the existing pure helper and load transcript storage only for operations that actually need it. Do we have a high-confidence way to reproduce the issue? Yes, for the unnecessary import: current main's model-selection loader reaches transcript.js through the resolver facade. Source establishes that path; runtime timing and the baseline negative control were not executed in this review. Is this the best way to solve the issue? Yes. Redirecting the existing facade to the unchanged pure helper repairs the import boundary without adding another implementation, changing stored settings, or modifying transcript persistence. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against c1c870a41755. LabelsLabel 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 (4 earlier review cycles)
|
|
Merged via squash.
|
…penclaw#149079) * fix(agents): avoid loading transcript storage during model selection * fix(agents): complete transcript resolver import cutover
Related: #148962
What Problem This Solves
Model selection loads transcript storage just to resolve a session routing token, pulling an unrelated runtime graph into cold agent startup.
User Impact
Session routing and entry selection stay unchanged. Resolving them no longer initializes the broader transcript storage module; the startup timing improvement still needs measurement.
Why This Change Was Made
The lazy resolver now exports the existing pure helper directly. A regression test rejects loading the broad transcript module while checking explicit-entry precedence, stored-entry fallback, and missing-entry behavior. The obsolete export from the broad transcript facade is removed, and the existing agent-session tests use the retained narrow facade.
Evidence
git diff --checkpassed. The export cutover received fresh scoped autoreview with no actionable finding.6525b22e4f97710bf94f62e061a1f76cd785b58f: hosted CI observed the new resolver regression passing, transcript sibling tests passing, and the build passing. The aggregate failed, including an unused broad-facade export now repaired here.b0688814d6b0b4ae4a991bd0c5f9174d702dcdbeand tested as merge carrierf81d2a2cc8e688db5e626c5d39d363eb8a394cc8, failed nine PR-wrapper alias fixture cases. Their fake Node executable intercepted dependency materialization before the intended supervisor handoff. The fixture and wrapper inputs were inherited unchanged from main; this job did not establish a transcript-resolver failure.939dd149bced5f6576f5fe4976d9fa8e40cc4b8c, including the canonical alias-fixture composition from fix(ci): restore PR alias delegation checks #149488 and fix(test): restore alias checks after duplicate dependency setup #149477, plus the idempotent helper follow-through in test(gateway): stabilize yielded-session settlement #149558. No duplicate fixture patch was added here. The four-file feature diff is byte-identical after this reviewed integration. Exact-head CI 35049966517, attempt 1 completed successfully: 139 unique jobs, 122 passed and 17 skipped, with no failures. The required CI gate, build and protocol checks passed. Native hosted qualification is the final landing step.Current signed head:
bcc1df36ea599153cf8232944a6abbf841fa89fd. The earlier fixture line-cap repair from #149423 remains incorporated. Source review was reused only for the unchanged feature patch; prior failed CI is retained as provenance, not current-head proof. No assertion or timeout change was made.