• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

cameri / nostream / 43802011728
78%
main: 78%

Build:
Build:
LAST BUILD BRANCH: chore/issue-templates
DEFAULT BRANCH: main
Ran 16 Nov 2026 04:09AM UTC
Jobs 2
Files 321
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

16 Nov 2026 04:06AM UTC coverage: 77.588%. Remained the same
43802011728

push

github

web-flow
fix(cli): gate the unix-only migration APIs behind cfg(unix) (#1148)

## Description

Gates the Unix-only migration code behind `cfg(unix)`, so `cargo build
-p nostream-cli --no-default-features` compiles on a non-Unix target
instead of failing on `std::os::unix::fs`.

- `crates/nostream-cli/src/commands/migrate.rs` — the Unix imports,
`run`, `refuse_unsafe_target`, `refuse_unsafe_target_for`,
`effective_uid`, `refuse_swappable_ancestry`, `create_target` and the
Unix-only unit tests. `run` keeps a `#[cfg(not(unix))]` twin that prints
`migrate pg-to-lmdb is unsupported on this platform` and answers exit
code 1, so the command still exists everywhere and is refused rather
than missing.
- `crates/nostream-storage/src/backend.rs` — the `DirBuilderExt` import
and the `0700` directory create behind `#[cfg(unix)]`, with
`create_dir_all` as the non-Unix path.
- `crates/nostream-cli/tests/migrate_cli.rs` — `#![cfg(unix)]` for the
file, because every test in it drives the copy.
- `crates/nostream-cli/tests/migrate_cli_unsupported.rs` — the refusal
pinned where the copy cannot run: exit 1 and the message naming the
command.
- `.github/workflows/checks.yml` — a `windows-latest` job running `cargo
build` and then the refusal test, so the non-Unix path is executed
rather than only built.

## Related Issue

Closes #1121

## Credit

The change is **@tirthraj01's**, from
https://github.com/cameri/nostream/issues/1121#issuecomment-6876971725
and his fork
(`tirthraj01:fix/1121-cli-migrate-cfg-gate`). He remains the author of
that commit; the Windows job and its SHA-pinned actions are his.

Applied here with corrections, each measured:

1. **`create_target`, `refuse_swappable_ancestry` and two unit tests
were still ungated.** They call `DirBuilder::mode`,
`refuse_unsafe_target`, `MetadataExt::uid`, `Permissions::from_mode` and
`metadata.permissions().mode()`, none of which exist off Unix — so the
Windows job would have failed. Gating a caller does not stop Rust
type-chec... (continued)

4502 of 6342 branches covered (70.99%)

Branch coverage included in aggregate %.

9792 of 12081 relevant lines covered (81.05%)

763.56 hits per line

Jobs
ID Job ID Ran Files Coverage
1 Unit - 43802011728.1 16 Nov 2026 04:10AM UTC 321
75.03
GitHub Action Run
2 Integration - 43802011728.2 16 Nov 2026 04:09AM UTC 321
33.0
GitHub Action Run
Source Files on build 43802011728
  • Tree
  • List 321
  • Changed 0
  • Source Changed 0
  • Coverage Changed 0
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • Github Actions Build #43802011728
  • 6e3af92b on github
  • Prev Build on rewrite/main (#43769183075)
  • Next Build on rewrite/main (#43803240174)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc