GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — mcpx: ResolvedScope plumbing + spawn cwd = resolved scope root (#958) by dezren39 · Pull Request #3925 · developing-today/code

Conversation

@dezren39

@dezren39 dezren39 commented Nov 1, 2026 •
edited by blacksmith-sh Bot
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

Closes #958 — slice 1 of decision record 0004 (pkgs/mcpx/docs/decisions/0004-scope-resolved-roots.md), sections 1/2/3/6.

What changed

  • internal/config — ResolvedScope{Key, Root, Degraded} + Scope.Resolve(ctx); Scope.Key is now Resolve(ctx).Key (one resolution path). Root semantics per §1: worktree → checkout top-level; repo → parent of the common dir only when its base is .git, else none; cwd → canonical caller cwd; degraded repo/worktree → that cwd; global/session/psession/pid/call → none.
  • Plumbing (§2) — the registry resolves via Resolve (resolvedFor) and passes the ResolvedScope into Pool.Acquire/Call/ReadResource/GetPrompt/Request/Complete/Watch. The pool stores root on the Instance at creation; startLane/dial read it from the instance — restarts, era redials, exec-watch replacements and handoffs keep the creation root and never re-resolve.
  • Spawn cwd (§3) — pool.SpawnCwd, a pure function: config cwd → resolved root → unset (daemon cwd), applied to both stdio and supervised transports.
  • Observability (§6) — one server.spawn lifecycle line per spawn (server, key, root, cwd, cwd source: config/scope/daemon); key/root/cwdSource also on server.start; root in mcpx status instance JSON.

Tests

  • New: Resolve root semantics (worktree, repo from subdir, repo from a linked worktree roots at the main worktree, cwd, degraded-to-cwd root, rootless scopes, Key↔Resolve parity) — full internal/config package passes.
  • New: SpawnCwd decision table, and an end-to-end test that acquires an instance with a resolved root and verifies the root in status plus the child's actual cwd via /proc/<pid>/cwd.
  • Existing pool/daemon test call sites updated to the ResolvedScope signatures; go vet clean for config/pool/daemon. Full suite runs in CI.

Overlap

Refs #1989: its spawn-cwd acceptance criteria 1–4 are satisfied by this change; #1989 should close as covered once this lands (its gopls live-proof criterion belongs to slice 4, #961). Slices 2/3 (#959/#960) stay blocked on this slice.


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

chatgpt-codex-connector[bot] reacted with thumbs up emoji
All reactions
  • 👍 1 reaction
@dezren39
mcpx: ResolvedScope plumbing + spawn cwd = resolved scope root (#958)
ff15803
Slice 1 of decision 0004 (pkgs/mcpx/docs/decisions/0004-scope-resolved-roots.md), sections 1/2/3/6:

- internal/config: ResolvedScope{Key, Root, Degraded} + Scope.Resolve; Scope.Key is Resolve().Key, one resolution path. Root semantics per spec: worktree -> checkout top-level; repo -> parent of the common dir only when its base is .git; cwd -> canonical caller cwd; degraded repo/worktree -> that cwd; global/session/psession/pid/call -> none.
- Registry resolves via Resolve and passes ResolvedScope into Pool.Acquire/Call/ReadResource/GetPrompt/Request/Complete/Watch; the pool stores root on the Instance at creation and startLane/dial read it from there (restarts, era redials and exec-watch replacements keep the creation root, never re-resolve).
- Spawn cwd (stdio, incl. supervised): pool.SpawnCwd pure function -- config cwd, else resolved root, else unset (daemon cwd).
- Observability: server.spawn lifecycle line (server, key, root, cwd, cwdSource), key/root/cwdSource on server.start, root in mcpx status instance JSON, root carried through instance handoff.

Tests: Resolve root semantics (worktree/repo/linked worktree/cwd/degraded/rootless/Key-parity), SpawnCwd decision table, end-to-end instance root in status + child cwd via /proc. Existing pool/daemon test call sites updated to the ResolvedScope signatures.

Refs #1989: its spawn-cwd acceptance criteria 1-4 are covered by this change; its gopls live-proof criterion belongs to slice 4 (#961).
@dezren39
dezren39 requested a review from a team as a code owner November 1, 2026 18:40
@coderabbitai

coderabbitai Bot commented Nov 1, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 20 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 737ea50e-a0f4-4458-9944-028b5dfa45f7
Commits

Reviewing files that changed from the base of the PR and between a423735 and bdb04b5.

Files selected for processing: 30
  • pkgs/mcpx/internal/config/execid.go
  • pkgs/mcpx/internal/config/execid_test.go
  • pkgs/mcpx/internal/config/scope.go
  • pkgs/mcpx/internal/config/scope_resolve_test.go
  • pkgs/mcpx/internal/daemon/consumer.go
  • pkgs/mcpx/internal/daemon/consumer_scope_test.go
  • pkgs/mcpx/internal/daemon/exec_watch_test.go
  • pkgs/mcpx/internal/daemon/input_required.go
  • pkgs/mcpx/internal/daemon/ops.go
  • pkgs/mcpx/internal/daemon/registry.go
  • pkgs/mcpx/internal/daemon/registry_handoff_test.go
  • pkgs/mcpx/internal/daemon/reload_test.go
  • pkgs/mcpx/internal/daemon/routes_proto.go
  • pkgs/mcpx/internal/daemon/takeover_test.go
  • pkgs/mcpx/internal/pool/detach_test.go
  • pkgs/mcpx/internal/pool/era_test.go
  • pkgs/mcpx/internal/pool/execwatch.go
  • pkgs/mcpx/internal/pool/execwatch_test.go
  • pkgs/mcpx/internal/pool/follow_test.go
  • pkgs/mcpx/internal/pool/handoff.go
  • pkgs/mcpx/internal/pool/handoff_exec_test.go
  • pkgs/mcpx/internal/pool/pool.go
  • pkgs/mcpx/internal/pool/pool_test.go
  • pkgs/mcpx/internal/pool/request.go
  • pkgs/mcpx/internal/pool/self_connection_test.go
  • pkgs/mcpx/internal/pool/shutdown_drain_test.go
  • pkgs/mcpx/internal/pool/spawn_cwd_test.go
  • pkgs/mcpx/internal/pool/upstream_session_test.go
  • pkgs/mcpx/internal/pool/watch.go
  • pkgs/mcpx/internal/pool/watch_test.go
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share
  • X
  • Mastodon
  • Reddit
  • LinkedIn
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 1, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-02T02:54:55.040451Z bdb04b5 New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

This was referenced Nov 1, 2026
mcpx: spawn repo/worktree-scoped instances with the child cwd set to the resolved scope root #1989
Closed
mcpx: ResolvedScope plumbing + spawn cwd = resolved scope root #958
Closed
mcpx: ${mcpx.root} / ${mcpx.cwd} substitution at spawn + era identity on effective definition #960
Closed
chatgpt-codex-connector[bot]
chatgpt-codex-connector Bot reviewed Nov 1, 2026
View reviewed changes

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: ff15803fdd

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread pkgs/mcpx/internal/daemon/registry.go Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread pkgs/mcpx/internal/pool/pool.go Resolved

Uh oh!

There was an error while loading. Please reload this page.

dezren39 added 2 commits November 1, 2026 13:14
@dezren39
fix(mcpx): preserve resolved roots across lanes and exec checks
84619fd
@dezren39
Merge remote-tracking branch 'origin/main' into queue/4872-958-resolv…
822d6c8
…ed-scope
@dezren39

dezren39 commented Nov 1, 2026

Copy link
Copy Markdown
Member Author

Addressed both Codex P2 findings in commit 84619fd80 (on top of current origin/main via merge commit 822d6c891):

  • Disambiguation now carries the selected instance's root into Acquire, so a new protocol lane or restart keeps the selected workspace root.
  • Scope-rooted relative executables are resolved and watched per instance using the effective spawn cwd; only the affected instance is replaced.

Verified: go test -count=1 ./internal/config ./internal/pool ./internal/daemon and git diff --check pass. Please re-review this head. @codex review

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

chatgpt-codex-connector[bot]
chatgpt-codex-connector Bot reviewed Nov 1, 2026
View reviewed changes

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 822d6c8912

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread pkgs/mcpx/internal/pool/execwatch.go Resolved

Uh oh!

There was an error while loading. Please reload this page.

@github-actions github-actions Bot assigned dezren39 Nov 1, 2026
@dezren39 dezren39 mentioned this pull request Nov 1, 2026
mcpx fleet config: gopls to worktree scope + live workspace proof #961
Closed
3 tasks
@dezren39
fix(mcpx): carry exec identity across instance handoff
bdb04b5
InstanceHandoff now carries the instance execStamp and execIdentity
(resolved from its effective spawn cwd at creation), describe() records
them under execMu, and resumeInstance restores them on the adopted
instance. Without them a resumed instance read as zero-valued, so the
successor exec watch treated its unchanged executable as newly changed
and restarted adopted children after a daemon takeover (Codex review
finding on PR #3925).

Adds TestHandoffCarriesExecIdentityForRelativeCommand: a relative
./server under a scope root keeps its identity through detach, JSON
round trip, adopt and attach, and keeps serving afterwards.
@dezren39
dezren39 merged commit 77970eb into main Nov 2, 2026
7 of 9 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@dezren39
dezren39 deleted the queue/4872-958-resolved-scope branch November 2, 2026 05:29
@dezren39 dezren39 mentioned this pull request Nov 3, 2026
mcpx: initialize sends rootUri/workspaceFolders for scope-resolved instances #959
Closed
4 tasks
@blacksmith-sh blacksmith-sh Bot mentioned this pull request Nov 3, 2026
feat(mcpx): send rootUri/workspaceFolders for scope-resolved instances (#959) #4992
Merged
@dezren39 dezren39 mentioned this pull request Nov 9, 2026
fix(mcpx): scope gopls-mcp-server to the worktree (#961) #8049
Merged
@dezren39 dezren39 mentioned this pull request Nov 21, 2026
Closure audit: every closed issue/PR verified; unmerged branches + unpushed worktrees inventoried #7079
Open
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@chatgpt-codex-connector chatgpt-codex-connector[bot] chatgpt-codex-connector[bot] left review comments

Uh oh!

There was an error while loading. Please reload this page.

Assignees

@dezren39 dezren39

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

mcpx: ResolvedScope plumbing + spawn cwd = resolved scope root

Uh oh!

There was an error while loading. Please reload this page.

1 participant

@dezren39
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.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.