herdr: optional per-home workspace label (config/herdr-workspace-label)#418
Open
thevwick wants to merge 1 commit into
Open
herdr: optional per-home workspace label (config/herdr-workspace-label)#418thevwick wants to merge 1 commit into
thevwick wants to merge 1 commit into
Conversation
A machine running several primary firstmate homes has every primary derive the same constant firstmate herdr workspace label, so all their task tabs co-mingle in one workspace. Add an optional local, gitignored config/herdr-workspace-label whose first non-empty line overrides that label for a primary home, extending the P3 secondmate workspace-per-home idea to primaries. Absent or empty keeps firstmate byte-for-byte; secondmate homes ignore it; whitespace, colon, and reserved 2ndmate-* values fall back with a warning. Per-home, not inherited by secondmate homes.
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.
Motivation
On a machine running several primary firstmate homes (e.g. one hub per company/context), every primary derives the same constant herdr workspace label (
firstmate) infm_backend_herdr_workspace_label(bin/backends/herdr.sh). All hubs' task tabs therefore co-mingle in one herdr workspace.This is exactly the mixing problem the P3 workspace-per-home pass already solved for secondmates (
2ndmate-<id>labels);docs/herdr-backend.mddocuments that P2 "assumed a single firstmate instance per herdr session". This change extends the same per-home idea to primaries, opt-in, with zero behavior change for existing single-home setups.Design
config/herdr-workspace-label. Its first non-empty line is the workspace label this home's herdr task tabs use.fm_backend_herdr_workspace_labelvia the effective config dir, respectingFM_CONFIG_OVERRIDE/FM_HOMEexactly likefm-backend.shreadsconfig/backend.<session>:<pane-id>field separator), or that matches the reserved2ndmate-*secondmate namespace, is rejected with a stderr warning and falls back tofirstmate.2ndmate-<secondmate-id>labels are already unique.bin/fm-config-inherit-lib.sh): it is per-home by nature, likeconfig/backend.Zero-default-change guarantee
Absent or empty
config/herdr-workspace-labelmeans the constantfirstmate, byte-for-byte. A single-home setup, and every existing task's recorded label, is unchanged.P3 secondmate-label precedent
This extends the existing workspace-per-home mechanism: the P3 pass gave each secondmate home a distinct
2ndmate-<id>workspace to stop tab co-mingling across homes. Primaries had no equivalent knob and all defaulted tofirstmate. This adds that knob for primaries, following the same find-before-create adapter conventions.Changes
bin/backends/herdr.sh- the label function honors the override for primaries.tests/fm-backend-herdr.test.sh- override respected; absent/empty = constantfirstmate; secondmate marker still wins and ignores the override; whitespace/colon/reserved labels rejected with fallback.docs/herdr-backend.md- "Label derivation" section updated.docs/configuration.md- the new file documented alongside the otherconfig/files.AGENTS.mdsection 2 layout - one-line entry forconfig/herdr-workspace-label.