Skip to content

Surface hcoord sandbox refusals and close stale watches and repeated SSH failures - #275

Merged
yansfil merged 1 commit into
mainfrom
fix/hcoord-sandbox-letters
Oct 1, 2026
Merged

yansfil merged 1 commit into
mainfrom
fix/hcoord-sandbox-letters

Conversation

@yansfil

@yansfil yansfil commented Oct 1, 2026

Copy link
Copy Markdown
Contributor

Fixes #273

Summary

  • sandbox가 ~/.hcoord를 막으면 hcoord 쓰기 명령이 internal로 뭉개져서 원인을 알 수 없었습니다. 이제 막힌 경로와 다음 행동이 담긴 permission_denied가 나갑니다.
  • 분류되지 않은 예외도 errno code와 message를 stderr 이벤트(hcoord.command_failed)에 남깁니다.
  • 대상과 observer가 모두 사라진 watch는 1시간 뒤 daemon이 스스로 멈추고 watch.orphaned 이벤트를 남깁니다.
  • 원격 SSH 호출이 대상마다 연결 하나를 공유하고(ControlMaster), 같은 원인으로 반복되는 수집 실패는 10분에 한 줄로 묶입니다.
$ HCOORD_HOME=<쓰기 불가 디렉터리> hcoord request send ... --json
before: {"error":{"code":"internal","message":"command failed; inspect stderr"}}
after:  {"error":{"code":"permission_denied","message":"this session cannot write the hcoord outbox <dir>/outbox (EACCES), so nothing was sent; add <dir> to the session's writable roots (...), then run the same command again","detail":{"path":"...","errno":"EACCES"}}}

Review

  • 판단해 주세요
    • 고아 watch 유예 1시간(WATCH_ORPHAN_MS). Herdr 재시작 복구보다 길고, 며칠 살아 있던 사고보다 훨씬 짧습니다.
    • 고아 판정은 Herdr가 직접 "없다"고 답한 경우만 셉니다. Herdr나 원격에 연결하지 못한 읽기는 시계를 올리지도 지우지도 않습니다. 수집 실패가 하루 수백 건이던 원격 머신의 건강한 watch가 멈추지 않게 하려는 선택입니다.
    • daemon이 멈췄다 깬 뒤처럼 점검이 max(2*간격, 60초)보다 늦으면 유예를 처음부터 다시 셉니다.
    • kit 설치기가 Codex writable_roots까지 맞추지는 않습니다. 그 파일은 운영자 소유 설정이고, 오류 메시지가 고칠 방법을 이름으로 알려 줍니다.
    • 고아로 멈춘 watch는 이벤트로만 드러나고 inbox 항목은 만들지 않았습니다(후속 후보).
  • 조심해서 볼 파일
    • plugins/hcoord/src/hcoord/service.ts - tick의 고아 판정. 건강한 watch를 멈추는 오탐이 가장 큰 위험입니다.
    • plugins/hcoord/src/hcoord/transport.ts - tick에서 observer를 읽는 호출(대상이 연결되지 않았을 때만)과 수집 실패 로그 순서(drop 성공 뒤에 recovered).
    • plugins/hcoord/src/hcoord/remote.ts - SSH 옵션. /tmp/hcoord-ssh-<uid>/%C, 60초 유휴 뒤 master 종료. 디렉터리를 만들 수 없으면 재사용만 포기하고 한 번 로그합니다.
  • 질문: 이슈 3번("5분마다 무한 재호출")은 원장 수준에서 재현되지 않았습니다. 확인 방법은 Evidence에 있고, 코드는 바꾸지 않았습니다. 사고 때 반복 깨움을 만든 경로를 아시면 알려 주세요.

Evidence

  • 확인한 것
    • hcoord 단위 35개와 e2e 30개 통과, typecheck와 build 통과. e2e 일부가 부하 높은 머신에서 가짜 herdr ETIMEDOUT으로 한 번씩 떨어져서 직렬로 다시 돌려 통과를 확인했습니다.
    • sandbox 거부: 쓰기 불가 디렉터리를 가리킨 private HCOORD_HOME으로 CLI를 실제 실행해 permission_denied, 경로, 종료 코드 1, 디렉터리에 아무것도 남지 않음을 확인했습니다. EEXIST로 분류되지 않은 예외가 errno와 message를 stderr에 남기는 것도 같은 방식으로 확인했습니다.
    • 고아 watch: 단위(유예 시작, 도달 가능한 쪽이 시계를 지움, 응답 없음은 시계에 영향 없음, 긴 공백 뒤 재시작, 유예 뒤 정지)와 e2e(daemon이 두 pane이 사라진 watch를 실제로 멈춤).
    • 무한 재호출: 3시간 동안 observer가 확인하지 않는 tick을 돌려 깨움이 observer 2회(요청, 리마인더)와 human 1회로 끝나고 새 cycle이 쌓이지 않음을 고정하는 테스트를 추가했습니다. 현재 코드가 이미 이 한도를 지켜서 코드 변경은 없습니다.
    • SSH: 실제 ssh -G가 옵션을 해석해 controlmaster auto, controlpersist 60, 짧은 controlpath를 내는지, 소켓 경로가 104바이트 한도 아래인지, 디렉터리가 0700인지.
    • 로그 묶기: 2시간 반복에서 줄 수, 원인 변경 즉시 기록, 복구 시 접힌 횟수 보고.
    • 리뷰 서브에이전트의 Fix now 5건(오탐 가능성, 절전 뒤 시계, 복구 로그 순서, 불필요한 observer 조회, stderr의 본문 인용)은 모두 반영했습니다.
  • 확인하지 못한 것
    • 실제 SSH master 연결 재사용과 서명 요청 감소는 loopback sshd 없이 보지 못했습니다. 옵션 해석만 확인했습니다.
    • desktop, native, web, Rust lane은 이 diff가 plugins/hcoord만 건드리고 같은 머신에서 다른 구현자가 무거운 QA를 돌리고 있어서 로컬에서 실행하지 않았습니다. CI verify 결과에 맡깁니다.
    • 운영 ~/.hcoord, daemon, 설치된 kit, /Applications/hide.app은 읽지도 바꾸지도 않았습니다.
    • 대화형 ssh agent(Secretive)의 간헐적 서명 거부 자체는 재현하지 못했습니다.
Verification record
  • head: dc622d4, base: origin/main 8d9919f
  • pnpm --dir plugins/hcoord typecheck, build, test (35 pass), test:e2e (30 pass)
  • bash scripts/check-no-workstation-identity.sh 통과
  • 리뷰 서브에이전트 후속 후보: 고아 정지 inbox 항목, 실제 loopback sshd 기반 master 테스트, daemon 종료 시 ssh -O exit, 실패 로그의 접힌 횟수가 daemon 종료로 사라짐

…eated SSH failures

A sandboxed session that cannot write the outbox now gets permission_denied
with the blocked path instead of internal, and an unclassified exception keeps
its errno code on stderr. The daemon stops a watch whose target and observer
Herdr reports gone for an hour, remote runs share one SSH connection per
target, and a repeating collection failure logs once per window.
@yansfil
yansfil merged commit 270e019 into main Oct 1, 2026
13 of 15 checks passed
@yansfil
yansfil deleted the fix/hcoord-sandbox-letters branch October 1, 2026 07:54
yansfil added a commit that referenced this pull request Oct 1, 2026
…es (#277)

Related: Fixes #271 · PRD `agents/prd/korean-terminal-path-links/prd.md`

## Summary

- 터미널에 `보드 보기 (docs/README.md)에 ...`처럼 경로 뒤에 닫는 괄호와 조사가 붙으면
`docs/README.md)에`를 파일명으로 검사해 링크가 사라졌다.
- parser가 토큰마다 최대 6개의 유한한 해석(원문, 기호 정리, 조사만 제거, literal 위치, 위치 해석)을 만들고,
hover provider가 실제로 있는 가장 긴 경로를 고른다.
- 조사는 닫는 괄호·대괄호·중괄호·인용부호 바로 뒤의 정해진 목록만 인정하고, 임의의 한글을 한 글자씩 잘라 보지 않는다.
- 링크 범위는 UTF-16 길이가 아니라 실제 cell로 계산해 wide 한글과 줄바꿈된 경로에서도 경로만 밑줄이 그어진다.
- 한 hover의 새 파일 확인은 512개, batch는 64개로 제한하고, 넘친 후보와 검사 실패는 링크로 인정하지 않는다.

![Before: hovering the path in Korean prose draws no link, because ')에'
was checked as part of the file
name](https://github.com/yansfil/pr-assets/blob/main/hide/korean-terminal-path-links/b502ab2/before-link.png?raw=true)

![After: only docs/README.md is underlined; the parenthesis and the
particle stay plain
text](https://github.com/yansfil/pr-assets/blob/main/hide/korean-terminal-path-links/b502ab2/after-link.png?raw=true)

## Review

- **판단해 주세요**: 지원 조사 목록(에, 에서, 에게, 께, 으로, 로, 와, 과, 을, 를, 은, 는, 이, 가, 의,
도, 만, 부터, 까지 + 도/만/는/은)은 위임받아 정한 가정이다.
- **판단해 주세요**: 512 새 lookup 예산은 위임 가정이다. 넘으면 일부 추론 링크가 안 뜨고 진단 로그에 개수만
남는다.
- **조심해서 볼 파일**: `web/src/terminalLinkProvider.ts` - high-frequency
path(hover). 원문 우선 admission과 "검사 못 한 긴 후보가 있으면 짧은 후보를 고르지 않는" 규칙.
- **조심해서 볼 파일**: `desktop/src/main/localPath.ts` - failure path. 이제
`ENOENT`/`ENOTDIR`만 "없음"이고, 다른 오류는 경로 없이 코드만 담아 batch를 reject한다.
- **조심해서 볼 파일**: `web/src/terminalLinks.ts` - `trimSpans`를 cell 기준으로 다시
썼다. wide glyph, surrogate, combining cell 경계.
- **범위 밖 테스트 변경**: `desktop/e2e/digit-shortcuts.spec.ts`는 socket이 열린 뒤에
frame 관찰을 붙여 `tab_select` 0회로 실패하던 harness race를 reload로 고쳤다. assertion은
그대로다.
- **알려진 미해결(이 PR 원인 아님)**: 이전 실행(96e3c47)에서
`agent-tab-groups.spec.ts:44` Meta 키캡이 한 번 안 떴다. b502 4회와 main 3회에서는
재현되지 않았다.
이 PR은 `keyboard.ts`/`hints.ts`를 건드리지 않는다. 원인은 미확정이며, 소스상 #269의
early-timer rearm(`d38e63f`)이 다루는 경로와 같을 가능성이 있다. 수정은 #269 소유이고 여기서 복제하지
않았다.

## Evidence

- **확인한 것**: `sasu implement verify` PASS(7152f86, 최신 main 병합 후):
`verify-cargo.sh test`, `verify-cargo.sh lint`.
- **확인한 것**: 병합 전 b502에서 cli와 web을 다시 빌드한 뒤 background desktop lane 30개
중 25 passed, 5 skipped(SSH/packaged 앱 필요), 0 failed. 다른 worktree의 web
e2e와 동시에 돌린 부하 상태였다.
- **확인한 것**: 위 lane의 `terminal-links.spec.ts` 3개 case가 격리된 Electron에서 실제
hover 범위와 Workspace 파일 열기, 원문 파일 우선, wrapped 한글 경로를 확인한다.
- **확인한 것**: `agent-tab-groups` ×3을 main, b502, main + `d38e63f`(로컬
적용만)에서 각각 돌려 모두 3/3 통과.
- **확인한 것**: unit 테스트는 web parser/provider 57개, desktop `localPath` 9개다.
6단계 해석 상한, 16 spelling × 6 = 192 lookup 상한, 512/64 budget, cache, 실패 시
fail-closed를 다룬다.
- **확인한 것**: 12개 토큰, 302열 dense 줄(cold/warm 각 5회)에서 원래 코드는 logical
lookup 6개, 후보는 42개였다. 후보 native stat은 12회였고, warm에서는 양쪽 모두 native 검사
0회였다.
hover-to-pointer 중앙값은 원래 cold 11.2 / warm 11.2 ms, 후보 cold 8.9 / warm
13.1 ms이다. 다른 작업이 함께 돌던 환경이라 개선이나 동등성은 주장하지 않는다.
- **확인하지 못한 것**: 이번 HEAD에서 full web e2e는 로컬에서 다시 돌리지 않았다(CI 3 shard에
맡김). 마지막 로컬 110개 통과는 main 병합 전 HEAD 기준이다.
- **확인하지 못한 것**: SSH 기기·원격 Workspace·packaged 앱 case 5개는 이 환경에서 skip됐다.
원격 context에서 새 파일 검사를 하지 않는다는 것(B14)은 unit으로만 확인했다.
- **확인하지 못한 것**: 실제 OS 권한 거부(EACCES)는 주입한 오류로만 확인했다. column 5 위치 열기는
metadata와 unit으로만 확인했고 화면에서는 line 12까지 확인했다.
- **확인하지 못한 것**: 위 스크린샷은 병합 전 리비전의 격리 후보에서 캡처했다. parser, provider,
`localPath` 소스는 그 뒤로 바뀌지 않았다.

<details><summary>Verification record</summary>

- PRD: `agents/prd/korean-terminal-path-links/prd.md` (sha256
baa4be45368864c9364c27e4046a18b943c2f1cc2d19b1dbeea5567392d01f00)
- Base 8d9919f → head 7152f86, verified 2026-10-01T08:28:47.695Z: PASS
- Verification report:
`agents/runs/korean-terminal-path-links/verification-report.json` and
`agents/runs/korean-terminal-path-links/verification-report.md`; source
fingerprint
2a0601d5bf906bf68c7b6f7ef43430f8fe82c3ff3bcb2da78b09c1ea8c7233c1
- Suites:
  - S1: GREEN `bash scripts/verify-cargo.sh test` (exit 0)
  - S2: GREEN `bash scripts/verify-cargo.sh lint` (exit 0)
- Reviews:
- Fidelity (b502ab2, follow-up over the full prior B1-B17 review): no
Fix now; full-lane P1 closed by the rebuilt b502 background lane; Meta
keycap non-reproducing, unattributed, owned by #269. Follow-up: run the
SSH/packaged lanes where available.
- Code (b502ab2, follow-up): no Fix now; earlier P1 was an uncommitted
local QA guard, not in this diff; digit-shortcuts reload weakens no
assertion; probe.ts store import adds no cycle. Follow-up: wait for
`shellPage()` before the digit-shortcuts reload.
- b502ab2 -> 7152f86 is only the origin/main merge (#275, #276, #279,
#280): `git diff origin/main...HEAD` is byte-identical to the reviewed
`ac1cc979...b502ab2` diff and the merge touches none of its files, so
no new review ran.
- Evidence: 100 registered (27 log, 57 file, 12 screenshot, 2 browser, 2
image); paths are local to the run directory
  - agents/runs/korean-terminal-path-links/evidence/focused.log
  - agents/runs/korean-terminal-path-links/evidence/candidate-native.log
  - agents/runs/korean-terminal-path-links/evidence/baseline-native.log
-
agents/runs/korean-terminal-path-links/evidence/baseline-dense--dense-hover-metrics.json
-
agents/runs/korean-terminal-path-links/evidence/candidate-native--dense-hover-metrics.json
- agents/runs/korean-terminal-path-links/evidence/dense-comparison.json
-
agents/runs/korean-terminal-path-links/evidence/candidate-native--korean-prose-hover.png
-
agents/runs/korean-terminal-path-links/evidence/candidate-native--korean-prose-open.png
-
agents/runs/korean-terminal-path-links/evidence/candidate-native--korean-prose-open.json
-
agents/runs/korean-terminal-path-links/evidence/candidate-native--korean-original-file.png
-
agents/runs/korean-terminal-path-links/evidence/candidate-native--korean-wrapped-open.png
-
agents/runs/korean-terminal-path-links/evidence/candidate-native--korean-wrapped-open.json
  - agents/runs/korean-terminal-path-links/evidence/browser-no-host.png
  - agents/runs/korean-terminal-path-links/evidence/before-link.png
  - agents/runs/korean-terminal-path-links/evidence/after-link.png
- agents/runs/korean-terminal-path-links/evidence/native-error-unit.log
-
agents/runs/korean-terminal-path-links/evidence/native-error-typecheck.log
- agents/runs/korean-terminal-path-links/evidence/native-error-lint.log
-
agents/runs/korean-terminal-path-links/evidence/native-error-focused.log
-
agents/runs/korean-terminal-path-links/evidence/current-final-web-unit.log
-
agents/runs/korean-terminal-path-links/evidence/current-final-web-e2e.log
-
agents/runs/korean-terminal-path-links/evidence/current-native-print-target-typecheck.log
-
agents/runs/korean-terminal-path-links/evidence/current-native-print-target-lint.log
-
agents/runs/korean-terminal-path-links/evidence/current-complete-native-suite.log
-
agents/runs/korean-terminal-path-links/evidence/current-complete-native--build-source-hashes.json
-
agents/runs/korean-terminal-path-links/evidence/current-complete-native--native-targets.jsonl
-
agents/runs/korean-terminal-path-links/evidence/current-complete-native--composite-click-observations.json
-
agents/runs/korean-terminal-path-links/evidence/current-complete-native--korean-prose-hover.png
-
agents/runs/korean-terminal-path-links/evidence/current-complete-native--korean-prose-hover.json
-
agents/runs/korean-terminal-path-links/evidence/current-complete-native--korean-prose-open.png
-
agents/runs/korean-terminal-path-links/evidence/current-complete-native--korean-prose-open.json
-
agents/runs/korean-terminal-path-links/evidence/current-complete-native--korean-composite-stage-2-open.png
-
agents/runs/korean-terminal-path-links/evidence/current-complete-native--korean-composite-stage-2-open.json
-
agents/runs/korean-terminal-path-links/evidence/current-complete-native--korean-probe-retry-open.png
-
agents/runs/korean-terminal-path-links/evidence/current-complete-native--korean-probe-retry-open.json
-
agents/runs/korean-terminal-path-links/evidence/current-complete-native--korean-wrapped-hover.png
-
agents/runs/korean-terminal-path-links/evidence/current-complete-native--korean-wrapped-hover.json
-
agents/runs/korean-terminal-path-links/evidence/current-complete-native--korean-wrapped-open.png
-
agents/runs/korean-terminal-path-links/evidence/current-complete-native--korean-wrapped-open.json
-
agents/runs/korean-terminal-path-links/evidence/current-matched-baseline-six-stage--dense-hover-metrics.json
-
agents/runs/korean-terminal-path-links/evidence/current-matched-baseline-six-stage--build-source-hashes.json
-
agents/runs/korean-terminal-path-links/evidence/current-matched-baseline-six-stage--native-targets.jsonl
-
agents/runs/korean-terminal-path-links/evidence/current-matched-baseline-six-stage.log
-
agents/runs/korean-terminal-path-links/evidence/current-matched-candidate-six-stage--dense-hover-metrics.json
-
agents/runs/korean-terminal-path-links/evidence/current-matched-candidate-six-stage--build-source-hashes.json
-
agents/runs/korean-terminal-path-links/evidence/current-matched-candidate-six-stage--native-targets.jsonl
-
agents/runs/korean-terminal-path-links/evidence/current-matched-candidate-six-stage.log
-
agents/runs/korean-terminal-path-links/evidence/current-matched-three-module-comparison.json
-
agents/runs/korean-terminal-path-links/evidence/current-browser-amended-observations.json
-
agents/runs/korean-terminal-path-links/evidence/current-browser-amended-no-host.png
-
agents/runs/korean-terminal-path-links/evidence/current-qa-slot-receipt.md
-
agents/runs/korean-terminal-path-links/evidence/current-fresh-slot-cleanup-proof.json
-
agents/runs/korean-terminal-path-links/evidence/current-complete-native-rerun-suite.log
-
agents/runs/korean-terminal-path-links/evidence/current-complete-native-rerun-results--desktop-attach-the-app-sta-ce119--native-chords-and-the-menu-background--error-context.md
-
agents/runs/korean-terminal-path-links/evidence/functional-diagnose-keycap-suite.log
-
agents/runs/korean-terminal-path-links/evidence/functional-diagnose-keycap-exact-suite.log
-
agents/runs/korean-terminal-path-links/evidence/functional-diagnose-keycap-exact--native-targets.jsonl
-
agents/runs/korean-terminal-path-links/evidence/functional-functional-slot-cleanup-proof.json
-
agents/runs/korean-terminal-path-links/evidence/functional-functional-native-preflight.json
-
agents/runs/korean-terminal-path-links/evidence/slot-final-functional-full-suite.log
-
agents/runs/korean-terminal-path-links/evidence/slot-final-functional-full--native-targets.jsonl
-
agents/runs/korean-terminal-path-links/evidence/slot-final-functional-full-relative-suite.log
-
agents/runs/korean-terminal-path-links/evidence/slot-final-functional-final-cleanup-proof.json
-
agents/runs/korean-terminal-path-links/evidence/slot-final-functional-superseded-stop.json
-
agents/runs/korean-terminal-path-links/evidence/runner-recovery-functional-lane-runner.py
-
agents/runs/korean-terminal-path-links/evidence/runner-recovery-native-slot-guard.cjs
-
agents/runs/korean-terminal-path-links/evidence/runner-recovery-test-functional-lane-runner.py
-
agents/runs/korean-terminal-path-links/evidence/runner-recovery-runner-process-tests.json
-
agents/runs/korean-terminal-path-links/evidence/runner-recovery-runner-ready-receipt.json
-
agents/runs/korean-terminal-path-links/evidence/runner-recovery-runner-ready.md
-
agents/runs/korean-terminal-path-links/evidence/runner-recovery-code-review-runner-followup.md
-
agents/runs/korean-terminal-path-links/evidence/runner-recovery-fidelity-review-runner-followup.md
-
agents/runs/korean-terminal-path-links/evidence/runner-recovery-review-dispositions.md
- agents/runs/korean-terminal-path-links/evidence/resumed96-targeted.log
-
agents/runs/korean-terminal-path-links/evidence/resumed96-targeted-corrected.log
-
agents/runs/korean-terminal-path-links/evidence/resumed96-cleanup-proof.json
-
agents/runs/korean-terminal-path-links/evidence/resumed96-active-grant.json
-
agents/runs/korean-terminal-path-links/evidence/resumed96-resources.jsonl
-
agents/runs/korean-terminal-path-links/evidence/resumed96-native-slot-guard.loaded.cjs
-
agents/runs/korean-terminal-path-links/evidence/resumed96-artifacts-native-targets.jsonl
-
agents/runs/korean-terminal-path-links/evidence/resumed96-artifacts-final-86759-probe.json
-
agents/runs/korean-terminal-path-links/evidence/resumed96-artifacts-final-86759-native.png
-
agents/runs/korean-terminal-path-links/evidence/resume96-code-review-digit-observer-current.md
-
agents/runs/korean-terminal-path-links/evidence/resume96-fidelity-review-digit-observer-current.md
-
agents/runs/korean-terminal-path-links/evidence/resume96-retained-binary-equivalence-96.json
-
agents/runs/korean-terminal-path-links/evidence/resume96-closed9a-suite.log
-
agents/runs/korean-terminal-path-links/evidence/resume96-closed9a-done.json
-
agents/runs/korean-terminal-path-links/evidence/resume96-closed9a-cleanup-proof.json
-
agents/runs/korean-terminal-path-links/evidence/resume96-closed9a-failure1.md
-
agents/runs/korean-terminal-path-links/evidence/resume96-closed9a-failure2.md
-
agents/runs/korean-terminal-path-links/evidence/resume96-closed9a-failure3.md
-
agents/runs/korean-terminal-path-links/evidence/b502-code-review-resumed-native-followup.md
-
agents/runs/korean-terminal-path-links/evidence/b502-fidelity-review-resumed-native.md
-
agents/runs/korean-terminal-path-links/handover-2026-10-01/branch-desktop-background.log
-
agents/runs/korean-terminal-path-links/handover-2026-10-01/base-main-keycap.log
-
agents/runs/korean-terminal-path-links/handover-2026-10-01/branch-keycap.log
-
agents/runs/korean-terminal-path-links/handover-2026-10-01/base-patched-keycap.log
- agents/runs/korean-terminal-path-links/handover-2026-10-01/bundle1.log
-
agents/runs/korean-terminal-path-links/handover-2026-10-01/fidelity-review-b502-followup.md
-
agents/runs/korean-terminal-path-links/handover-2026-10-01/code-review-b502-followup.md
- Changed paths: 106 (see Files changed)

</details>
yansfil added a commit that referenced this pull request Oct 14, 2026
## Summary

⌘K에 PR 번호(`#275`, `275`)를 쳐도 그 PR을 작업한 agent는 목록에 나오지 않았습니다.
agent 행은 자기 이름·위치·상태 문장에 그 숫자가 글자로 들어 있을 때만 걸렸기 때문입니다.
이제 PR 번호가 정확히 맞는 행 바로 아래 `Agents` 그룹에, 코어가 그 PR에 연결해 둔 agent가 나오고 ↵로 그
pane에 갑니다.
연결 기준은 agent 행이 이미 받는 `request.pull_requests`(그 세션이 만들었거나 그 브랜치에 걸린
PR)이고, 머지·닫힌 PR도 포함합니다.
agent 상세에는 `PR #275, #260` 줄이 추가됩니다.

<img width="871" alt="⌘K에 #275를 입력하면 PR 행 아래 Agents 그룹에 그 PR의 agent가
나오고, 상세에 PR #275가 보인다"
src="https://github.com/user-attachments/assets/098830dc-0acc-4440-8bfe-4c36ee80f3ad"
/>

`#275` 입력: Pull requests 바로 아래 `Agents`에 그 PR 브랜치에서 일한 agent가 나오고, 오른쪽
상세에 `PR #275` 줄이 생깁니다 (gallery ⌘K 장면, 픽스처 데이터).

## Review

- **판단해 주세요**: 연결 범위를 agent의 PR 마크가 그리는 것(그 agent가 맡은 현재 PR)보다 넓게 잡았습니다.
머지된 PR 번호로도 그 PR을 만든 agent를 찾게 하려는 선택입니다.
- **판단해 주세요**: 다른 저장소의 같은 번호 PR에 연결된 agent도 함께 나옵니다. PR 행도 프로젝트마다 따로 나오는
기존 규칙과 같고, agent 행의 위치(`project › checkout`)로 구별됩니다.
- **조심해서 볼 파일**: `web/src/search.ts` - `filterEntries`의 정확 일치 목록. 점수 매긴
목록과 겹치지 않고, 80행 상한 안에서 앞에 남습니다.

## Evidence

- **확인한 것**: `search.test.ts`에서 `#275`·`275`는 PR 행 다음 Agents 그룹에 연결된
agent가 나오고, 이슈 번호 `273`은 agent를 데려오지 않으며, 머지되고 처리할 몫이 없는 PR 260도 agent를
찾는 것을 확인했습니다.
- **확인한 것**: 결함을 일부러 넣어 테스트가 실패하는지 봤습니다. agent 매칭을 빼면 1개 실패, 매칭을 열린 PR로
좁히면 1개 실패합니다.
- **확인한 것**: `searchDetail.test.ts`는 연결 PR이 있는 agent에 `PR` 줄이 붙고, 없는
agent에는 줄이 없는 것을 확인합니다.
- **확인한 것**: `bash scripts/verify-web.sh`의 web typecheck, lint, 테스트(파일
176개, 1561개 통과, 1개 skip), 빌드가 둘째 커밋에서 통과했습니다. 마지막 커밋(문서·주석·테스트만)에서는 web
typecheck, lint, ⌘K 테스트 4파일을 다시 돌려 통과했습니다.
- **확인한 것**: dev 빌드 gallery의 ⌘K 장면(`/gallery?scene=search-palette`)에서
`#275`를 입력하고 실제 렌더를 캡처했습니다. 위 이미지입니다.
- **확인하지 못한 것**: 실제 앱에서 실제 PR이 걸린 agent로 확인하지는 않았습니다. 목록 데이터는 코어가 이미 보내는
필드 그대로입니다.
- **확인하지 못한 것**: 원격 기기 agent는 실행해서 확인하지 않았습니다. 같은 필드를 읽고, 필드가 없으면 매칭하지
않습니다.
- **확인하지 못한 것**: 같은 로컬 실행에서 desktop
`src/main/notificationPermission.test.ts`의 "asks the helper once for
reads that overlap" 테스트가 부하 중 1회 실패했고, 단독으로는 3회 모두 통과했습니다. 이 변경과 무관한 타이밍
의존 테스트로 보입니다.
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.

hcoord 쓰기 명령이 sandbox 거부를 internal로 숨기고 감시 주기가 닫히지 않음

1 participant