Skip to content

Add finalized orchestration summaries - #495

Draft
sepo-agent-app[bot] wants to merge 5 commits into
mainfrom
agent/implement-issue-452/codex-31434926660
Draft

Add finalized orchestration summaries#495
sepo-agent-app[bot] wants to merge 5 commits into
mainfrom
agent/implement-issue-452/codex-31434926660

Conversation

@sepo-agent-app

Copy link
Copy Markdown

Summary

  • publish or update a finalized orchestration note at terminal states
  • reuse live progress comments and mention human requesters
  • collapse trusted review artifacts after successful PR outcomes
  • document and test the finalized-comment lifecycle

Verification

  • npm --prefix .agent run build
  • node --test .agent/dist/__tests__/orchestrate-handoff-cli.test.js
  • npm --prefix .agent run check:workflow
  • node --test .agent/dist/__tests__/docs-validation.test.js
  • git diff --check

Closes #452

@sepo-agent-app

This comment has been minimized.

@sepo-agent-app

This comment has been minimized.

Comment thread .agent/src/cli/orchestrate-handoff.ts Outdated
Comment thread .agent/src/cli/orchestrate-handoff.ts Outdated
@sepo-agent-app

This comment has been minimized.

@sepo-agent-app

This comment has been minimized.

@sepo-agent-app

This comment has been minimized.

@sepo-agent-app

This comment has been minimized.

@sepo-agent-app

This comment has been minimized.

Comment thread .agent/src/cli/orchestrate-handoff.ts Outdated
Comment thread .github/workflows/agent-orchestrator.yml Outdated
@sepo-agent-app

This comment has been minimized.

@sepo-agent-app

This comment has been minimized.

@sepo-agent-app

This comment has been minimized.

@sepo-agent-app

This comment has been minimized.

@sepo-agent-app

This comment has been minimized.

Comment thread .agent/src/cli/orchestrate-handoff.ts
Comment thread .agent/src/progress-final-comment.ts
Comment thread .github/workflows/agent-orchestrator.yml
Comment thread .github/workflows/agent-orchestrator.yml
@sepo-agent-app

This comment has been minimized.

@sepo-agent-app

This comment has been minimized.

@sepo-agent-app

This comment has been minimized.

@sepo-agent-app

This comment has been minimized.

@sepo-agent-app

This comment has been minimized.

@sepo-agent-app

This comment has been minimized.

@sepo-agent-app

This comment has been minimized.

@sepo-agent-app

Copy link
Copy Markdown
Author

Sepo pushed fixes for this PR. Branch: agent/implement-issue-452/codex-31434926660. Requested by @sepo-agent.

  • Preserved validated planner summaries and successful cleanup when PR state changes during planning.
  • Omitted unknown elapsed time and made same-run progress publication trusted and idempotent.
  • Passed build, 138 focused runtime tests, 93 workflow checks, and git diff --check.

codex | gpt-5.6-sol | max | Macmini-runner-2

@sepo-agent-app

sepo-agent-app Bot commented Aug 11, 2026

Copy link
Copy Markdown
Author

Sepo is dispatching follow-up automation.

Source Next Target Round Status
fix-pr review PR #495 11 / 40 Dispatched

Reason: agent planner selected review: The fix-pr run succeeded, advanced the open mergeable PR from reviewed head 0566d05 to f3cee28, and the hosted check passed; the three targeted runtime fixes warrant current-head verification.

@sepo-agent-app

Copy link
Copy Markdown
Author

Rubrics Review

Total Score Verdict Rubrics Scored
97 PARTIAL 16
Dimension Rubric Result Score Evidence
coding_workflow / generic Validate delegated route authorization pass 8/8 The capability guard requires access to every enabled delegated route, with preflight and runtime enforcement.
coding_workflow / generic Separate decision gates from action authorization pass 8/8 The planner job is read-only; write operations belong to the deterministic resolver.
coding_workflow / generic Reuse existing code pass 8/8 Finalization reuses existing comment, footer, progress, handoff, authorization, and cleanup helpers in the typed orchestration CLI.
coding_workflow / generic Generate context-derived artifact metadata pass 7/7 The final-note formatter combines requester, planner summary, source outcome, target, round, reason, and run metadata.
coding_workflow / generic Prefer explicit structured inputs pass 7/7 Planner response, progress ID, stream, authorization, source state, requester, and model display remain separate resolver fields.
coding_workflow / generic Make user-facing automation idempotent pass 7/7 Publication now reuses the latest trusted same-run marker, with forged-marker and repeated-attempt coverage.
coding_workflow / generic Surface stateful failures pass 7/7 Deferred persistence and bundle-registration failures emit explicit workflow warnings; publication failures also exit visibly.
coding_workflow / generic Comment on accepted workflow stops pass 6/6 Terminal outcomes enter the finalized-comment path, including closed PRs and blocked decisions.
communication / generic Keep status comments compact pass 6/6 Final notes use one outcome heading, an optional summary, compact metadata bullets, and one next-step sentence.
coding_workflow / generic Keep docs in sync pass 7/7 Architecture and usage docs explain finalization, permission separation, persistence, progress reuse, cleanup, and failure fallback.
communication / generic Keep temporary migration notes out of durable docs partial 3/6 One-time legacy-marker migration remains in permanent architecture and workflow usage documentation.
coding_workflow / generic Make surgical changes pass 8/8 Changes are confined to orchestration runtime, necessary persistence extraction, focused tests, workflow wiring, and corresponding docs.
coding_style / generic Prefer simple implementations pass 7/7 The required security boundary uses narrow deterministic CLIs and existing helpers, without a new dependency or public configuration knob.
coding_workflow / generic Read docs and linked context first pass 6/6 The implementation follows the accepted issue #452 plan, including success-only cleanup and retention of blocked context.
coding_workflow / generic Leave release notes to release preparation pass 8/8 The changed files contain no changelog or release-note edits.
coding_workflow / generic Separate context from execution dependencies pass 7/7 The resolver stops dispatch when a PR becomes ineligible while preserving validated planner context, with closed/merged regressions.

Notes

  • Current head f3cee280 passes the hosted Test Scripts check and git diff --check.
  • Earlier authorization, state-change, duration, and same-run idempotency findings are resolved on this head.
  • Smallest useful follow-up: remove the two legacy-marker migration notes from durable docs while retaining the compatibility code and tests.

Findings

  • WARNING: The PR documents the one-time sepo-agent-orchestrate-stop migration in two permanent documentation pages, partially violating keep-temporary-migration-notes-out-of-durable-docs.

Final Rubric Verdict

PARTIAL


codex | gpt-5.6-sol[max] | Macmini-runner-4

@lolipopshock

Copy link
Copy Markdown
Contributor

@sepo-agent /answer why it become so big?

@sepo-agent-app

sepo-agent-app Bot commented Aug 11, 2026

Copy link
Copy Markdown
Author

It snowballed through the automated review/fix loop.

The original implementation was 7 files, +451/−60. A security review then required splitting the read-only planner from the write-authorized resolver. That introduced cross-job progress and session-state handling, followed by fixes for persistence, failure recovery, cleanup, and deduplication. Four follow-up commits grew it to 24 files, +2,019/−168.

The largest expansion was session persistence and artifact recovery at +640/−55. About 1,043 current additions—roughly half—are tests.

So the size is mostly an architectural hardening cascade, not the finalized-comment feature itself. In hindsight, the job-boundary/session-persistence refactor should likely have been separated into a prerequisite or follow-up PR instead of being absorbed into #495.


Sepo activity

Sepo finished — answer · 2m57s · 16 steps

Last message

It snowballed through the automated review/fix loop. The original implementation was 7 files, +451/−60. A security review then required splitting th…

Activity

  • 🔧 Used tool gh api repos/self-evolving/repo/commits/b41afca252e85b25292b4d6ab85f1730db3ad065 | jq '{sha:(.sha[0:8]),message:(.commi… (completed)
  • 🔧 Used tool gh api repos/self-evolving/repo/commits/850d2d84f28f199cf192881a9c46d76f7692f958 | jq '{sha:(.sha[0:8]),message:(.commi… (completed)
  • 🔧 Used tool gh api repos/self-evolving/repo/commits/f3cee28025994cae4bbb7a9640ce3324dc636967 | jq '{sha:(.sha[0:8]),message:(.commi… (completed)
  • 🔧 Used tool gh api repos/self-evolving/repo/commits/0566d05bc6349a91ceed42604ec0071333c1c424 | jq '{sha:(.sha[0:8]),message:(.commi… (completed)
  • 🔧 Used tool gh api repos/self-evolving/repo/commits/dd129eb3d245c859aaf49facae5d3bc11dcea280 | jq '{sha:(.sha[0:8]),message:(.commi… (completed)
  • 💬 Message "It snowballed through the automated review/fix loop. The original implementation was 7 files, +451/−60. A security review then required splitting th…"

codex | gpt-5.6-sol[max] | Macmini-runner-1

@lolipopshock

Copy link
Copy Markdown
Contributor

I don't understand.

why 0566d05 should be added in this chain of PRs?

@sepo-agent-app

sepo-agent-app Bot commented Aug 11, 2026

Copy link
Copy Markdown
Author

You’re right to question it: 0566d05b is not directly required by issue #452.

It entered through this cascade:

  1. Earlier fixes split orchestration into a read-only planner job and a write-authorized resolver job.
  2. Existing session persistence still tried to write from the now-read-only planner, so session state could be lost between orchestration rounds.
  3. Passing the planner response between jobs also introduced an artifact-transfer failure path that could skip the terminal comment entirely.
  4. The review on 850d2d84 classified those two regressions as blocking, so the automated chain dispatched /fix-pr, producing 0566d05b.

So 0566d05b repairs consequences of the earlier permission/job split; it does not implement finalized comments. If that split remains in #495, the commit is needed to avoid breaking session continuity. If #495 should stay focused on #452, the better boundary is to move the job split and 0566d05b together into a separate prerequisite/follow-up PR—not remove 0566d05b alone.


Sepo activity

Sepo finished — answer · 1m55s · 5 steps

Last message

You’re right to question it: 0566d05b is not directly required by issue #452. It entered through this cascade: 1. Earlier fixes split orchestrat…

Activity

  • 💬 Message "I’ll trace that commit back to the exact review finding that triggered it, then distinguish what was genuinely required for Consider adding a finalized comment at the end of orchestrator #452 from what was scope expansion."
  • ✏️ Edited gh api repos/self-evolving/repo/commits/0566d05bc6349a91ceed42604ec0071333c1c424 | jq '{sha,parent:.parents[0].sha,mess… (completed)
  • ✏️ Edited gh api --paginate repos/self-evolving/repo/issues/495/comments | jq '[.[] | select((.body | contains("850d2d84")) or (.… (completed)
  • ✏️ Edited gh api --paginate repos/self-evolving/repo/pulls/495/comments | jq '[.[] | select((.commit_id | startswith("850d2d84"))… (completed)
  • 💬 Message "You’re right to question it: 0566d05b is not directly required by issue Consider adding a finalized comment at the end of orchestrator #452. It entered through this cascade: 1. Earlier fixes split orchestrat…"

codex | gpt-5.6-sol | max | Macmini-runner-1

@lolipopshock

Copy link
Copy Markdown
Contributor

@sepo-agent /answer what's the lean, minimum design here?

@sepo-agent-app

Copy link
Copy Markdown
Author

AI Review Synthesis

Dual-agent review by Claude and Codex.
Requested by @lolipopshock.

Summary of PR/Issue

PR #495 implements issue #452 by publishing or updating one finalized orchestration note at terminal states. It preserves planner context, mentions human requesters, reuses progress comments, and collapses trusted automation artifacts after successful outcomes. Subsequent review rounds added a read-only planner/write-resolver split, deferred session persistence, and failure recovery. The current draft contains 24 changed files and remains open, mergeable, and passing checks.

Review

Both reviewers found no remaining correctness or security blocker on current head f3cee280. The sole actionable concern is a minor documentation-hygiene issue.

Issue Severity Description
One-time migration guidance remains in durable docs WARNING The architecture and workflow documentation permanently describe migration of the legacy sepo-agent-orchestrate-stop marker, although this is temporary upgrade guidance that will become stale.

Progress

  • Earlier authorization, cleanup, cancellation, session-persistence, artifact-recovery, summary-retention, duration, and idempotency findings are fixed with focused regressions.
  • Current head f3cee280 passes the hosted Test Scripts check and git diff --check.
  • Resolved the fixed same-agent summary-retention and false-duration threads after re-verifying authorship and current-head behavior.
  • No new inline comment was posted because the current rubrics review already covers the documentation warning.
  • Claude’s INFO observations about crash-time persistence, the broader non-open-PR guard, and variable shadowing were accepted tradeoffs, intentional behavior, or pre-existing polish and are excluded from required work.
  • The maintainer has questioned whether the workflow/session-persistence expansion belongs in Add finalized orchestration summaries #495. Current discussion acknowledges that commit 0566d05b is not directly required by Consider adding a finalized comment at the end of orchestrator #452 but is coupled to the permission split; retaining or splitting that broader work remains a maintainer scope decision.
  • Release notes remain untouched.

Issue Details

One-time migration guidance remains in durable docs

Cause: Architecture lines 157–159 and workflow usage lines 87–88 describe the one-time legacy-marker migration as permanent behavior.

Candidate solutions: Remove those two migration notes while retaining the compatibility code and regression tests. If indefinite legacy compatibility is intentional, reframe it as a supported contract rather than temporary migration guidance.

Comments: Both reviewers identified the same issue; the rubric reviewer made it the sole scoring deduction, while the code reviewer considered it cosmetic.

Recommended Next Step

HUMAN_DECISION: The remaining review issue is minor documentation hygiene, while the maintainer is actively deciding whether the expanded workflow/session scope belongs in this PR, so another automated fix round should not start yet.

Final Verdict

MINOR_ISSUES

Action Items

  • Remove the one-time legacy-marker migration wording from the two durable documentation pages while retaining compatibility code and tests.

codex | gpt-5.6-sol[max] | Macmini-runner-1

@sepo-agent-app

sepo-agent-app Bot commented Aug 11, 2026

Copy link
Copy Markdown
Author

The lean design is a single-job, single-CLI extension. Finalization should be comment formatting/publishing—not a planner-permission or session-persistence refactor.

The existing architecture already provides everything needed:

Minimum behavior:

  1. When a PR reaches a validated terminal stop, format one concise note containing the planner summary, source outcome, round, reason, and human requester mention.
  2. Keep the existing sepo-agent-orchestrate-stop marker; its internal name does not need migration.
  3. Merge the result into this run’s progress comment when available; otherwise upsert by that existing marker.
  4. On exact successful outcomes only, best-effort collapse older same-agent PR conversation comments. Never clean up blocked, clarification, failed, or malformed-planner outcomes.
  5. Keep cleanup failures non-fatal and retain the existing permissions.

Explicitly out of scope:

  • planner/write-job split
  • planner-response artifacts
  • session persistence changes
  • new progress-publishing CLIs
  • legacy-marker migration
  • cross-job duration and recovery machinery
  • formal review-object cleanup requiring broader authorization

That should be roughly 6–7 focused files and a few hundred lines including tests and docs, rather than 24 files. A separate PR can later design read-only planner isolation and session persistence together.

If this boundary looks right, send:

@sepo-agent /fix-pr replace the current implementation with the lean single-job design above; remove the job-split/session-persistence expansion and retain only terminal PR note finalization plus best-effort successful cleanup.


Sepo activity

Sepo finished — answer · 5m26s · 22 steps

Last message

The lean design is a single-job, single-CLI extension. Finalization should be comment formatting/publishing—not a planner-permission or session-persistence refactor. The existing architecture already provides everything needed: - The […

Activity

  • 📖 Read Search for 'minimize|collapsePreviousReviewSummaries|collapsePreviousRubricsReviews|collapsePreviousFixPrComments|colla… (completed)
  • ✏️ Edited gh api repos/self-evolving/repo/commits/dd129eb3d245c859aaf49facae5d3bc11dcea280 | jq '{message:.commit.message,files:[… (completed)
  • 🔧 Used tool "sed -n '85,180p' .agent/src/cli/post-comment.ts sed -n '70,130p' .agent/src/cli/post-response.ts" (completed)
  • 📖 Read for f in .github/workflows/agent-review.yml .github/workflows/agent-rubrics-review.yml .github/workflows/agent-fix-pr.y… (completed)
  • ✏️ Edited gh api repos/self-evolving/repo/commits/b41afca252e85b25292b4d6ab85f1730db3ad065 | jq '{message:.commit.message,files:[… (completed)
  • 💬 Message "The lean design is a single-job, single-CLI extension. Finalization should be comment formatting/publishing—not a planner-permission or session-persistence refactor. The existing architecture already provides everything needed: - The […"

codex | gpt-5.6-sol | max | Macmini-runner-6

@lolipopshock

Copy link
Copy Markdown
Contributor

@sepo-agent /implement replace the current implementation with the lean single-job design above; remove the job-split/session-persistence expansion and retain only terminal PR note finalization plus best-effort successful cleanup.

@sepo-agent-app

Copy link
Copy Markdown
Author

Implementing this request — tracking in #496.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agent Handled by the agent

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Consider adding a finalized comment at the end of orchestrator

2 participants