Repository navigation
feat: list the projects worth adding from agents, Paseo and Herdr in Add a project - #2204
Conversation
There was a problem hiding this comment.
FAIL: a6738dc23d2e3bdb86fd8f41b63da5b35f7b13e9, base 80fa605d8708325509bf2e8165f046291c016f6b와의 차분만 검토했습니다.
docs/CODE_REVIEW.md 기준 serious 3건과 ordinary 1건이며, 아래는 소스로 확인한 실패 경로입니다.
이번 라운드에서 빌드나 제품 테스트를 실행하지 않았습니다.
-
serious / Correctness, ownership: 특수 파일 하나가 후보 조회 전체와 node worker를 멈춥니다.
hide-host/src/importable.rs:103,
hide-host/src/importable.rs:178
~/.paseo/projects/projects.json이 writer 없는 FIFO이면File::open에서 멈춥니다.
Herdr도 새 호출 경로가 기존herdr_save::fetch의 같은 blocking open(hide-host/src/herdr_save.rs:46)을 사용합니다.
4 MiBtake는 open/read 대기시간을 제한하지 않습니다.
순차 실행하는find는 다른 출처의 정상 후보도 반환하지 못하고, hided의 30초 호출 timeout 뒤에도 이 함수에는 deadline/취소 입력이 없어 node worker가 남습니다.
수정: 기존 regular-file reader 정책처럼 open 자체가 특수 파일에서 막히지 않게 열고, 열린 핸들의 종류를 검사한 뒤 capped read를 하십시오.
읽기 예산·취소를 실제 node 작업까지 전달하고 실패 출처만 dropped로 돌려야 합니다.
Paseo/Herdr FIFO 각각에서 정상 출처가 반환되고 반복 요청 뒤 worker가 남지 않는 회귀 사례가 필요합니다. -
serious / Correctness, failure isolation: 한 에이전트의 목록 오류가 모든 에이전트 후보를 지웁니다.
hide-session/src/catalog.rs:333,
hide-session/src/catalog.rs:272
읽기 권한이 없는.claude/projects또는 그 아래 디렉터리 하나가 있으면collect_jsonl의 오류가session_files(...)?로 전파됩니다.
정상 Codex/Pi/OpenCode/Antigravity 후보도 모으지 못하고importable.rs:86에서 출처 전체를agents로 버립니다.
앞에서 모은 후보도 뒤쪽 walk 오류에 함께 유실됩니다.
B27의 출처별 실패 격리를 만족하지 않습니다.
수정: agent별 walk 결과와 refusal을 나누고, 한 출처의 IO/용량 오류가 이미 모은 다른 출처와 이후 출처를 지우지 않게 하십시오.
동일하게 헤더 reader에서.ok()로 삼키는 unreadable/malformed도 해당 출처의 진단으로 연결해야 합니다.
권한 없는 Claude 저장소와 정상 Codex 저장소를 함께 둔 테스트가 필요합니다.
현재 테스트는 Paseo/Herdr 형식 오류 및 OpenCode DB 오류만 검증합니다. -
serious / Correctness, result ownership: 다른 프로젝트의 결과를 현재 추가 행의 결과로 처리합니다.
web/src/ImportableProjects.tsx:72-85
A를 추가하는 동안 다른 창/CLI가 같은 기기의 C를 등록하면,landed는 경로를 비교하지 않고 새로운 registration id 하나만 보고 A가 성공했다고 판단합니다.
A를added에 넣어 숨기고 B를 시작하므로, 나중의 A 실패는 A 행에 남지 않습니다.
useErrorSince로 읽는 core의 전역last_error도 요청·기기·경로와 연결되지 않아 다른 생성의 오류를 현재 행에 붙일 수 있습니다.
한 컴포넌트의 queue만 직렬화해도 다른 클라이언트의 생성과 격리되지 않습니다.
수정: 성공은 해당 기기+정규화된 등록 루트로 확인하고 실패도 요청별 receipt로 연결하십시오.
임의의 새로운 등록이나 전역 시간 기준 오류로 queue를 전진시키지 않아야 합니다.
A pending → 다른 C 등록 → A 실패의 순서에서 A 실패 행이 남고 B에 잘못된 결과가 붙지 않는 테스트가 필요합니다. -
ordinary / Ownership and limits: 새 전체 조회가 공유 header cache의 퇴출 경로를 빠뜨립니다.
hide-session/src/catalog.rs:358
worked_folders는file_cwd를 통해 Claude/Codex 경로를 전역 HEADERS map에 넣지만, 기존project_sessions의file_cache::retain(&self.home, &listed)(catalog.rs:239)에 대응하는 정리가 없습니다.
프로젝트 세션 조회가 없는 기기에서 세션 파일을 교체·삭제하며 Add a project를 다시 열면, 매번 10,000개 미만이어도 지난 경로가 계속 쌓입니다.
호출당 discovery cap은 프로세스 수명 동안의 cache cap이 아닙니다.
수정: 성공한 전체 discovery의 listed set으로 동일한 per-home 퇴출을 수행하거나 cache 자체에 명시적 상한을 두십시오.
세션 집합을 교체한 뒤 두 번째 worked_folders가 삭제된 파일의 cache를 남기지 않는 테스트가 필요합니다.
verify run 42386235802은 위 head SHA에서 success임을 확인했습니다.
CI 성공은 위 실패 경로의 검증을 대신하지 않습니다.
|
Review 5813750407: all four findings are fixed in 5ec0aa2 and b9909cc. The head is 3c43c6a, which merges #2196's branch at 18ce7a0.
Node protocol: main took 79 for the clipboard, and #2196 is now at 80. The open PR Local checks (filtered, through cargo-slot): all 436 hide-session tests, the hide-host importable tests (4), the core add tests, and the hided boundary tests pass. clippy |
yansfil
left a comment
There was a problem hiding this comment.
FAIL at 3c43c6ae10adb57dc3c661503a7e31a5aa2dc2ce: I1 is closed; I2, I3 and I4 are partly fixed but remain blocking under docs/CODE_REVIEW.md.
-
I3 remaining, serious | correctness / result ownership |
hide-core/src/runtime/project_open.rs:214-228.
answer_addsremoves every pending add matching device+path, but emits a refusal only foranswered.back(). If two windows add the same project while its creation is pending,events.rs:2571-2580joins the second request to the in-flight work. When that work fails, only the second request receives an error; the first window's row stays Adding and its Add all queue never advances. Even for one request, the only result is the globallast_error, which the next event clears (runtime.rs:2919); an event before the next snapshot can erase the refusal before the row sees it. Request identity fixes attribution but does not make delivery durable.
Fix: retain a bounded per-request result for every waiter, using/extending the existing project-open receipt mechanism, and have the row consume its receipt. Test two request IDs for one failing path, plus a failure followed by an unrelated event before reading the snapshot. Success matching by device+path and hided's echoed refusal ID are fixed. -
I2 remaining, serious | correctness / failure isolation |
hide-session/src/catalog.rs:349,368and511-513.
Agent walks still sharevisited. When Claude's tree crosses 10,000 entries, its walk returns Capacity but leaves that counter above the limit. Codex's first entry immediately fails the same check, and so do later file-based stores; OpenCode receives the exhausted counter too (416-420). A large Claude store therefore still suppresses a valid small Codex store, despite the promised per-source capacity-error isolation. The new regression tests a listing error before any entries are consumed, so it misses this case.
Fix: give each source an isolated bounded allocation while retaining an explicit total work bound, so a refused source cannot consume later sources' entire allowance. Test an over-cap Claude tree beside a valid Codex session. Ordinary listing/header errors now have per-agent diagnostics and preserve other agents' rows. -
I4 remaining, ordinary | ownership and limits |
hide-session/src/catalog.rs:368-371,408-412.
Cache eviction is conditional on every agent listing succeeding. Keep.claude/projectsas an unreadable directory (or the regular-file fixture already used by the new test), and repeatedly replace readable Codex session files. Each call inserts Codex headers, butwholeis always false, so none of the deleted files' entries is evicted. A device doing only import discovery still accumulates headers without a lifetime cap. The new cache regression covers only a wholly successful listing.
Fix: prune each successfully enumerated source independently, or give the cache an explicit bounded admission/eviction policy that also applies during partial failures. Add a rotation regression with a permanently refused sibling source. This is the resource cap required by principle 15; successful-run cleanup alone does not supply it.
I1 closed: Paseo (hide-host/src/importable.rs:119-133) and Herdr, including the shared fetch path (hide-host/src/herdr_save.rs:48-57), now use hide_platform::fs::open_regular (fs/mod.rs:118-139), with nonblocking open and validation of the opened file. FIFO regression: hide-host/tests/it/importable.rs:282.
The added 20-second deadline is cooperative: it is checked between sources/files, not inside directory walks or blocking filesystem calls. This review does not treat it as proof of a hard 20-second runtime bound.
Protocol 82 is declared at hide-node-link/src/protocol.rs:344. Older non-24 protocols are rejected by hide-node/src/ssh/host.rs:1128; installation/digest replacement precedes Hello (ssh/device.rs:435-466, ssh/bootstrap.rs:441). The frozen protocol-24 exception remains; this is not a claim that protocol24 supports import discovery. No live helper upgrade was exercised.
CI run 42395570476 is successful at this exact SHA. Evidence here is source review and inspection of regression tests; no local Cargo/build/test execution, source changes or commits. The terminal-links failure was not investigated. Unrelated changes inherited from main and #2196 were not re-reviewed in this four-finding pass.
|
Recheck 5814169553: the three findings left open are fixed in 12b3a05. I3: result ownership.
I2: one budget per source.
I4: pruning with a failing source beside it.
Local checks (filtered, through cargo-slot): all 437 hide-session tests, the core receipt and add tests, and the hide-host importable tests pass. clippy |
…device-add-project-import
yansfil
left a comment
There was a problem hiding this comment.
FAIL at b6e855d1829e6c1d018ff850dd3ffe383cb62940: I2 and I4 are closed; I3's admitted-request cases are fixed, but admission refusal still strands an import row.
Serious | correctness / failure delivery | hide-core/src/runtime/project_open.rs:218-227, web/src/ImportableProjects.tsx:72-91.
When all 32 shared project-open receipts are pending, await_add emits only last_error = workspace.create_busy with the request ID and returns false. No receipt is created and no work is started (events.rs:2492). The import row now reads only status.project_adds and hided's path_refused; it no longer observes last_error. Therefore an import submitted while 32 CLI/window opens are pending has no terminal outcome the row consumes. It stays Adding and blocks Add all even after those other requests finish. This occurs even if the snapshot containing the busy error reaches the UI; it is not merely a timing race. Reused-ID admission refusal takes the same undelivered path.
Fix: deliver admission refusal through a request-correlated response that this row actually consumes, while keeping the 32-entry bound. For example, return a structured refusal to the submitting connection before treating the request as admitted. Do not rely solely on the transient global last_error or merely raise the cap. Add a regression with all 32 shared slots pending, then one import add: its row must show the busy refusal, leave Adding, and permit retry/queue progress; include an unrelated event before the client reads its result.
The admitted-request fix is otherwise sound: every matching waiter gets its own retained receipt (project_open.rs:280-290,359-365), so two IDs on one failing path and a later unrelated event no longer lose the result. Queue and snapshot row counts are bounded: MAX_OPENS=32; make_open_room evicts the oldest settled receipt when full (170-184); pending entries are not evicted; publish_project_adds replaces the snapshot vector from the queue (242-265) rather than accumulating historical rows. No explicit acknowledgement/TTL removes settled receipts; they remain within the bound until capacity pressure or runtime teardown.
I2 is closed by fresh per-store counters (hide-session/src/catalog.rs:362,409) and the over-cap Claude plus valid Codex regression (1128). I4 is closed by pruning every completely listed store independently (366-368, file_cache.rs:83-90); its rotation regression now keeps Claude permanently unlistable (1155).
The #2196 merge retains the reviewed clone fix; protocol is 82. Verify 42405165904 succeeded at this exact SHA. This pass inspected source and regression tests; no local Cargo/build/test run, tracked edits, commits, or installed-app interaction. The terminal-links failure was not investigated.
|
Review 5814606099: an add the core does not admit now gets a receipt like any other, fixed in 78b415d. Fix:
Tests:
Local checks: the core add, receipt and project-open tests pass (39). clippy |
yansfil
left a comment
There was a problem hiding this comment.
FAIL at 78b415d587030a1b1e063f8500c429f25cee7996: the round-3 overflow-delivery finding is closed, but storing a reused-ID refusal exposes one new result-ownership bug.
Serious | correctness | hide-core/src/runtime/project_open.rs:388-391.
await_add now appends a refused receipt with the reused ID, potentially for a different device/path (225-266). settle_project_open initially selects pending receipts for the correct device/path (313-318), but its write-back matches only the request ID and updates every entry carrying it, including already-refused entries for other paths.
Concrete sequence: admit ID r for /A; refuse another add with ID r for /B; complete /A successfully. The final loop changes both receipts to Added, including /B, even though /B was refused and no work was started for it. The web's new findLast reads that later /B receipt (ImportableProjects.tsx:72) and marks its row added (78-80). An original failure similarly overwrites the independent admission-refusal reason. The new reused-ID test stops before settling waiting-1, so it misses this transition.
Fix: mutate only the actual pending entries whose device and path match this completion, preserving all terminal receipts. Do not reselect by ID alone now that the queue deliberately permits duplicate IDs for refusal records. Extend the regression with reused ID + different path, then complete the original request and assert that the later receipt remains workspace.create_refused, the original gets its own result, and no unadmitted row becomes Added.
The requested overflow fix itself is correct: a busy add now gets a published refused receipt and starts no work; the UI consumes it and moves on. Waiting receipts are bounded at 32 (admits_open:172-179), settled at 32 (trim_settled_opens:189-205), and trimming runs after insertion and settlement. Only settled entries are evicted, oldest in queue order; the queue and published vector are at most 64 at observable points. hide <path> still returns project_open_busy with 32 pending (113-114), and its existing regression remains.
Verify 42407729062 passed at this exact SHA. Evidence here is source and regression-test inspection. No tracked edits, commits, Cargo/build/test execution, or installed-app interaction; terminal-links was not investigated.
|
Review 5814708939: fixed in c661d05. Fix:
Tests:
Local checks: the core add, receipt and project-open tests pass (40). clippy and |
Related: #2196 (stacked on it; this is the second layer of "기기에서 프로젝트 추가")
Summary
Adding a project you already work on meant finding its folder by hand, on this Mac and even more on a device.
Now Add a project lists
가져올 수 있는 프로젝트under the other ways: the folders your agents worked in on the chosen machine, and the projects Paseo and Herdr keep there.Each row carries a chip per source, and
추가or모두 추가 (N)adds them while the dialog stays open; a refused row stays with its reason.Hide only reads those files, so Paseo and Herdr keep working beside it, and a file it cannot read just drops out and goes to the log.
Start view on a Linux device: one repository found by two agents, one kept by Paseo and Herdr, a long path cut with an ellipsis.
Review
모두 추가sends onecreate_workspaceper row, one after another, not one event. Each add carries arequest_idand gets its own receipt in the core, besidehide <path>'s and under the same bound of 32, published asstatus.project_adds(pending, added, or refused with kind and message) and cleared by no later event; every receipt waiting on a machine and path is settled with that registration's outcome, so another window's add answers no row (B25).updatedAtis its record's time, not its last use, so a Paseo-only project untouched for 30 days drops out unless an agent worked there too.session.json.worked_foldersreads agy's index for it. The session archive itself is unchanged.hide-host/src/importable.rs- access boundary: every folder goes throughregister::judge(unconfirmed), so only roots under home come back; reads are capped (Paseo 4 MiB, Herdr 4 MiB, 400 folders judged, 20 answered), opened only as regular files without waiting (hide_platform::fs::open_regular, also now inherdr_save::fetch), and the search ends by a 20 s deadline below hided's 30 s bound.hide-core/src/runtime/project_open.rsawait_add/settle_project_openand thestatus.project_addswire field - snapshot wire and result ownership: add receipts share thehide <path>receipt queue (bound 32) but bring nothing forward; everycreate_workspaceoutcome passessettle_project_open.hide-session/src/catalog.rs-project_sessionsandworked_foldersshare one walk per agent (agent_files);worked_foldersreads each agent under its own budget ofSESSION_DISCOVERY_LIMITentries, refuses a store it cannot list, past its budget, or a session file it cannot read for that agent only, and prunes the header cache per store that listed whole. A header that could not be read is told apart from one refused by rule (HeaderError), and only the latter is cached.hided/src/server.rsnode_ask- failure path: runs offMutex<Runtime>on a blocking task, 30 s bound, each dropped source logged asadd_project.import_source_dropped.web/src/ImportableProjects.tsx- the one-at-a-time queue and how an answer is matched to its row.hide-host/src/herdr_save.rssays Bundle 4 PR B deletes it with Herdr; this PR reads Herdr saves through it, as the existing Herdr import does.Evidence
hide-hostimportable tests (4) on a real temporary home: a repository worked from a linked worktree and a subfolder is one row with both agents; a folder Paseo and Herdr both keep is one row with both; home, outside home, gone, archived, older than 30 days and registered are left out; every file read is byte-equal afterwards (B26); an unreadable Paseo registry and a newer Herdr format drop out alone (B27); 25 projects answer the newest 20 (B22); a FIFO at Paseo's registry and at Herdr's session drops each at once while the agents' project still answers, three times over on a thread with a 10 s bound, and a passed deadline drops every source as late.hide-sessiontests: each agent folder once, an old session left out, an unreadable OpenCode database refused alone; a Claude store that cannot be listed and a Codex FIFO refused beside Codex's folder; a Claude store past its 10,000-entry budget beside a small Codex store still finds Codex's folder; a second search after a Codex file is replaced keeps no header of it while Claude's store never lists.last_error. hided: apath_refusedcarries the add's request id.workspace::tests::a_space_occupying_a_registered_directory_does_not_duplicate_it: a later Herdr workspace in a registered folder joins that project.check-design-contract; Galleryscene=add-projectcaptured in ko/dark, en/light, ja/dark, zh-CN/dark.docs/data-model.mdandworkspace-registry.ts.추가 증거
English, light.
Breaking change
The node protocol goes from 80 (#2196) to 82; 81 is held by an open change (
fix/new-build-reaches-panes). A device helper before 82 is refused at Hello and reinstalled, as on every protocol step.Verification record
device-add-projectPRD, D-09..D-14; B20-B28, and the import parts of B29, B32, B33.