Skip to content

fix(gateway): stop actors on session delete#1220

Open
ymote wants to merge 1 commit into
mainfrom
fix/gateway-delete-stops-actor-1219
Open

fix(gateway): stop actors on session delete#1220
ymote wants to merge 1 commit into
mainfrom
fix/gateway-delete-stops-actor-1219

Conversation

@ymote

@ymote ymote commented May 24, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Wire gateway slash /delete handling into the existing session-delete event channel used to stop in-memory session actors.
  • Notify the runtime with the exact profiled deleted session key after the disk session clear succeeds.
  • Add gateway dispatcher regressions for named deletion and current-topic deletion emitting actor-stop signals.

Closes #1219

Current-main refresh

  • Base: current GitHub main / origin/main 4adbe05fff212cb85d1f0a6d6225da0713446016.
  • Head: a66a2dd851659989c203f7c981ce2364e7b09dbe.
  • Isolated checkout: /private/tmp/octos-1220-current.f8pao4/octos.
  • Environment: Darwin 25.5.0 arm64; rustc 1.95.0; cargo 1.95.0.
  • Root dirty checkout was not modified.

Local validation

  • git diff --check origin/main...HEAD passed.
  • cargo fmt --all -- --check passed.
  • rustfmt --check crates/octos-cli/src/commands/gateway/gateway_runtime.rs crates/octos-cli/src/gateway_dispatcher.rs passed.
  • typos crates/octos-cli/src/commands/gateway/gateway_runtime.rs crates/octos-cli/src/gateway_dispatcher.rs passed.
  • CARGO_TARGET_DIR=/private/tmp/octos-1220-current-4adbe-target-cli CARGO_INCREMENTAL=0 CARGO_PROFILE_DEV_DEBUG=0 cargo test -p octos-cli gateway_dispatcher::tests::should_signal_actor_stop -- --nocapture passed: 2/2 matching tests.
  • CARGO_TARGET_DIR=/private/tmp/octos-1220-current-4adbe-target-cli CARGO_INCREMENTAL=0 CARGO_PROFILE_DEV_DEBUG=0 cargo test -p octos-cli gateway_dispatcher::tests::should_delete -- --nocapture passed: 3/3 matching tests.
  • CARGO_TARGET_DIR=/private/tmp/octos-1220-current-4adbe-target-cli CARGO_INCREMENTAL=0 CARGO_PROFILE_DEV_DEBUG=0 cargo test -p octos-cli gateway_dispatcher::tests -- --nocapture passed: 34/34 gateway dispatcher tests.
  • CARGO_TARGET_DIR=/private/tmp/octos-1220-current-4adbe-target-cli CARGO_INCREMENTAL=0 CARGO_PROFILE_DEV_DEBUG=0 cargo clippy --workspace --all-targets -- -D warnings passed.
  • git ls-files --others --exclude-standard was empty in the isolated checkout.

CI / merge status

  • GitHub CI is green on refreshed head a66a2dd851659989c203f7c981ce2364e7b09dbe: check, check-matrix, dashboard, swarm-app, test-octos-cli, test-octos-agent (lib), test-octos-agent (integration), typos, and author-email all passed.
  • PR is MERGEABLE but remains branch-protection blocked by required review (REVIEW_REQUIRED).

@ymote

ymote commented May 29, 2026

Copy link
Copy Markdown
Contributor Author

Current-main validation refresh for #1219.

Scope validated:

  • Base/current main: 1fb4c88e020242d82cee245b331798ed6dc551e7 (confirmed with git ls-remote https://github.com/octos-org/octos.git refs/heads/main)
  • PR head: a88f59a08b3af7d318f20316f58728dc42c1e238
  • Local rehearsal merge: c5435ea46ce252b50c3223a17990a4b19d940a87
  • Rehearsal clone: /private/tmp/octos-1220-current-3tLEFS (standalone clone; root checkout left untouched)
  • Changed files: crates/octos-cli/src/commands/gateway/gateway_runtime.rs, crates/octos-cli/src/gateway_dispatcher.rs

Commands run:

  • git fetch https://github.com/octos-org/octos.git pull/1220/head
  • git merge --no-edit FETCH_HEAD clean on current local main
  • git diff --check origin/main...HEAD
  • rustfmt --check crates/octos-cli/src/commands/gateway/gateway_runtime.rs crates/octos-cli/src/gateway_dispatcher.rs
  • cargo fmt --all -- --check
  • CARGO_TARGET_DIR=/private/tmp/octos-1220-current-1fb4-test-target CARGO_INCREMENTAL=0 cargo test -p octos-cli gateway_dispatcher::tests::should_signal_actor_stop -- --nocapture
  • CARGO_TARGET_DIR=/private/tmp/octos-1220-current-1fb4-test-target CARGO_INCREMENTAL=0 cargo test -p octos-cli gateway_dispatcher::tests::should_delete -- --nocapture
  • CARGO_TARGET_DIR=/private/tmp/octos-1220-current-1fb4-test-target CARGO_INCREMENTAL=0 cargo test -p octos-cli gateway_dispatcher::tests -- --nocapture
  • CARGO_TARGET_DIR=/private/tmp/octos-1220-current-1fb4-clippy-target CARGO_INCREMENTAL=0 cargo clippy -p octos-cli --lib --no-deps
  • CARGO_TARGET_DIR=/private/tmp/octos-1220-current-1fb4-clippy-api-target CARGO_INCREMENTAL=0 cargo clippy -p octos-cli --features api --lib --no-deps
  • git ls-files --others --exclude-standard

Results:

  • Rehearsal merge was clean.
  • git diff --check passed.
  • Touched Rust files passed rustfmt --check.
  • Focused actor-stop regressions passed: 2/2.
  • Focused delete command regressions passed: 3/3.
  • Full gateway_dispatcher::tests passed: 34/34.
  • Both clippy commands exited 0; the API clippy run emitted existing warnings outside this slice.
  • git ls-files --others --exclude-standard returned empty in the rehearsal clone.
  • Environment: Darwin 25.5.0 arm64, rustc 1.95.0, cargo 1.95.0.

Current-main blocker found:

  • Full cargo fmt --all -- --check fails outside this PR diff on current-main formatting drift in:
    • crates/octos-agent/src/agent/loop_runner.rs
    • crates/octos-agent/src/loop_detect.rs
    • crates/octos-cli/src/api/ui_protocol_ledger.rs
  • The touched files for this PR passed formatting.

Issue fit:

  • Gateway /delete now emits the same profiled session-delete signal consumed by the runtime to stop the in-memory session actor after disk deletion succeeds.
  • Tests cover deleting a named session and deleting the current named session, including the emitted actor-stop signal.

Remaining gap:

  • GitHub reports this PR as MERGEABLE but REVIEW_REQUIRED / BLOCKED, so I did not merge.

@ymote ymote force-pushed the fix/gateway-delete-stops-actor-1219 branch from a88f59a to a66a2dd Compare June 2, 2026 04:38
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.

Bug: Gateway /delete fails to stop the in-memory session actor

1 participant