Skip to content

Append the Workspace guidance at SessionStart without a pane id and name the bound checkout - #205

Merged
yansfil merged 2 commits into
mainfrom
fix/hook-probe-without-pane
Sep 27, 2026
Merged

yansfil merged 2 commits into
mainfrom
fix/hook-probe-without-pane

Conversation

@yansfil

@yansfil yansfil commented Sep 27, 2026

Copy link
Copy Markdown
Contributor

Related: #202 (checkout-bound capability; this is its hook-side follow-up)

Summary

  • Bind a Workspace caller outside its pane to the checkout holding its cwd #202 lets hided bind a local caller outside any pane (Codex 0.157's shared app-server daemon, a plain terminal) to the registered checkout holding its cwd, but the SessionStart hook helper still skipped the Workspace probe whenever HERDR_PANE_ID was unset, so a daemon-run Codex session got no Workspace guidance even though bare hide already worked.
  • The helper now probes on every SessionStart and appends the guidance whenever the daemon binds the caller; the guidance names the checkout path the daemon answered with instead of "this connected pane".
  • Pane counters and Herdr reporting stay pane-only; hided, the CLI, and the Action list are unchanged.
Hide Workspace control is available for this session's checkout `/Users/.../herdr-ide.worktrees/hook-probe-without-pane`. Commands affect only that checkout's Workspace; there is no Workspace override. Prefix each command with `HIDE_CAP_REF='…' '/Applications/hide.app/Contents/Resources/hide'`. Available commands: …

Review

  • 판단해 주세요: hide의 hook이 설치된 머신에서는 이제 Herdr 밖의 일반 터미널 세션도 등록 checkout 안에 있으면 Workspace 안내문을 받습니다. #202의 접근 모델(같은 계정, cwd가 등록 checkout 안)과 같은 경계이지만, 안내문이 뜨는 범위가 넓어지는 것을 받아들일지.
  • 조심해서 볼 파일: hide-agent-hooks/src/bin/hide-agent-hooks.rs - SessionStart의 probe 게이트 제거; counters/report 분기는 그대로 pane id를 요구하는지. hide-agent-hooks/src/workspace_context.rs - checkout_path가 없으면 안내문 자체를 내지 않음(failure path).
  • 질문: 없음.

Evidence

  • 확인한 것: scripts/verify-cargo.sh test 전체 워크스페이스 green(새 단위 테스트 2개 포함), lint clean, pnpm --dir desktop typecheck green. 이 브랜치로 패키징한 hide.app을 설치한 뒤, pane id 없이 등록 checkout에서 helper를 직접 실행하면 안내문이 그 checkout 경로를 이름 짓고, checkout 밖에서는 안내문이 없음(hided 로그 checkout_capability.issued / refused). 공용 daemon(pid ppid 확인)에 붙은 실제 Codex 0.157.1 세션 두 개에서 session-start 컨텍스트에 안내문이 들어갔고, daemon의 cwd와 다른 checkout에서 띄운 세션은 그 checkout 경로를 받음. 즉 daemon 안 hook은 스레드 cwd를 봄(Bind a Workspace caller outside its pane to the checkout holding its cwd #202 PRD의 B13 미결 항목 해소).
  • 확인하지 못한 것: desktop/e2e/remote-workspace.spec.ts의 새 plainInCheckout 케이스는 로컬에서 돌리지 않았고 CI의 desktop lane에 맡김. SSH 원격 helper는 pane id 없이는 지금처럼 안내문이 없어야 하는데(원격 attestation은 pane 전용) 라이브로는 보지 않음. 리뷰어 지적: hook이 설치된 일반 터미널의 모든 SessionStart가 probe 두 번(각 2초 상한)을 더 돌리므로 Hide가 안 떠 있어도 최대 4초가 추가될 수 있음; 실제로는 소켓 부재로 즉시 실패.

AI tooling: 대부분 AI 도구. 사람이 대조한 것: 설치본에서의 helper 출력과 Codex 세션 두 개의 답변, 리뷰어의 Fix now 없음 판정.

@yansfil
yansfil merged commit c68e760 into main Sep 27, 2026
6 checks passed
@yansfil
yansfil deleted the fix/hook-probe-without-pane branch September 27, 2026 13:16
yansfil added a commit that referenced this pull request Sep 27, 2026
…th (#208)

Related: PRD `agents/prd/sidebar-typography/prd.md`

## Summary

- Projects 사이드바의 글자가 크기·굵기 단계 없이 비슷해 프로젝트, 체크아웃, 에이전트가 한눈에 갈리지 않았습니다.
- 보드 v7에서 고른 E-mid로 맞췄습니다: 13/600 · 12/400 · 11, 행 높이 프로젝트 36 · 체크아웃
32/48 · 에이전트 28/44, 헤더는 10/500 문장형.
- 체크아웃은 purpose가 있을 때만 두 줄이고, 이름의 첫 `/`까지 접두사는 흐리게 그립니다.
- 사이드바는 Appearance 글자 크기를 따르지 않고, 오른쪽 가장자리를 끌어 220-440 너비를 정하며 코어
`ui_state.sidebar_width`에 저장됩니다(더블클릭은 292).
- Pen 라이브러리 네 마스터와 Screen / Projects Sidebar, 문서 세 개를 같은 수치로 고쳤습니다.

![왼쪽 main, 오른쪽 이 브랜치(292, dark): 프로젝트 13/600, 체크아웃 12/400과 흐린 접두사, 문장형
헤더, 행
높이](https://github.com/yansfil/pr-assets/blob/main/hide/sidebar-typography/8f6a005/before-after-dark-292.png?raw=true)

## Review

- **판단해 주세요**: 대표 이미지에서 11px 둘째 줄(purpose, 시간)이 충분히 읽히는지.
- **판단해 주세요**: 드래그 중에는 사이드바만 가운데 위로 겹쳐 따라오고 가운데와 터미널은 놓을 때 한 번
리사이즈됩니다(포인터 이동마다 PTY 리사이즈를 막으려는 해석).
- **판단해 주세요**: Agents 목록의 그룹 헤더도 같은 10/500 문장형이 됐습니다(같은 마스터 O79KF).
- **판단해 주세요**: D-10은 `--size-compact-agent-row-vpad` 삭제였지만 Pen
`Component / Agent identity`가 참조해 남겼습니다.
- **조심해서 볼 파일**: `herdr-core/src/runtime/events.rs` - runtime mutex 안의
`ui_state_update`; 범위 밖 값은 `last_error`가 아니라 diagnostic으로 거부.
- **조심해서 볼 파일**: `herdr-core/src/persistence.rs` - 저장 형식에
`sidebar_width` 추가, serde default로 이전 저장을 292로 읽음.
- **조심해서 볼 파일**: `web/src/sidebar.tsx` `SidebarEdge` - high-frequency
path; pointermove는 nav의 CSS 변수만 바꾸고 이벤트는 놓을 때 하나.
- **조심해서 볼 파일**: `scripts/gen-tokens.mjs` - 생성 규칙
`.interface-scale-exempt`가 text 토큰을 배율 1로 다시 선언(변수는 선언된 곳에서 풀리므로 nav에
배율만 두면 무효).

## Evidence

- **확인한 것**: 갤러리 12장(dark/light × 220/292/440 × reference/long)을 보드 v7
E-mid, Pen 헤드리스 export와 대조.
- **확인한 것**: 배율 1.25 갤러리 캡처가 배율 1 캡처와 바이트까지 같음(`cmp`); e2e가 글자 크기 17에서
사이드바 글자 크기와 행 기하가 기본값과 같음을 단언.
- **확인한 것**: 격리된 hided + private Herdr e2e가 드래그 중 `ui_state_update`와
`terminal_resize` 0회, 놓을 때 1회, 220/440 경계, 새로고침 유지, 더블클릭 292를 단언.
- **확인한 것**: 코어 테스트 3개(재시작 후 유지, 보낸 값 거부는 로그로, 저장된 범위 밖 값은 292로 열림),
vitest 402, `verify-cargo.sh test`/`lint`, `verify-web.sh`,
`check-design-contract.mjs` 통과.
- **확인하지 못한 것**: Electron 데스크톱 창은 띄우지 않았습니다. 실제 앱 캡처는 격리된 hided가 서빙한 셸을
Playwright Chromium으로 찍은 것입니다.
- **확인하지 못한 것**: 전체 e2e는 66d55015에서 72/73(글자 크기 대기 race 1건)였고, 수정 뒤에는
사이드바 두 스펙만 다시 돌렸습니다.
- **확인하지 못한 것**: 리사이즈 핸들의 키보드 경로는 PRD 비목표라 없습니다.
- **병합**: main의 #207이 체크아웃 둘째 줄에 raised-from 부모를 더해, 둘째 줄은 purpose나 그
부모가 있을 때만 그립니다(에이전트만으로는 한 줄).
- **생성물**: `design/hide-ui.lib.pen`, `design/hide-screens.pen`,
`web/src/tokens.css`는 스크립트 생성 diff입니다(라이브러리는 base JSON에 스크립트로 이식, 구조
diff로 네 마스터와 변수만 바뀜 확인).

<details><summary>추가 증거</summary>

![오른쪽 가장자리를 440 너머로 끌 때: 경계에서 멈추고 놓기 전까지 가운데 위에
그려짐](https://github.com/yansfil/pr-assets/blob/main/hide/sidebar-typography/8f6a005/drag-crop.png?raw=true)

</details>

**AI tooling**: 대부분 AI 도구 - 행 높이와 글자 단계는 사람이 Pen 보드 v1-v7에서 고른 E-mid이고,
캡처를 그 보드와 대조했습니다.

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

- PRD: `agents/prd/sidebar-typography/prd.md` (sha256
313f696f0cb07ff06dc982ba76c6672046c1fb60a9bc9506a8e8f21b15f975b4)
- Base 7b1ae02 → head 2ddba7f, verified 2026-09-27T15:31:35.649Z: PASS
- Verification report:
`agents/runs/sidebar-typography/verification-report.json` and
`agents/runs/sidebar-typography/verification-report.md`; source
fingerprint
50839c1f5b8c2d8bcd34c1e2e9eb459947cb3ac5536e007468d4477f126f4529
- Suites:
  - S1: GREEN `bash scripts/verify-cargo.sh test` (exit 0)
  - S2: GREEN `bash scripts/verify-cargo.sh lint` (exit 0)
- Reviews:
- Fidelity @ 66d5501: PASS, B1-B16 MET; D-10
편차(`--size-compact-agent-row-vpad` 유지)는 수용; Fix now 없음.
- Code @ 66d5501: FAIL, Fix now 2건. (1) `--size-compact-agent-row-vpad`
삭제 요구: 유지, Pen `Component / Agent identity`(HXWFK) 패딩이 참조하고 그 마스터는 D-11의
네 장 밖. (2) `--size-control-regular` 고아: 522b2dac에서 삭제.
- Code 후속 @ 8f6a005 (diff 66d5501..8f6a005): PASS, 두 처분과 e2e 대기 수정
확인.
- Fidelity 후속 @ 8f6a005 (diff와 실제 앱 캡처 6장): PASS, Fix now 없음; 커서 모양은
캡처가 아니라 e2e의 computed style로 증명됨.
- 병합 후속 @ ebe843e (origin/main의 #205 병합, diff 8f6a005..ebe843e):
PASS, 사이드바 변경과 겹치는 경로 없음, 충돌 해소 편집 없음.
- 병합 후속 @ 2ddba7f (origin/main의 #206/#207/#209 병합, 충돌 4건 해소): PASS, Fix
now 없음. #206 hold 키캡과 #207 raised-from·기기 칩 유지; 체크아웃 둘째 줄은 purpose 또는
raised-from 부모가 있을 때만(에이전트만으로는 한 줄, D-04 유지). Follow-up: PRD D-04 표현에
raised-from 확장 반영(사람 승인 필요).
- Evidence: 22 registered (21 screenshot, 1 log); paths are local to the
run directory
-
agents/runs/sidebar-typography/evidence/gallery/sidebar-dark-220-reference-x1.png
-
agents/runs/sidebar-typography/evidence/gallery/sidebar-dark-220-long-x1.png
-
agents/runs/sidebar-typography/evidence/gallery/sidebar-dark-292-reference-x1.png
-
agents/runs/sidebar-typography/evidence/gallery/sidebar-dark-292-long-x1.png
-
agents/runs/sidebar-typography/evidence/gallery/sidebar-dark-440-reference-x1.png
-
agents/runs/sidebar-typography/evidence/gallery/sidebar-dark-440-long-x1.png
-
agents/runs/sidebar-typography/evidence/gallery/sidebar-light-220-reference-x1.png
-
agents/runs/sidebar-typography/evidence/gallery/sidebar-light-220-long-x1.png
-
agents/runs/sidebar-typography/evidence/gallery/sidebar-light-292-reference-x1.png
-
agents/runs/sidebar-typography/evidence/gallery/sidebar-light-292-long-x1.png
-
agents/runs/sidebar-typography/evidence/gallery/sidebar-light-440-reference-x1.png
-
agents/runs/sidebar-typography/evidence/gallery/sidebar-light-440-long-x1.png
-
agents/runs/sidebar-typography/evidence/gallery/sidebar-dark-292-reference-x1.25.png
  - agents/runs/sidebar-typography/evidence/pen/psb-sidebar-l.png
  - agents/runs/sidebar-typography/evidence/pen/psb-sidebar-d.png
- agents/runs/sidebar-typography/evidence/e2e/projects-sidebar-dark.png
- agents/runs/sidebar-typography/evidence/e2e/projects-sidebar-light.png
-
agents/runs/sidebar-typography/evidence/e2e/projects-sidebar-large-font.png
- agents/runs/sidebar-typography/evidence/e2e/sidebar-width-dragging.png
  - agents/runs/sidebar-typography/evidence/e2e/sidebar-width-440.png
  - agents/runs/sidebar-typography/evidence/e2e/sidebar-width-220.png
-
agents/runs/sidebar-typography/evidence/e2e/full-run-before-race-fix.txt
- Changed paths: 130 (see Files changed)

</details>
yansfil added a commit that referenced this pull request Sep 27, 2026
… checkouts (#216)

Related: #202, #205, `agents/prd/checkout-capability/prd.md`

## Summary

#202 let a caller with no attestable pane (Codex 0.157's shared daemon)
hold a checkout-bound Workspace credential, but two edges still spoke
the pane path's language.
A checkout-bound command whose answer no longer matched its credential
was refused as `pane_changed` with "Reconnect the pane and retry", a
step that caller cannot take; it now answers `checkout_not_registered`
with the checkout next action, chosen by the credential's own binding.
A checkout-bound capability whose project was unregistered stayed in the
registry until its eight-hour lifetime ended, counting against the
64-reference cap; the five-second sweep now drops it, with a
`sweep`-stage `pane_auth` record.
`AGENTS.md` gains the rule for `/Applications/hide.app` after
2026-09-27, when one session replaced the operator's app with a pre-fix
build and deleted the backups beside it.

```text
before  {"reason":"pane_changed","next_action":"Reconnect the pane and retry"}
after   {"reason":"checkout_not_registered","next_action":"Run the command from a shell inside a registered project checkout, or reconnect Hide, and retry"}
```

## Review

- **판단해 주세요**: the installed-app rule's wording in `AGENTS.md`; whether
"the operator asked for it in the session doing the replacing" is the
authority line you want.
- **조심해서 볼 파일**: `hided/src/pane_auth.rs` `Registry::sweep` - it now
asks the core once per live checkout-bound entry every 5 s (at most 64,
in-process owner-thread round trips), with the registry lock released
and on a `spawn_blocking` task, so a bootstrap or validation never waits
behind it; a pane-bound entry is not re-resolved.
- **조심해서 볼 파일**: `hided/src/server.rs` - the two post-command context
checks return `cap.changed_refusal()`; the validate refusal's next
action is now keyed by reason.

## Evidence

- **확인한 것**: `scripts/verify-cargo.sh test -p hided` (77 hided unit
tests, including the new
`sweep_drops_a_checkout_capability_whose_checkout_no_longer_resolves`: a
claimed checkout-bound entry against a bare core is gone after one sweep
and its reference file removed, a pane-bound entry stays, and the token
then validates as `credential_expired`), `verify-cargo.sh lint`, `cargo
fmt --all --check`, `check-no-workstation-identity.sh`,
`check-no-attribution.py`.
- **확인하지 못한 것**: no live run on the installed app; the
`checkout_not_registered` refusal text on a real post-command mismatch
is covered by the unit-level `changed_refusal` mapping, not by
unregistering a project under a running daemon. One `hide-agent-hooks`
deadline test failed once under load and passed on rerun (known flake,
unrelated files).

**AI tooling**: 대부분 AI 도구. Diff, the sweep's lock and thread placement,
and the AGENTS.md wording were read by hand.
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.

1 participant