Repository navigation
fix: keep automation reads working across detached gateway calls - #198742
Conversation
Preserve service installation facts across lazy cron construction, operations, lifecycle calls, and detached scheduled runs without retaining request authority. Keep catalog test notifications in sequence to avoid an artificial reconnect. Co-authored-by: RomneyDa <[email protected]> Co-authored-by: vincentkoc <[email protected]>
|
🦞👀 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. What this changesPreserve Gateway installation facts across lazy cron operations and detached scheduled work, and keep catalog-test events ordered. Example: A Gateway initialized with installation root /fixture/service receives a detached cron.status request.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review Keep open: this maintainer-authored PR addresses a context-loss bug still present on main; no introduced correctness defect was found. Priority: P2 Before mergeNone. FindingsNone. Tests
Agent review detailsHow this fits togetherThe Gateway's lazy cron facade and scheduled-run wrapper connect detached requests and timers to cron services and SQLite workers, which enforce database admission and schema policy. flowchart TD
A[Gateway startup] --> B[Installation facts]
B --> C[Lazy cron facade]
B --> D[Scheduled run wrapper]
E[Detached requests and timers] --> C
E --> D
C --> F[Cron service]
D --> F
F --> G[SQLite worker owner]
Technical reviewBest possible solution: Keep installation-fact propagation in the existing cron and scheduled-run owners while preserving worker policy and request-authority checks. Do we have a high-confidence way to reproduce the issue? Source establishes that detached work drops installation context, cron reads recapture that context, and active worker reuse rejects mismatched policy; no target code was executed during this read-only review. Is this the best way to solve the issue? The patch fixes propagation at the existing ownership boundaries, reuses the installation context API, and preserves the worker's refusal policy rather than suppressing its error. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 2e77b6be8b67. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceSource +32, Tests +54. Total +86 across 5 files. Added test files: 0. View PR surface stats
Preflight sourceSource unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified. LabelsLabel changes:
Label justifications:
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment Reviewed November 14, 2026, 3:12 AM ET / 08:12 UTC. |
Backport 35ca716 (#198742). Preserve only service installation facts for lazy cron construction, operations, lifecycle and detached scheduling. Retain request-authority isolation and ordered catalog notifications. Proof: original real-Gateway catalog recovery passes on candidate and main; 18 focused tests, seven lifecycle consumer tests, targeted lint/typechecks and clean builds pass. Upstream exact-head CI 43573353703 completed successfully. Other release qualification failures remain open. Co-authored-by: RomneyDa <[email protected]> Co-authored-by: vincentkoc <[email protected]>
|
Merged via squash auto-merge.
|
…nclaw#198742) Preserve service installation facts across lazy cron construction, operations, lifecycle calls, and detached scheduled runs without retaining request authority. Keep catalog test notifications in sequence to avoid an artificial reconnect. Co-authored-by: RomneyDa <[email protected]> Co-authored-by: vincentkoc <[email protected]>
What Problem This Solves
Fixes cron reads failing after detached Gateway work loses the service installation context, including recovery in an open automation editor.
User Impact
Automation reads and scheduled work retain the Gateway installation they belong to. No configuration changes or migration are required.
Why This Change Was Made
Retain only service installation facts across lazy cron construction, cron operations and lifecycle calls, and detached scheduled work. Existing request-authority stripping and shared-state worker policy checks remain unchanged. The catalog recovery fixture now holds subsequent events in sequence instead of creating a protocol-gap reconnect.
Evidence
No visual design, release version, or performance-waiver change is included.