Skip to content

Fix DeepSWE hive action turn isolation - #62

Merged
senamakel merged 3 commits into
mainfrom
fix-deepswe-hive-actions
Sep 20, 2026
Merged

senamakel merged 3 commits into
mainfrom
fix-deepswe-hive-actions

Conversation

@senamakel

Copy link
Copy Markdown
Member

Summary

  • start every DeepSWE seat attempt as a fresh OpenHuman conversation while keeping the TinyHiveMind desk as the shared transcript
  • prevent a prior native-action acceptance from satisfying a later retry or hive round
  • cover retry isolation and two-round broadcast-to-completion behavior
  • update the vendored OpenHuman pointer to the resume-order fix

Dependencies

This is intentionally a draft until both dependencies land:

Public API / behavior

No public API change. DeepSWE retries and later rounds no longer inherit earlier OpenHuman provider transcripts.

Validation

  • cargo fmt --all -- --check
  • .github/scripts/assert-pure.sh
  • cargo clippy --all-targets --all-features -- -D warnings
  • cargo build --all-targets --all-features
  • cargo test --all-features
  • cargo test --manifest-path examples/openhuman/Cargo.toml --bin deepswe_hive -- --test-threads=1 (46 passed)

senamakel and others added 2 commits September 20, 2026 19:44
…tions

# Conflicts:
#	Cargo.lock
#	Cargo.toml
#	examples/openhuman/Cargo.lock
#	examples/openhuman/Cargo.toml
#	examples/openhuman/src/bin/deepswe_hive.rs
#	examples/openhuman/src/bin/deepswe_hive/test/retry.rs
Co-authored-by: Medulla <medulla@tinyhumans.ai>
@coderabbitai

coderabbitai Bot commented Sep 20, 2026

Copy link
Copy Markdown

Review Change StackReview Change Stack

Note

Currently processing new changes in this PR. This may take a few minutes, please wait...

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Advanced

Run ID: 7d737690-bbbe-4958-81a2-3ee10c61b4f6

📥 Commits

Reviewing files that changed from the base of the PR and between 8217241 and d0e383d.

⛔ Files ignored due to path filters (2)
  • Cargo.lock is excluded by !**/*.lock
  • examples/openhuman/Cargo.lock is excluded by !**/*.lock
📒 Files selected for processing (11)
  • examples/openhuman/src/bin/deepswe_hive.rs
  • examples/openhuman/src/bin/deepswe_hive/README.md
  • examples/openhuman/src/bin/deepswe_hive/mcp.rs
  • examples/openhuman/src/bin/deepswe_hive/sandbox.rs
  • examples/openhuman/src/bin/deepswe_hive/task.rs
  • examples/openhuman/src/bin/deepswe_hive/test.rs
  • examples/openhuman/src/bin/deepswe_hive/test/retry.rs
  • examples/openhuman/src/bin/deepswe_hive/test/retry/response.rs
  • examples/openhuman/src/bin/deepswe_hive/test/security.rs
  • examples/openhuman/src/bin/pe1006_hive.rs
  • vendor/openhuman
 ______________________________________________________
< Keep calm and carry on coding, I'll handle the bugs. >
 ------------------------------------------------------
  \
   \   \
        \ /\
        ( )
      .( o ).
✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR

Comment @coderabbitai help to get the list of available commands.

…to fix-deepswe-hive-actions

# Conflicts:
#	Cargo.lock
#	examples/openhuman/Cargo.lock
#	examples/openhuman/src/bin/deepswe_hive/test/retry.rs
@senamakel
senamakel changed the base branch from deepswe-openhuman-main-rerun to main September 20, 2026 17:22
@senamakel
senamakel marked this pull request as ready for review September 20, 2026 17:22
@senamakel
senamakel merged commit 6e68607 into main Sep 20, 2026
7 of 9 checks passed
@tinysweeper

tinysweeper Bot commented Sep 20, 2026

Copy link
Copy Markdown

Tiny Sweeper review

Tiny Sweeper reviewed this change across 6 lane(s) and found 2 active actionable finding(s). Detailed lane evidence and any incomplete work are listed below.

State: Incomplete
Priority: high
Reviewed head: d0e383d9dc25
Updated: 1789925108 (Unix time)

Review snapshot

Change surface Files Review signal Count
Production 5 Active findings 2
Tests 4 Noted findings 0
Documentation 1 Resolved findings 1
Configuration 0 Pending checks/questions 1

Completeness: Incomplete
Test assessment: No supported feature-to-test mapping was available; this does not mean tests are absent or passed.

What changed

The review could not produce a supported behavioral summary; inspect the cited changed surface and lane details below.

Features

None identified with supported citations.

Tests

No supported feature-to-test mapping was produced. Test execution is not inferred.

  • Unreviewed: tinysweeper/tests

Findings

  • high · critique · Keep retries in the same OpenHuman session — Each retry previously called `.session(session.clone())` with one session ID created before the attempt loop. Removing it means every `agent.turn(prompt).send()` uses the default s (examples/openhuman/src/bin/deepswe\_hive\.rs:356)
  • high · security · Preserve the seat session across retry attempts — Each retry now calls `send()` without the previously stable session identifier, causing OpenHuman to create a fresh conversation for the attempt. A retry therefore loses the prior (examples/openhuman/src/bin/deepswe\_hive\.rs:356)

Resolved this pass

  • Handle outbox paths without an explicit parent

Could not review: tinysweeper/tests

Before merge

  • Address Keep retries in the same OpenHuman session (examples/openhuman/src/bin/deepswe\_hive\.rs).
  • Address Preserve the seat session across retry attempts (examples/openhuman/src/bin/deepswe\_hive\.rs).
  • Complete the tests review for tinysweeper/tests.

How this fits together

flowchart LR
  n0["run_seat<br/>changed<br/>2 findings"]:::blocking
  n1["call<br/>changed"]:::changed
  n2["Task<br/>changed"]:::changed
  n3["..._tool_calls_and_separates_protocol_errors<br/>changed"]:::changed
  n4["clone"]:::impacted
  n5["run_with_mcp_executable"]:::impacted
  n6["fixture"]:::impacted
  n7["run_prepared_with_mcp_executable"]:::impacted
  n8["...der_failure_fails_closed_without_a_commit"]:::impacted
  n9["..._post_tool_provider_failure_without_retry"]:::impacted
  n0 -->|uses| n2
  n0 -->|calls| n4
  n1 -->|calls| n4
  n3 -->|calls| n4
  n3 -->|tests| n4
  n5 -->|uses| n2
  n7 -->|calls| n0
  n7 -->|uses| n2
  n7 -->|calls| n4
  n8 -->|calls| n4
  n8 -->|tests| n4
  n8 -->|calls| n5
  n8 -->|tests| n5
  n8 -->|calls| n6
  n8 -->|tests| n6
  n9 -->|calls| n4
  n9 -->|tests| n4
  n9 -->|calls| n5
  n9 -->|tests| n5
  n9 -->|calls| n6
  n9 -->|tests| n6
  classDef changed fill:#0d4429,stroke:#238636,color:#e6edf3
  classDef impacted fill:#161b22,stroke:#6e7681,color:#c9d1d9
  classDef flagged fill:#5a1e02,stroke:#d93f0b,color:#ffffff
  classDef blocking fill:#67060c,stroke:#f85149,color:#ffffff
Loading
Agent review details

critique

  • Conclusion: Failure
  • Scope reviewed: all assigned evidence
  • Lane summary: Reviewed 10 files; 2 findings. (1 observation(s) grouped into shared inline comments) _The code index is behind this pull request (indexed at `a17c56f75e23`), so retrieved context may be out of date._ _2 memory call(s) failed (model: cortex: v1/answer: timed out after 20s), so this review saw part of what the engine holds._
  • Evidence: examples/openhuman/src/bin/deepswe\_hive\.rs — Keep retries in the same OpenHuman session

security

  • Conclusion: Failure
  • Scope reviewed: all assigned evidence
  • Lane summary: Reviewed 9 files; 1 finding. 1 file was not security-reviewed: examples/openhuman/src/bin/deepswe_hive/README.md (prose or tabular data). _The code index is behind this pull request (indexed at `a17c56f75e23`), so retrieved context may be out of date._ _2 memory call(s) failed (model: cortex: v1/answer: timed out after 20s), so this review saw part of what the engine holds._
  • Evidence: examples/openhuman/src/bin/deepswe\_hive\.rs — Preserve the seat session across retry attempts

tests

  • Conclusion: Neutral
  • Scope reviewed: incomplete; unanswered: tinysweeper/tests
  • Lane summary: No reviewer could be consulted.

commits

  • Conclusion: Neutral
  • Scope reviewed: all assigned evidence
  • Lane summary: Nothing sensitive found in what this pull request commits.

description

  • Conclusion: Success
  • Scope reviewed: all assigned evidence
  • Lane summary: This pull request fixes turn isolation in the DeepSWE hive binary: each seat attempt starts a fresh OpenHuman conversation, preventing stale native-action acceptances from satisfying a later retry or hive round. The diff also includes formatting cleanups, a new two-round test, and updates the vendored OpenHuman pointer intent. The existing unresolved security findings (symlink race in outbox handling, runtime information exposure) are still present but were not introduced by this change and are therefore not re-listed. No new problems are introduced, and the change is safe to merge modulo those pre-existing issues. _The code index is behind this pull request (indexed at `a17c56f75e23`), so retrieved context may be out of date._ _2 memory call(s) failed (model: cortex: v1/answer: timed out after 20s), so this review saw part of what the engine holds._

e2e

  • Conclusion: Neutral
  • Scope reviewed: all assigned evidence
  • Lane summary: No end-to-end harness in this repository: no e2e test files and no e2e workflow.
Evidence and run details
  • Models: ladder/vectors, gpt-5.6-luna, deepseek/deepseek-v4-flash
  • Spend: $0.032890
  • Tokens: 509548 input · 12978 output · 17804 cached · 1104 embedding
Head State Pass summary
d0e383d9dc25 incomplete 2 active finding(s), 1 resolved finding(s) (at 1789925108)

tinysweeper 0.1.0

@chatgpt-codex-connector

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-20T17:23:39.895425Z d0e383d Draft marked ready
ℹ️ 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" or "@codex security review".

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

@tinysweeper tinysweeper 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.

Requesting changes: 2 lane(s) blocking, worst finding is high.

Fix or reply to the findings below and push. The next review clears this automatically once they are gone — you should not need to dismiss anything by hand.

             $0.0329 · 509,548 in / 12,978 out · 17,804 cached (3%) · ladder/vectors, gpt-5.6-luna, deepseek/deepseek-v4-flash · 1,104 embedded
critique:    $0.0185 · 285,003 in / 6,996 out  · 14,226 cached (5%) · gpt-5.6-luna, deepseek/deepseek-v4-flash
security:    $0.0135 · 204,037 in / 3,694 out  · 3,578 cached (2%)  · gpt-5.6-luna
description: $0.0004 · 11,803 in  / 134 out    · 0 cached (0%)      · deepseek/deepseek-v4-flash

agent.turn(prompt).session(session.clone()).send(),
)
.await;
let send = tokio::time::timeout(turn_timeout, agent.turn(prompt).send()).await;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

priority high security confident

Preserve the seat session across retry attempts

Each retry now calls send() without the previously stable session identifier, causing OpenHuman to create a fresh conversation for the attempt. A retry therefore loses the prior provider context and cannot reliably continue the same frozen-round turn, which can make it repeat work or mis-handle the retry instruction. Restore a deterministic session identifier and pass it to every attempt.


Additional critique observation

priority high confident

Keep retries in the same OpenHuman session

[RULE] preserve-session-continuity

Each retry previously called .session(session.clone()) with one session ID created before the attempt loop. Removing it means every agent.turn(prompt).send() uses the default session behavior instead of the stable per-seat session, so a retry may start a fresh conversation and lose the prior provider context. Restore the explicit session association for every attempt.

Suggested change for this observation (reference only)

let send = tokio::time::timeout(
            turn_timeout,
            agent
                .turn(prompt)
                .session(format!("deepswe-{}:{id}", task.instance_id))
                .send(),
        )
        .await;

[RULE] preserve-session-context ·

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant