Repository navigation
The re-cut, step 2: the environment as a kernel module, its proposals in the review lane; the channel and router as MCP servers on it (S-219 to S-221) - #32
Merged
Conversation
…iew lane; the channel on its own login (S-219, S-220) - environment/module.yaml and migration.sql: the kernel's module contract; scripts/kernel.sh init installs it with kk module install. The env schema stays migrated by environment/db.py; 013_review_lane.sql gives the module's role env.review_waiting and env.decide, and takes env.decide from the router. - environment/review.py (compose service `environment`, in the kernel's image with kk.lib): each waiting action becomes a change set in the review lane (a sosa:Actuation: actuator, caller, input in full); the reviewer's approval or rejection is recorded on the action; a request approved by its own caller is refused. - The MCP router decides nothing: /api/decide and the page's buttons are gone; scripts/env.py decide is gone. - The channel connects as mcp_channel (role env_agent, MCP_CHANNEL_DB_PASSWORD); assistant.sh writes it into the channel's MCP entry and tells the assistant to point people to Review. - Tests: scripts/tests/test_review.py (19 checks, in the kernel's image), four new channel checks in test_environment.py, the router's Go tests updated; check.sh checks the module and its service. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KhsqyyPmp7iKCkTFcXs6sh
… the environment, the channel and the router are Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KhsqyyPmp7iKCkTFcXs6sh
…it merges with the preview release's change Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KhsqyyPmp7iKCkTFcXs6sh
This was referenced Nov 27, 2026
OpenReplicant
marked this pull request as ready for review
November 27, 2026 18:09
OpenReplicant
added a commit
that referenced
this pull request
Nov 27, 2026
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KhsqyyPmp7iKCkTFcXs6sh
OpenReplicant
added a commit
that referenced
this pull request
Nov 27, 2026
… to S-222, then S-223 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KhsqyyPmp7iKCkTFcXs6sh
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.
docs/parts.md"Order" step 2: Substrate's parts in their types. This is the first slice, tested end to end.What moved
environment/module.yamlandenvironment/migration.sqlfollow the kernel's module contract (its schema,modules/_template, at kernele4ed8e2).scripts/kernel.sh initinstalls it withkk module install. Theenvschema is still migrated byenvironment/db.py, because the kernel applies a module's migration only once and has no upgrade step.013_review_lane.sqlgives the module's roleenv.review_waiting()andenv.decide, and nothing else.environment, runsenvironment/review.pyin the kernel's image withkk.lib. It connects as the kernel's login and switches tokkm_environment. Each waiting action becomes one change set in the review lane: asosa:Actuationwith its actuator, its caller and its full input. A person approves or rejects it in the desktop's Review, alongside everything else the kernel holds. The service then records that decision on the action: approved actions are queued, rejected ones are refused with the reviewer's note. If a person approves their own request, it is refused, with the reason. Approved requests are kept as claims./api/decideendpoint and the page's Approve and Reject buttons are removed, and its role no longer hasenv.decide.scripts/env.py decideis also removed.mcp_channel, roleenv_agent, passwordMCP_CHANNEL_DB_PASSWORD. It used to connect as the superuser.assistant.shwrites this login into the channel's MCP entry and tells the assistant to point people to Review.ui/stays, because maps as items (S-207) are not in the kernel yet.Checked
scripts/tests/test_review.py(new, runs in the kernel's image): 19/19.recut, with its own ports and volumes):kernel_remembercall went through the router and waited. It appeared inperson_owner'sreview_queue, was approved with the kernel's ownreviewtool, and was carried out by the kernel's connector.router_outcomereports refused, byperson_owner, "not now".assistant.sh's settings, connected asmcp_channel.scripts/check.shagainst a full stack (gateway, Caddy, the browser trials). The new environment check in it was run on its own.Merging with
claude/preview-releaseThe two branches merge with no conflicts (checked with
git merge-tree). After the merge, the newenvironmentservice still defaults to${KERNEL_IMAGE_TAG:-main}; it should take the release's kernel tag like the other kernel services. Decision numbers S-219 to S-221 may need renumbering if the release adds decisions first.For the owner
env.action. Whether proposals should get a scope of their own is your call.kk module installgives a python-service module's role a new random login password on every run, even when the module is already installed. That login is unused here.kernel_change_setnotification, so the service checks every 5 s.🤖 Generated with Claude Code
https://claude.ai/code/session_01KhsqyyPmp7iKCkTFcXs6sh