- F-T-003 actually closed: clients/typescript/src/subscribe.ts now bounds the 401-refresh loop at 3 consecutive refusals, surfaces an onError describing the loop, and resets on any successful stream open. New test covers the cap. The Stage 2 dashboard fix only addressed adminRequest in dashboard/src/lib/api.ts; the originally- cited TS client file was untouched. - users/invitations subtab dropped the redundant api.apps.get fetch the other 5 subtabs already shed in Stage 6. - Queue visibility-timeout validator pulled out as validate_queue_visibility_timeout, with two thresholds: hard-reject below MIN_QUEUE_VISIBILITY_TIMEOUT_SECS (30s — catches typos), warn- log between MIN and SAFE_VISIBILITY_VS_EXEC_BUDGET_SECS (300s) so operators see when their visibility is below the dispatcher's per-message executor budget. Stage 6 only had the hard floor; the reviewer caught that a 60s handler still races a 30s visibility even after the floor. Four new unit tests cover none/above-safe/ between/below-min. - pic dead-letters count subcommand: cheap headless probe for unresolved DL totals, parallels the dashboard's badge query. - pic dead-letters replay now has a happy-path integration test (replay_against_real_dl_row_succeeds): inserts a synthetic DL row directly via the rust-postgres sync driver (added as dev-dep), drives `pic dead-letters replay`, asserts the row is resolved with reason=replayed and count drops back to 0. Plus a count smoke test. All 75 CLI integration tests + 16 TS client tests + 4 new visibility-timeout unit tests pass. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
49 lines
1.4 KiB
TOML
49 lines
1.4 KiB
TOML
[package]
|
|
name = "picloud-cli"
|
|
version.workspace = true
|
|
edition.workspace = true
|
|
rust-version.workspace = true
|
|
license.workspace = true
|
|
repository.workspace = true
|
|
authors.workspace = true
|
|
description = "PiCloud command-line client"
|
|
# Each top-level `tests/*.rs` would otherwise auto-discover as its own
|
|
# test binary, respawning picloud once per file. We want one binary
|
|
# with module sub-files (auth.rs, apps.rs, …) so the LazyLock fixture
|
|
# is genuinely shared.
|
|
autotests = false
|
|
|
|
[[bin]]
|
|
name = "pic"
|
|
path = "src/main.rs"
|
|
|
|
[[test]]
|
|
name = "cli"
|
|
path = "tests/cli.rs"
|
|
|
|
[dependencies]
|
|
picloud-shared.workspace = true
|
|
reqwest = { workspace = true, features = ["json"] }
|
|
serde.workspace = true
|
|
serde_json.workspace = true
|
|
tokio = { workspace = true, features = ["macros", "rt-multi-thread"] }
|
|
chrono = { workspace = true }
|
|
clap = { version = "4", features = ["derive"] }
|
|
toml = "0.8"
|
|
directories = "5"
|
|
rpassword = "7"
|
|
anyhow = "1"
|
|
|
|
[dev-dependencies]
|
|
assert_cmd = "2"
|
|
predicates = "3"
|
|
tempfile = "3"
|
|
reqwest = { workspace = true, features = ["json", "blocking"] }
|
|
libc = "0.2"
|
|
# Synchronous Postgres driver used by the dead-letters integration test
|
|
# to inject a row the replay path can act on. Smaller compile cost than
|
|
# pulling sqlx into the CLI tree, and the existing tests are
|
|
# blocking-style anyway.
|
|
postgres = { version = "0.19", features = ["with-uuid-1", "with-serde_json-1"] }
|
|
uuid = { version = "1", features = ["v4"] }
|