Repository navigation
Conversation
… delivery, and refactor automations - Distinguish unsupported Core sessionActivity from authoritative idle/running/background observations in AgentClient (honoring replace semantics where no update yet = idle). - Fall back to SessionActivePresence lateActivity for agents without sessionActivity in MessageHandler, aligning automations with GC and turn completion, and wake session-blocked receipts immediately when native work becomes idle. - Surface non-busy blocked Auto delivery receipts as stalled (request_blocked + blockReason) in shared schema, delivery policy, and SessionAutoDeliveryNote UI. - Decompose workspace-legacy, session-actions-legacy, and ledger schema/migrations into focused collaborators while preserving SQL query plans and transaction boundaries. Model: gemini-4-neon-high
…ighten types and tests - Collapse 8 shallow wrapper modules back into cohesive deep owners (authorization.ts, session-actions-legacy.ts, policies/delivery.ts, runtime/managed-runs.ts, control/commands.ts) and unify native work observation in AgentClient/MessageHandler. - Harden Effect v4 lifecycle: promote ManagedRunsService to a scoped Layer with LIFO teardown before ledger.close(), share the wake queue via Layer.unwrap to remove startup races, migrate command routing and DeliveryCoordinator to Effect.fn/Effect.gen with explicit lock order, and gate all workspace boundary calls during close(). - Harden ledger.wakeSessionBlocked to wake all waiting states, preserve the MAX_SAFE_INTEGER capacity-push sentinel, and bump capacityWakeRevision to prevent stale backoff overwrites. - Enforce invariants via discriminated unions on SessionAutoDelivery, ConditionObservation, ActionAuthorization, and DeliveryStepDecision, and document remaining runtime invariants in automations AGENTS.md/README. - Tighten tests to pure unit and real-boundary integration coverage. Model: gemini-4-neon-high
Model: gemini-4-neon-high
…ope, and dead code - Add target_input_pending to SESSION_BUSY_BLOCK_REASONS (moved to storage/schema.ts to decouple policies/delivery.ts from session-automation-authority.ts) and add a 60s grace window (DELIVERY_TRANSIENT_BLOCK_GRACE_MS) for transient/unconfirmed blocks so normal retries do not flash stalled status or sidebar alerts. - Narrow ledger.wakeSessionBlocked to state = 'blocked' receipts with session-busy reasons so quota estimatedReset/sentinel and waiting not_before timers are never spuriously woken or timestamp-bumped. - Re-read fresh SessionMeta after await deps.capacity() in authorizeAutomationReceipt instead of reusing pre-refresh meta. - Remove unreachable SessionNativeActivity 'unknown' / native_activity_unobserved code path and dead locale entries; format popover blockReason with localized labels. - Add implemented EN/ZH Agent Note documenting the shared native-work contract, 30s non-reporting trade-off, idle wake scope, and 3-tier blocked delivery surfacing. Model: gemini-4-neon-high
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
native_activity_unobserveddeadlock for Auto delivery & Merge archiveAgentClient.getNativeActivityObservation()now distinguishes'unsupported'(agents that do not advertise CoresessionActivityv1, such as Antigravity, Codex, Kimi, Pi) from authoritative'idle' | 'running' | 'background'(defaulting to'idle'before the first update under CoresessionActivityv1 replace semantics).MessageHandlerfalls back toSessionActivePresence.native.hasLateActivity(sessionId)for'unsupported'agents (matching GC and turn-completion semantics), and wakes session-blocked automation receipts immediately whenonNativeWorkChangedtransitions tonullviaAutomationLedger.wakeSessionBlocked.blockedAuto delivery receipts in UIrequest_blockedtoSessionAutoDeliveryStallReasonand optionalblockReasontoSessionAutoDelivery.policies/delivery.tskeeps normal busy waits (session_work_active,queue_pending,native_work_active, etc.) in the active step state while surfacing otherblockedreceipts as reversiblestalled(request_blocked+blockReason) instead of silently staying onMerging.SessionAutoDeliveryNoteanden/zh_CNlocales to render human-readable block reasons and a popover diagnostic row.apps/cli/src/automations/DeliveryCoordinator,conditions/evaluator.ts,runtime/wait-evaluator.ts,control/command-handler.ts, andcontrol/remote-control.tsout ofworkspace-legacy.ts(989 -> 360 lines).session-actions-legacy.ts(760 -> 160 lines) intoarchive-action.ts,compact-action.ts,invoke-action.ts, and unified sync/async receipt authorization inactions/authorization.ts.storage/schema.tswithout changing indexes, query plans, or cross-table transactions, and removes policy-name hardcoding fromengine.tswokeDuringCheck.Verification
pnpm format,pnpm check:quick(oxlint, boundary guards, i18n check, comment ratchet),pnpm check:typecheck(all 24 workspace packages), andpnpm run docs checkall passed.apps/cliautomation & agent suites: 6 files / 128 tests passed (includingEXPLAIN QUERY PLANratchet, v2->v4 migration, 200-run Auto delivery property test, blocked-delivery surfacing, and immediate idle wake).packages/componentsAuto delivery UI suites: 2 files / 19 tests passed.