Repository navigation
refactor(gateway): remove workspace plugin generation projections - #125990
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Codex review: found issues before merge. Reviewed August 18, 2026, 4:29 PM ET / 20:29 UTC. ClawSweeper reviewWhat this changesThis PR removes workspace-derived plugin-generation projections and passes the Gateway-admitted plugin generation through reply execution and post-turn compaction. Merge readiness⛔ Blocked by patch quality or review findings - 7 items remain Keep open: this focused follow-up is not on current main, but it regresses enabled workspace-origin plugins for Gateway replies whose reply workspace differs from the configured agent workspace. Priority: P1 Review scores
Verification
Live VerificationCommand: Result: FAIL (partial) — step 3 Assertions:
How this fits togetherGateway startup publishes plugin metadata for configured agents; reply and compaction paths later acquire prepared runtimes to run models and plugins. The change makes that generation explicit across those downstream paths. flowchart LR
A[Gateway startup] --> B[Published plugin generation]
B --> C[Admitted agent turn]
C --> D[Reply workspace]
C --> E[Post-turn compaction]
D --> F[Prepared runtime lease]
E --> F
F --> G[Plugin and model execution]
Decision needed
Why: Current behavior and documentation support that workspace contract, while this refactor intentionally removes the mechanism that distinguishes such workspaces; the replacement ownership model needs maintainer direction. Before merge
Findings
Agent review detailsSecurityNone. PR surfaceSource -139, Tests -51, Other -1. Total -191 across 19 files. View PR surface stats
Review metrics
Stored data modelPersistent data-model change detected: Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Preserve the documented workspace-plugin behavior by selecting a workspace-appropriate generation at an explicit lifecycle/admission boundary, then carry that fact through reply execution without request-time discovery. Do we have a high-confidence way to reproduce the issue? Yes: current main explicitly avoids reusing the configured generation when a different reply workspace has a plugin root, while the branch always supplies that generation; an enabled workspace plugin exercises the divergent path. Is this the best way to solve the issue? No: the explicit carrier is appropriate for pluginless cross-workspace replies, but it bypasses the existing workspace-plugin contract instead of giving that workspace an owner-bound generation. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against a57d9b506081. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
|
Land-ready verification for exact head
Commands run: node scripts/run-vitest.mjs src/auto-reply/reply/get-reply-run.prepared-metadata.test.ts src/auto-reply/reply/get-reply.config-override.test.ts src/auto-reply/reply/dispatch-from-config.test.ts src/agents/command/cli-compaction.test.ts src/agents/agent-command.compaction-rotation.test.ts src/agents/prepared-model-runtime.lifecycle.test.ts src/agents/prepared-model-runtime.plugin-context.test.ts src/plugins/plugin-metadata-snapshot.test.tsnode scripts/run-vitest.mjs src/agents/prepared-model-runtime.inbound-registry.test.tspnpm buildpnpm lint:corepnpm check:database-first-legacy-stores && pnpm check:media-download-helpers && pnpm check:runtime-sidecar-loaders && pnpm check:import-cycles && pnpm lint:webhook:no-low-level-body-read && pnpm lint:auth:no-pairing-store-group && pnpm lint:auth:pairing-account-scopeThe first CI attempt hit GitHub 429s while downloading Proof gap: this cleanup has not yet been deployed independently. The underlying event-loop repair from #125596 is already live and measured; after merge, I will deploy this final cleanup and repeat the production soak before closing #125595. |
|
Merged via squash.
|
…enclaw#125990) * refactor(agents): remove workspace plugin generation projections * test(agents): pass explicit generation in auth refresh
Related: #125595
Follow-up to #125596
What Problem This Solves
Fixes the remaining ownership ambiguity after the Gateway event-loop stall repair: reply and post-turn compaction paths could still infer or project plugin metadata from an agent workspace instead of carrying the Gateway generation that admitted the turn.
Why This Change Was Made
Gateway reply execution and native-harness compaction now receive the exact published plugin generation explicitly. With those callers migrated, this deletes the workspace-root probe, cross-workspace metadata projection, and configured-owner inference fallback while preserving standalone cold discovery, including the shipped workspace plugin contract.
This is an AI-assisted maintainer follow-up to the active production incident repair.
User Impact
No new configuration or user workflow is introduced. Gateway turns keep one lifecycle-owned plugin generation through reply execution and compaction, and request-time code has fewer paths that can rediscover plugin metadata on the event loop.
Production code shrinks by 142 lines; tests and support shrink by 44 lines.
Evidence
pnpm build: passed in 6m03.8s; the subsequent commit changed only the retained regression test.pnpm lint:core: passed.