Revert unreviewed detached Agent Host program - #238
Merged
Conversation
Removes the detached Agent Host / Agent Operation / protocol v5 program pushed directly to main without review over ~38h (session os-01a03a08), while preserving unrelated interleaved work: kernel lane placement and routing, transcript-actor co-location, Executor providers, onboarding/UI, and the steer/worker-report protocol additions. The transcript-destination append surface and the agent_host_plan fence stay (relocated types), because the currently deployed release wrote live data through them; kernel SQLite schema and DDL-only migrations are kept so existing DBs open unchanged.
🤖 OS review · approve · confidence 5/5Safe to merge once required CI completes. The PR removes the detached Agent Host and Agent Operation program while preserving the deployed transcript-destination contracts and schema compatibility needed by existing session databases. Repository-wide reference checks found no remaining production imports of the removed modules and no P0/P1 issues.
|
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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.
Reverts the unreviewed "detached Agent Host / Agent Operation / protocol v5" program that was pushed directly to main over ~38h by session os-01a03a08 and its workers (BASE a23d44a..main, identified by content, not author). 107 files changed, −31,987 lines. Typecheck (
tsc --noEmit, whole repo incl. tests) is clean; all targeted test files for touched modules pass (session-kernel 198/198, protocol 91/91, transcript-store/actor/destination + session-safety suites green).1. Removed
Whole directories / files (all new since BASE, verified with git log):
packages/core/opensession-server/src/agent-host/(27 files: host, driver, runtime, ledgers, canary qualification, socket framing, supervisor, probes)packages/core/opensession-server/src/server/agent-operation/(39 files: composition, gateway, grants, kernel/transcript facades, pi-model + mcp adapters, readiness, stream journal, deletion coordinator, ledgers)server/agent-host-client.ts+ test,server/agent-host-registry.tsserver/security/transport/(5 files: Linux peer credentials, Unix socket security, inherited-listener support — created by and only used by the program)server/session-kernel/:agent-host-supervision-protocol.ts,agent-host-supervision-signer.ts, both supervision test files,agent-operation-protocol.ts,agent-operation.test.tspackages/core/protocol/src/:agent-host.ts+ test,agent-host-fence.ts,agent-host-supervision.ts,agent-operation.ts+ test; their export lines removed fromprotocol/src/index.tsand thepackage.jsonexports mapopensession-agent-host@.service,opensession-agent-host@.socket,deploy/install-agent-host-topology.sh,deploy/agent-host-service.test.ts,deploy/systemd/agent-host-unactivated/, and the topology-install call indeploy/deploy.shdocs/agent-host-deployment.md,docs/canary-qualification.md, the "Detached Agent Host boundary" section ofdocs/security-model.md, the "Agent Host execution binding" section ofdocs/executor-architecture.md, and the two Agent operation/supervision sections ofdocs/session-kernel-architecture.mdSurgical reverts in mixed live files (program hunks only):
session-kernel/kernel.ts:registerAgentHostPlan/claimAgentHostSupervisionfacades and their importssession-kernel/actor-client.ts:decideAgentOperationAsync,agentOperationCancellationIntentAsync,decideAgentHostSupervisionAsyncsession-kernel/actor-worker.ts,actor-protocol.ts,actor-routing.ts,lifecycle-protocol.ts: theagent_operation/agent_host_supervisionreducer command kinds and routingsession-kernel/store-routing.ts,session-kernel/index.ts: routing entry and module exportsession-kernel/store.ts(the biggest job, ~2,000 program lines removed):claimAgentHostSupervision,decideAgentOperation,agentOperationCancellationIntent, supervision issuer wiring, supervision/operation row decoders and per-open row validators, the supervision-settle hook inapplyRunEvent, theagent_operationquarantine-recovery special case, and all protocol importsscripts/check-module-side-effects.ts: dropped theagent-hostglob2. Deliberately KEPT, and why
transcript-store.ts,actor-transcript.ts, andsession-kernel/transcript-protocol.tskeep the destination-append/receipt path (agent_append_destination, receipt query/validate) byte-for-byte: this code is in the currently deployed release and has written live per-session kernel data. The type definitions it needs (AgentTranscriptAnchorV1,AgentTranscriptReceiptRefV1,decodeAgentTranscriptReceiptRefV1+ its safe-JSON guard) were relocated from the deletedprotocol/agent-operationmodule intosession-kernel/transcript-protocol.tsunchanged.store.tsfence + plan surface.assertTranscriptDestinationFence,registerAgentHostPlan, and thesession_kernel_agent_host_plantable stay (with a local copy of the plan-registration decoder) because the surviving transcript destination path and its tests (agent-transcript-destination.test.ts,store-host.test.ts) depend on them.schema-version32, and migrations 26/27/28/32 are kept — live DBs are at user_version 32 and the tables exist in every deployed per-session DB; removing DDL would make fresh and live DBs diverge and breakremoveSession/clearSession. Migrations 26 and 27 were reduced to DDL-only (their row-validation loops used deleted protocol decoders; pre-program DBs have empty agent tables, so behavior is identical). The pure-SQL schema asserts stay; the receipt-decoding row asserts were removed with the decoders.protocol/src/executor.ts(+1079),session.ts,notices.ts,events.ts. Kept in full: the Executor surface (decodeExecutorId, grants, operations,ExecutorProvider/ExecutionTarget,SessionSafetyState) is referenced by surviving live code (src/executor/,src/runner-executor/,server/executors/,server/managed-executors/,executor-client.ts, routes/frontend safety UI, andstore.tsitself viadecodeExecutorId);notices.ts/events.tschanges are the unrelated worker-report and steer_delivered work.lane-placement.*, actor-routing lane changes, kernel memory bounding, per-lane metrics), transcript-actor co-location (transcript-store.ts,actor-transcript.ts,transcript-offline-migration.*, transcript authority migration 31), onboarding/UI, session-safety (quarantine → paused_for_safety), capacity-control docs, and everything else unrelated: untouched.session-safety.tskeeps theagent_operation: "an agent action"display label — live DBs can contain sessions quarantined with that command kind.runAgentHostedinhost-client.tsand callers: pre-existing at BASE, unrelated naming coincidence.3. Not cleanly disentangled / leftovers
session_kernel_agent_host_supervision/agent_operations/ cancellation / high-water rows are no longer read, validated, settled, or pruned; they sit inert until session deletion clears them. Supervision receipts stuck 'active' are harmless (nothing consumes them anymore).agent_operation-quarantined session recoverable (the validators needed deleted decoders).docs/transcripts.mdstill mentions "future detached Agent Host recovery" when describing the kept typed destination surface — left as-is since the surface it documents remains.agent-operation/transcript-facade.ts, was deleted); a follow-up could retire it once live data ages out.Started by Michiel Westerbeek in this OS session