feat: attest tmux session provenance - #249
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour 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. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d26d65e38c
ℹ️ 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 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 address that feedback".
| continue; | ||
| } | ||
| edge.evidence_refs = vec![RuntimeEvidenceRef { | ||
| version: 5, |
There was a problem hiding this comment.
Accept version-five tmux evidence in the API validator
On a Docker-mode host with a canonical host node and at least one tmux session, this emits a version-five evidence reference, but apps/api/src/daemonResponseValidation.ts:183-215 recognizes only versions one through four and rejects every other version. Consequently, even after the provider-state enumeration is synchronized, /daemon/runtime/map still returns daemon_invalid_response instead of the valid tmux topology; add the corresponding closed V5 edge rule at the browser-facing validation boundary.
AGENTS.md reference: AGENTS.md:L32-L35
Useful? React with 👍 / 👎.
| if pid_namespace.is_restricted() { | ||
| ProviderStateKind::Disabled | ||
| } else { | ||
| ProviderStateKind::Fresh |
There was a problem hiding this comment.
Propagate tmux failures before marking the slot fresh
If tmux cannot spawn, times out, or exits unsuccessfully, collect_tmux_sessions returns early (providers/tmux.rs:26-52), but this branch still records the dedicated slot as Fresh. The scheduler consequently treats the attempt as a successful collection, replaces any retained sessions with an empty observation, and advances the last-success metadata/revision; propagate the command outcome so failed attempts become stale or unavailable while only a successful empty listing is fresh.
Useful? React with 👍 / 👎.
d26d65e to
02de33e
Compare
Summary: add the closed V5 Tmux session-listing evidence shape and fixed tmux provider slot; bind Tmux RunsOn host evidence only after its own lifecycle revision/freshness; fail closed for restricted PID namespaces, absent or ambiguous identities, reset/revisionless/disabled state, and mock mode. Verification passed: Rust core tests; Rust daemon tests; contract tests and typecheck; Rust clippy; Rust format check; generated schema check.