Sprint 220: Reduce invocation visibility latency safely — merge feature/CODUX-220-reduce-invocation-visibility-latency-safely into dev - #3038
Merged
numnx merged 16 commits intoJul 13, 2026
Conversation
…ex-bfd3a5ce-mrjhy2ra (CODUX-220) Guard Chat against optimistic invocation records
…ex-05a308d8-mrjhy09h (CODUX-220) Create early CLI execution audit rows
…ex-027f723b-mrjhy1ad (CODUX-220) Refresh the Stats invocation ledger realtime
…ex-d591266c-mrjjhe7r (CODUX-220) Reuse execution rows for provider telemetry
…ex-959d9fba-mrjkhzjm (CODUX-220) Settle preparation failures and recovery
…ex-63718b36-mrjl51cu (CODUX-220) Document preparation-phase invocation visibility
…ex-8b4ed5cd-mrjl52g1 (CODUX-220) Add end-to-end invocation lifecycle acceptance
numnx
deleted the
feature/CODUX-220-reduce-invocation-visibility-latency-safely
branch
July 13, 2026 19:28
Merged
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.
🚀 Sprint Completion: Sprint 220 · Reduce invocation visibility latency safely
📋 Summary
Sprint: Sprint 220 · Reduce invocation visibility latency safely Tasks: 7/7 completed
🧭 Planning
gpt-5.6-lunaIncluded usage estimate (subscription/local login): $0.77
🎯 Original Sprint Prompt
Outcome
Make CLI coding invocations become visible in the server-backed Invocations surfaces as soon as the workflow has safely entered its cancellable preparation phase, while preserving honest provider telemetry and avoiding duplicate or frontend-only placeholder records. Also make the Stats → System invocation ledger refresh when execution state changes.
Investigation evidence
Recent local telemetry for 500 CLI task-coding runs showed:
The dominant delay is therefore lifecycle placement:
CliWorkflowServicefinishes branch/worktree preparation beforeProviderExecutionServicecreatesexecution_invocations. Chat → Invocations is already driven by the lightweightproject.execution.updatedchannel, while Live uses an intentional heavier 5-second snapshot throttle and Stats → System currently has no realtime invalidation.Required backend behavior
execution_invocationsrow earlier in the workflow, after the active dispatch cancellation handle is registered and beforecli_prepare_started/executePrepareStagebegins.ProviderExecutionService.executeProvider({ invocationId })path. Provider execution must reuse that row, append/refresh its transcript, and link the realprovider_invocationsusage row when the provider slot is claimed.provider_invocations.started_at, concurrency accounting, and provider duration semantics anchored to the actual provider claim/run phase. Do not create fake provider usage rows during workspace preparation.finishedAt, diagnostic fields, and a concise system transcript rather than stranded as running.Required dashboard behavior
project.execution.updatedandsnapshot_requiredfor the selected project.Tests
Add focused deterministic coverage for:
ProviderExecutionService;project.execution.updatedandsnapshot_required;Update integration coverage for success, validation/failure, and cancellation/error paths where contracts change. Keep tests deterministic and do not lower coverage thresholds.
Documentation and quality
docs/architecture/execution-invocation-tracking.md, the affected dashboard/realtime documentation, and matchingdocs-web/pages so the documented lifecycle matches code.dev; do not commit directly todevormain.pnpm run lint, relevant backend and dashboard Vitest suites, andpnpm run build; runpnpm run ciwhen feasible.Acceptance criteria
✅ Task Checklist
codex(PR)codex(PR)codex(PR)codex(PR)codex(PR)codex(PR)codex(PR)👥 Provider Breakdown
7 by codex
⏱️ Sprint Timing
📊 Aggregate CLI Token Usage
Included usage estimate (subscription/local login): $38.95
🕵️ QA Review Summary
Outcome: pass
Sprint-focused lifecycle tests, full dashboard tests, E2E, docs sync, lint, and build pass. The only broader backend failure is an unrelated Docker-dependent test blocked by
spawn docker ENOENT.🌿 Branch Info
Base:
devHead:
feature/CODUX-220-reduce-invocation-visibility-latency-safely🤖 Generated by Code UX