8000 refactor(agentcore): persist input routing and enforce runtime invariants by Fodesu · Pull Request #133 · felinics/twilight · GitHub
[go: up one dir, main page]

Skip to content

refactor(agentcore): persist input routing and enforce runtime invariants - #133

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

Fodesu merged 4 commits into
mainfrom
integration/agentcore-runtime

Conversation

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

输入路由需要在重新打开 Session 后保持一致,有限次执行之间也需要延续输入提交、工具容量和响应重放的约束。本次将这些能力补齐到 AgentCore。

改动

  • 持久化输入 placement,并据此路由到当前或下一个 Turn;保留旧输入提交记录的读取兼容,重复 InputID 的内容或 placement 不一致时返回冲突。
  • 提供可组合到同一个 Session Writer 事务中的输入提交与撤回操作。
  • 工具调度计入此前已处于执行状态的调用,确保跨次执行仍遵守串行和 MaxParallel 限制;等待审批或外部响应的调用不占执行容量。
  • 提供中断恢复入口,并完善工具审批、拒绝及外部响应处理;相同响应可幂等重试,内容或决策变化时返回冲突,包括重新取得 ownership 和 Turn 已结束的情况。
  • 补充运行时一致性测试,并更新 AgentCore 架构说明。

验证

  • go test ./agentcore/... ./agent/... -count=1 -timeout=180s
  • go vet ./agentcore/... ./agent/...
  • 再次运行 go test ./agentcore/... -count=1 -timeout=180s 和 go vet ./agentcore/...,均通过。
  • git diff --check 通过;未配置 DSN 的 PostgreSQL 集成测试跳过。

范围仅包含 agentcore/ 和 docs/architecture/core.md。

Closes TWI-20

Make input admission idempotent and reject conflicting identities inside atomic units. Add input withdrawal as a unit part and count executing tools against sequential and parallel scheduling capacity across finite activations.
@Fodesu
Fodesu merged commit 8701883 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