Repository navigation
feat: epic 7964 — channel v2 integration - #179
Conversation
Introduces `ChannelSessionIdentity` and `ChannelConversationIdentity` structs to carry host-derived context for channel-origin jobs. This allows the receiving host to validate the job's origin against its trusted dispatch context. Auto-committed-on: dragonfly
This updates the contract version to 8 and adds ChannelConversationIdentity and ChannelSessionIdentity to the exported types. This allows for more granular tracking of job origins within the scheduling system. Auto-committed-on: dragonfly
This commit updates the expected contract version to 8 across several test modules. Additionally, it introduces tests to handle `channel_session` in various schedule-related contexts to improve test coverage for channel interactions. Auto-committed-on: dragonfly
This change updates the `channel_session` field in `JobOrigin` to use `Option<Box<ChannelSessionIdentity>>` instead of `Option<ChannelSessionIdentity>`. This adjustment is made to correctly handle ownership when serializing and deserializing job data. Auto-committed-on: dragonfly
This adds a new test case to verify the behavior when the channel_session field is explicitly set to None in the wire structure. Auto-committed-on: dragonfly
feat(schedule): carry durable channel identity for channel-origin jobs
Merge upstream main into epic/7964-channel-v2
Tiny Sweeper reviewFindings
Verdict: Incomplete · Priority: critical Diagnostics and supporting detailsFull summaryPull request purpose (title): feat: epic 7964 — channel v2 integration. Tiny Sweeper completed its review; deterministic results follow. Review snapshot
Completeness: Incomplete Features
Tests
Before merge
How this fits togetherflowchart LR
n0["JobOrigin<br/>changed"]:::changed
n1["...nel_roundtrips_with_and_without_optionals<br/>changed"]:::changed
n2["origin_wire_bytes<br/>changed"]:::changed
n3["...ation_and_announce_can_reply_to_its_asker<br/>changed"]:::changed
n4["origin_wire_bytes<br/>changed"]:::changed
n5["assert_bytes"]:::impacted
n6["assert_bytes"]:::impacted
n7["Channel"]:::impacted
n8["Value"]:::impacted
n9["DeliveryConfig"]:::impacted
n1 -->|uses| n0
n1 -->|uses| n7
n2 -->|calls| n5
n2 -->|tests| n5
n2 -->|uses| n7
n3 -->|uses| n7
n3 -->|uses| n9
n4 -->|calls| n6
n4 -->|tests| n6
n4 -->|uses| n7
n7 -->|uses| n8
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. |
| #[cfg(any(test, feature = "mock"))] | ||
| pub(crate) async fn run_preflight_with_observer( |
There was a problem hiding this comment.
Do not gate run_preflight_with_observer behind test/mock
`crates/tinyflows/src/preflight.rs` unconditionally calls `crate::engine::run_preflight_with_observer(&compiled, input, &caps, &observer_dyn, nesting)` — that call site carries no `#[cfg]`. With this gate the function (and the re-export in `engine.rs`) only exists when `cfg(test)` or `feature = "mock"` is set, so a default `cargo build` of the `tinyflows` crate fails with `E0425: cannot find function run_preflight_with_observer in module crate::engine`. `mock` is `default = []`, so the production build is exactly the one that loses the symbol. Either drop the gate or gate the `preflight.rs` call site identically.
| #[cfg(any(test, feature = "mock"))] | |
| pub(crate) async fn run_preflight_with_observer( | |
| pub(crate) async fn run_preflight_with_observer( |
[RULE] cfg-gated-symbol-used-in-production ·
| if source != step.item | ||
| || (row.meta.schema < step.to | ||
| && !output_ids.contains(&(step.item.to_owned(), row.id.clone()))) |
There was a problem hiding this comment.
Keep the migration from deleting rows no step touched
The original condition deleted only rows that were (a) in a different collection than the step's item, or (b) in the step's own collection, still below `step.to`, and not among this batch's outputs — i.e. rows the step left behind. The rewritten form first disjunct is `source != step.item`, with no `row.meta.schema < step.to` requirement, so when a step reads from another collection every row in the page is now deleted unconditionally after the outputs are written. Concretely: any step with `step.source = Some(other)` (the `if source != step.item` branch at `let source = step.source.unwrap_or(step.item);` exists precisely for this) wipes the entire source collection as it pages through it, even rows the step did not touch or preserve via `output_ids`. Restore the previous structure, or at minimum require `row.meta.schema < step.to` on the `source != step.item` branch as well.
| if source != step.item | |
| || (row.meta.schema < step.to | |
| && !output_ids.contains(&(step.item.to_owned(), row.id.clone()))) | |
| if (source != step.item || row.meta.schema < step.to) | |
| && (source != step.item | |
| || !output_ids.contains(&(step.item.to_owned(), row.id.clone()))) |
[RULE] unnecessary-delete ·
Epic-integration compatibility with the channel/delivery changes plus upstream-main sync.
Rolled-up work
2 fork PRs merged into
senamakel/tinyflows:epic/7964-channel-v2: https://github.com/senamakel/tinyflows/pulls?q=is%3Apr+is%3Amerged+base%3Aepic%2F7964-channel-v2The branch already contains the current upstream default branch (merge commit, no rebase), so it merges cleanly.
Gates
Per-PR hosted CI on the fork passed (or the bypassed check is named on the fork PR). Local gates run: build,
clippy -D warnings, focused tests, fmt. Cross-repo integration evidence: senamakel/openhuman#678 anddocs/handoffs/7964/upstream-merge-receipts.md.Part of tinyhumansai/openhuman#7964
Summary by CodeRabbit
channel_session. Existing data usingsession_identityremains accepted when read.