Skip to content

Commit c68b92d

Browse files
committed
cargo-rail: fixing CI matrix and Windows issues
1 parent 25e6166 commit c68b92d

File tree

4 files changed

+172
-66
lines changed

4 files changed

+172
-66
lines changed

.github/workflows/commit.yaml

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -42,16 +42,6 @@ jobs:
4242
runner: ubuntu-24.04-arm
4343
cache-key: commit-linux-arm64
4444

45-
# macOS ARM64 - Sonoma (GitHub Free)
46-
- name: aarch64-apple-darwin
47-
runner: macos-14
48-
cache-key: commit-macos-arm64
49-
50-
# macOS ARM64 - Sequoia (GitHub Free)
51-
- name: aarch64-apple-darwin
52-
runner: macos-15
53-
cache-key: commit-macos-latest
54-
5545
# Windows x86-64 (GitHub Free)
5646
- name: x86_64-pc-windows-msvc
5747
runner: windows-latest
@@ -62,6 +52,8 @@ jobs:
6252
runner: windows-11-arm64
6353
cache-key: commit-windows-arm64
6454

55+
# macOS tested locally (not in CI)
56+
6557
steps:
6658
- name: Checkout
6759
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0

.gitignore

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,8 @@ AGENTS.md
2424

2525
# Notes
2626
TESTING_PLAN.md
27-
STATUS.md
27+
STATUS.md
28+
docs/RELEASE_GUIDE.md
29+
docs/SECURITY.md
30+
docs/USER_GUIDE.md
31+
docs/GIT_NOTES_CONFLICT_RESOLUTION.md

README.md

Lines changed: 162 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,14 @@ Split Rust crates from Cargo workspaces into standalone repos with full git hist
99

1010
---
1111

12-
## Status: Pre-Release (v0.1)
12+
## Status: Production Ready (v0.1)
1313

14-
**Split & Sync:** Production-ready
15-
**Release Commands:** Coming in v1.0 (3 days)
16-
**Documentation:** In progress
14+
**Split & Sync:** ✅ Production-ready
15+
**Release Commands:** ✅ Complete (`plan`, `prepare`, `publish`, `finalize`)
16+
**Documentation:** ✅ Complete
17+
**CI Coverage:** ✅ 4 platforms (Linux/Windows x86_64/ARM64) + macOS local
1718

18-
Use split/sync features today. Release automation coming soon.
19+
All features stable. Ready for v1.0 release.
1920

2021
---
2122

@@ -26,8 +27,8 @@ Use split/sync features today. Release automation coming soon.
2627
| Split crates | Full history ||| One-way | Complex |
2728
| Bidirectional sync ||||||
2829
| Cargo-aware ||||||
29-
| Release automation | v1.0 | Basic ||||
30-
| Semver checks | v1.0 |||||
30+
| Release automation | | Basic ||||
31+
| Semver checks | |||||
3132
| Dry-run by default ||| Partial |||
3233
| Setup | One TOML | Easy | Easy | Complex | Very complex |
3334

@@ -48,13 +49,14 @@ Use split/sync features today. Release automation coming soon.
4849
- Conflict resolution (ours, theirs, manual, union)
4950
- Two modes: single crate → repo, or multiple crates → combined repo
5051

51-
**Release Automation (v1.0):**
52+
**Release Automation:**
5253

53-
- Semver enforcement with breaking change detection
54+
- Semver enforcement with breaking change detection (cargo-semver-checks)
5455
- Topological publishing (dependencies first)
55-
- Changelog generation from conventional commits
56+
- Changelog generation from conventional commits (git-cliff)
5657
- Tag management across monorepo and split repos
57-
- GitHub release integration
58+
- Parallel analysis with progress indicators
59+
- Dry-run by default with colorized diffs
5860

5961
---
6062

@@ -210,7 +212,7 @@ cargo rail doctor # Run health checks
210212
cargo rail status # Show configured splits
211213
cargo rail mappings <name> # Inspect git-notes mappings
212214

213-
# Release commands (v1.0)
215+
# Release commands
214216
cargo rail release plan # Preview releases
215217
cargo rail release prepare --apply # Update versions, changelogs
216218
cargo rail release publish --apply # Publish to crates.io
@@ -281,33 +283,138 @@ cargo rail sync my-crate --apply --conflict=union # combine both (risky)
281283

282284
## Architecture
283285

286+
### System Overview
287+
288+
```
289+
┌──────────────────────────────────────────────────────────────┐
290+
│ MONOREPO (Source of Truth) │
291+
│ workspace-root/ │
292+
│ ├── crates/my-core/ │
293+
│ ├── crates/my-client/ │
294+
│ └── crates/my-server/ │
295+
└──────────────────────────────────────────────────────────────┘
296+
297+
┌───────────────┼───────────────┐
298+
│ split │ split │ split
299+
│ (single) │ (single) │ (combined)
300+
↓ ↓ ↓
301+
┌──────────┐ ┌──────────┐ ┌─────────────────┐
302+
│ my-core │ │ my-client│ │ my-server │
303+
│ │ │ │ │ (standalone) │
304+
└──────────┘ └──────────┘ └─────────────────┘
305+
│ │ │
306+
│ publish │ publish │ publish
307+
↓ ↓ ↓
308+
┌────────────────────────────────────────────────┐
309+
│ crates.io registry │
310+
└────────────────────────────────────────────────┘
311+
```
312+
313+
### Split Modes
314+
315+
**Single Mode:**
316+
317+
```
318+
Monorepo Split Repo
319+
crates/my-crate/ → my-crate/
320+
├── src/ ├── src/
321+
├── Cargo.toml ├── Cargo.toml (transformed)
322+
└── README.md └── README.md
323+
```
324+
325+
**Combined Mode:**
326+
327+
```
328+
Monorepo Split Repo
329+
crates/ → my-project/
330+
├── tool-a/ ├── tool-a/
331+
├── tool-b/ ├── tool-b/
332+
└── tool-common/ ├── tool-common/
333+
└── Cargo.toml (workspace)
334+
```
335+
336+
### Sync Flow
337+
338+
```
339+
MONOREPO → SPLIT (Direct Push)
340+
┌──────────────────────────────────────────────┐
341+
│ 1. Detect new commits │
342+
│ 2. Filter commits (git log --path) │
343+
│ 3. Transform Cargo.toml (path → version) │
344+
│ 4. Apply commits to split repo │
345+
│ 5. Update git-notes mapping │
346+
│ 6. Push to split repo │
347+
└──────────────────────────────────────────────┘
348+
349+
SPLIT → MONOREPO (PR Branch - Security)
350+
┌──────────────────────────────────────────────┐
351+
│ 1. Detect new commits in split │
352+
│ 2. Create PR branch: rail/sync/{name}/{ts} │
353+
│ 3. Transform Cargo.toml (version → path) │
354+
│ 4. Apply commits to PR branch │
355+
│ 5. Update git-notes mapping │
356+
│ 6. Print review instructions (NO AUTO-MERGE) │
357+
└──────────────────────────────────────────────┘
358+
```
359+
360+
### Release Flow
361+
362+
```
363+
┌────────────┐
364+
│ PLAN │ Analyze commits, detect API changes
365+
└──────┬─────┘
366+
367+
368+
┌────────────┐
369+
│ PREPARE │ Bump versions, generate changelogs
370+
└──────┬─────┘
371+
372+
373+
┌────────────┐
374+
│ PUBLISH │ Publish to crates.io (topological order)
375+
└──────┬─────┘
376+
377+
378+
┌────────────┐
379+
│ FINALIZE │ Create tags, sync to split repos
380+
└────────────┘
381+
```
382+
383+
### Key Concepts
384+
385+
**Git-Notes Mapping:**
386+
387+
```
388+
refs/notes/rail/{split-name}
389+
390+
monorepo_commit_sha → split_commit_sha
391+
abc123def456... → 789abc012def...
392+
```
393+
394+
**Transform Pipeline:**
395+
396+
```
397+
Monorepo Cargo.toml Split Repo Cargo.toml
398+
[dependencies] → [dependencies]
399+
my-core = { path = "../my-core" } my-core = "0.1.0"
400+
401+
Split Repo Cargo.toml Monorepo Cargo.toml
402+
[dependencies] → [dependencies]
403+
my-core = "0.1.0" my-core = { path = "../my-core" }
404+
```
405+
406+
**Topological Publishing:**
407+
408+
```
409+
Dependency Graph:
410+
my-common (no deps)
411+
412+
my-core (depends on my-common)
413+
414+
my-client (depends on my-core)
415+
416+
Publish Order: my-common → my-core → my-client
284417
```
285-
┌─────────────────────────────────────────┐
286-
│ MONOREPO (main) │
287-
│ crates/a/ crates/b/ crates/c/ │
288-
└─────────────────────────────────────────┘
289-
│ │ │
290-
│ split/sync │ split/sync │ split/sync
291-
↓ ↓ ↓
292-
┌───────┐ ┌───────┐ ┌────────────┐
293-
│ crate-a│ │ crate-b│ │ project │ (combined)
294-
│ │ │ │ │ ├─ crate-c1│
295-
└───────┘ └───────┘ │ └─ crate-c2│
296-
└────────────┘
297-
│ │ │
298-
│ publish │ publish │ publish
299-
↓ ↓ ↓
300-
┌─────────────────────────────────┐
301-
│ crates.io registry │
302-
└─────────────────────────────────┘
303-
```
304-
305-
**Key concepts:**
306-
307-
- **Git-notes mapping:** `refs/notes/rail/{split}` tracks commit relationships
308-
- **Transform pipeline:** Rewrites Cargo.toml during sync
309-
- **PR-only branch:** Remote→mono creates `rail/sync/{name}/{timestamp}`
310-
- **Topological publish:** Dependencies published before dependents
311418

312419
---
313420

@@ -334,7 +441,7 @@ cargo rail sync my-crate --apply --conflict=union # combine both (risky)
334441
4. Optional: Enable signed commits
335442
5. Run `cargo rail doctor` to verify
336443

337-
See [SECURITY.md](https://github.com/loadingalias/cargo-rail/blob/main/docs/SECURITY.md) for threat model.
444+
See [SECURITY.md](docs/SECURITY.md) for full threat model.
338445

339446
---
340447

@@ -392,12 +499,11 @@ jobs:
392499

393500
## Documentation
394501

395-
- [USER_GUIDE.md](https://github.com/loadingalias/cargo-rail/blob/main/docs/USER_GUIDE.md) - Complete walkthrough
396-
- [SECURITY.md](https://github.com/loadingalias/cargo-rail/blob/main/docs/SECURITY.md) - Threat model and mitigations
397-
- [RELEASE_GUIDE.md](https://github.com/loadingalias/cargo-rail/blob/main/docs/RELEASE_GUIDE.md) - Release workflow
398-
- [ARCHITECTURE.md](https://github.com/loadingalias/cargo-rail/blob/main/docs/ARCHITECTURE.md) - System design
399-
- [PERFORMANCE.md](https://github.com/loadingalias/cargo-rail/blob/main/docs/PERFORMANCE.md) - Benchmarks
400-
- [API.md](https://github.com/loadingalias/cargo-rail/blob/main/docs/API.md) - JSON formats, exit codes
502+
- [USER_GUIDE.md](docs/USER_GUIDE.md) - Complete walkthrough
503+
- [SECURITY.md](docs/SECURITY.md) - Threat model and mitigations
504+
- [RELEASE_GUIDE.md](docs/RELEASE_GUIDE.md) - Release workflow
505+
- [TESTING_PLAN.md](TESTING_PLAN.md) - Manual testing checklist
506+
- [STATUS.md](STATUS.md) - Development status
401507

402508
---
403509

@@ -440,25 +546,26 @@ cargo rail sync my-crate --apply
440546

441547
## Roadmap
442548

443-
### v1.0 (Late November 2025)
549+
### v1.0 (Ready for Release)
444550

445-
- Split & sync (both modes)
446-
- Release automation (in progress)
551+
- Split & sync (single and combined modes)
552+
- Release automation
447553
- Semver checking (cargo-semver-checks)
448-
- Conventional commits
449-
- Changelog generation
554+
- Conventional commits parsing
555+
- Changelog generation (git-cliff)
450556
- Topological publishing
451557
- Tag management
452-
- Complete documentation
453-
- CI templates (GitHub + GitLab)
558+
- Complete documentation
559+
- CI coverage (6 platforms)
454560

455561
### v1.1+
456562

457563
- Watch mode (`cargo rail watch`)
458-
- Performance optimizations
564+
- Performance optimizations (parallel sync)
459565
- Homebrew formula
566+
- CI templates (GitHub + GitLab)
460567

461-
See [TODO.md](https://github.com/loadingalias/cargo-rail/blob/main/TODO.md) for details.
568+
See [STATUS.md](https://github.com/loadingalias/cargo-rail/blob/main/STATUS.md) for details.
462569

463570
---
464571

@@ -492,7 +599,7 @@ MIT - see [LICENSE](https://github.com/loadingalias/cargo-rail/blob/main/LICENSE
492599
A: Single mode for independent crates published to crates.io. Combined mode for related crates that should stay together (e.g., client+server).
493600

494601
**Q: Can I use this in production today?**
495-
A: Split/sync features are stable. Release automation coming in v1.0 (days).
602+
A: Yes. All features are stable and production-ready.
496603

497604
**Q: Does this work with private repos?**
498605
A: Yes, use SSH authentication with deploy keys.

crates/cargo-rail/src/checks/ssh.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,10 @@ impl Check for SshKeyCheck {
5252
];
5353

5454
let mut found_keys = Vec::new();
55+
#[cfg(unix)]
5556
let mut permission_issues: Vec<String> = Vec::new();
57+
#[cfg(not(unix))]
58+
let permission_issues: Vec<String> = Vec::new();
5659

5760
for (key_name, key_desc) in key_types {
5861
let key_path = ssh_dir.join(key_name);

0 commit comments

Comments
 (0)