Repository navigation
fix(gateway): retain observer slots until model work settles - #174262
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: needs changes before merge. What this changesRetain observer model-work reservations through physical completion and cleanup, then resume waiting observer states. Example: Six observer requests are active when session-0 is evicted and session-6 requests a digest.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Merge readiness⛔ Needs changes before merge - 1 item remains Keep this PR open: it addresses a current observer resource-accounting defect, and source review found no definite introduced bug; GitHub reports a conflict and the PR remains a draft. Priority: P2 Before merge
FindingsNone. Tests
Agent review detailsHow this fits togetherThe Gateway observer consumes agent activity and subscription state, runs bounded utility-model assessments, and publishes and persists session digests. flowchart TD
A[Agent activity and subscriptions] --> B[Observer lifecycle]
B --> C[Logical model selection]
C --> D[Physical reservations]
D --> E[Completion and owned cleanup]
E --> F[Digest publication and persistence]
E --> G[Release capacity and resume waiting states]
Technical reviewBest possible solution: Keep physical reservations with the existing slot owner and join digest-owned cleanup before releasing capacity. Do we have a high-confidence way to reproduce the issue? Source shows that aborting or evicting a logical observer can admit replacement work while the original completion or tracked cleanup remains active; no target code was executed during this review. Is this the best way to solve the issue? The repair uses the existing reservation and async-work owners, preserves publication checks, and avoids polling or a second scheduler. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 8114ddb5ce62. Provenance checked
TestingProof path: none. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceSource +40, Tests +244. Total +284 across 7 files. Added test files: 1. View PR surface stats
Review metrics
LabelsLabel changes:
Label justifications:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
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 October 16, 2026, 9:57 AM ET / 13:57 UTC. |
54d962f to
70707a1
Compare
|
Merged via squash.
|
…158510 * commit '236ceb85e92ac8cb5bdc58a4a70bd79cbebd1094': (24 commits) feat(decisions): run typed tasks with prepared model credentials (#157225) fix(gateway): retain observer slots until model work settles (#174262) refactor(ui): own assistant content subscriptions in Solid (#174035) refactor(logging): remove package and snapshot debug instrumentation (#174431) fix: show native Talk speech separately from completed answers (#172598) test(ui): forbid new controller host consumers (#174446) chore(deps): refresh dependencies with a seven-day cutoff (#174410) perf(ui): reduce idle native session catalog polling (#174404) refactor(test): remove unused Signal fixture overrides (#174445) fix: surface DNS zone and Linux camera read failures (#174424) fix(doctor): keep at most three standalone Doctor captures (#174415) perf(cron): reuse session writer for completed run alias cleanup (#174413) feat(database): legacy SQLite migrations complete before PostgreSQL port (#174399) perf(channels): avoid rereading ingress queue mutations (#174393) feat(control-ui): keep link readers scoped to their pane session (#173652) test(ui): wait for desktop widget placement before pinning (#174439) refactor(ui): compose remaining plugin classes (#174441) perf(control-ui): shrink transcript overscan and settle skipped row sizes synchronously (#173690) fix(sessions): quietly settle archived delivery endpoints (#174442) perf(sessions): keep config loading out of transcript workers (#174414) ...
…esafe-decision-native * commit '236ceb85e92ac8cb5bdc58a4a70bd79cbebd1094': (24 commits) feat(decisions): run typed tasks with prepared model credentials (#157225) fix(gateway): retain observer slots until model work settles (#174262) refactor(ui): own assistant content subscriptions in Solid (#174035) refactor(logging): remove package and snapshot debug instrumentation (#174431) fix: show native Talk speech separately from completed answers (#172598) test(ui): forbid new controller host consumers (#174446) chore(deps): refresh dependencies with a seven-day cutoff (#174410) perf(ui): reduce idle native session catalog polling (#174404) refactor(test): remove unused Signal fixture overrides (#174445) fix: surface DNS zone and Linux camera read failures (#174424) fix(doctor): keep at most three standalone Doctor captures (#174415) perf(cron): reuse session writer for completed run alias cleanup (#174413) feat(database): legacy SQLite migrations complete before PostgreSQL port (#174399) perf(channels): avoid rereading ingress queue mutations (#174393) feat(control-ui): keep link readers scoped to their pane session (#173652) test(ui): wait for desktop widget placement before pinning (#174439) refactor(ui): compose remaining plugin classes (#174441) perf(control-ui): shrink transcript overscan and settle skipped row sizes synchronously (#173690) fix(sessions): quietly settle archived delivery endpoints (#174442) perf(sessions): keep config loading out of transcript workers (#174414) ...
…/decision-tool-v2-proof-20261016 * commit '236ceb85e92ac8cb5bdc58a4a70bd79cbebd1094': (24 commits) feat(decisions): run typed tasks with prepared model credentials (#157225) fix(gateway): retain observer slots until model work settles (#174262) refactor(ui): own assistant content subscriptions in Solid (#174035) refactor(logging): remove package and snapshot debug instrumentation (#174431) fix: show native Talk speech separately from completed answers (#172598) test(ui): forbid new controller host consumers (#174446) chore(deps): refresh dependencies with a seven-day cutoff (#174410) perf(ui): reduce idle native session catalog polling (#174404) refactor(test): remove unused Signal fixture overrides (#174445) fix: surface DNS zone and Linux camera read failures (#174424) fix(doctor): keep at most three standalone Doctor captures (#174415) perf(cron): reuse session writer for completed run alias cleanup (#174413) feat(database): legacy SQLite migrations complete before PostgreSQL port (#174399) perf(channels): avoid rereading ingress queue mutations (#174393) feat(control-ui): keep link readers scoped to their pane session (#173652) test(ui): wait for desktop widget placement before pinning (#174439) refactor(ui): compose remaining plugin classes (#174441) perf(control-ui): shrink transcript overscan and settle skipped row sizes synchronously (#173690) fix(sessions): quietly settle archived delivery endpoints (#174442) perf(sessions): keep config loading out of transcript workers (#174414) ...
…157433 * commit '3dd7f576829fd8ec1fd395acb59f3d4f9e999166': (24 commits) feat(decisions): run typed tasks with prepared model credentials (#157225) fix(gateway): retain observer slots until model work settles (#174262) refactor(ui): own assistant content subscriptions in Solid (#174035) refactor(logging): remove package and snapshot debug instrumentation (#174431) fix: show native Talk speech separately from completed answers (#172598) test(ui): forbid new controller host consumers (#174446) chore(deps): refresh dependencies with a seven-day cutoff (#174410) perf(ui): reduce idle native session catalog polling (#174404) refactor(test): remove unused Signal fixture overrides (#174445) fix: surface DNS zone and Linux camera read failures (#174424) fix(doctor): keep at most three standalone Doctor captures (#174415) perf(cron): reuse session writer for completed run alias cleanup (#174413) feat(database): legacy SQLite migrations complete before PostgreSQL port (#174399) perf(channels): avoid rereading ingress queue mutations (#174393) feat(control-ui): keep link readers scoped to their pane session (#173652) test(ui): wait for desktop widget placement before pinning (#174439) refactor(ui): compose remaining plugin classes (#174441) perf(control-ui): shrink transcript overscan and settle skipped row sizes synchronously (#173690) fix(sessions): quietly settle archived delivery endpoints (#174442) perf(sessions): keep config loading out of transcript workers (#174414) ...
…/decision-onnx-v2-proof-20261016 * commit '3dd7f576829fd8ec1fd395acb59f3d4f9e999166': (24 commits) feat(decisions): run typed tasks with prepared model credentials (#157225) fix(gateway): retain observer slots until model work settles (#174262) refactor(ui): own assistant content subscriptions in Solid (#174035) refactor(logging): remove package and snapshot debug instrumentation (#174431) fix: show native Talk speech separately from completed answers (#172598) test(ui): forbid new controller host consumers (#174446) chore(deps): refresh dependencies with a seven-day cutoff (#174410) perf(ui): reduce idle native session catalog polling (#174404) refactor(test): remove unused Signal fixture overrides (#174445) fix: surface DNS zone and Linux camera read failures (#174424) fix(doctor): keep at most three standalone Doctor captures (#174415) perf(cron): reuse session writer for completed run alias cleanup (#174413) feat(database): legacy SQLite migrations complete before PostgreSQL port (#174399) perf(channels): avoid rereading ingress queue mutations (#174393) feat(control-ui): keep link readers scoped to their pane session (#173652) test(ui): wait for desktop widget placement before pinning (#174439) refactor(ui): compose remaining plugin classes (#174441) perf(control-ui): shrink transcript overscan and settle skipped row sizes synchronously (#173690) fix(sessions): quietly settle archived delivery endpoints (#174442) perf(sessions): keep config loading out of transcript workers (#174414) ...
…w#174262) * fix(gateway): retain observer slots until model work settles * test(gateway): await observer settlement boundaries * test(gateway): join dormant terminal publication * test(gateway): type observer persistence mock as async
What Problem This Solves
Session observer work can outlive a logical timeout, eviction, or replacement, allowing another request to reuse its slot before work and cleanup physically settle.
User Impact
The existing model-work limit holds through physical settlement. Canceled late results remain unpublished; waiting observers resume only when capacity is released.
Why This Change Was Made
Separate physical reservations from the logical observer-state map. Each digest has its own async-work scope, drained before releasing its reservation. Disposal waits for owned work without waiting on a shared parent scope.
No new configuration, timeout, concurrency default, route, or persistence schema. Abort-ignoring work retains capacity until settlement rather than allowing overlapping replacement work.
Evidence
3cf474d3d12faf0fa0bf2076180ce55893d9f071. Exact-head CI completed successfully: 36 successful jobs, 26 skipped, no failures. The tested merge wasab32ffe66a9af178e1b24cb641769b2684fe245dintocfc5fcf02b6b1d5ff72b4fdfce4f82e9a982371a.runWithAsyncWorkResourcesandtrackAsyncWorkimplementations. Standalone shared async-work scope/resources suites were not selected; no standalone execution is claimed. Their implementation is unchanged.54d962f0a8c82f83a6b4e87e1b45c3914691e726; its conflict resolution preserves main's utility-completion test setup. Production delta is +40 lines for physical ownership and cleanup joining; tests are counted separately.