Skip to content

fix(workflow): render agent prompts and publish final answers - #182

Merged
EricWvi merged 3 commits into
ora-space:mainfrom
ElephantGit:fix/676-agent-output-template
Oct 27, 2026
Merged

EricWvi merged 3 commits into
ora-space:mainfrom
ElephantGit:fix/676-agent-output-template

Conversation

@ElephantGit

@ElephantGit ElephantGit commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

Agent prompts now resolve variable templates before dispatch, and successful session settlement publishes the initial turn's final complete assistant message as the node's output root. Named Output bindings and the linked IssueRun message can therefore carry the actual answer. Session evidence is stored separately in sessionEndReason; terminal historical runs are not backfilled.

The implementation reads durable assembled history for the current node attempt and initial turn, excludes failed/cancelled or unrelated turns, preserves committed output when the run is cancelled, and rejects truncated history. First dispatch and retry use the scoped variable pool used by conditions, including loop/iteration inputs.

Rebased onto main a4dfee1 after #179 merged. Compared with the previously validated b327040 candidate, this retains main's Output upgrade-compatibility documentation, container failure policy, state-budget enforcement, and timeout drain barriers. An additional fix keeps drain diagnostics in sessionEndReason instead of Agent output roots and preserves Agent failure diagnostics in run-level errors. Loop/iteration timeout tests now assert that both live and archived states have no output root. This PR adds no migrations.

Validation: PostgreSQL-backed workflow regressions, the full Go race suite, formatting, Go lint (0 issues), and OpenAPI regeneration consistency passed locally. All new-head CI checks passed: frontend, packages, four integration shards, and the final complete/disjoint coverage aggregate. CI proto lint, breaking-change detection and generation drift checks passed (local generation could not reach the remote plugin service). The frontend generated-client diff remains comments only.

ADR: implements the existing variable-root and execution-context obligations in specs/decisions/cloud/workflow/0-cloud-side-scheduler-owns-workflow-execution.md, whose status remains implemented. It adds no architectural decision and preserves the approved loop/iteration ownership and cancellation semantics. A separate specs follow-up under the parent task will remove the known-gap note and synchronize core-case evidence after review and acceptance; this PR does not prematurely change that evidence.

Real-model acceptance passed for b327040 before this rebase. That result is not acceptance of the new head. Full post-merge main acceptance remains assigned to the existing follow-up.

Refs ora-space/circus#676

@ElephantGit
ElephantGit force-pushed the fix/676-agent-output-template branch from b327040 to 42b1b91 Compare October 27, 2026 02:22
@ElephantGit
ElephantGit marked this pull request as ready for review October 27, 2026 02:29

@EricWvi EricWvi left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

owner review: 模板渲染、最终回答写入与 sessionEndReason 分离核对通过。

@EricWvi
EricWvi merged commit f433499 into ora-space:main Oct 27, 2026
7 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.

2 participants