feat(session-ingest): persist owned browser jobs - #5644
Open
iscekic wants to merge 3 commits into
Open
Conversation
Contributor
Code Review SummaryStatus: No Issues Found | Recommendation: Merge Files Reviewed (2 files)
Previous Review Summary (commit f9acb72)Current summary above is authoritative. Previous snapshots are kept for context only. Previous review (commit f9acb72)Status: No Issues Found | Recommendation: Merge Files Reviewed (2 files)
Reviewed by grok-4.6 · Input: 127.3K · Output: 17.6K · Cached: 428.3K Review guidance: REVIEW.md from base branch |
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.
No new behavior — This level prepares browser tasks without enabling them.
Summary
createBrowserJobStoreprovides the dormantBrowserJobStorewith proof-bound ownership, deduplication, bounded queues and retention, immutable settlement, and fences that survive cleanup.BrowserStoreSocketbinds identity;BrowserStoreChange<T>returns committedBrowserStoreEffects, whileBrowserJobStoreErrorreports safe failures and explicit retryability.Callers must deliver effects and manage deadlines, expiration, and cleanup; dormant relay integration leaves existing callers and command records unchanged.
Files
services/session-ingest/src/dos/browser-job-store.ts— A (added); Source; 1,120 lines added, none removed. Proof hashes and payload fingerprints bind invocations to the user, parent, provider, conversation, and goal; identical retries only rebind delivery. Owned status, cancel, and recover requests return retained jobs; a missing recovery returns null without creating work. Each conversation permits one outstanding job, and each provider dispatches in queue order with one fence. The limits are 1,000 retained jobs and 32 providers per user, plus 100 queued jobs per provider. Invocations expire seven days after their embedded timestamp; timestamps more than five minutes ahead fail validation. Invoke and recovery reject expired invocations before lookup. Queue and execution deadlines last ten minutes, approval lasts two minutes, and provider leases last 15 seconds. Job deadlines respect invocation expiry. Socket nonces survive hibernation; generations and approved-tab checks reject stale or unrelated provider updates. Provider loss, running cancellation, uncertain results, and dispatched timeouts interrupt work without replay; new registrations never adopt older queued jobs. Settlement preserves the first result and removes the goal, while fingerprints retain deduplication. Cleanup removes expired terminal records and unused indexes; unresolved fences block dispatch and retain proof bindings until matching quiescence or recovery. Cancellation records survive cleanup, and deadline queries support external scheduling. Callers must deliver expiration effects before cleanup. Byte limits cover escaped text, routing, tab details, and full results; provider listings and current-generation heartbeat snapshots support pagination.Tests: 1 test file added —
services/session-ingest/src/dos/browser-job-store.test.ts(A; Test; 1,952 lines added, none removed), covering the owned-job ledger.Generated: 0 files changed.
Verification
Visual Changes
Visual Changes: N/A
Reviewer Notes
Human steps
Automated evidence
Repository scope
Kilo-Org/cloud:/Users/igor/Projects/.worktrees/browser-task-0787; branchbrowser-task-0787-s2, basebrowser-task-0787. This level adds two files: 3,072 added lines, no deletions.Kilo-Org/kilocode:/Users/igor/Projects/.worktrees/browser-task-0787-kilocode; branch and comparison basebrowser-task-0787. Its matching contracts have no additional changes in this comparison.Notes
Runtime verification remains pending on the stack tips. This level adds a dormant job ledger and does not enable browser delegation.
Stacked PRs — merge bottom to top. Each level shows only its own diff.
Runtime verification (E2E, user advocacy, simplify) runs on the tip PR over every level.
Every level keeps its own checks, its own bot review, and its own threads; each one is answered on its own PR.
Each level is its own deliverable: it builds and passes its own checks alone.
A finding on a level is repaired on that level, then carried upward with stack.sh forward.
browser-task-0787— feat(browser-task): define negotiated job contracts #5638browser-task-0787-s2— feat(session-ingest): persist owned browser jobs #5644 ← this PRbrowser-task-0787-s3— feat(session-ingest): route fenced browser providers #5648browser-task-0787-s4— feat(cloud-agent-sdk): support browser provider jobs #5653 (tip)