Skip to content

Isolate daemon sessions by coding-agent source - #40

Merged
Stephen Belanger (Qard) merged 3 commits into
mainfrom
fix/source-qualified-daemon-sessions
Sep 1, 2026
Merged

Isolate daemon sessions by coding-agent source#40
Stephen Belanger (Qard) merged 3 commits into
mainfrom
fix/source-qualified-daemon-sessions

Conversation

@Qard

Copy link
Copy Markdown
Collaborator

What this changes

A native session ID is only unique within a coding agent. The daemon previously used that ID alone for journals, locks, delivery keys, and deterministic span namespaces, so two agents reusing the same value could collide.

This PR makes the canonical agent source part of daemon session identity. It:

  • rejects unknown sources before accepting or journaling events
  • qualifies journals, locks, delivery state, and span-ID namespaces by source
  • keeps each translator bound to its canonical source
  • migrates legacy unqualified journals without changing the span IDs of recovered history
  • proves that identical native IDs from different agents remain isolated

This is intentionally limited to source identity and daemon state isolation; it does not change translator checkpoint/finalization behavior, managed-run capture, transcript import, or package distribution.

Validation

  • cargo test --manifest-path bt-daemon/Cargo.toml --all-features
  • cargo clippy --manifest-path bt-daemon/Cargo.toml --all-targets --all-features -- -D warnings
  • cargo fmt --manifest-path bt-daemon/Cargo.toml -- --check
  • git diff --check

The full daemon suite passes, including 20 distributed-tracing tests and new coverage for same-ID cross-agent isolation, strict source rejection, and legacy journal migration. Real-agent tests remain ignored by the default suite because this slice changes daemon identity/recovery rather than agent adapters.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 1, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-09-01T15:25:00.014063Z 3c6df13 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 3c6df13707

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "Codex (@codex) review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "Codex (@codex) address that feedback".

Comment thread bt-daemon/src/server.rs
Comment thread bt-daemon/src/translate/antigravity.rs Outdated
@Qard
Stephen Belanger (Qard) merged commit 29bbd56 into main Sep 1, 2026
20 checks passed
@Qard
Stephen Belanger (Qard) deleted the fix/source-qualified-daemon-sessions branch September 1, 2026 17:05
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.

2 participants