Skip to content

fix(status): hide stale cleanup recovery#426

Merged
moncher-dev merged 4 commits into
mainfrom
feat/421-hide-stale-recovery
Jul 4, 2026
Merged

fix(status): hide stale cleanup recovery#426
moncher-dev merged 4 commits into
mainfrom
feat/421-hide-stale-recovery

Conversation

@moncher-dev

@moncher-dev moncher-dev commented Jul 2, 2026

Copy link
Copy Markdown
Collaborator

Issues

TL;DR

  • Suppresses stale incomplete-turn-dirty-workspace recovery in project status snapshots when the backing issue workspace record has been removed.
  • Keeps preserved run history intact, including historical run.recovery, while repo status and repo explain only report currently actionable recovery.

변경 지점 다이어그램

IssueWorkspaceRecord lifecycle state → buildProjectSnapshot() recovery selection → saved status.json.recoveryrepo status / repo explain rendering

여기부터 보세요

  • packages/core/src/observability/snapshot-builder.ts
  • packages/orchestrator/src/service.ts
  • packages/orchestrator/src/explain.ts
  • packages/cli/src/commands/repo-explain.ts

위험 & 롤백

  • Risk: workspace matching must avoid suppressing recovery for an active replacement workspace; matching now prefers project/workspace key, then path, then legacy issue identity.
  • Rollback: revert the status snapshot/explain filtering changes and the related tests.

변경 파일

  • Core snapshot recovery filtering and tests.
  • Orchestrator status assembly and terminal cleanup regression coverage.
  • Repo explain workspace-record loading and runtime ownership warning suppression.
  • CLI status rendering coverage for recovery: null.
  • Patch changeset for @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 — pass
  • pnpm lint && pnpm test && pnpm typecheck && pnpm build — pass
  • Docker E2E: docker compose -f docker-compose.e2e.yml -f docker-compose.e2e.events.yml up -d --build, /healthz, injected happy-path.json, /api/v1/state — pass; observed health: running, summary.activeRuns: 1, recovery: null

머지 후/사람 확인

  • Confirm a cleaned-up removed issue workspace no longer shows a recoverable incomplete turn in gh-symphony repo status.
  • Confirm an active dirty workspace recovery still appears and can be recovered.

@github-actions

github-actions Bot commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

Coverage Report

Status Category Percentage Covered / Total
🔵 Lines 39.35% 29007 / 73713
🔵 Statements 39.35% 29007 / 73713
🔵 Functions 71.85% 1417 / 1972
🔵 Branches 76.9% 6006 / 7810
File Coverage
File Stmts Branches Functions Lines Uncovered Lines
Changed Files
packages/cli/src/commands/repo-explain.ts 79.72% 61.64% 92.85% 79.72% 43-45, 51-53, 55-57, 120-121, 144-151, 186-187, 190, 217-219, 240-242, 245-249, 289-291, 294-297, 309-310, 314, 317-323, 334-335, 337-338, 357-368, 378-379, 408, 423-425, 428-429
packages/core/src/observability/snapshot-builder.ts 97.37% 92.77% 100% 97.37% 195-196, 199-200, 206-207
packages/orchestrator/src/explain.ts 78.58% 80.95% 100% 78.58% 72-74, 87, 180-181, 208-214, 309, 363-364, 387-398, 407-418, 422-425, 427-449, 460-478, 486-490, 514-527, 601-602, 612-613
packages/orchestrator/src/service.ts 92.58% 82.92% 94.95% 92.58% 109-110, 122-127, 168, 170-171, 192, 224, 240-243, 250-253, 371-378, 400-401, 413-414, 421, 428-432, 448, 458, 489, 515-516, 554-556, 568-569, 576, 673-675, 737-738, 835, 865-875, 879, 928-929, 982-986, 1061-1062, 1066-1067, 1076-1077, 1089-1096, 1119, 1144, 1147-1150, 1221-1237, 1352-1355, 1414-1417, 1444, 1515-1518, 1566-1576, 1646, 1654-1655, 1674-1675, 1693-1694, 1724, 1736-1741, 2128, 2240-2241, 2246-2250, 2254, 2267-2268, 2431-2435, 2445-2447, 2493-2494, 2523-2524, 2531, 2568-2574, 2584-2585, 2628-2629, 2733-2734, 2748-2749, 2935-2936, 2948-2957, 2964-2965, 3000-3001, 3039-3040, 3071, 3088-3089, 3185, 3237, 3278-3279, 3287-3288, 3295-3296, 3309, 3322-3323, 3385-3386, 3421-3422, 3450-3451, 3508, 3555-3556, 3630-3632, 3638-3639, 3652-3653, 3658-3664, 3711-3713, 3791
Generated in workflow #323 for commit 0570e4c by the Vitest Coverage Report Action

@moncher-dev moncher-dev changed the title fix(status): hide stale removed workspace recovery fix(status): hide stale cleanup recovery Jul 2, 2026
@moncher-dev moncher-dev marked this pull request as ready for review July 2, 2026 16:18
Steve Lee added 2 commits July 3, 2026 01:18
…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

Copilot AI 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.

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 explain workspace 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 hojinzs left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

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.ts
  • pnpm --filter @gh-symphony/orchestrator test -- --run src/dispatch.test.ts src/service.test.ts
  • pnpm --filter @gh-symphony/cli test -- --run src/commands/status.test.ts
  • pnpm typecheck
  • pnpm 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.

@moncher-dev moncher-dev merged commit d524bda into main Jul 4, 2026
3 checks passed
@moncher-dev moncher-dev deleted the feat/421-hide-stale-recovery branch July 4, 2026 02:59
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.

fix(status): hide stale incomplete-turn recovery after workspace cleanup

3 participants