Repository navigation
Read a nested worktree, a device's first tab and a late acknowledgment as the folder a created tab was born for - #573
Merged
Merged
Conversation
A folder in a linked worktree nested below the checkout is not the checkout's own start folder, a device's first worktree tab is recorded like a local one, device paths are compared by their names instead of this machine's files, a device acknowledgment after the session carried the tab regroups it at once, and the 30 s window runs on an injectable monotonic clock.
…nt regroups the session The stored device session already reads the other recorded tabs as their folder, so the new record alone reads it. Nested worktrees are related by names so no file system lookup runs under the runtime lock, and the device nested-worktree and spelling cases are pinned by tests that fail without their fix.
The checkout is read when the tab is recorded and the catalog's worktrees when it arrives, so a session costs one read per pane cwd under the lock and the nested list no longer scales it. Only the checkout's own repository's worktrees count as nested, a device's paths are compared as the device wrote them, a repeated acknowledgment keeps its record, a device tab with no pane is not settled by the window, and the clamps are built once per ingest.
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.
Closes #461
Related: follows #449 and #420
Summary
A new pane reports the cwd its shell was born in until it enters the start folder, and #449 made every reader see the folder a Hide-created tab was created for until then.
This goes through the cases #449 left out of scope: each has a core test that fixes the expected behavior, and where the behavior was wrong it is fixed.
worktree.createanswer, like a local onehide_platform::path::wire_relative)/is answered resolved, no separator; the comparison reads both sides as the folder, test pins both directionsSystemTimebirth_clock, injected in tests; no wall-clock waitReview
docs/ARCHITECTURE.md: a tab born inside a nested worktree before the catalog has listed it settles at once and the latch is not undone when the list arrives, because a settled record must not hide a latercd.created_tab.cwd_unsettled. I took that over the local-file-system false positives.herdr-core/src/runtime/session.rs- runtime mutex: the checkout is read once when the tab is recorded and the catalog's worktrees once when the catalog arrives (local_worktree_paths); a session reads each pane cwd once and compares nested worktrees by names, so there is no lookup per nested worktree. A device acknowledgment callsrefresh_device_catalogonce when the session already has the tab.herdr-core/src/session_sync/coordinator.rs- high-frequency path: only the filter type changed.herdr-core/src/runtime/agents.rsis untouched; the device acknowledgment path goes throughrecord_created_device_tab.Evidence
runtime/tests/birth_cwd.rsanddevice_catalog.rs. On current main, 3 failed (nested worktree, device first tab, late acknowledgment); the device-path, second-acknowledgment and device-nested tests were then made to fail without their fix by mutation (clamp disabled, one record, empty nested list), and pass with it.workspace.createandtab.createwith<link>/proj/answered the resolved path without the trailing/.scripts/verify-cargo.sh test-scoped -p herdr-core: 1454 passed;clippy -p herdr-core --all-targets -D warningsandfmt-checkclean; workstation-identity and harness-anchor checks pass.refresh_device_catalogafter an acknowledgment drops the request overlayingest_remote_sessionlays (lay_remote_requests) was not checked; other callers share the pattern.