Skip to content

[refactor] Orca 연동을 걷어내고 direct 실행과 Herdr·수동 터미널 인계만 남긴다 - #565

Merged
m16khb merged 5 commits into
mainfrom
560-remove-orca-integration
Oct 16, 2026
Merged

m16khb merged 5 commits into
mainfrom
560-remove-orca-integration

Conversation

@m16khb

@m16khb m16khb commented Oct 15, 2026 •

Copy link
Copy Markdown
Collaborator

요약

IssueOps에서 Orca 연동과 실행 방식(auto, direct, orca) 선택을 코드, 계약, 스킬, 현행 문서에서 모두 지웠습니다. 실행 방식은 direct 하나만 남고, 세션 인계는 기존 인수 체인을 Herdr나 두 번째 터미널에서 실행합니다. 호환 경로는 남기지 않았고 로컬 데이터 정리는 후속 작업입니다. 새 main(#563, #561 병합 뒤)을 병합해 다시 맞췄습니다.

Closes #560

변경 내용

바뀐 것은 다음과 같습니다.

  • 실행 기록에서 mode, selection, driver, orca 필드와 관련 타입을 지웠습니다. execution prepare는 --id ID ACTOR_FLAGS [--confirm]만 받고, preview가 workspace root, branch, base를 보여 줍니다.
  • execution resume, execution switch-mode, MCP resume action, doctor --preserve-terminal, doctor --sealed, interactive doctor profile을 지웠습니다. claim, replace, reconcile에서 이슈 스냅샷과 봉인 claim context 관련 플래그도 지웠습니다.
  • Orca intent 체인, owner 프롬프트와 context packet, replacement의 Orca owner 조회, cleanup의 orca_remove와 orca_resources_absent, doctor의 Orca 수집기, handoff 감사의 orca launcher를 지웠습니다. launcher는 direct, herdr, cmux만 남습니다.
  • internal/adapter/orca와 internal/port/orca*를 지웠고, 호출자가 사라진 함수(deadcode ./cmd/... 기준)도 함께 지웠습니다. 대소문자를 무시한 orca 검색에 걸리던 camelCase 이름 18개 파일은 의미 변경 없이 바꿨습니다.
  • 스킬과 현행 .issueops 문서, README를 새 계약으로 고쳤습니다. 자동 세션 선택은 Herdr를 확인한 뒤 현재 세션 또는 수동 두 번째 터미널 순서입니다. 새 ADR(2026-10-15)이 이전 결정 중 Orca 관련 부분을 대체한다고 적었습니다.
  • usage, MCP, response contract, 설치 golden과 설정 템플릿의 catalog 해시를 다시 만들었습니다.

바뀌지 않은 것은 다음과 같습니다.

  • generation, actor, cwd fence, claim 토큰 검증, workspace 프로세스 정지 확인, artifact 봉인, manual-direct 관측(source generation N과 claim N+1 연결)은 그대로입니다.
  • Execution.Pending, remote_pr_create intent와 execution reconcile의 해당 경로, cmux(execution handoff-cmux)는 유지했습니다.

병합 충돌 11개는 이렇게 해소했습니다. 이 PR이 지운 테스트 파일(internal/adapter/orca 6개, reconcile·resume wiring 테스트, owner coverage 테스트, lease resume guard 테스트) 10개는 main이 lint 수정을 했지만 삭제를 택했습니다. handoff_delivery_wiring_test.go는 이 PR의 Orca 제거 판본을 유지했습니다. main이 그 파일에서 고친 줄은 Orca 줄과 //go:fix inline helper였고, 이 PR의 판본에는 둘 다 이미 없습니다. 충돌이 없던 main의 변경(lint 수정과 라벨 점수)은 Orca 제거 의도를 되돌리지 않습니다.

확인한 것

  • 게이트 원장 13개가 한 번의 gates check 실행에서 모두 통과했습니다. Go 코드와 skills에 Orca 언급이 없는지, usage golden에 지운 명령이 없는지, 지운 이름이 현행 표면에 남지 않았는지, go vet, go test -race ./..., self-verify 95점, 문서 배치 검사가 포함됩니다. 새 main을 병합한 head에서 처음부터 다시 돌린 결과입니다. self-verify는 커밋된 변경이 검사 범위에 들어가도록 기준 커밋을 넘겨 돌렸고, 문서 배치 검사는 main에 이미 있는 한 건(.issueops/issues/561/plan.md의 깨진 링크, origin/main에서도 같은 결과)만 예외로 두었습니다.
  • 새 인계 체인 통합 테스트 TestDirectHandoffChainThroughProductionCommands가 production 명령 handler로 prepare, release, replace preview, reseed, claim을 끝까지 실행합니다. lease가 generation 1 active, 1 released, 2 claimable, 2 active 순서로 바뀌고 claim 뒤 holder가 claim actor와 같은지 확인합니다.
  • 새로 빌드한 바이너리를 임시 state와 임시 Git 저장소에서 실행해 같은 체인을 확인했고, 이어서 list --json의 read_errors가 0이었습니다. 옛 모양 기록(mode, selection, driver 포함)을 같은 state에 넣으면 read_errors가 1이 됩니다. 지운 플래그와 명령은 표준 오류로 거부됩니다.
  • 병합한 head에서 golangci-lint v2.12.2를 CI와 같은 방식(go.mod 툴체인, 새 캐시)으로 GOOS=linux와 darwin에서 실행해 둘 다 0 issues.입니다. 이 PR의 CI Lint 실패는 옛 main에 있던 lint 부채 때문이었고, 그 부채를 고친 #563이 병합에 들어와 해소됐습니다. 마지막 커밋의 push와 pull_request CI가 Lint 이후 단계(race 테스트 포함)까지 모두 성공했습니다. deadcode ./cmd/...는 0줄입니다.
  • 독립 서브에이전트 리뷰를 병합 전에 다섯 라운드, 병합 뒤에 두 라운드 돌렸습니다. 병합 전 필수 결함 5건(지운 doctor --sealed를 넘기던 스크립트, 옛 모양 기록의 전역 영향 서술 누락, ADR 대체 표시 누락과 잘못된 대체 문장, lint 검증 누락과 테스트 helper 고아)과 병합 뒤 1건(self-verify에 기준 커밋을 넘기지 않아 risk QA가 커밋된 diff를 보지 않음)을 고쳤고 마지막 라운드에서 통과했습니다. 리뷰어 모델은 task 도구가 라운드별 상향 모델을 넘기지 못해 모든 라운드에서 같았습니다.
  • 확인하지 못했거나 하지 않은 것이 있습니다. Herdr로 새 세션을 실제로 띄우는 인계 end-to-end는 실행하지 않았습니다(Go 코드가 Herdr를 다루지 않고, 인수 체인 자체는 위 테스트와 smoke로 확인했습니다). issueops api-doc check와 화면 QA, 스키마 실측은 해당 변경이 없어 하지 않았습니다. self-verify는 skills/slack-delegate 테스트가 pydantic을 요구하고 이 기기에서 ~/.omo가 백업 디렉터리로 옮겨져 있어, 임시 venv(typer도 설치)와 이전 ~/.omo를 가리키는 임시 HOME에서 실행했습니다. 이 기기의 기본 Go 빌드 캐시가 실행 중 일부 파일을 잃어 임시 GOCACHE도 썼습니다. 저장소 파일은 바뀌지 않습니다.

리뷰 포인트

  1. 옛 모양 기록의 비호환입니다. 옛 바이너리가 쓴 실행 기록과 orca launcher가 남은 감사 파일은 새 바이너리에서 읽히지 않습니다. 사용자 지시("정리 없이 코드만 제거")에 따라 읽기 호환 경로와 정리 명령을 만들지 않았습니다. 이 방향이 맞는지 봐 주세요.
  2. 삭제로 호출자가 없어진 코드의 범위입니다. owner 정책용 명령 문자열 파서(ParseExactIssueOpsCommand)와 shelltoken의 활성 확장 검사 함수군도 deadcode 기준으로 함께 지웠습니다. 남겨 두는 편이 낫다고 보는 항목이 있으면 알려 주세요.
  3. 병합 충돌 해소(위 참조)와 게이트 G11의 예외 한 건이 맞는지 봐 주세요. 예외는 main이 이미 가진 과거 기록 문서의 깨진 링크 한 건만 허용하고 다른 위반은 계속 실패시킵니다. main에서 그 링크를 고치면 예외 없이 엄격한 검사로 돌아갑니다.
  4. execution reconcile이 remote_pr_create 경로 하나만 처리하도록 줄었습니다. internal/domain/issueopsreconcile와 internal/application/issueopsexecution/execution_reconcile.go를 봐 주세요.

위험과 되돌리기

이 변경은 호환을 깨는 변경입니다. 이 기기에는 옛 모양 실행 기록이 18개 있고, 하나라도 남아 있으면 새 바이너리에서 다른 모든 사이클의 execution prepare가 invalid state로 실패합니다. 그래서 병합 뒤 바이너리를 갱신하기 전에 옛 바이너리로 기존 사이클을 cleanup finish나 cleanup abandon으로 끝내야 합니다. 이 순서는 병합과 정리 승인 단계에서 다룹니다. 감사 파일에 orca 줄이 남아 있는 동안은 이 기기에서 execution handoff-cmux와 claim 직후의 manual 관측이 실패합니다. 저장소 밖 스크립트나 전역 스킬이 지운 플래그와 명령(--mode direct --direct-reason, execution resume, doctor --sealed 등)을 부르면 업데이트 직후 실패합니다. PR을 되돌려도 새 바이너리가 쓴 기록을 옛 바이너리가 읽지 못하므로, 되돌리기 전에 해당 사이클을 끝내야 합니다.

남은 일

  • 로컬 state의 옛 실행 기록과 인계 감사 파일의 orca 줄 정리(후속 작업).
  • 변경 집합 fingerprint가 git diff --name-only의 rename 감지 때문에 커밋 전후로 경로 집합이 달라졌습니다(이름 변경 2건). 이번에는 내용이 같음을 확인하고 다시 봉인했습니다.

…election

Lore:
- Intent: Leave direct (git sibling worktree + generation-fenced lease) as the only execution mode and delete everything that existed for Orca or for choosing a mode.
- Why: #560. Orca was a hard dependency threaded through prepare, claim, replace, reconcile, cleanup, doctor and the handoff audit; session handoff now runs through the existing release, replace --preview, --reseed, claim --claim-current-token chain in Herdr or a second terminal.
- Changes:
  - Drop Execution.mode/selection/orca and Workspace.driver from the record contract and validators; execution prepare is now `--id ID ACTOR_FLAGS [--confirm]`.
  - Delete execution resume, execution switch-mode, the MCP resume action, doctor --preserve-terminal/--sealed and the interactive doctor profile, the Orca intent chain, sealed claim context, owner prompt/context packet, and cleanup's orca_remove/orca_resources_absent steps.
  - Keep remote_pr_create pending intents and reconcile, the claim token, quiescence and workspace-process checks, artifact sealing, manual-direct handoff observation, and cmux.
  - Remove internal/adapter/orca and internal/port/orca*, the functions that lost their last caller (deadcode ./cmd/... stays at 0 lines), and rename 18 files' camelCase names that matched a case-insensitive orca search.
  - Rewrite the skills, current .issueops docs and README for Herdr-then-current-or-manual-terminal session selection, add ADR 2026-10-15, and regenerate the CLI/MCP/response/install goldens.
  - Add TestDirectHandoffChainThroughProductionCommands and rebuild TestSuccessfulDirectClaimObservesReleasedReseededGeneration on the Herdr manual producer.
- Verify: gofmt -l, go vet ./..., go test -race ./... , ./bin/issueops self-verify --seed=100 --target-score=95 --llm-eval=false, golangci-lint v2.12.2 (no new findings against bac123a), deadcode ./cmd/..., project docs check (680 documents, 0 violations), gate ledger G1-G12 met in one run, real-binary smoke 1 active -> 1 released -> 2 claimable -> 2 active.
- Risk: Breaking. Records and handoff audit lines written by the old binary are unreadable to the new one, so finish or abandon existing cycles with the old binary before updating; any leftover old-shape record makes execution prepare fail with invalid state for every cycle. Out-of-repo callers of the removed flags/commands fail after the update. Local data cleanup is a follow-up.
…eport

Lore:
- Intent: Keep the tracked materials of the #560 cycle with the change they justify.
- Why: Project convention records the plan, intent, plan review, gate ledger and verified-execution report in the cycle's commit history.
- Changes:
  - Add .issueops/issues/560/{plan,intent,plan-review,gates}.md.
  - Add .issueops/verified-execution/560-remove-orca-integration.md with acceptance results, smoke table, side effects, size measurements, doc-to-implementation cross-check and the verification table.
- Verify: gate ledger G1-G12 met in one gates check run; project docs check ok (680 documents, 0 violations).
- Risk: Low; documentation only.
…ve-orca-integration

# Conflicts:
#	cmd/issueops/issueopsapp/handoff_delivery_wiring_test.go
#	cmd/issueops/issueopsapp/issueops_reconcile_wiring_test.go
#	cmd/issueops/issueopsapp/issueops_resume_wiring_test.go
#	internal/adapter/orca/client_decode_test.go
#	internal/adapter/orca/client_validation_test.go
#	internal/adapter/orca/execution_stage_test.go
#	internal/adapter/orca/execution_test.go
#	internal/adapter/orca/execution_validation_test.go
#	internal/adapter/orca/runner_failure_test.go
#	internal/adapter/outbound/issueopslease/resume_repository_guards_test.go
#	internal/application/issueopsowner/coverage_test.go
Lore:
- Intent: Keep the gate ledger and verification report in step with the head that now contains main 6f1ad90.
- Why: #565 was CONFLICTING and its CI Lint step failed on debt that #564 already fixed on main; the base moved, so every gate was re-run on the merged head.
- Changes:
  - Reset and re-run all 13 gates in one `gates check` run (all met).
  - Let G11 accept exactly the one broken link main already carries in .issueops/issues/561/plan.md (it fails the same way on origin/main).
  - Record the sync-base conflict resolution, the lint result (0 issues on linux and darwin), and the environment notes in the report.
- Verify: gates check 13/13 met in one run; golangci-lint v2.12.2 GOOS=linux and darwin 0 issues; go vet ./...; go test ./... -count=1.
- Risk: Low; documentation only.
…sync

Lore:
- Intent: Make the G8 self-verify gate inspect the committed diff, not only the working tree.
- Why: After the changes were committed and main was merged, base bac123a and HEAD differ; without --base-ref the risk QA step saw no scope. The implementation review of the reopened cycle (D6) caught it.
- Changes:
  - Add --base-ref bac123a to the G8 CHECK and re-run all 13 gates in one run (all met).
  - Correct the report: self-verify scope reasoning, the reopen wording, the sync-base command column, and the #564 wording.
- Verify: gates check 13/13 met in one run; self-verify with --base-ref reports ok with scope base bac123a and head f6dec21; contract golden tests ok; project docs check shows only the one violation main already has.
- Risk: Low; documentation only.
@m16khb
m16khb marked this pull request as ready for review October 16, 2026 01:49
@m16khb
m16khb merged commit 6237393 into main Oct 16, 2026
2 checks passed
@m16khb
m16khb deleted the 560-remove-orca-integration branch October 16, 2026 01:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[refactor] Orca 연동을 걷어내고 direct 실행과 Herdr·수동 터미널 인계만 남긴다

1 participant