Repository navigation
Add scoped project settings - #1073
Merged
Merged
Conversation
Since hided answers a checkout with no GitHub remote without asking gh, that fixture reads Local under Auto, which is the existing source rule. Give the repository a GitHub remote and a gh that answers as a logged-out account, so the spec still proves a failed GitHub read stays GitHub.
…ings Main now answers such a checkout without asking gh, and the existing source rule reads Local for it. The menu spec's repository has no remote, so it checks the Connections tab says so.
Main replaced the Tools column with the right lane (#1112) and now holds a Memory switch press until the agent hooks are first read (#1086). Project settings opens Memory as the lane's Memory tool and calls that lane forward; a held press that the hook read refuses is recorded as that Project's Memory failure, like every other refused Memory action.
… limit Each delayed answer took 14 of Git's 15 seconds, so on a loaded machine the first discovery call timed out and the read returned no repository. At 10 seconds the read still ends at the one 45-second deadline, and a budget renewed after discovery still ends near 55 seconds and fails; whichever part the read reached last reports that it was not finished.
yansfil
added a commit
that referenced
this pull request
Oct 15, 2026
Related: #1073 (Project Settings, 이 미지원 두 줄을 둔 PR) ## Summary - 프로젝트 설정 > 작업 방식의 보호 두 줄은 Unsupported 표시뿐이라, 에이전트가 원본 체크아웃 브랜치를 바꾸거나 main을 고쳐도 막을 수단이 없었다. - 그 자리를 프로젝트별 스위치 4개로 바꿨다: 작업 폴더 지키기, 기준 브랜치 지키기(+에이전트 머지도 막기), 위험한 Git 명령 막기, 파일 지키기(경로 칩). - 켜면 지원하는 7개 에이전트의 도구 실행 직전 훅이 해당 셸 명령과 파일 도구 호출을 실행 전에 거부하고, 에이전트는 규칙 이름과 할 일을 담은 이유를 받는다. 운영자 화면에는 알림이 없다. - 판단은 훅이 그 기계의 정책 파일과 로컬 Git 파일만 읽어서 한다. core는 저장할 때, daemon 시작과 기기 연결 때 소유 기계에 정책을 보낸다(기기는 node 호출). - 기본값은 모두 꺼짐이라, 켜기 전까지 에이전트 동작은 바뀌지 않는다.   ## Review - **판단해 주세요**: 운영자가 PRD 본문을 검토하지 않았다(`/please` 위임). 아래는 권장안으로 진행한 판단이다. - Hide pane 밖에서 실행한 에이전트에도 그 프로젝트의 보호를 적용한다(훅은 거부만 하고 편지·안내는 하지 않음). - 프로젝트 설정 기록은 보호를 처음 켤 때 v2가 되고, 그 전에는 v1로 남는다(오래된 빌드가 읽기 전용이 되는 범위를 줄임). - PRD 목록보다 넓힌 것: `git pull --rebase`와 `rebase`(기준 브랜치), `git switch -f`(작업 삭제), Cursor의 Delete와 MultiEdit 도구. - 판단이 안 설 때(운영자 답): 켠 규칙에 필요한 사실을 못 읽으면 거부, 정책 파일이 없거나 깨지면 통과하고 진단만 남김. - **조심해서 볼 파일**: - `hide-agent-hooks/src/bin/hide-agent-hooks.rs`, `src/guardrails.rs`, `src/guardrails/git.rs` - high-frequency path: 모든 에이전트의 파일 읽기·수정 호출이 거침 - `herdr-core/src/runtime/guardrails.rs` - runtime mutex: 잠금 아래는 정책 값 계산만, 전달은 owned worker, 재시도 3회 상한 - `hide-host/src/serve.rs`, `hide-node-link` - 기기 wire: `Call::GuardrailPolicy`, PROTOCOL 34 - `hide-agent-hooks/src/install.rs`, `src/codex_trust.rs` - 운영자 소유 훅 파일: matcher에 파일 도구 추가, HOOK_VERSION 8, `Codex CLI` 재신뢰 - **비용 검토**: 규칙이 없을 때 OpenCode·Pi·omp는 helper를 띄우지 않고, 명령 훅 에이전트는 helper가 정책 파일만 읽고 끝난다(CPU p95가 `/usr/bin/true`보다 3-5 ms 높음). `git status`는 변경을 지우는 명령일 때만, fsmonitor를 끄고 `GIT_*` 환경을 지운 채 돈다. - **질문**: high-risk라 사람 머지 승인이 필요한 범주다. 운영자의 "열린 PR 전부 머지" 지시로 night-merge-lead가 머지 여부를 정한다. ## Evidence - **확인한 것**: - `sasu implement verify` PASS: `verify-cargo.sh test`, `lint` (main 병합 커밋 기준) - `verify-web.sh`: web 1668, desktop 185 테스트와 디자인 계약, 귀속 표기, 워크스테이션 식별, Herdr pin, core 경계 검사 - desktop e2e project-settings 3/3: 실제 Escape, 정책 파일이 저장됨 표시 뒤에 기록됨 - 격리 환경(별도 HOME과 Herdr 소켓, 로컬 bare remote, 가짜 gh)에서 실제 거부 관찰: `Claude Code`(pane 밖 포함), `Codex CLI`, `Cursor`, `OpenCode`, `Pi`, `omp` - Windows CI 첫 실패는 테스트가 Windows 경로를 따옴표 없이 셸 줄에 넣은 탓이었다(POSIX 셸이 백슬래시를 escape로 읽음). 같은 종류로 Git Bash 드라이브 경로(`/c/...`, `/cygdrive/c/...`)가 보호 파일 판단을 비껴가던 문제를 찾아 `hide_platform::path`에서 풀게 했다 - main 병합 충돌(훅 matcher, `Codex CLI` 신뢰, hook-bytes fixture, 문서) 해소 뒤 hide-agent-hooks 전체(codex_trust, Windows hook command, plugin JS) 통과 - **확인하지 못한 것**: - Grok 실제 실행: 무료 사용 한도에 걸려 payload 테스트로만 확인 - 규칙 없는 호출의 wall-clock p95 15 ms: 측정 중 load가 20-97이라 증명하지 못했고 CPU 시간만 쟀다 - Windows·Linux에서 실제 에이전트 실행: CI lane에 맡김. Windows 전용 새 테스트는 이 PR의 CI가 첫 실행이다 - Windows PowerShell 명령의 백슬래시 경로 단어는 판단하지 않는다(docs/INSTALL.md에 gap으로 기록) - 운영자 앱에는 설치하지 않았다 ## Breaking change - 기기 프로토콜이 34로 올라 옛 기기 도우미는 연결 때 거절되고 평소처럼 다시 설치된다. 운영자가 할 일은 없다. - 훅 항목 버전이 8로 올라 다음 kit 패스에서 다시 쓰인다. 그 전에 시작한 `Codex CLI` 세션은 'Hooks need review'를 한 번 볼 수 있다. - 보호를 켠 프로젝트의 설정 기록은 v2가 되어, 이보다 오래된 Hide에서는 그 프로젝트 설정이 읽기 전용이다. <details><summary>Verification record</summary> - PRD: `agents/prd/agent-guardrails/prd.md` (sha256 e4e785c518c2def78942fabc1787a111c3dabaa243a25738201fe931dbd8f6d7) - Base 1dc9f25 → head 6aa1671, verified 2026-10-15T20:09:37.667Z: PASS - Verification report: `agents/runs/agent-guardrails/verification-report.json` and `agents/runs/agent-guardrails/verification-report.md`; source fingerprint 8fe14a987b81eb57a01eec51a6b82b496b399b367779ead44f7178648c7b9dc1 - Suites: - S1: GREEN `bash scripts/verify-cargo.sh test` (exit 0) - S2: GREEN `bash scripts/verify-cargo.sh lint` (exit 0) - Reviews (advisory, native subagents): - Fidelity: c38d0c5 -> 77cd117 -> 1c53d76 -> 2786fcc, 5156314, 17af51d (follow-ups) -> 39d4dc2 (main merge conflicts, PASS). Fix now all fixed: policy file not written under XDG_STATE_HOME, Escape closed the whole sheet, focus after a refused path, saving left on "saving" ordering. - Code: same heads. Fix now all fixed: nested repository judged by the outer checkout, new file names with spaces (cp, touch) passed, newer node sequence retry without bound (now 3 then failed), panic on a program path with spaces let the call through, OpenCode/Pi/omp outside a pane started the helper per call without a policy file. - CI follow-up heads 2d515de, 0d9b31b, 2b84d42 -> 426f84d (main re-merge, node protocol 33 taken by main so the policy call moved to 34): short follow-up reviews PASS, no Fix now. - 6aa1671: example drive paths moved off a home folder for the workstation identity check (code comment, test, doc line); short confirmation, no Fix now. - Security (from 1c53d76): Fix now fixed: the hook's `git status` ran the repository's fsmonitor and inherited `GIT_*`; now disabled and cleared. - Follow-up improvements (not fixed): reftable repositories, no whole-call deadline, matcher rebuilt per word, generic plugin panic log cause, `grep -T` over-refusal, a save stays "saving" after a worker panic, stale comments at `codex_trust.rs:425` and `install.rs:909`, duplicate case at `codex_trust.rs:1081/1087`, `install.rs:1154` "earlier" case is not main's v7 matcher. - Evidence: none registered separately. - Changed paths: 97 (see Files changed) - Delivery: mode pr, branch `spec/agent-guardrails`, base `main` </details>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
프로젝트 행과 Overview에서 연결·작업 방식·기억을 관리하는 별도 설정 창을 엽니다.
기기와 원본 checkout별로 확인된 저장 값을 공유하고, 저장 실패에는 기존 값과 재시도를 유지합니다.
새 작업 위치와 기준 branch를 초기 선택에 적용하고, 기존 이슈·PR·Memory 연결은 원래 저장소를 보존합니다.
프로젝트 기억을 열면 대상 checkout에서 오른쪽 레인의 Memory 도구를 엽니다. 좁은 창에서도 레인이 앞으로 나옵니다.
Windows 세션 경로를 읽은 기기에서 변환해 원래 저장소를 찾고, 재시작 검사는 실제 저장 완료를 기다립니다.
설정 메뉴가 있어도 긴 Overview 제목을 읽을 수 있도록 돌아가기 버튼도 공간에 따라 이름이 있는 아이콘으로 바뀝니다.
진입 위치: 프로젝트 행의 설정 아이콘
프로젝트 행에 마우스를 올리거나 키보드로 이동하면 설정 아이콘이 나타납니다.
Connections: 저장소와 이슈 출처
왼쪽 탐색과 설정창 전체를 함께 보여줍니다. Linear는 준비 중입니다.
이 캡처는 main #1107 이전 것이라 원격 없는 저장소가 GitHub 읽기 실패로 보입니다. 지금은 원격 없는 저장소는
Automatic (Local)로 보이고, GitHub 저장소의 읽기가 실패할 때만 GitHub에 남아 실패를 알립니다.Working style: 새 작업 위치와 기준 branch
New worktree 저장 상태와 자동 감지한 main을 표시합니다. 보호 기능 두 항목은 미지원입니다.
Memory: 자동 기억 설정과 프로젝트 기억 열기
좁은 창·일본어·밝은 테마에서 설정창 전체를 보여주고, 이어서 프로젝트 기억을 연 화면을 보여줍니다. 두 번째 캡처는 main #1112 이전 것이라 Memory가 옛 Tools 열에 보입니다. 지금은 오른쪽 레인의 Memory 도구로 열립니다.
Review
herdr-core/src/runtime/project_settings.rs,runtime/session_work.rs- 저장 확정·원격 연결 전달·취소와 잘못된 저장소 생성 거절.herdr-core/src/links/{worker,store,ledger_store}.rs- 과거 세션의 원래 저장소·재스캔·기기 읽기 중 연결 변경·마이그레이션.herdr-core/src/runtime/issues.rs,runtime/memory_promotion.rs,hide-memory/src/store.rs- 대상 검증·기존 링크와 Memory의 원래 저장소.web/src/ProjectSettingsSheet.tsx,web/src/navigation.ts,web/src/App.tsx- 설정 대상·포커스 복귀·Memory 도착 판정.herdr-core/src/runtime/project_memory.rs- main #1086의 "훅을 처음 읽기 전 Memory 켜기 보류"와 이 PR의 프로젝트별 실패 표시를 합친 곳입니다. 보류 중 다른 프로젝트의 요청과 읽기 실패 거절이 그 프로젝트의 실패로 남습니다.herdr-core/src/runtime/workspace_view.rs- main #1112의 오른쪽 레인으로 옮긴 Memory 열기입니다. 레인 도구를 Memory로 두고 lane call로 앞으로 부릅니다.desktop/e2e/project-settings.spec.ts- 로그아웃 상태 fixturegh로 GitHub 읽기 실패 유지(B15)를, 원격 없는 저장소로 Local(B16)을 확인합니다.hide-host/src/serve.rs,web/e2e/session-work-ledger.spec.ts- 기기의 경로 변환과 재시작 전 저장 완료.web/src/SessionRecord.tsx- main #1106이 세션 기록을 새로 짰습니다. 이 PR의 변경은 이슈 초안 실패 줄이 원인(저장소 모름·바뀜·그 외)을 말하는 한 줄뿐이라, main 파일에 그 줄만 다시 얹었습니다.hide-host/src/worktrees.rs,hide-host/tests/it/worktrees.rs,.github/workflows/pr.yml- public 조회의 단일 마감 시간, 자식 정리와 Windows 실제 실행. 같은 파일에 main #1114의 재시작 뒤 측정 결과 보존이 함께 들어와 있습니다. 그쪽은 git을 부르지 않아 마감 시간 밖으로 새는 호출이 없습니다.hide-host/tests/it/worktrees.rs- 이 PR의 단일 마감 테스트에서 가짜 git 지연을 14초에서 10초로 줄였습니다. 호출당 15초 제한에 여유가 1초뿐이라 부하가 높으면 첫 호출이 잘려 저장소를 못 찾았습니다. 10초에서는 잘리는 지점이 측정 단계로 옮겨가서, 저장소든 worktree든 끝내지 못한 쪽이 그렇다고 알리는지로 검사합니다. 마감을 새로 시작하는 버그를 일부러 넣으면 55초에 끝나 여전히 실패합니다.herdr-core/src/runtime/tests/project_sessions.rs- 실패 문구 대신 실패 상태로 기존 4회 요청을 제어하며, 최종 오류 없음·정확한 세션 1개를 유지합니다.hide-session/tests/it/usage.rs- 고정 호출 횟수 대신 checkpoint와 완료 상태로 집계하며 정확한 이벤트·유실·EOF와 각 페이지 상한을 유지합니다.hide-memory/src/store.rs의 비교 테스트 - 기존 제어 시계로 의미를 검사하며, production 100ms와 별도 99/100ms deadline 검사는 유지합니다.web/src/OverviewTitleRow.tsx,web/e2e/overview-header.spec.ts- 돌아가기·설정 진입 유지와 글자형 너비 기준의 안정된 축약 판단.Evidence
node_session_activity테스트 1개가 실패했습니다. 기기 부하가 평균 35~39일 때 시작 확인이 5초를 넘긴 것입니다. 같은 head 단독 실행은 5/5 통과했고 기한·재시도는 바꾸지 않았습니다. 다음 전체 검사 두 번은 테스트가 모두 통과했습니다.40에서58에서 3/3 통과).remote_spawn테스트 1개의 응답 대기 시간 초과(단독 5/5 통과), 한 번은 디스크 여유 897 MiB에서connect_build2개의 서명용 바이너리 복사 실패입니다. 둘 다 이 PR이 건드리지 않은 테스트이고, 기한·재시도는 바꾸지 않았습니다. 6cd7에서는 이 PR의 worktrees 마감 테스트가 부하 때문에 실패해, 위 Review에 적은 대로 테스트의 고정 지연만 고쳤습니다(부하 평균 38Verification record
agents/prd/project-settings/prd.md(sha256 1106d497dfa6419a4f34d7f705abcf4e4ce705d8db5797aeb32a195f97a1246e)agents/runs/project-settings/verification-report.jsonandagents/runs/project-settings/verification-report.md; source fingerprint 2df4c4990cd48a7ce612ee5c73cf7bcdb69ef21d4fdc5b023aaef9efbd6641f2bash scripts/verify-cargo.sh test(exit 0)bash scripts/verify-cargo.sh lint(exit 0)gen-prd/project-settings, basemain