Repository navigation
fix: keep image compression policy consistent during plugin reloads - #125182
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Codex review: needs maintainer review before merge. Reviewed August 17, 2026, 6:46 AM ET / 10:46 UTC. ClawSweeper reviewWhat this changesThe PR carries the admitted run’s prepared model runtime through image compression and static model-catalog fallback resolution so plugin reloads cannot mix generations. Regression provenancePossible regression — probable (reproduction; reviewed change). No predecessor PR is attributed. Merge readinessKeep open for explicit maintainer handling: the supplied head fixes a source-proven lifecycle-generation gap, while the protected maintainer label and in-progress exact-head checks preclude an automated close or merge verdict. Priority: P2 Review scores
Verification
How this fits togetherImage preprocessing obtains compression limits from the selected model before media is sent to the agent tool flow. Plugin reloads replace process metadata, so an admitted run must retain its prepared metadata generation across model fallbacks. flowchart LR
A[Admitted agent run] --> B[Prepared model runtime]
B --> C[Image compression policy]
C --> D[Model resolution]
D --> E[Static catalog fallbacks]
E --> F[Image preprocessing]
G[Plugin reload] --> H[Replacement metadata generation]
Decision needed
Why: The protected maintainer label requires an explicit maintainer merge decision even though the supplied patch addresses the prior blocker. Before merge
Agent review detailsSecurityNone. PR surfaceSource -2, Tests +49. Total +47 across 7 files. View PR surface stats
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. Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Retain one caller-owned prepared runtime through every image compression resolver path, then merge only after exact-head validation confirms the lifecycle regression remains covered. Do we have a high-confidence way to reproduce the issue? Yes, from source: current main’s static fallback at Is this the best way to solve the issue? Yes, based on the supplied diff: propagating the existing prepared runtime through both catalog fallbacks fixes the owner boundary without adding an image-specific cache, fallback, or lifecycle owner. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 0bc877e88918. LabelsLabel 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)
|
|
Verification for
Live-proof classification: deterministic internal lifecycle owner boundary. There is no external API, channel, UI, config, protocol, storage, or dependency surface; the controlled real-resolver generation-swap regression is the strongest relevant proof. |
|
Merged via squash.
|
…penclaw#125182) * fix: keep image compression policy consistent during plugin reloads * fix: pin model static fallbacks to prepared metadata
Related: #125090
What Problem This Solves
Fixes an issue where image preprocessing could combine compression limits from two plugin lifecycle generations when an admitted agent run overlapped a plugin metadata refresh. The run's augmentation decision stayed on its prepared generation, but static model metadata could be read from the replacement generation.
Why This Change Was Made
The complete compression-policy path now carries the caller-owned prepared model runtime. Direct static catalog resolution and hook-aware model resolution both consume that exact generation, with no new cache, fallback, compatibility path, or image-specific lifecycle owner. The original ClawSweeper P1 was addressed at the model-resolution owner: both internal static fallbacks now consume the prepared metadata snapshot, and the lifecycle regression exercises the real resolver rather than a stub.
User Impact
Image compression remains consistent with the model and plugin generation admitted for the run during reload overlap. There is no config, API, protocol, storage, or dependency change.
Evidence
e04402ce6095with generation B (maxBytes: 2000000,preferredSidePx: 2560,tokenMode: provider) instead of generation A (1000000,1280,detail).node scripts/run-vitest.mjs src/agents/tools/image-tool.test.ts— 101 passed.node scripts/check-changed.mjsrun — core and coreTests passed, including format, production/test type checking, lint, dead exports, guards, and import cycles.git diff --checkpassed.AI-assisted: yes. The code, lifecycle ownership, and proof were reviewed and understood before publication. Agent transcript omitted by default.