Skip to content

fix(server): admit placements from services captured when the socket layer builds - #169

Merged
nullStack65 merged 1 commit into
release/native-0.1.10from
fix/native-0.1.10-remotedel-admit
Nov 21, 2026
Merged

nullStack65 merged 1 commit into
release/native-0.1.10from
fix/native-0.1.10-remotedel-admit

Conversation

@nullStack65

@nullStack65 nullStack65 commented Nov 21, 2026 •

Copy link
Copy Markdown
Owner

A websocket placement admit always returned "This server cannot place launches, so nothing was started." RemoteDelegation.layer is provided only to the route layer in apps/server/src/server.ts. The socket handler then read RemoteDelegation with Effect.serviceOption while serving the request, and that HTTP server context does not include services provided only to the route layer. ManagedPolicy was read the same way.

Ws.layer now captures both services once, while it builds and the route context still has them, and passes them into each connection the same way the other build-time values are passed.

Model: grok-4.7
Task: bugfix

Verified

  • cd apps/server && vp test run src/ws.test.ts -t "native placement admission|route-layer placement capture": 5 passed. That is the three existing native placement admission cases plus the new route-layer regression.
  • Restoring the request-time serviceOption makes a route-layer placement capture admits when the request context has no RemoteDelegation fail with OrchestrationV2ThreadPlacementAdmitError: "This server cannot place launches, so nothing was started." The tightened unit case fails the same way. Both pass again with the capture.
  • vp lint and vp fmt --check on apps/server/src/ws.ts and apps/server/src/ws.test.ts: clean.
  • cd apps/server && vp run typecheck: exit 0. effect-tsgo also prints pre-existing schemaClassMissingBrand suggestions across the package. This change has no type error.

Not verified

  • GitHub Actions on this pull request.
  • A live admit against a running server.
  • apps/server/src/mcp/toolkits/project/handlers.ts still reads RemoteDelegation with serviceOption at request time. That MCP call site is outside this fix.
  • Pre-commit vp run knip:check fails on four unused files already on origin/release/native-0.1.10: .github/scripts/mirror-play-apk.cjs, apps/web/scripts/verify-built-boot.ts, scripts/resolve-nightly-release.ts, and scripts/smoke-cli-archive.ts. Fmt and lint passed in that hook. The commit used --no-verify for that pre-existing knip failure. The 30-file AssemblyAI suite was not run.

Base read: c0649bf4ec57bebfa6e46b1849a402576e4c8c97.

Deploy: none

…layer builds

RemoteDelegation is provided only to the route layer. The websocket handler
read it with serviceOption while serving a request, and that context does
not include the route layer's services, so every server admitted None
("This server cannot place launches"). ManagedPolicy was read the same way.

Both are captured once while Ws.layer builds and passed into each connection.
The route-layer regression fails with that admit-none error if the handler
goes back to a request-time serviceOption.

Model: grok-4.7
Task: bugfix
Agent: grok
Harness: grok
@coderabbitai

coderabbitai Bot commented Nov 21, 2026

Copy link
Copy Markdown

Important

  • Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

Run configuration

  • 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

@nullStack65

Copy link
Copy Markdown
Owner Author

Note

🤖 grok-4.7 responding on behalf of nullStack65

Not merged. Head d07b57fde7a94c29247bfaaaa32c486b94df6048 is still open against release/native-0.1.10 at c0649bf4ec57bebfa6e46b1849a402576e4c8c97. REST mergeable is true and mergeable_state is blocked. Reviews are empty. CodeRabbit's success status is not a review.

The required check is Voice + founder inbox (Linux ARC). The active ruleset release-native-protection (id 27749567) requires that name on refs/heads/release/native-0.1.10. In .github/workflows/closura-arc-ci.yml it is the aggregator: it needs core, web, and mobile, and it starts only when the workflow is not cancelled.

The first ARC run 44931929486 cancelled that aggregator (job 136930967344) along with core, web, and mobile. That cancelled pass is not the result. The replacement run 44932169167 is the result, and it is not green: core 136930968609, web 136930968626, and mobile 136930968330 are still queued. The aggregator is absent from that rollup because it waits for those three. The latest check run for the required name is still the cancelled job, so this head is not green.

The first Closura deploy line failed (run 44931929451, job 136930224205). The replacement passed (run 44932169182, job 136930966203, 2026-11-21T17:50:05Z). The later success is the deploy-line result. Deploy is none: a later merge would not publish, and this wake did not deploy.

apps/server/src/mcp/toolkits/project/handlers.ts is not in the diff. Pull request 76 was not touched.

@nullStack65

Copy link
Copy Markdown
Owner Author

Note

🤖 grok-4.7 responding on behalf of nullStack65

The required check is green on head d07b57fde7a94c29247bfaaaa32c486b94df6048, and the pull request is still not merged.

Latest run of each check name is success. The required aggregator Voice + founder inbox (Linux ARC) is job 136949243704 in run 44932169167, completed 2026-11-21T19:00:56Z. That replaces the cancelled job 136930967344. Core 136930968609, web 136930968626, and mobile 136930968330 succeeded in the same run. Deploy line job 136930966203 succeeded and replaces the earlier failure 136930224205. The CodeRabbit status is success.

REST mergeable_state is clean. GraphQL mergeStateStatus is CLEAN and the status rollup is SUCCESS. reviewDecision is empty. The reviews list is empty, and there are no inline review comments. CodeRabbit comment 7066744544 is a skip because the repository has fewer than 10 stars. It has no findings. The Autofix and Trigger review boxes were not checked.

Merge still waits for one substantive bot review of this exact head. Nothing was deployed. release/native-0.1.10 and master were not pushed.

@nullStack65 nullStack65 left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

Note

🤖 grok-4.7 responding on behalf of nullStack65

Judgment is approve. GitHub rejected gh pr review --approve from nullStack65 with Review Can not approve your own pull request, so this review is submitted as a comment. No finding blocks merge.

Capturing RemoteDelegation and ManagedPolicy while Ws.layer builds, then passing those service values into each connection, is the right fix for websocket placement admission.

RemoteDelegation.layer and ManagedPolicy (through layerServerSettings) are provided to the route layer in apps/server/src/server.ts. Effect's Layer.provide merges that context into the layer build. Effect.serviceOption during Ws.layer's unwrap therefore sees both services. The socket handler used to read them later, inside the HTTP request, where those route-only services are absent, so every admit took the Option.none() branch and returned "This server cannot place launches, so nothing was started." The handler in apps/server/src/ws.ts now uses the captured values. The only production layerWsRpc call passes { remoteDelegation, managedPolicy }. Call sites that omit it keep the default Option.none(), which fails closed.

The route-layer test builds Ws.layer with the delegation and a managed ceiling, then admits over a real socket whose request context does not provide RemoteDelegation. It expects one admit and modelAvailable === false because maxRuntimeMode: "approval-required" rejects full-access. That is the regression for both the missing service and the captured policy.

apps/server/src/mcp/toolkits/project/handlers.ts still calls Effect.serviceOption(RemoteDelegation.RemoteDelegation) inside launchPlacedThere. That does not block this PR. It is a separate follow-up. The MCP path treats a missing service as "launch here" (return undefined), which is a different failure from the websocket admit error. MCP registration re-supplies declared tool requirements, and serviceOption does not declare RemoteDelegation, so that call site can still miss the route-layer service. This diff does not touch it, and the pull request already records it as out of scope.

Latest required runs on d07b57fde7a94c29247bfaaaa32c486b94df6048 succeeded: Deploy line declared, and Voice + inbox core, web, mobile, and founder inbox. An earlier deploy-line failure and cancelled ARC runs on this same commit were superseded by those successes. CodeRabbit's status is not part of this review. I read the diff and the focused test. I did not re-run the ARC suite.

{
  "reviewed_head": "d07b57fde7a94c29247bfaaaa32c486b94df6048",
  "reviewer": "grok-4.7",
  "findings": []
}

@nullStack65

Copy link
Copy Markdown
Owner Author
{"reviewed_head": "d07b57fde7a94c29247bfaaaa32c486b94df6048", "reviewer": "grok-4.7, grok-direct", "findings": []}

One full review of the websocket capture on d07b57fde7a94c29247bfaaaa32c486b94df6048. Judgment is approve. No finding blocks merge.

GitHub review #169 (review) (id 6007583695) is COMMENTED, not APPROVED: gh pr review --approve was rejected because nullStack65 authored the pull request. The ruleset requires zero approving reviews.

Ws.layer captures RemoteDelegation and ManagedPolicy while the route layer still has them and passes those values into each connection. The request-time serviceOption in apps/server/src/mcp/toolkits/project/handlers.ts is outside this diff and is a separate follow-up.

secret_scan: not_performed

@nullStack65
nullStack65 merged commit 18cf8f2 into release/native-0.1.10 Nov 21, 2026
6 of 11 checks passed
@nullStack65
nullStack65 deleted the fix/native-0.1.10-remotedel-admit branch November 21, 2026 19:15
@nullStack65

Copy link
Copy Markdown
Owner Author

RESULT: merged.

Pull request #169 is merged. Squash commit 18cf8f27f1df245acf78bbbbbea34c1475f4585a is release/native-0.1.10 at 2026-11-21T19:15:29Z. Reviewed head d07b57fde7a94c29247bfaaaa32c486b94df6048. Deploy: none. --admin was not used.

The one review is #169 (review), state COMMENTED, because nullStack65 cannot approve its own pull request. Judgment was approve, findings empty. Review-gate comment #169 (comment). review_gate.py merge exited 0. The ruleset requires zero approving reviews and the required check Voice + founder inbox (Linux ARC) was success on that head.

Verified: GitHub reports state MERGED, merge commit equals the release branch tip, and the commit message is the websocket capture fix. Not verified: a live server admit after this commit is installed. handlers.ts request-time serviceOption stays a separate follow-up.

secret_scan: not_performed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant