Repository navigation
fix(saas): fence recovered deliveries by lease; relay turns mark their thread busy (WIP) - #7295
Conversation
The delivery_drain module is no longer referenced by the orchestration pipeline, so it has been deleted to avoid dead code. Auto-committed-on: dragonfly Co-authored-by: Medulla <medulla@tinyhumans.ai>
Introduce a background delivery module that lets orchestration results be delivered asynchronously, and wire it into the orchestration module so callers can dispatch work without blocking on completion. Auto-committed-on: dragonfly Co-authored-by: Medulla <medulla@tinyhumans.ai>
Background task results are now delivered even when the agent is busy, instead of being dropped or deferred indefinitely. The busy guard was adjusted to allow this delivery path, and tests cover the new behaviour. Auto-committed-on: dragonfly Co-authored-by: Medulla <medulla@tinyhumans.ai>
The relay ops module is no longer referenced by any provider code, so it has been deleted to keep the relay provider directory free of dead code. Auto-committed-on: dragonfly Co-authored-by: Medulla <medulla@tinyhumans.ai>
Adds coverage for the delivery drain path in the orchestration layer to verify that queued deliveries are flushed correctly. Auto-committed-on: dragonfly Co-authored-by: Medulla <medulla@tinyhumans.ai>
Expose a test-only single-pass delivery helper so tests outside the background delivery module can drive one turn, and reflow a few over-long log and assertion lines to satisfy formatting. Auto-committed-on: dragonfly Co-authored-by: Medulla <medulla@tinyhumans.ai>
The delivery drain test passed a String literal with an explicit into call where the parameter already accepts a string slice, so the conversion was removed to keep the call site consistent with the surrounding tests. Auto-committed-on: dragonfly Co-authored-by: Medulla <medulla@tinyhumans.ai>
The relay ops test now records whether the thread was busy while each relayed turn ran and asserts it was, plus that the thread is idle once the turn ends. This pins down the busy-guard behaviour that lets a background result wait for an in-flight relayed turn. Auto-committed-on: dragonfly Co-authored-by: Medulla <medulla@tinyhumans.ai>
|
Note Currently processing new changes in this PR. This may take a few minutes, please wait... ⚙️ Run configuration
📒 Files selected for processing (9)
Comment |
Tiny Sweeper reviewTiny Sweeper reviewed this change across 5 lane(s) and found 0 active actionable finding(s). Detailed lane evidence and any incomplete work are listed below. State: Incomplete Review snapshot
Completeness: Incomplete FeaturesNone identified with supported citations. TestsNo supported feature-to-test mapping was produced. Test execution is not inferred.
FindingsNo active actionable findings. Lower-confidence notes
Could not review: tinysweeper/description, tinysweeper/tests Before merge
How this fits togetherflowchart LR
n0["is_busy<br/>changed"]:::changed
n1["try_deliver<br/>changed"]:::changed
n2["expect"]:::impacted
n3["unit_concurrency_cap_is_respected"]:::impacted
n4["...child_marks_run_failed_with_partial_state"]:::impacted
n5["unit_max_children_hard_cap_fails_run"]:::impacted
n6["unit_phases_execute_in_dependency_order"]:::impacted
n7["unit_resume_skips_completed_phases"]:::impacted
n0 -->|calls| n2
n1 -->|calls| n0
n1 -->|calls| n2
n3 -->|calls| n2
n4 -->|calls| n2
n5 -->|calls| n2
n6 -->|calls| n2
n7 -->|calls| n2
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
Agent review detailscritique
security
tests
commits
description
Evidence and run details
|
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.
tinysweeper found nothing blocking, but could not review everything, so this is not an approval: tinysweeper/description, tinysweeper/tests.
$0.0680 · 460,446 in / 30,416 out · 31,590 cached (7%) · openai/gpt-6-luna,
critique: $0.0327 · 212,530 in / 16,184 out · 12,852 cached (6%) · openai/gpt-6-luna,
security: $0.0353 · 247,916 in / 14,232 out · 18,738 cached (8%) · openai/gpt-6-luna,
What
These are two follow-ups to #7273 that review had deferred.
agent/orchestration/delivery_drain.rs, new).DrainFence. That is the lease grant the profile was opened under (DrainFence::current(), or the grant passed torecover_on_openfromprofiles/host.rs).try_deliverrefuses whenfence.admits()is false, so a node that lost the profile's lease does not deliver over the new holder.RECOVERY_BUSY_POLLinstead of giving up.channels/providers/relay/ops.rs,busy_guard.rs).To finish
RUST_MIN_STACK=16777216 cargo test -p openhuman --lib -- agent::orchestration channels::providers::relay profiles::andcargo test -p openhuman-cli --test saas_mode_e2e --test saas_profile_isolation_e2e.delivery_drain_tests.rscovers the fenced and live drain cases. It still needs a test where a profile loses its lease (clock advance or aLocalLeasestakeover) and no delivery happens, while a live profile still delivers. It was being added (a test-only delivery pass helper inbackground_delivery.rs) when the work stopped.relay/ops_tests.rspasses. It was the last thing added.