Repository navigation
storage(#7640): re-pin tinychannels v0.1.30, drop persistence callbacks, grant + import legacy state - #7698
Conversation
Update the vendored tinychannels submodule to a newer commit. Auto-committed-on: dragonfly Co-authored-by: Medulla <medulla@tinyhumans.ai>
Add a callback hook invoked during channel runtime startup so callers can observe or react to initialization. This gives the runtime a place to signal readiness without coupling startup logic to specific channels. Auto-committed-on: dragonfly Co-authored-by: Medulla <medulla@tinyhumans.ai>
The startup delivery store now writes channel delivery state to disk and reloads it on boot, so pending deliveries survive a restart instead of being dropped. Storage host access was extended to support the new persistence path. Auto-committed-on: dragonfly Co-authored-by: Medulla <medulla@tinyhumans.ai>
Introduce a storage host module and a delivery import step in channel runtime startup so persisted deliveries can be loaded when a channel starts. Auto-committed-on: dragonfly Co-authored-by: Medulla <medulla@tinyhumans.ai>
Introduce a storage grants module that tracks per-channel storage permissions, with a tinychannels-backed implementation registered alongside the existing modules. Auto-committed-on: dragonfly Co-authored-by: Medulla <medulla@tinyhumans.ai>
Add tests covering storage grant behaviour for tiny channels and delivery imports, and wire the new test modules into the startup provider setup so the grants are exercised during runtime startup. Auto-committed-on: dragonfly Co-authored-by: Medulla <medulla@tinyhumans.ai>
The legacy state fixture no longer spreads a deserialized JSON value into the terminal result, since the explicit fields already cover what the test needs. Auto-committed-on: dragonfly Co-authored-by: Medulla <medulla@tinyhumans.ai>
…ds_extra.rs Auto-committed-on: dragonfly Co-authored-by: Medulla <medulla@tinyhumans.ai>
Auto-committed-on: dragonfly Co-authored-by: Medulla <medulla@tinyhumans.ai>
Update the tinychannels crates to 0.1.30, which pulls in the bytes and tinystoragedrivers-core dependencies, and refresh the lockfile's windows-sys entries to 0.61.2. The remaining edits are rustfmt reflows with no behaviour change. Auto-committed-on: dragonfly Co-authored-by: Medulla <medulla@tinyhumans.ai>
The storage_host module was only reachable from within the modules tree, so it is now exposed at the crate level to let other parts of the crate use it. Auto-committed-on: dragonfly Co-authored-by: Medulla <medulla@tinyhumans.ai>
The busy flag now lives in the module's own storage scope, so the tests can no longer read it through the session store. The affected test is marked ignored until the linked-module fixture lands, and the remaining assertions were replaced with the corresponding processed events. Auto-committed-on: dragonfly Co-authored-by: Medulla <medulla@tinyhumans.ai>
Update the locked tinychannels-bus dependency from 0.1.29 to 0.1.30. Auto-committed-on: dragonfly Co-authored-by: Medulla <medulla@tinyhumans.ai>
Pinned tinychannels-bus back to 0.1.29 and bumped tinyflows to 0.8.15 in the app lockfile to match the versions resolved by the workspace. Auto-committed-on: dragonfly Co-authored-by: Medulla <medulla@tinyhumans.ai>
Co-authored-by: Medulla <medulla@tinyhumans.ai>
Update the locked tinychannels-runtime version to 0.1.30 to pick up the latest published release. Auto-committed-on: dragonfly
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. |
|
Note Currently processing new changes in this PR. This may take a few minutes, please wait... ⚙️ Run configuration
⛔ Files ignored due to path filters (1)
📒 Files selected for processing (17)
Comment |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 682a4e54fb
ℹ️ 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".
| [[package]] | ||
| name = "tinychannels-bus" | ||
| version = "0.1.29" | ||
| version = "0.1.30" |
There was a problem hiding this comment.
Refresh the desktop lockfile for the bus bump
The root lock now resolves tinychannels-bus 0.1.30, but crates/openhuman-app/Cargo.lock:6774-6775 still records this path package as 0.1.29. I checked scripts/check-linux-tls-dependencies.sh, which runs cargo tree --locked --manifest-path crates/openhuman-app/Cargo.toml; cargo tree --help defines --locked as “Assert that Cargo.lock will remain unchanged”, so the separate desktop manifest now fails that locked dependency gate before compilation until its lockfile is regenerated.
AGENTS.md reference: AGENTS.md:L16-L16
Useful? React with 👍 / 👎.
| let found = records.len(); | ||
| let mut written = 0usize; | ||
| for (collection, id, doc) in records { | ||
| match docs.put(collection, &id, doc, Precondition::Absent).await { |
There was a problem hiding this comment.
Prevent the module from consuming a partial import
If a later record or the marker write fails after one of these puts succeeds, import_into returns without a marker but ModuleChannelRuntime::prepare logs the error and still opens TinyChannels. The module can finish and remove the successfully imported pending item; a later startup still sees no marker and reinserts it under Precondition::Absent, resurrecting the required outbound delivery (and, after its finite terminal-result TTL, allowing it to be sent again). Commit the records and marker atomically, or do not start the module after a partial import.
Useful? React with 👍 / 👎.
Tiny Sweeper review
|
Summary
vendor/tinychannelsgitlink, registry version and the 11 per-platform SHA-256 digests (taken from the published release assets), and the registry test.Save/LoadPendingDeliveryand friends) from the host and deletes the file-backedChannelDeliveryStore.storage_grant_tinychannels.rs): delivery, remote-session and WhatsApp session collections, no streams, blobs or secrets.channels/channel-delivery.jsonqueue into the module's storage scope. The module already imports the legacy remote-session JSON itself (RemoteSessionStore::adopt_legacy), now under the granted collections.Problem
Part of the storage epic: tinystoragedrivers is the only storage owner. TinyChannels kept its delivery queue behind host callbacks served from a JSON file, its remote-session map in JSON, and WhatsApp pairing in memory only.
Solution
ai.tinyhumans.tinystorage.Storageunder a per-module grant; the host enforces it per call.delivery_import.rswrites withPrecondition::Absent, skips expired results and records whose key does not match their id, never touches the legacy file, and records a marker in a host-only collection (channels_host_import, outside the grant) so a delivery finished afterwards is not resurrected. A corrupt file writes no marker and is retried on the next start.modules::storage_host::current_module_scopeexposes the existing scope rule so the importer writes where the module will read.chat.dbreader is unchanged (read-only exception).Submission Checklist
storage_grant_tinychannels_tests.rs), importer happy path, once-only marker, no overwrite, missing file, corrupt-then-repaired file, key mismatch (delivery_import_tests.rs), registry pin test, declared-grant test.Closes #7640.Impact
turn_state_marks_busy_for_every_remote_control_channelis now#[ignore]d with a reason. It read the removed in-process store API, and before this change it already panicked on the unavailable linked-module fixture (module_fixture_tests.rs, tinybus epic). The sibling guard test no longer reads busy state.approval_prompts_reach_every_chat_channelandruntime_limits_come_from_the_linked_channel_modulefail on the same fixture panic onmaintoo.Related
cargo check(root,--testswith product features, app),pnpm rust:layout, feature-forwarding, crate-chain, submodule-monotonic, module-pin checks, focused lib tests (32 pass), clippy shows only pre-existingduplicate_modwarnings. RootCargo.lockcarries only the tinychannels version bump (no windows-sys churn).Summary by CodeRabbit