Workspace projects: design risks before implementation #161
harshitsinghbhandari
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Workspace project Option 1: design risks to resolve before implementation
Follow-up to #155.
The provisioning direction from #155 is now settled:
--targetsfor V1;This thread is for the problems that remain in that design before we start coding past the first schema/registration slice.
1. Root symlinks are not a write barrier
The current doc says normal workers see root files through read-only symlinks. That is useful for workspace shape, but it is not enforcement by itself.
Likely day-one failure modes:
pnpm install,npm install, oryarn installwrites a lockfile next to the root manifest and can mutate canonical root state through the symlinked path..cache/,dist/, stamp files, generated config, or lockfiles;sed -i,tee, shell redirection, Pythonopen(..., "w"), etc.) follow symlinks;scripts/ortools/are recursively write-through;Questions to decide:
2. Composite cleanup and restore need a state matrix
Single-repo cleanup already has an important invariant: do not force-delete dirty registered worktrees. With all child repos provisioned for every workspace session, cleanup now has N opportunities to partially fail.
Scenarios to enumerate:
git worktree removerefuses forever;cli/successfully, thenapi/refuses, leaving a partially cleaned composite root;Questions to decide:
3. Branch/base/collision policy across all child repos
V1 likely uses one shared branch name,
ao/<session-id>, in every child repo. That still leaves several policy choices.Questions to decide:
ao/<session-id>already exists in one child repo but not the others?4. PR fan-out and session status aggregation
One workspace session can produce one PR per child repo. PR ownership can still point to the session, but the product read model needs an aggregation rule.
Questions to decide:
Likely V1 answer: worst-of-N status in list views, per-child PR list in detail views, and no cross-repo bulk operations beyond existing per-PR actions.
5. Platform and registration edge cases
These are probably lower priority than the first four, but should be named before implementation:
clivsCLI);frontend/uiandmobile/uiif we ever support more than direct children;api -> /opt/work/api) and whether registration follows, refuses, or warns;.gitignore,.envrc,.npmrc,.tool-versions, etc. as read-through context with side effects;workspace_repos.repo_origin_urlbecoming stale);CHECKenum future-proofing forprojects.kind.Proposed next step
Before coding past project detection + registration, write two small design artifacts:
Those two are operationally more important than revisiting the provisioning choice itself. Option 1 remains the right provisioning model; this discussion is about making it safe enough to ship.
Beta Was this translation helpful? Give feedback.
All reactions