Skip to content

feat: make Astrid local admin standalone - #1473

Draft
joshuajbouw wants to merge 1 commit into
mainfrom
codex/standalone-admin
Draft

feat: make Astrid local admin standalone#1473
joshuajbouw wants to merge 1 commit into
mainfrom
codex/standalone-admin

Conversation

@joshuajbouw

Copy link
Copy Markdown
Member

Linked Issue

Closes #1471

Summary

Makes Astrid's baseline local administrative transport part of Astrid itself, so a clean runtime can start and be managed without installing an AOS or other distribution-provided uplink capsule.

The kernel remains tool- and business-logic-blind: the new native uplink is a typed, authenticated transport boundary owned by the Astrid runtime. Distribution frontends remain optional compositions and cannot compete for the canonical listener or become boot dependencies.

Changes

  • Add the Astrid-owned native Unix-socket uplink, including authenticated handshake, request correlation, typed routing, timeout handling, and orderly shutdown.
  • Start the native uplink during daemon boot and remove the hard dependency on a capsule advertising the CLI socket uplink.
  • Update the native CLI/admin client path and preserve capsule-uplink compatibility for non-canonical transports.
  • Add clean-home runtime/CLI smoke coverage and update daemon and architecture documentation.
  • Document the change under CHANGELOG.md [Unreleased].

Verification

  • cargo test -p astrid-daemon — 8 tests passed.
  • cargo test -p astrid-kernel — 296 tests passed.
  • cargo test -p astrid-uplink — 21 tests passed.
  • cargo clippy --workspace --all-features -- -D warnings passed.
  • Twenty clean-home start, CLI operation, stop, and restart cycles passed.
  • An existing AOS CLI capsule remained loadable and ready while staying transport-inert beside the canonical Astrid-owned listener.

AI / Tool Assistance

Assisted-by: Codex:GPT-5.6

Codex assisted with repository analysis, implementation across the daemon, uplink, kernel, and CLI boundaries, regression tests, documentation, and local validation. Joshua reviewed the complete change, its architecture, risks, and validation before publication.

Checklist

  • Linked to an issue
  • CHANGELOG.md updated (entry under [Unreleased] — or [Unreleased] rolled into a version section for a release PR; not applicable to docs/CI-only changes)
  • I understand every change in this PR and can explain its design, risks, and validation.
  • I reviewed and tested any meaningful tool-generated output included in this PR.
  • Every non-bot, non-merge commit has a matching Signed-off-by trailer.

Signed-off-by: Joshua J. Bouw <jjb@unicity-labs.com>
Copilot AI balanced review requested due to automatic review settings August 10, 2026 07:57

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Makes Astrid’s local administrative transport runtime-owned, removing the boot dependency on distribution uplink capsules.

Changes:

  • Adds an authenticated native uplink server with routing and lifecycle handling.
  • Starts it during daemon boot and updates CLI/runtime documentation.
  • Adds capsule-free lifecycle smoke coverage.

Reviewed changes

Copilot reviewed 22 out of 23 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
scripts/e2e/runtime-harness.sh Runs standalone admin smoke coverage.
scripts/e2e/runtime-cli-smoke.sh Tests capsule-free start/status/stop/restart.
docs/astrid-native-uplink.md Documents the native transport boundary.
crates/astrid-uplink/src/socket_client.rs Exposes handshake helper for crate tests.
crates/astrid-uplink/src/native/routing.rs Adds topic policy and response demultiplexing.
crates/astrid-uplink/src/native/mod.rs Implements the native socket server.
crates/astrid-uplink/src/native/handshake.rs Implements server-side authentication.
crates/astrid-uplink/src/lib.rs Exports and documents native uplink support.
crates/astrid-uplink/Cargo.toml Adds native server dependencies.
crates/astrid-kernel/src/lib.rs Assigns canonical listener ownership.
crates/astrid-integration-tests/tests/gateway_e2e.rs Updates gateway test scope documentation.
crates/astrid-integration-tests/tests/daemon_wedge_e2e.rs Removes obsolete capsule dependency note.
crates/astrid-daemon/src/lib.rs Starts and shuts down the native uplink.
crates/astrid-daemon/README.md Documents the revised boot sequence.
crates/astrid-daemon/Cargo.toml Adds the uplink dependency.
crates/astrid-cli/src/principal.rs Documents handshake-bound identity.
crates/astrid-cli/src/main.rs Updates principal-resolution commentary.
crates/astrid-cli/src/commands/mcp/watch.rs Updates watcher identity documentation.
crates/astrid-cli/src/cli.rs Updates principal option documentation.
crates/astrid-cli/src/admin_client.rs Updates admin identity documentation.
crates/astrid-capsule/src/readiness.rs Documents capsule-free boot behavior.
CHANGELOG.md Records standalone administration support.
Cargo.lock Locks new dependency relationships.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment on lines +24 to +40
const ALLOWED_EGRESS_EXACT: &[&str] = &[
CHAT_DELTA_TOPIC,
CHAT_RESPONSE_TOPIC,
"astrid.v1.onboarding.required",
"astrid.v1.approval",
"astrid.v1.capsules_loaded",
"registry.v1.active_model_changed",
];
const ALLOWED_EGRESS_PREFIXES: &[&str] = &[
"astrid.v1.elicit.",
"astrid.v1.response.",
"astrid.v1.admin.response.",
"registry.v1.response.",
"registry.v1.selection.",
"session.v1.response.",
"cli.v1.command.result.",
];
Comment on lines +90 to +93
match outbound_session(message) {
Some(target) => session == Some(target),
None => true,
}
Comment on lines +88 to +93
let identity = match handshake::authenticate(
&mut stream,
&self.session_token,
&self.home,
)
.await
Comment on lines +293 to +295
writer.write_all(&len.to_be_bytes()).await?;
writer.write_all(&bytes).await?;
writer.flush().await
Comment on lines +103 to +106
connections.spawn(async move {
let _permit = permit;
serve_connection(stream, identity, event_bus, shutdown).await;
});
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.

Astrid standalone boot must not depend on a distribution-provided CLI uplink

2 participants