Skip to content

refactor: write the engine names to disk and wire, keep reading the old names - #2387

Merged
yansfil merged 6 commits into
mainfrom
refactor/engine-wire-names
Nov 10, 2026
Merged

yansfil merged 6 commits into
mainfrom
refactor/engine-wire-names

Conversation

@yansfil

@yansfil yansfil commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

Summary

저장 파일과 wire에 남아 있던 herdr 이름을 엔진 이름으로 바꿨습니다. 디스크에는 새 이름으로 쓰고, 옛 이름으로 저장된 값도 계속 읽습니다. 스냅숏과 이벤트의 herdr_* 키도 engine_*, given_name, machine_profiles, machine_profile_connect로 바뀌었고, 코어와 웹과 두 계약 JSON이 한 PR에서 같이 바뀌었습니다.

스크린샷은 격리 후보 앱(빈 상태 폴더)의 사이드바와 탭 줄입니다.

사이드바와 탭 줄이 새 이름(engine 탭 종류)으로 그려진 격리 후보 화면

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-core 1189개, 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.ts 5개가 통과합니다.
    • 디자인 계약: 이 헤드(CI 실행 42828590559)에서 check-design-contract.mjs가 통과했습니다.
    • hided 필터 시험: 이동 답의 별칭 시험을 포함해 109개 중 106개 통과. 나머지 3개(node_link_facts, node_session_activity 두 개)는 부하가 27일 때 owned child exit unconfirmed로 실패했고, 단독 재실행에서 모두 통과했습니다.
    • e2e: sidebar-menus.spec.ts 9개 통과 (data-tab-kind 선택자를 engine으로 바꿈).
    • 격리 후보: 디버그 빌드 hided, hide, hide-holder로 빈 HOME과 격리 상태 폴더에서 띄워 사이드바가 새 이름으로 그려지는 것을 확인했습니다. 확인 뒤 상태 폴더와 프로세스를 지웠습니다.
  • 확인하지 못한 것:
    • e2e 전체 대상 묶음과 scripts/verify-web.sh 전 lane: 이 PR의 CI가 돌려야 합니다.
    • 설정 화면과 가져오기 카드의 캡처: 이 PR에서는 사이드바만 캡처했습니다.
    • 이 PR이 건드리지 않은 이름 (herdr_kind, 번역 키 coreError.herdr.*, 가져오기 파일과 이름, herdr_profiles_list 이벤트, 로그 구성 요소 herdr_profiles)은 다음 노드에서 다룹니다.

Breaking change

없습니다. 옛 이름으로 저장된 값은 계속 읽고, 스냅숏 wire는 코어와 셸이 한 빌드로 같이 배포되므로 빌드 사이 호환 문제가 없습니다.

…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 yansfil left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Round 1: FAIL at 662246ff2faa6ee1a1a659d9a2178d14258de531. Two ordinary findings remain; no serious runtime defect was established by this source-only review.

Blocking findings:

  1. Ordinary - Tests - web/src/coreError.ts:66-68. The stored launch reason agent_start.refused_by_herdr retains its translation mapping, but no test exercises either this old reason or its new agent_start.refused_by_engine counterpart. coreError.test.ts only 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.

  2. 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 response herdr_socket for renaming to engine_scope and the synthetic registration's herdr_socket_path for removal/renaming. Both remain, including the response writer and the readers in supervisor.rs:871 and move_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_path still types the field removed from ProviderStatusSnapshot; remove this obsolete member to finish the requested writer/type cleanup. The daemon-frame fields are removed correctly from its schema and DaemonInfo. Also remove the orphaned socket comment now attached to Device.agent_count at line 2068.
  • Correctness of documentation - docs/UI_BEHAVIOR.md:2454. The guide still says given_name is herdr_name on the wire, contradicting this PR. Update it with the rename. Related stale references remain in web/src/i18n/resources/kitReasons.ts:3 (herdr_profile_refusal, a contract reference rather than an i18n key) and hide-core/src/model/rest.rs:52-53 (the nonexistent older-shell compatibility rationale).
  • Evidence / PR body. The body still lists scripts/check-design-contract.mjs as 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 yansfil left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@yansfil
yansfil enabled auto-merge November 10, 2026 14:23
@yansfil
yansfil added this pull request to the merge queue Nov 10, 2026
Merged via the queue into main with commit 4ec32fd Nov 10, 2026
67 checks passed
@yansfil
yansfil deleted the refactor/engine-wire-names branch November 10, 2026 14:34
HyunjunJeon pushed a commit to HyunjunJeon/hide that referenced this pull request Nov 12, 2026
## 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.
HyunjunJeon pushed a commit to HyunjunJeon/hide that referenced this pull request Nov 12, 2026
…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.
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