Repository navigation
fix(backends): scope Herdr crew discovery to recorded workspaces - #7
Merged
Merged
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
…re in tests/fm-backend-herdr-crew-workspace-e2e.test.sh. Verified: shellcheck target, bash tests/fm-backend-herdr-crew-workspace-e2e.test.sh, bash bin/fm-lint.sh, and bash tests/fm-remote-reply.test.sh all pass. Behavior portable serial 4 failed only in tests/fm-remote-reply.test.sh ('NUL-bearing line was not captured'), a file unchanged by this PR; it passes locally, so no behavior-code change is warranted. Final diff scope check found no unrelated hunks
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.
Intent
I'll write the fork grant
Context: that was the captain's answer to letting this firstmate open PRs on his fork (Profreshor/firstmate) again, which was asked so that the three follow-ups filed from the Codex review on fork PR #3 could ship as fork PRs. The captain's earlier "Merge now" on PR #3 accepted filing them as follow-ups. This task is one of those three. The Codex finding, verbatim:
Restrict crew discovery to this home's recorded workspaces
When two
FM_HOMEinstances share a Herdr session, their crew workspaces can have the same label (for example, separate primary homes both usefirstmate-crew). This loop scans every workspace with that label rather than the IDs recorded in the current home's state, sofm_backend_herdr_list_livereports another home's panes as local recovery/orphan entries. Enumerate the IDs returned byfm_backend_herdr_crew_workspace_recordedinstead.(bin/backends/herdr.sh, around the crew discovery loop near line 4131)
What Changed
Risk Assessment
✅ Low: The change is tightly scoped to reusing the existing per-home recorded-workspace helper, which validates IDs against the live session and expected label; the new behavioral regression covers the shared-label collision.
Testing
Focused stateful and real-product Herdr validation passed. The live guarded lab created two homes with same-labeled crew workspaces and proved list-live reports only the calling home's recorded panes; its named session was cleaned up by the test. This backend-only change has no rendered UI surface, so CLI/lab transcripts are the reviewer-visible evidence.
real herdr: list-live scopes same-labeled crew workspaces to the recording homefirstmate-crewworkspaces in one named session; each list-live result contained only its own pane and excluded the other home's pane.Evidence: Live guarded Herdr lab transcript
Source: Live guarded Herdr lab transcript
Evidence: Focused crew regression transcript
Source: Focused crew regression transcript
Pipeline
Updates from git push no-mistakes
✅ **intent** - passed
✅ No issues found.
✅ **Rebase** - passed
✅ No issues found.
✅ **Review** - passed
✅ No issues found.
✅ **Test** - passed
✅ No issues found.
real herdr: list-live scopes same-labeled crew workspaces to the recording homefirstmate-crewworkspaces in one named session; each list-live result contained only its own pane and excluded the other home's pane.bash tests/fm-backend-herdr-crew-workspace-e2e.test.sh(real Herdr 0.9.1/protocol 22 named lab; spawned two homes with colliding crew labels and verified mutually exclusive recovery output)bash tests/fm-backend-herdr-crew.test.sh(focused stateful crew regression)git diff --checkgit diff | jev find "a change unrelated to scoping Herdr crew recovery to the current home's recorded workspace ids"(no unrelated hunks flagged)✅ **Document** - passed
✅ No issues found.
✅ **Lint** - passed
✅ No issues found.
✅ **Push** - passed
✅ No issues found.