fix(sdk): surface Sent/Queued on send(), and build the SDK in CI
`Node::send()` became `Result<OutboxStatus, String>` in the local-outbox work,
which broke `crates/onionwire-sdk` (E0308 at src/lib.rs:195) — and nothing
noticed, because the SDK is a separate cargo workspace that root CI never
compiles and android-release.yml only builds on a v*.*.* tag.
- `Wire::send()` now returns `WResult<SendState>` (`Sent` | `Queued`) instead
of swallowing the outcome as `()`. A queued send is local-only until the
retry worker gets a circuit through, so the Kotlin boundary must be able to
tell it apart from a delivered one.
- `ChatMessage` gains `delivery: Option<String>` ("sent" | "queued" |
"sending" | "failed: <reason>"), populated from the message's outbox row;
`None` for incoming messages. An outgoing row with no outbox row was accepted
on the first attempt, so it reads "sent".
- New `sdk` job in `.forgejo/workflows/ci.yml`: `cargo test --locked` +
`cargo clippy --locked --all-targets -- -D warnings` in `crates/onionwire-sdk`
in the same rust:1.91-bookworm container, with its own target volume (the SDK
resolves the root crate with rustls, so sharing the root job's target dir
would thrash feature-unified artifacts).
- Drift found while un-rotting it: the SDK `Cargo.lock` was stale (missing
`sha2`, added to the root crate by the zeroize work), so `--locked` failed;
and the SDK README still said "no outbox, no spool in v1" and "identity keys
in sqlite are plaintext", both untrue since the outbox and SQLCipher landed.
Tests: crates/onionwire-sdk 4 passed (2 new unit tests over the status
mapping), clippy clean; root `cargo test --locked` clean. The CI job body was
smoke-run locally in the same container image before being committed.
# Conflicts:
# crates/onionwire-sdk/src/lib.rs
This commit is contained in:
parent
2cbe7d41e5
commit
168727ac39
20 changed files with 306 additions and 103 deletions
|
|
@ -11,19 +11,19 @@
|
|||
//! `chars().count()` width checks here match `tests/tui_chrome.rs` on purpose.
|
||||
//! They are the known-wrong metric (see `chars_count_is_not_terminal_cells`).
|
||||
|
||||
use onionwire::FriendProfile;
|
||||
use onionwire::qr;
|
||||
use onionwire::tui::{
|
||||
backup_screen_text, banner_for_width, compact_banner, draw_share, fingerprint_mismatch_banner,
|
||||
help_overlay_text, main_footer_hints, onion_glyph, quit_screen_text, restore_screen_text,
|
||||
rotate_screen_text, status_footer, who_overlay_text, wipe_screen_text, wordmark_banner,
|
||||
ProfileEditor, WipeKind,
|
||||
ProfileEditor, WipeKind, backup_screen_text, banner_for_width, compact_banner, draw_share,
|
||||
fingerprint_mismatch_banner, help_overlay_text, main_footer_hints, onion_glyph,
|
||||
quit_screen_text, restore_screen_text, rotate_screen_text, status_footer, who_overlay_text,
|
||||
wipe_screen_text, wordmark_banner,
|
||||
};
|
||||
use onionwire::FriendProfile;
|
||||
use ratatui::Frame;
|
||||
use ratatui::Terminal;
|
||||
use ratatui::backend::TestBackend;
|
||||
use ratatui::layout::{Constraint, Layout, Rect};
|
||||
use ratatui::widgets::{Block, Borders, Clear, List, ListItem, ListState, Paragraph, Wrap};
|
||||
use ratatui::Frame;
|
||||
use ratatui::Terminal;
|
||||
|
||||
const SIZES: [(u16, u16); 3] = [(80, 24), (120, 40), (200, 60)];
|
||||
const FP: &str = "abcdef0123456789deadbeefcafebabe";
|
||||
|
|
|
|||
Loading…
Reference in a new issue