fix: discover Ops across all served projects in an estate (#31) - #44
Merged
Merged
Conversation
Multi-estate served the ops list from the primary project only, so a project with no Ops shown first surfaced "no Ops — add an ApplyOp" even when a sibling in the estate had them — misleading, and Sync/Adopt/rollback were unreachable for those Ops. Discover Ops across every served project (discoverEstateOps), tag each with its own dir, and run it there (OpRunner.trigger cwd, signal, auto-sync). Name collisions keep the first project's Op. Verified: serve <no-ops> <has-ops> now surfaces the sibling's prod-apply @its-dir (Sync shows). tsc + 54 tests (+2 estate discovery).
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.
Follow-up to #31. Reported: a multi-estate showed "no Ops — add an ApplyOp to enable Sync" even though a served project had Ops.
Cause
/api/ops(and op-run / signal / auto-sync) discovered Ops from the primary project only. If the first-listed project has no Ops, the estate showed none — and Sync/Adopt/rollback were unreachable for Ops living in sibling projects.Fix
discoverEstateOps(projectDirs)— discover across every served project; eachOpInfocarries its owndir; name collisions keep the first project's Op.OpRunner.trigger(name, env, cwd)runs the Op in its own project dir; signal + auto-sync updated likewise.Verified
serve <no-ops-project> <has-ops-project>now surfaces the sibling'sprod-apply @its-dir(Sync shows), and it runs there. tsc + 54 tests (+2: cross-project discovery, first-wins collision).