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: fix remaining #1942 daemon-state defects — ephemeral exec runs, MCP surface rebuild, opencode channel DBs by dezren39 · Pull Request #2625 · developing-today/code

Conversation

@dezren39

@dezren39 dezren39 commented Oct 30, 2026 •
edited by blacksmith-sh Bot
Loading

Uh oh!

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

Copy link
Copy Markdown
Member

Fixes the three remaining daemon-state defects from #1942 (queue task 3243). PM-15 was already fixed on main (routes_proto.go reports the effective proto.native setting) and is not touched here.

PM-12 — /v1/exec runs are marked ephemeral. execsvc.scriptEnv never set MCPX_EPHEMERAL, so the generated client never sent x-mcpx-ephemeral, ReleaseCaller never saw an ephemeral caller, and session-scoped instances (browsers) waited for idle reaping. scriptEnv now sets it with the CLI's rule: ephemeral unless the caller named a session (a named session may be shared and must outlive the run). The CLI path is unchanged — its runner env already carries the flag and wins over scriptEnv in RunWith. Regression test: ephemeral_internal_test.go (the key is absent on the old code).

PM-13 — the MCP surface rebuilds, and failures are not cached. lazyMCP built under sync.Once: adapters added later were invisible and a failed first build (including one from a cancelled first-request context) was cached for the daemon's life. The build is now keyed by a SHA-256 fingerprint of the adapter (paths.adapters) and API (paths.apis) declaration files — unchanged inputs reuse the built surface, a changed/added/appearing file rebuilds it, and a build error is returned without being cached so the next request retries. Tests: lazymcp_test.go covers both.

PM-21 — opencode channel database filenames. DefaultPaths only ever named opencode.db, while v1 writes opencode-<channel>.db outside latest/beta/prod and v2's set differs again. Each data directory now contributes every opencode*.db it holds — plain opencode.db first, then channel files newest-first — and OPENCODE_DISABLE_CHANNEL_DB (honoured by both opencodes) restores plain-only behaviour. Tests: paths_test.go covers finding a channel database, ordering, and the disable flag.

Verification: go test ./internal/execsvc/ ./internal/opencode/ ./internal/cli/ passes on the laptop worktree; the full pkgs/mcpx suite runs in CI on this PR.

Refs #1942 (slice: PM-12, PM-13, PM-21; PM-15 already fixed).


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: fix the three remaining #1942 daemon-state defects (PM-12, PM-1…
b3f4107
…3, PM-21)

PM-12: execsvc scriptEnv now sets MCPX_EPHEMERAL (ephemeral unless the caller named a session -- the CLI rule), so /v1/exec runs send x-mcpx-ephemeral and session-scoped instances are released at end of run instead of waiting for idle reaping. The CLI path is unchanged: its runner env already carries the flag and wins over scriptEnv in RunWith.

PM-13: lazyMCP no longer builds under sync.Once. The build is keyed by a SHA-256 fingerprint of the adapter and API declaration files: unchanged inputs reuse the surface, changed inputs rebuild it, and a failed build is returned but never cached, so the next request retries.

PM-21: opencode DefaultPaths enumerates each data directory's opencode*.db files -- opencode.db first, then opencode-<channel>.db newest-first -- so a channel-named database (v1 next writes opencode-next.db) is found; OPENCODE_DISABLE_CHANNEL_DB restores plain-only behaviour.

PM-15 was already fixed on main and is not touched. Tests: ephemeral_internal_test.go, lazymcp_test.go, paths_test.go; go test passes for internal/execsvc, internal/opencode and internal/cli on the laptop; full suite runs in CI on this PR.
@dezren39
dezren39 requested a review from a team as a code owner October 30, 2026 07:40
@coderabbitai

coderabbitai Bot commented Oct 30, 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 15 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: 744dfce7-b145-428c-b7ea-ee75f9ab9d82
Commits

Reviewing files that changed from the base of the PR and between 9986b72 and 11551b8.

Files selected for processing: 11
  • pkgs/mcpx/internal/cli/lazymcp_test.go
  • pkgs/mcpx/internal/cli/serve_ask.go
  • pkgs/mcpx/internal/config/scope.go
  • pkgs/mcpx/internal/config/scope_test.go
  • pkgs/mcpx/internal/daemon/server.go
  • pkgs/mcpx/internal/execsvc/ephemeral_internal_test.go
  • pkgs/mcpx/internal/execsvc/execsvc.go
  • pkgs/mcpx/internal/mcpserver/server.go
  • pkgs/mcpx/internal/mcpserver/transport_test.go
  • pkgs/mcpx/internal/opencode/opencode.go
  • pkgs/mcpx/internal/opencode/paths_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

Comment @coderabbitai help to get the list of available commands.

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 Oct 30, 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-10-30T08:48:19.986097Z 11551b8 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 Oct 30, 2026
mcpx: /v1/exec leaves session-scoped servers running, /mcp never rebuilds its surface, /v1/protocol reports the default nativeElicit, stats reads one opencode database #1942
Closed
mcpx: accept a flake ref as a program and as an execution environment #1921
Closed
chatgpt-codex-connector[bot]
chatgpt-codex-connector Bot reviewed Oct 30, 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: b3f41070a4

ℹ️ 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/cli/serve_ask.go Resolved

Uh oh!

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

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

Uh oh!

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

@dezren39
mcpx: retire replaced MCP surface sessions; keep shared daemon PID ou…
11551b8
…t of ephemeral ownership (#1942)

Codex P2 x2 on PR 2625:
- lazyMCP replacement now ends the old server's sessions via new
  mcpserver.Server.CloseSessions, so legacy GET streams, notification
  and listen subscriptions do not accumulate on a surface nothing
  routes to.
- CallContext gains PIDShared: the daemon marks a caller PID equal to
  its own (every /v1/exec run reports the daemon PID) as shared, and
  CallerOwned no longer treats that pid: key as caller-private, so one
  run ending cannot ReleaseKey an instance another run still needs.

Tests: config shared-PID ownership, cli retire-on-replace seam,
mcpserver CloseSessions ends GET stream + forgets session.
This was referenced Oct 30, 2026
mcpx: mcpx adapter import — a declaration generated from completions, man and --help, and a loud --bare for the rest #1962
Closed
ci: Actions check runs stuck in queued across PRs — no runner pickup since ~05:00Z 2026-10-28 #1599
Closed
@dezren39

dezren39 commented Oct 30, 2026

Copy link
Copy Markdown
Member Author

agent-note:v1
event: handed_off
task: 3243 (repo-health-code-pilot; parked)
state: Independent read-only review found a potential PM-21 correctness issue: internal/opencode/opencode.go:88-92 prioritizes opencode.db, and Find selects the first existing database. A user switching from stable to next/dev may retain opencode.db, causing stats to read the old stable DB rather than the active channel DB. The ordering test appears to encode that case. SQLite WAL also makes database file mtime an unreliable channel selector. Please verify against the intended channel precedence and fix or document an explicit selection strategy before merging.

All reactions

Sorry, something went wrong.

Uh oh!

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

@dezren39

dezren39 commented Oct 30, 2026

Copy link
Copy Markdown
Member Author

agent-note:v1
event: handed_off
task: 3243 (repo-health-code-pilot; parked)
state: A second independent review finding needs verification before merge: serve_ask.go:378-399 caches successful MCPServer builds, but serve.go:543 calls apiTools, which suppresses loadAPIs/buildAPI errors (openapi_tools.go:241-255). A temporarily unavailable remote OpenAPI spec or cancelled initial request may therefore produce a successful but incomplete build, cached indefinitely while the declaration fingerprint remains unchanged. The injected failing-build test does not exercise this real MCPServer path. Add a recovery regression test and address if confirmed.

All reactions

Sorry, something went wrong.

Uh oh!

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

@dezren39

dezren39 commented Oct 30, 2026

Copy link
Copy Markdown
Member Author

agent-note:v1
event: handed_off
task: 3243 (repo-health-code-pilot; parked)
state: A third independent review finding needs verification: serve_ask.go:370 computes the declaration fingerprint before acquiring l.mu. A request can fingerprint old declarations, wait while another request builds the new surface, then rebuild against new declarations but record the stale fingerprint and retire the new surface, terminating sessions; a later request may rebuild again. Consider fingerprinting under the lock and validating a consistent snapshot around the build, with a concurrency regression test.

All reactions

Sorry, something went wrong.

Uh oh!

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

@dezren39

dezren39 commented Oct 30, 2026

Copy link
Copy Markdown
Member Author

agent-note:v1
event: handed_off
task: 3243 (repo-health-code-pilot; parked)
state: Local go test ./... did not complete: the background shell hit its 10-minute time limit and terminated the process. Output includes internal/daemon FAIL with signal: terminated; this is not evidence of an independent test assertion failure. Some packages passed, including internal/cli and internal/conformance. Resume with a bounded targeted investigation and rerun as appropriate.

All reactions

Sorry, something went wrong.

Uh oh!

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

@dezren39
dezren39 merged commit a9abb6b into main Oct 30, 2026
1 check passed

Uh oh!

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

@dezren39
dezren39 deleted the queue/3243-1942-daemon-state-defects branch October 30, 2026 11:13
@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

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

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.