Repository navigation
refactor: write the engine names to disk and wire, keep reading the old names - #2387
Conversation
…ide them The focus hint, the owner change sockets, the letter reason codes and the launch failure reasons are written under their engine names. The 1.2.1 keys stay readable through serde aliases and reason matches, and tests read the 1.2.1 forms so each alias is pinned.
The status engine, the machine profiles, the given name of an agent row, the engine label of a pane, the engine strip tab and the machine profile connect event drop their herdr names; the daemon frame loses the two dead path fields. The core and the web shell change in this one commit, since the snapshot wire has no cross-build reader, and both contract files and the wire enum tests change with them. The release 1.2.1 fixture tests now pin each rename under its engine name.
yansfil
left a comment
There was a problem hiding this comment.
Round 1: FAIL at 662246ff2faa6ee1a1a659d9a2178d14258de531. Two ordinary findings remain; no serious runtime defect was established by this source-only review.
Blocking findings:
-
Ordinary - Tests -
web/src/coreError.ts:66-68. The stored launch reasonagent_start.refused_by_herdrretains its translation mapping, but no test exercises either this old reason or its newagent_start.refused_by_enginecounterpart.coreError.test.tsonly exercises unrelated kinds, and the changed Rust launch test asserts only the new producer value. Removing the old mapping leaves the existing tests unchanged and makes an existing saved refusal fall back to a generic error. Add a caller-visible wording test using a literal old stored reason and the expected refusal sentence, covering the new spelling too. This is the missing per-alias regression required by c1 and engineering principle 12. By inspection, the focus fixture, both required owner-socket aliases and all three spent-bell normalization cases do have assertions that would fail if their compatibility paths were removed. I did not mutate or execute them. -
Ordinary - Module boundaries / scope completeness -
hided/src/core_move/answer.rs:102,hided/src/core_move/target.rs:191,hided/src/supervisor/move_back.rs:311-348. Inventory 4b explicitly lists the core-move responseherdr_socketfor renaming toengine_scopeand the synthetic registration'sherdr_socket_pathfor removal/renaming. Both remain, including the response writer and the readers insupervisor.rs:871andmove_back.rs. These are additional 4b wire leftovers, separate from the intentionally retained import names. The paused move prevents a currently demonstrated user failure, but the inventory cannot be reported complete. Finish this row or have its owner explicitly accept and assign this scope exception in writing before passing review.
Minor findings:
- Simplicity -
web/src/snapshot.ts:2379.EngineStatus.socket_pathstill types the field removed fromProviderStatusSnapshot; remove this obsolete member to finish the requested writer/type cleanup. The daemon-frame fields are removed correctly from its schema andDaemonInfo. Also remove the orphaned socket comment now attached toDevice.agent_countat line 2068. - Correctness of documentation -
docs/UI_BEHAVIOR.md:2454. The guide still saysgiven_nameisherdr_nameon the wire, contradicting this PR. Update it with the rename. Related stale references remain inweb/src/i18n/resources/kitReasons.ts:3(herdr_profile_refusal, a contract reference rather than an i18n key) andhide-core/src/model/rest.rs:52-53(the nonexistent older-shell compatibility rationale). - Evidence / PR body. The body still lists
scripts/check-design-contract.mjsas not run. Exact-head CI run 42823100129 successfully executed that command and its accompanying checks. Update the evidence to distinguish local non-execution from CI success. I found no separate local author run record, so I cannot establish a contradiction about local execution. The linked candidate screenshot satisfies the presence requirement; I did not independently inspect or reproduce the candidate capture.
Other results: the inspected snapshot/event producers and web consumers move together, both JSON contracts and wire_enum_tests agree, and the rewritten 1.2.1 tests remain meaningful: literal fixture-key mappings plus old-key absence checks pin status names; exact object equality pins pane/strip names; the named-agent test pins given_name. The release fixtures and kept import implementation are unchanged. Phone source uses its own projection, and source searches found no renamed-key reader in mobile/relay; retained protocols are 1, 3 and 4, but their pinned bundle bytes are not present locally and were not downloaded or executed. Deferred herdr_kind, i18n keys and unrelated identifiers were not treated as rename failures.
Review covered correctness, fragmentation, simplicity, module boundaries, ownership/limits and tests. No new resource owner or high-frequency work was introduced by the inspected rename. Per instruction, no files changed, builds, cargo, tests, native/browser QA, pushes, merges or additional agents. Full CI was still pending when inspected. This is a COMMENT review, not an approval or a request-changes action.
yansfil
left a comment
There was a problem hiding this comment.
Round 2: PASS at 786254557fcab749713838a10e73204f9af5be65. Both ordinary blockers are fixed. One minor evidence correction remains. Reviewed only 662246ff2f..786254557f, the updated PR body, and the registration source needed to judge the removed key.
| Round-1 finding | Status | Evidence |
|---|---|---|
| Blocking 1: missing regression for the stored launch refusal | Fixed | web/src/coreError.test.ts:21-28 exercises literal old/new reason codes against the expected catalog sentence in English and the old reason in Korean. Removing the legacy mapping would yield the generic fallback and fail these assertions. The expectation comes from the catalog rather than the mapping under test. |
| Blocking 2: core-move wire leftovers | Fixed | hided/src/core_move/answer.rs:103-104 writes engine_scope and reads herdr_socket as an alias. Its new test at lines 135-158 checks the new key, absence of the old output key, and recovery of a nonempty scope from the literal old key; removing the alias would leave None and fail. The writer at target.rs:191 and readers at supervisor.rs:871 and supervisor/move_back.rs:311-312 now agree. |
| Minor: obsolete socket type and orphaned comment | Fixed | web/src/snapshot.ts:2067-2068 no longer attaches the socket comment to agent_count; EngineStatus at line 2376 no longer declares socket_path. |
| Minor: stale documentation | Fixed | docs/UI_BEHAVIOR.md:2454 now names given_name on the wire; web/src/i18n/resources/kitReasons.ts:3 names profile_refusal; hide-core/src/model/rest.rs:52-53 no longer claims an older shell requires compatibility. |
| Minor: PR evidence | Partly fixed | The unrun claim is removed, but the body now calls run 42823100129 a result on "this head". That run belongs to 662246ff2f. The actual successful design run for 786254557f is 42824785940. Replace the run reference or label the earlier result with its SHA. This does not block review. |
The move_back.rs:344-349 deletion is correct: DeviceRegistration deserializes through StoredDeviceRegistration (hide-core/src/model.rs:6102-6118), which has no socket field and does not deny unknown fields. Its conversions at lines 6120 and 6158 do not store such a field. Thus the removed synthetic herdr_socket_path key was previously ignored. The real scope still travels as peer_socket to back::back_change at move_back.rs:359; no scope information is lost. This satisfies engineering principle 1 by deleting an unused value while retaining the required legacy response alias.
Source-only follow-up: no files changed, tests/builds/cargo run, native/browser checks, pushes or merges. The newly added tests were inspected, not executed by this review. Current-head design CI success was read from GitHub and does not establish full CI or runtime verification. No new serious or ordinary finding in the delta. This is a COMMENT review, not an approval action.
## Summary The restart fixture waited for the restarted daemon on `status.herdr.state`. The snapshot now sends `status.engine` (with-hide#2387), so every Playwright test that restarts hided timed out after 15 s waiting for "the restarted core's engine and saved Workspace". The fixture reads `status.engine.state` now. No screenshot: test fixture only, no screen changes. ## Review - **Decide**: nothing. - **Risky files**: `web/e2e/hided-fixture.ts` only (two lines: the local type and the connected check). - **Cost**: none. - **Questions**: none. ## Tests - **Layer**: Playwright e2e fixture shared by every restart test. - **Catches**: a restarted daemon that never reports its engine connected; the failing tests are the existing restart specs, for example `read-across-restart.spec.ts`. - **Repeat**: not repeated; the fix is the wire name the fixture reads. - **Waits**: the existing 15 s wait for the restarted core, unchanged. ## Evidence - **Verified**: `rg` finds no other `status.herdr` reader in `web/`, `desktop/` or `scripts/`; the failure message and its cause were reported from mission-45's with-hide#2390 CI (five Linux e2e shards with the same 15 s timeout). - **Not verified**: the restart specs were not run locally; CI runs them.
…cket variables (with-hide#2397) Related: mission-48 (Herdr leftovers, stage 3); follows with-hide#2379 and with-hide#2387. ## Summary Hide no longer runs Herdr, but the core, platform and adapter code still named Herdr in identifiers, test fixtures, comments and log names. This renames those to the import's names or neutral names, rewrites comments so they say what the engine does, and removes the environment variables nothing reads any more (`HERDR_SOCKET_PATH`, `HERDR_SESSION`). The rule that keeps the operator's Herdr pane identity out of a Hide pane is now one constant and one helper. Behaviour does not change: the read-only Herdr import keeps its names, its files and its attribution. No screenshot: no screen changes. ## Review - **Decide**: the PRD slugs (`engine-bundle-4-herdr-removal`, `grid-ahead-of-herdr`) stay in comments because renaming them would break links to local PRD files. - **Risky files**: `hide-platform/src/process.rs` - the new `FOREIGN_PANE_IDENTITY` rule is used by the holder, desk, node and core copies. - **Risky files**: `hide-node/src/ssh/openssh.rs` - the ssh command keeps its own case-sensitive comparison, so a lowercase `herdr_*` variable is still passed on, as before; a test pins it. Desk and holder already matched case-insensitively. - **Risky files**: `hide-core/src/environment.rs` - the `HERDR_SOCKET_PATH` registry row goes; the status list is now three rows. - **Cost**: none; no hot path changed. - **Questions**: none. ## Tests - **Layer**: unit, the existing crate suites (no new layer). - **Catches**: `the_foreign_pane_identity_is_the_herdr_prefix_whatever_the_case` fails if the prefix or its case rule changes in hide-platform. - **Repeat**: not repeated; the changed tests are renames with the same assertions, and the one new test is a pure function check with no timing, so each ran once in `verify` on 6c83a76. - **Waits**: none added. ## Evidence - **Verified**: `verify` is green on 6c83a76, including the e2e lanes. - **Verified**: `scripts/verify-cargo.sh fmt-check` passes. - **Verified**: filtered nextest runs, all green: hide-core 277 tests (ids, environment, session navigation, remote settings, device kit, node issues, gone worktrees, spent bells, import, machine profiles, moved workspace); hide-platform 30 (host, foreign pane identity, login child); hide-holder 1; hide-desk 4; hide-node 113; hide-kit 29. - **Not verified**: the full workspace suite locally; only the filtered crate tests above were run, and CI covers the rest. - **Not verified**: `docs/INSTALL.md` support rows still name the move; that belongs to the transition-removal node. - **Not verified**: assertion and panic messages in hide-core tests still say "Herdr" (about 70 lines); they are expectations, not comments or names. - **Not verified**: plugin JavaScript comments in `hide-agent-hooks` (`opencode/tui.js`, `opencode/plugin.js`, `pi_extension/extension.js`) still say Herdr; they are hashed into the installed plugin, so changing them needs a version bump. - **Not verified**: `AGENTS.md` still links "Drawn ahead of Herdr" and has a "Herdr Source" section; the web-and-scripts node owns it. - **Not verified**: `hided/src/herdr_transition.rs` log component names are unchanged; the transition-removal node owns that file. - **Not verified**: `ARCHITECTURE.md` heading "The core, the shell and Herdr" is unchanged, because other docs link to its anchor.
Summary
저장 파일과 wire에 남아 있던
herdr이름을 엔진 이름으로 바꿨습니다. 디스크에는 새 이름으로 쓰고, 옛 이름으로 저장된 값도 계속 읽습니다. 스냅숏과 이벤트의herdr_*키도engine_*,given_name,machine_profiles,machine_profile_connect로 바뀌었고, 코어와 웹과 두 계약 JSON이 한 PR에서 같이 바뀌었습니다.스크린샷은 격리 후보 앱(빈 상태 폴더)의 사이드바와 탭 줄입니다.
Review
hide-core/src/persistence.rs,hide-core/src/node_migration/reown.rs: 저장 파일을 읽는 자리라서 옛 값 별칭이 빠지면 기존 사용자의 상태가 안 읽힙니다.hided/src/core_move/answer.rs,target.rs,supervisor.rs,supervisor/move_back.rs: 이동 점검의herdr_socket이engine_scope로 바뀌었습니다. 다른 빌드가 보낸 답은 옛 이름으로도 읽히고, 그 시험이answer.rs에 있습니다. 이동은 지금 멈춰 있습니다.hide-core/src/runtime/spent_bells.rs: 옛 reason code를 새 이름으로 맞추는 정규화가 여기 있습니다.hide-core/src/model.rs(release_1_2_1_wire_tests): 아래 두 시험의 뜻이 바뀌었습니다.contracts/snapshot-wire-enums.json,contracts/hided-ws.schema.json: 두 계약이 웹과 코어에서 같이 읽힙니다.web/src/coreError.test.ts: 옛 launch 거절 코드와 새 코드가 같은 문장으로 번역되는 것을 봅니다.every_status_key_1_2_1_sent_is_sent_under_its_engine_name: 1.2.1이 보낸 고정 파일의 키를 새 이름으로 옮겨 비교합니다. 옛 이름을 그대로 기대하지 않습니다.a_pane_is_sent_as_1_2_1_sent_it_under_engine_names: 고정 파일의herdr_label을engine_label로 옮겨 비교합니다.tests/fixtures/release-1.2.1/snapshot.json)은 건드리지 않았습니다. snapshot wire에는 다른 빌드의 읽는 쪽이 없어서 (docs/ARCHITECTURE.md, No link forms across builds) 시험 설명도 그렇게 고쳤습니다.Evidence
hide-core1189개,hided와 wire 관련 406개 통과 (scripts/verify-cargo.sh nextest).focus_from_herdr,herdr_call_failed정규화)를 지우면 대응하는 시험 두 개가 실패하는 것을 확인한 뒤 복원했습니다.tsc --noEmit오류 0, vitest 2846개 통과. 부하 시간 초과로 실패한src/practice/worlds.test.ts한 건은 단독 재실행에서 통과했습니다. 리뷰 수정 뒤에는coreError.test.ts5개가 통과합니다.check-design-contract.mjs가 통과했습니다.node_link_facts,node_session_activity두 개)는 부하가 27일 때owned child exit unconfirmed로 실패했고, 단독 재실행에서 모두 통과했습니다.sidebar-menus.spec.ts9개 통과 (data-tab-kind선택자를engine으로 바꿈).hided,hide,hide-holder로 빈 HOME과 격리 상태 폴더에서 띄워 사이드바가 새 이름으로 그려지는 것을 확인했습니다. 확인 뒤 상태 폴더와 프로세스를 지웠습니다.scripts/verify-web.sh전 lane: 이 PR의 CI가 돌려야 합니다.herdr_kind, 번역 키coreError.herdr.*, 가져오기 파일과 이름,herdr_profiles_list이벤트, 로그 구성 요소herdr_profiles)은 다음 노드에서 다룹니다.Breaking change
없습니다. 옛 이름으로 저장된 값은 계속 읽고, 스냅숏 wire는 코어와 셸이 한 빌드로 같이 배포되므로 빌드 사이 호환 문제가 없습니다.