fix(status): hide stale cleanup recovery#426
Conversation
…inzs/github-symphony into feat/421-hide-stale-recovery # Conflicts: # packages/cli/src/commands/repo-explain.ts # packages/core/src/observability/snapshot-builder.test.ts # packages/core/src/observability/snapshot-builder.ts # packages/orchestrator/src/dispatch.test.ts # packages/orchestrator/src/explain.ts # packages/orchestrator/src/service.test.ts
There was a problem hiding this comment.
Pull request overview
Updates the project status snapshot and explain paths so that stale incomplete-turn-dirty-workspace recovery is no longer reported when the backing IssueWorkspaceRecord has been cleaned up (removed), while preserving historical run recovery payloads for audit/history.
Changes:
- Plumbs
IssueWorkspaceRecord[]into snapshot building and dispatch explanation to suppress stale dirty-workspace recovery when the workspace record is no longer actionable. - Adjusts orchestrator status assembly and CLI
repo explainworkspace loading to provide workspace records to the explain logic. - Adds regression tests across core snapshot building, orchestrator explain/service cleanup, and CLI status rendering for
recovery: null.
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| packages/orchestrator/src/service.ts | Loads issue workspace records and passes them into buildProjectSnapshot() so status recovery can be filtered against workspace lifecycle. |
| packages/orchestrator/src/service.test.ts | Verifies cleanup sets saved status.recovery to null while preserving the historical run’s recovery. |
| packages/orchestrator/src/explain.ts | Suppresses the “dispatch will start a recovery turn” warning when the recovery workspace is not actionable. |
| packages/orchestrator/src/dispatch.test.ts | Adds coverage ensuring removed workspaces do not trigger dirty-workspace recovery warnings in explain output. |
| packages/core/src/observability/snapshot-builder.ts | Filters recovery selection by checking whether the referenced workspace record is still actionable. |
| packages/core/src/observability/snapshot-builder.test.ts | Adds tests ensuring removed workspaces suppress recovery while active workspaces still surface recovery. |
| packages/cli/src/commands/status.test.ts | Adds coverage that status output does not render incomplete-turn recovery blocks when recovery is null. |
| packages/cli/src/commands/repo-explain.ts | Loads issue workspace records from the runtime root and passes them into explainIssueDispatch(). |
| .changeset/hide-stale-cleanup-recovery.md | Publishes a patch changeset for @gh-symphony/cli describing the behavior change. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| issueWorkspaces | ||
| ); | ||
|
|
||
| return !workspaceRecord || workspaceRecord.status === "active"; |
hojinzs
left a comment
There was a problem hiding this comment.
Reviewed by Project #14 watchdog.
Evidence bundle: https://evidence-browser.dev0.daniworks.kr/w/github-symphony/b/project14-pr-426-20260702-173234z
Result: approving. I did not find concrete blocking issues in the diff or local smoke/regression checks.
Checks run locally:
pnpm --filter @gh-symphony/core test -- --run src/observability/snapshot-builder.test.tspnpm --filter @gh-symphony/orchestrator test -- --run src/dispatch.test.ts src/service.test.tspnpm --filter @gh-symphony/cli test -- --run src/commands/status.test.tspnpm typecheckpnpm lint
All passed. GitHub CI also reports Test and Container Smoke passing.
Note: Claude Code review was attempted but the local CLI failed before analysis with 401 Invalid authentication credentials; the bundle includes that log. Because this PR changes runtime/orchestrator/CLI behavior and exceeds the low-risk Land gate, I am not moving the Project item to Land automatically.
Issues
TL;DR
incomplete-turn-dirty-workspacerecovery in project status snapshots when the backing issue workspace record has been removed.run.recovery, whilerepo statusandrepo explainonly report currently actionable recovery.변경 지점 다이어그램
IssueWorkspaceRecordlifecycle state →buildProjectSnapshot()recovery selection → savedstatus.json.recovery→repo status/repo explainrendering여기부터 보세요
packages/core/src/observability/snapshot-builder.tspackages/orchestrator/src/service.tspackages/orchestrator/src/explain.tspackages/cli/src/commands/repo-explain.ts위험 & 롤백
변경 파일
recovery: null.@gh-symphony/cli.Evidence
pnpm exec vitest run packages/core/src/observability/snapshot-builder.test.ts packages/orchestrator/src/dispatch.test.ts packages/orchestrator/src/service.test.ts packages/cli/src/commands/status.test.ts packages/cli/src/commands/repo-explain.test.ts— passpnpm lint && pnpm test && pnpm typecheck && pnpm build— passdocker compose -f docker-compose.e2e.yml -f docker-compose.e2e.events.yml up -d --build,/healthz, injectedhappy-path.json,/api/v1/state— pass; observedhealth: running,summary.activeRuns: 1,recovery: null머지 후/사람 확인
gh-symphony repo status.