Skip to content

chore(deps): update vendored runtime crates - #5081

Merged
senamakel merged 26 commits into
tinyhumansai:mainfrom
senamakel:chore/update-vendor-submodules
Jul 22, 2026
Merged

chore(deps): update vendored runtime crates#5081
senamakel merged 26 commits into
tinyhumansai:mainfrom
senamakel:chore/update-vendor-submodules

Conversation

@senamakel

@senamakel senamakel commented Jul 21, 2026

Copy link
Copy Markdown
Member

Summary

  • Advance TinyAgents, TinyChannels, and TinyJuice to their latest main revisions; TinyCortex was already current.
  • Advance TinyFlows to latest main because its TinyAgents 2.1 dependency is required to preserve a single graph/checkpointer trait identity.
  • Align both Cargo lockfiles on TinyAgents 2.1, bytes 1.12.1, and mail-parser 0.11.5.
  • Fail closed on nested-conditional fan-in graphs that the current upstream barrier-relief lowering can execute with silent data loss, including misleading main-labelled branch ports and legacy stored graphs at run/resume boundaries.
  • Make same-turn agent-harness scenarios explicitly opt into blocking delegation after main changed archetype delegation to async-by-default.

Problem

  • The vendored runtime crates had moved ahead of OpenHuman's pins. TinyAgents 2.1 is source compatible for current host call sites, but the old ^1.7 constraint rejected it.
  • TinyFlows' pinned TinyAgents 1.x dependency created incompatible Rust trait identities once OpenHuman moved to TinyAgents 2.1.
  • Diff review and a standalone reproduction found an uncovered nested-conditional fan-in case where the new upstream barrier relief can merge before a real inner-branch item arrives.

Solution

  • Update the vendor gitlinks and dependency constraints together, including the required TinyFlows compatibility revision.
  • Keep stored workflow schemas unchanged and preserve normal one-level conditional joins and unconditional fan-ins.
  • Add stable nested/main-port conditional fan-in validation errors and enforce them on graph-changing author operations and at run/resume boundaries. Existing affected graphs remain readable, metadata-only edits remain possible, and definitions are not rewritten or deleted.
  • Preserve the production async delegation default while making the integration tests' inline child-result contract explicit and deterministic.
  • Synchronize the branch with current main and initialize the new optional transcript sequence field in raw-coverage fixtures.
  • Make the agent-team E2E wait for idle reconciliation after task completion, matching the runtime's documented two-step durable transition.
  • Synchronize with OpenHuman v0.62.0 and initialize the new AGENTS.md prompt fields in the personality and raw-coverage E2E fixtures.

Submission Checklist

If a section does not apply to this change, mark the item as N/A with a one-line reason. Do not delete items.

  • Tests added or updated (happy path + at least one failure / edge case) per Testing Strategy
  • Diff coverage ≥ 80% — changed lines are directly exercised by the focused topology, structured-validation, and legacy-run tests; GitHub coverage remains the merge gate.
  • N/A: Coverage matrix unchanged — no feature row was added, removed, or renamed.
  • N/A: No affected feature IDs; this is a dependency and safety-compatibility update.
  • No new external network dependencies introduced (mock/in-memory tests only).
  • N/A: Release manual smoke checklist does not need a new step for internal vendor revisions.
  • N/A: No tracking issue was supplied for this requested upgrade.

Impact

  • Desktop/core/CLI builds use the updated vendor runtime crates. TinyChannels' parser patch improves malformed and legacy-charset email handling.
  • Existing workflow JSON and persistence schemas remain compatible. Unsafe nested-conditional fan-in workflows now return a clear validation error instead of risking silent partial merge output.
  • TinyCortex remains at 9a0603a because that is already the latest main revision.

Related

  • Closes: N/A — no issue supplied.
  • Follow-up PR(s)/TODOs: Upstream TinyFlows should model all controlling nested branchers before OpenHuman removes the fail-closed guard.

AI Authored PR Metadata (required for Codex/Linear PRs)

Keep this section for AI-authored PRs. For human-only PRs, mark each field N/A.

Linear Issue

  • Key: N/A
  • URL: N/A

Commit & Branch

  • Branch: chore/update-vendor-submodules
  • Commit SHA: 5b28cafce

Validation Run

  • N/A: no frontend source changes; frontend format validation is delegated to CI.
  • N/A: no TypeScript changes; typecheck is delegated to CI.
  • Focused tests: TinyFlows all-features (340 unit + integration/doc suites), TinyAgents all-features (1,200 unit + integration/doc suites), TinyChannels all-features (984 unit + docs), TinyJuice all-features (437 unit + binary/integration/doc suites), and TinyCortex feature tests (1,309 unit + mock integration/doc suites; two live credential tests ignored) passed.
  • OpenHuman tests/build: all 191 pre-existing flows ops tests plus all 3 new referenced-child authoring/cycle regressions, all 14 edit-workflow tests, and all 3 saved-flow resolver tests passed (including direct/single-wired-router fan-in detection, recursive inline/by-ID sub-workflow compatibility, shared builder gating, durable-draft backward compatibility, terminal incompatible-resume persistence, and legacy metadata edits); the full agent_harness_e2e target passed 18/18; the agent-team live-run E2E (including exact expected-member reconciliation), exact Composio contract-gate raw-coverage test, and TokenJuice host-floor middleware tests passed; root check and openhuman-core build passed; merged-main raw_coverage_all and v0.62.0 personality_e2e compile successfully.
  • Tauri fmt/check: lockfile regenerated and cargo check --manifest-path app/src-tauri/Cargo.toml passed.
  • Startup/update smoke: isolated headless core booted healthy, exposed 747 schema methods, reported version 0.61.7, and completed openhuman.update_check successfully.

Validation Blocked

  • command: N/A
  • error: N/A
  • impact: N/A

Behavior Changes

  • Intended behavior change: use the latest compatible vendor runtimes and reject the one confirmed unsafe nested fan-in topology.
  • User-visible effect: affected workflow validation/run/resume calls return a stable actionable error instead of producing incomplete merged output.

Parity Contract

  • Legacy behavior preserved: stored workflows remain readable and unchanged; metadata-only edits remain available; safe one-level conditional fan-in, direct all-port reconvergence, nested conditions without fan-in, and unconditional fan-in remain accepted.
  • Guard/fallback/dispatch parity checks: author-time validation plus authoritative run/resume guards cover new and pre-upgrade persisted definitions.

Duplicate / Superseded PR Handling

  • Duplicate PR(s): None found.
  • Canonical PR: This PR.
  • Resolution (closed/superseded/updated): N/A

Summary by CodeRabbit

  • Bug Fixes

    • Workflow validation and execution now reject unsupported conditional fan-in topologies before they run.
    • Unsafe nested workflows are also detected when referenced as saved sub-workflows.
    • Resume failures now record the run as failed while preserving actionable validation details.
    • Workflow editing prevents incompatible changes from being saved, while retaining structurally invalid drafts for repair.
  • Improvements

    • Workflow proposals now use consistent validation and compatibility checks.
    • Team monitoring verifies members return to an idle state after completing tasks.
  • Tests

    • Expanded coverage for validation, persistence, resume behavior, saved workflows, and tool schema errors.

@coderabbitai

coderabbitai Bot commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Warning

Review limit reached

You’ve reached a temporary PR review limit under our Fair Usage Limits Policy.

Your recent review volume is higher than typical usage, so adaptive limits are currently applied.

Next review available in: 27 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: df5f3ae9-c2a7-4733-8144-e6b9b60b3e8c

📥 Commits

Reviewing files that changed from the base of the PR and between dd6c85e and f9fbce0.

📒 Files selected for processing (2)
  • src/openhuman/flows/ops.rs
  • src/openhuman/flows/ops_tests.rs
📝 Walkthrough

Walkthrough

Adds engine-topology compatibility validation for conditional fan-in graphs, applies it across workflow authoring and execution paths, rejects incompatible saved sub-workflows, updates proposal gating, and expands legacy-flow, resolver, end-to-end, dependency, and middleware coverage.

Changes

Workflow compatibility enforcement

Layer / File(s) Summary
Topology validation and fixtures
src/openhuman/flows/ops.rs, src/openhuman/flows/ops_tests.rs
Detects unsupported nested and main-port conditional fan-in patterns, including nested inline sub-workflows, with stable validation codes.
Authoring and proposal gates
src/openhuman/flows/builder_tools.rs, src/openhuman/flows/tools.rs, src/openhuman/flows/ops.rs, src/openhuman/flows/*_tests.rs
Runs engine compatibility before later builder gates, preserves structurally invalid draft edits, rejects incompatible edits without durable advancement, and uses the shared proposal builder.
Validation, resolution, and execution boundaries
src/openhuman/flows/ops.rs, src/openhuman/tinyflows/caps.rs, src/openhuman/flows/ops_tests.rs
Rejects incompatible graphs during validation, run, resume, update inputs, and saved sub-workflow resolution; incompatible resumed runs become failed.

Dependency and middleware alignment

Layer / File(s) Summary
Dependency and vendor revisions
Cargo.toml, vendor/tinyagents, vendor/tinychannels, vendor/tinyflows, vendor/tinyjuice
Updates TinyAgents to 2.1 and advances the four vendored submodule revisions.
Workflow proposal tabulation coverage
src/openhuman/tinyagents/middleware.rs
Updates compaction rationale documentation and verifies the fixture exceeds the configured compression threshold.

End-to-end contract coverage

Layer / File(s) Summary
Team lifecycle assertions
tests/json_rpc_e2e.rs
Polls team members after task completion and verifies they return to idle.
Tool schema retry behavior
tests/raw_coverage/composio_credentials_state_raw_coverage_e2e.rs
Verifies an invalid action-tool request fails schema validation before a valid retry succeeds.

Estimated code review effort: 4 (Complex) | ~60 minutes

Sequence Diagram(s)

sequenceDiagram
  participant ProposalTool
  participant WorkflowOps
  participant CompatibilityValidator
  participant SubWorkflowResolver
  participant FlowCompiler
  ProposalTool->>WorkflowOps: validate and build proposal
  WorkflowOps->>CompatibilityValidator: check graph topology
  CompatibilityValidator->>SubWorkflowResolver: inspect referenced child graphs
  SubWorkflowResolver-->>CompatibilityValidator: return compatible or rejected graph
  CompatibilityValidator-->>WorkflowOps: return errors or success
  WorkflowOps->>FlowCompiler: compile compatible workflow
Loading

Possibly related PRs

Suggested labels: rust-core, bug

Suggested reviewers: graycyrus

Poem

I’m a rabbit guarding each branching trail,
Fan-in knots now raise a warning tale.
Safe drafts stay, unsafe ones cease,
Saved child paths must earn their peace.
Two-point-one hops through the burrow bright—
Tests return every member right. 🐇

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title is related to the vendored dependency updates, though it understates the substantial flow-validation changes.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

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

@senamakel
senamakel marked this pull request as ready for review July 21, 2026 19:33
@senamakel
senamakel requested a review from a team July 21, 2026 19:33
@coderabbitai coderabbitai Bot added the bug label Jul 21, 2026

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (1)
src/openhuman/flows/ops.rs (1)

3361-3365: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Log the compatibility-gate rejection before returning. The new ensure_engine_compatible(&flow.graph)? gate fails closed but propagates its error silently — unlike flows_validate (which emits a debug) and every other error branch in these two functions (which tracing::warn). A legacy flow that suddenly stops running/resuming will leave no grep-friendly trace at target: "flows" explaining why.

  • src/openhuman/flows/ops.rs#L3361-L3365: log the rejection (e.g. tracing::warn!(target: "flows", flow_id = %flow_id, %error, "[flows] flows_run: rejected — unsupported engine topology")) before returning the error.
  • src/openhuman/flows/ops.rs#L3618-L3620: emit the equivalent flows_resume warn including flow_id and thread_id.

As per coding guidelines: "Use verbose, grep-friendly diagnostics for new or changed flows, including entry/exit, branches, external calls, retries, state transitions, and errors."

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/openhuman/flows/ops.rs` around lines 3361 - 3365, Log compatibility-gate
failures before propagating them: in src/openhuman/flows/ops.rs lines 3361-3365,
update the flows_run path around ensure_engine_compatible to emit a target
"flows" warning including flow_id and the error, then return the error; in lines
3618-3620, add the equivalent flows_resume warning including flow_id and
thread_id before returning.

Source: Coding guidelines

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@tests/json_rpc_e2e.rs`:
- Around line 15065-15091: Update poll_team_members_status to accept the
expected member IDs or count, and require the agent_team_get response to contain
exactly that expected set before checking every member has the want status.
Update its callers for the Alice-and-Bob scenario so the poll cannot succeed
when only one member is returned.

---

Nitpick comments:
In `@src/openhuman/flows/ops.rs`:
- Around line 3361-3365: Log compatibility-gate failures before propagating
them: in src/openhuman/flows/ops.rs lines 3361-3365, update the flows_run path
around ensure_engine_compatible to emit a target "flows" warning including
flow_id and the error, then return the error; in lines 3618-3620, add the
equivalent flows_resume warning including flow_id and thread_id before
returning.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: d81902b2-2b3e-4816-ac8d-ddda326e4b63

📥 Commits

Reviewing files that changed from the base of the PR and between c09bef2 and 30beeb8.

⛔ Files ignored due to path filters (2)
  • Cargo.lock is excluded by !**/*.lock
  • app/src-tauri/Cargo.lock is excluded by !**/*.lock
📒 Files selected for processing (19)
  • Cargo.toml
  • src/openhuman/flows/ops.rs
  • src/openhuman/flows/ops_tests.rs
  • src/openhuman/tinyagents/middleware.rs
  • tests/agent_harness_e2e.rs
  • tests/json_rpc_e2e.rs
  • tests/personality_e2e.rs
  • tests/raw_coverage/agent_harness_leftovers_raw_coverage_e2e.rs
  • tests/raw_coverage/agent_prompts_subagent_raw_coverage_e2e.rs
  • tests/raw_coverage/agent_round26_raw_coverage_e2e.rs
  • tests/raw_coverage/agent_session_round24_raw_coverage_e2e.rs
  • tests/raw_coverage/composio_credentials_state_raw_coverage_e2e.rs
  • tests/raw_coverage/inference_agent_raw_coverage_e2e.rs
  • tests/raw_coverage/memory_raw_coverage_e2e.rs
  • tests/raw_coverage/memory_threads_raw_coverage_e2e.rs
  • vendor/tinyagents
  • vendor/tinychannels
  • vendor/tinyflows
  • vendor/tinyjuice

Comment thread tests/json_rpc_e2e.rs
coderabbitai[bot]
coderabbitai Bot previously approved these changes Jul 21, 2026

@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: 8c7830f6af

ℹ️ 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".

Comment thread src/openhuman/flows/ops.rs Outdated
Comment on lines +150 to +151
if ports.len() < 2 {
continue;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Treat single-output routers as conditional

When a switch has only one wired case (or a condition only wires one branch), ports.len() is 1 so this guard skips the node as if it were unconditional, even though the runtime still makes a routing decision and may emit no matching successor/default. A graph such as trigger -> outer switch(case) -> inner switch(case) -> A plus an unconditional C -> merge still has a predecessor behind nested conditional routing, but it now passes validation/run guards and can hit the same silent fan-in data-loss path this compatibility check is intended to block. Please classify router node kinds as branchers even when only one output edge is present.

Useful? React with 👍 / 👎.

pub(crate) fn validate_and_migrate_graph(graph_json: Value) -> Result<WorkflowGraph, String> {
let graph = migrate_and_deserialize_graph(graph_json)?;
tinyflows::validate::validate(&graph).map_err(|e| e.to_string())?;
ensure_engine_compatible(&graph)?;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Apply the compatibility gate to edited graphs too

Putting the new engine-compatibility check only in validate_and_migrate_graph leaves already-deserialized authoring paths out of sync: edit_workflow applies graph ops to a WorkflowGraph, runs tinyflows::validate::validate_all, and then calls build_builder_proposal without ever hitting this helper. In that path an agent can get a normal workflow_proposal and write an unsafe nested-fan-in graph back to a draft, only for save/run to fail later. Please run engine_compatibility_errors from the shared graph-level gate used after validate_all as well.

Useful? React with 👍 / 👎.

@coderabbitai coderabbitai Bot added the rust-core Core Rust runtime in src/: CLI, core_server, shared infrastructure. label Jul 21, 2026

@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: 54f6beb38a

ℹ️ 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".

Comment on lines +154 to +157
let reaches_from_port = |port: &str| {
reaches_via_port(graph, &candidate.id, port, predecessor, &fan_in.id)
};
let any_port_reaches = ports.iter().any(|port| reaches_from_port(port));

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Count branchers that feed the fan-in directly

When the fan-in edge comes directly from a router branch, e.g. outer.true -> inner, inner.true -> merge, and another unconditional predecessor also feeds merge, the immediate predecessor is the router node (inner) itself. This check only asks whether each candidate port can reach predecessor, so inner.true is tested for reaching inner and the inner brancher is never counted; the same gap lets a direct route.main -> merge branch bypass the main-port rejection. Those graphs still hit the unsafe nested/main-labelled fan-in path this guard is meant to fail closed on, so the check needs to treat candidate.id == predecessor with a matching fan-in edge as controlled by that candidate port.

Useful? React with 👍 / 👎.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@src/openhuman/flows/ops.rs`:
- Around line 3642-3653: Update the compatibility-rejection branch in
flows_resume to mark the existing run as failed before returning the
ensure_engine_compatible error, using the same store::record_run and
finish_flow_run_row cleanup performed by other failure branches. Add a focused
flows_resume test for an engine-incompatible checkpoint that verifies the
rejection and asserts the persisted run reaches terminal failed status.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 64240e41-516c-4841-948e-b3eb9b354a27

📥 Commits

Reviewing files that changed from the base of the PR and between 30beeb8 and 54f6beb.

📒 Files selected for processing (5)
  • src/openhuman/flows/builder_tools.rs
  • src/openhuman/flows/builder_tools_tests.rs
  • src/openhuman/flows/ops.rs
  • src/openhuman/flows/ops_tests.rs
  • tests/json_rpc_e2e.rs
🚧 Files skipped from review as they are similar to previous changes (1)
  • tests/json_rpc_e2e.rs

Comment thread src/openhuman/flows/ops.rs
coderabbitai[bot]
coderabbitai Bot previously approved these changes Jul 21, 2026

@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: aebc836a18

ℹ️ 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".

Comment thread src/openhuman/flows/ops.rs Outdated
// Author-time validation cannot protect definitions persisted by an older
// OpenHuman build. Re-check immediately before compilation so an upgrade
// fails explicitly instead of silently committing incomplete merge data.
if let Err(error) = ensure_engine_compatible(&flow.graph) {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Validate resolved sub-workflow graphs too

When a pre-upgrade unsafe flow is only reached through a sub_workflow node, this guard checks the parent flow.graph and then installs capabilities whose OpenHumanWorkflowResolver::resolve loads the child via load_flow_graph without running ensure_engine_compatible. A safe parent that references a legacy nested-fan-in child by workflow_id can therefore still execute the exact topology this change is trying to fail closed on, including from the new run/resume boundary. Please apply the same compatibility check to resolved child graphs before returning them to TinyFlows.

Useful? React with 👍 / 👎.

@coderabbitai coderabbitai Bot added the feature Net-new user-facing capability or product behavior. label Jul 21, 2026
coderabbitai[bot]
coderabbitai Bot previously approved these changes Jul 21, 2026

@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: 20883087e9

ℹ️ 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".

Comment thread src/openhuman/flows/ops.rs Outdated
Comment on lines +216 to +217
let every_port_deterministically_reaches = ports.len() >= 2
&& ports.iter().all(|port| {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Count switches without defaults as conditional

Here ports is just the set of outgoing edges, so a switch with two wired case labels that both reconverge passes every_port_deterministically_reaches even when it has no default edge. In that case an unmatched switch value emits no successor, so a graph like outer switch(case1/case2 -> inner) -> inner branch -> fan-in is still behind nested conditional routing but is treated as unconditional by this new guard. Please only apply the all-ports reconvergence exception when the router's runtime choices are exhaustive (e.g. condition true/false, or a switch with a default), otherwise count the switch as controlling the fan-in.

Useful? React with 👍 / 👎.

Comment thread src/openhuman/flows/ops.rs Outdated
Comment on lines +443 to +445
let referenced_compatibility_errors = referenced_workflow_compatibility_errors(config, graph);
if !referenced_compatibility_errors.is_empty() {
return referenced_compatibility_errors;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Gate first-draft proposals against saved children

The new saved-child compatibility check only runs inside run_builder_gates, but the registered propose_workflow tool still has its own validation sequence in src/openhuman/flows/tools.rs and never calls this helper. When an initial proposal contains a sub_workflow with a literal workflow_id pointing to a legacy graph with this unsupported topology, the agent gets a normal workflow_proposal even though revise_workflow/save_workflow/strict validation would reject the same graph. Please route ProposeWorkflowTool through the shared gate/build proposal path or add the referenced-child check there.

Useful? React with 👍 / 👎.

@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: 0a4cbbcafb

ℹ️ 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".

Comment thread src/openhuman/flows/ops.rs Outdated
NodeKind::Switch => ports.contains("default"),
_ => true,
};
let every_port_deterministically_reaches = ports.len() >= 2

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Treat default-only switches as exhaustive

When a nested path contains a switch whose only outgoing edge is default, runtime always chooses that edge, so it is not an additional conditional brancher. The ports.len() >= 2 guard makes every_port_deterministically_reaches false even though the switch was already classified as exhaustive, so a graph like outer condition -> default-only switch -> A plus another predecessor into a merge is rejected as unsupported_nested_conditional_fan_in. This blocks valid workflows; special-case default-only switches or drop the port-count guard for exhaustive routers.

Useful? React with 👍 / 👎.

Comment thread src/openhuman/flows/ops.rs Outdated
Comment on lines +2739 to +2740
ensure_engine_compatible(graph)
.map_err(|error| format!("workflow_id '{id}' is engine-incompatible: {error}"))?;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Recursively check saved sub-workflow references

The fresh gap is a workflow_id inside the resolved child: ensure_engine_compatible only checks the loaded graph plus inline children, so a legacy chain parent -> saved child -> unsafe saved grandchild returns the child to TinyFlows and can run nodes before that nested sub_workflow before the grandchild resolver rejects. That means stored graphs are not fail-closed at the run/resume boundary when the incompatible topology is one saved-reference hop deeper; apply the same saved-reference traversal used by authoring gates before returning the resolved graph.

Useful? React with 👍 / 👎.

@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: 39a4506dcd

ℹ️ 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".

Comment thread src/openhuman/flows/ops.rs Outdated
// Author-time validation cannot protect definitions persisted by an older
// OpenHuman build. Re-check immediately before compilation so an upgrade
// fails explicitly instead of silently committing incomplete merge data.
if let Err(error) = ensure_engine_compatible(&flow.graph) {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Preflight referenced sub-workflows before starting runs

When a legacy saved parent is itself compatible but contains a literal sub_workflow.workflow_id pointing to an incompatible saved child, this new run-boundary guard only checks flow.graph (plus inline children). The saved-reference traversal runs later in the resolver, so any parent nodes before that sub-workflow, including http_request, tool_call, or code, can already execute before the run fails; apply the same referenced-workflow compatibility check here and in the matching resume guard before compiling/executing.

Useful? React with 👍 / 👎.

@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: 0445a204b3

ℹ️ 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".

// Write the accepted structural edit back to the draft (the durable
// working copy), so it survives across turns/reloads even if a later
// binding/connection/contract gate flags something to fix next.
write_edit_to_draft()?;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Check saved children before writing the draft

When an edit adds a literal sub_workflow.workflow_id that points at a legacy incompatible flow, the graph-only engine_compatibility_errors(&edited) above passes because it cannot resolve saved workflows. This line then writes the edited graph into the draft before build_builder_proposal runs run_builder_gates and rejects the saved child, leaving a durable draft that save/run paths will refuse even though the tool returned an error. Run the referenced-workflow compatibility check before this writeback, or skip writeback for that gate, so rejected engine-incompatible edits do not poison the working copy.

Useful? React with 👍 / 👎.

@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: d679eeaa41

ℹ️ 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".

Comment thread src/openhuman/flows/ops.rs Outdated
let Some(edge) = outgoing.next() else {
return false;
};
if edge.from_port != "main" || outgoing.next().is_some() {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Allow deterministic main fan-out in compatibility proof

When an exhaustive nested router reconverges through a normal node that has two main fan-out edges (for example one edge toward the fan-in predecessor and one side edge), that predecessor still always runs because same-port edges are unconditional fan-out. This outgoing.next().is_some() check makes deterministically_reaches return false for that path, so otherwise-exhaustive routers get counted as controlling the fan-in and valid workflows are rejected as unsupported_nested_conditional_fan_in. Please keep following main fan-out (or prove that at least one main successor reaches the target) instead of treating any extra main edge as nondeterministic.

Useful? React with 👍 / 👎.

@coderabbitai coderabbitai Bot removed feature Net-new user-facing capability or product behavior. agent Built-in agents, prompts, orchestration, and agent runtime in src/openhuman/agent/. labels Jul 22, 2026
coderabbitai[bot]
coderabbitai Bot previously approved these changes Jul 22, 2026

@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

"tinyagents 2.0.0",

P2 Badge Align TinyCortex to TinyAgents 2.1

In default builds that include TinyCortex, the lockfile still pulls two tinyagents crate identities: OpenHuman/TinyFlows use tinyagents 2.1.0, but tinycortex still depends on tinyagents 2.0.0. That defeats the single-crate/trait-identity guarantee documented in Cargo.toml for the TinyCortex tinyagents patch, so any TinyCortex API that names tinyagents traits/types can no longer interoperate with the host's 2.1 adapters and the binary still carries both runtimes. Please update the vendored TinyCortex dependency/pin so the lock contains only the 2.1 tinyagents package.

ℹ️ 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".

pub(crate) fn validate_and_migrate_graph(graph_json: Value) -> Result<WorkflowGraph, String> {
let graph = migrate_and_deserialize_graph(graph_json)?;
tinyflows::validate::validate(&graph).map_err(|e| e.to_string())?;
ensure_engine_compatible(&graph)?;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Gate default saves against referenced unsafe children

When a graph uses sub_workflow.config.workflow_id, this graph-only compatibility check cannot inspect the saved child, and the normal canvas/create/update path still persists through flows_create/flows_update without strict (checked FlowCanvasPagecreateFlow/updateFlow). In that scenario a user can save a new parent that points at a legacy incompatible child, then every run fails later in ensure_execution_compatible; the new author-time validation only covers inline children or strict/agent paths. Please run the config-aware compatibility gate before persisting graph changes, while still keeping metadata-only edits of legacy graphs available.

Useful? React with 👍 / 👎.

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

Labels

bug rust-core Core Rust runtime in src/: CLI, core_server, shared infrastructure.

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

1 participant