8000 fix(agentcore): preserve execution lifecycles and bound session reads by Fodesu · Pull Request #134 · felinics/twilight · GitHub
[go: up one dir, main page]

Skip to content

fix(agentcore): preserve execution lifecycles and bound session reads - #134

Merged
Fodesu merged 2 commits into
mainfrom
integration/agentcore-runtime
Oct 20, 2026
Merged

Fodesu merged 2 commits into
mainfrom
integration/agentcore-runtime

Conversation

@Fodesu
@Fodesu Fodesu commented Oct 20, 2026
Copy link
Copy Markdown
Member

Accepted executions can be interrupted when an activation's context ends. A preparation deadline can also expire while the independently bounded Start RPC is still running, preventing its definitive result from being persisted. Session pagination currently decodes more history than the requested page needs.

This change:

  • Keeps accepted preparation under the Worker lifecycle, preserves caller cancellation for Start RPCs already in flight, and records Start results independently of the preparation deadline. Transient writes retry settlement without dispatching the execution again.
  • Closes new progress subscriptions for executions already settled by another replica, while preserving buffered local frames.
  • Bounds Session reads using complete commit indexes, falls back when indexes are missing or lagging, and decodes only selected log spans. Reuses validated indexes on clean handoff and avoids fsync for rebuildable index/projection files.

Validation:

  • go test ./agentcore/... -short -race -count=1 -timeout=120s
  • go vet ./agentcore/...
  • GOTOOLCHAIN=go1.26.5 golangci-lint run ./agentcore/... — 0 issues
  • Regression coverage for cancellation, shutdown, preparation timeout with successful/rejected Start, transient settlement failures, remote terminal progress, indexed pagination parity, and rebuilding derived files after restart.

@Fodesu
Fodesu added this pull request to stack #136 October 20, 2026 13:36
@Fodesu
Fodesu merged commit 25bdcfe into main Oct 20, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

0