Skip to content

Reorganize userspace/ into base/ and tests/userspace/#873

Merged
dburkart merged 2 commits intomainfrom
m872-reorg-userspace
May 5, 2026
Merged

Reorganize userspace/ into base/ and tests/userspace/#873
dburkart merged 2 commits intomainfrom
m872-reorg-userspace

Conversation

@dburkart
Copy link
Copy Markdown
Owner

@dburkart dburkart commented May 5, 2026

Closes #872

Summary

  • Move base system crates (init, vibix_abi, vibix_libc, vibix_libc_defs, ld_vibix, lib) from userspace/ to base/
  • Move test/demo binaries (hello, hello_dyn, std_hello, pjdfstest_runner, repro_fork, shell_pipeline) from userspace/ to tests/userspace/
  • Update all path references: workspace Cargo.toml members, inter-crate path deps, xtask build paths, CI workflow paths, library/std vibix_abi dep, and RFC 0009 documentation

Test plan

Split the flat userspace/ directory so base system crates (init,
vibix_abi, vibix_libc, vibix_libc_defs, ld_vibix, lib) live under
base/ and test/demo binaries (hello, hello_dyn, std_hello,
pjdfstest_runner, repro_fork, shell_pipeline) live under
tests/userspace/. This gives base system components first-class
status and keeps test fixtures out of the install surface as the
real base system grows.

Updates workspace members, inter-crate path deps, xtask build
paths, CI workflow paths, library/std dep path, and RFC 0009
path references.

Closes #872

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 5, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 78c5bafa-b272-4531-9622-dcee6f7292dd

📥 Commits

Reviewing files that changed from the base of the PR and between 6bbab72 and 41876f4.

📒 Files selected for processing (3)
  • docs/design/dst-478-investigation.md
  • docs/repros/fork-loop.md
  • xtask/src/main.rs
✅ Files skipped from review due to trivial changes (2)
  • docs/design/dst-478-investigation.md
  • docs/repros/fork-loop.md
🚧 Files skipped from review as they are similar to previous changes (1)
  • xtask/src/main.rs

📝 Walkthrough

Walkthrough

This PR reorganizes the userspace/ directory by splitting it into base/ (for system components like init, vibix_abi, vibix_libc, ld_vibix) and tests/userspace/ (for test/demo binaries like hello, repro_fork, shell_pipeline). All workspace members, build paths, dependencies, CI triggers, and documentation references are updated to reflect the new structure.

Changes

Directory Structure Reorganization

Layer / File(s) Summary
Workspace Declaration
Cargo.toml, library/std/Cargo.toml, tests/userspace/hello_dyn/Cargo.toml
Workspace members migrate from userspace/* to base/* and tests/userspace/*. Root Cargo.toml updates members list and exclude paths. library/std dependency on vibix_abi changes from ../../userspace/vibix_abi to ../../base/vibix_abi. hello_dyn dependency on vibix_libc changes from ../vibix_libc to ../../../base/vibix_libc.
Build System Integration
xtask/src/main.rs
All userspace build functions (build_userspace_init, build_userspace_hello, build_userspace_repro_fork, build_userspace_shell_pipeline, build_pjdfstest_runner, build_ld_vibix, build_userspace_hello_dyn) update linker script paths from userspace/*/link.ld to base/*/link.ld or tests/userspace/*/link.ld. Build manifest for std_hello relocates from userspace/std_hello/Cargo.toml to tests/userspace/std_hello/Cargo.toml. Musl dynamic linker embedded in initrd and ISO switches from userspace/lib/ld-musl-x86_64.so.1 to base/lib/ld-musl-x86_64.so.1. Unit tests for repro-fork read sources from updated paths.
CI Workflow Configuration
.github/workflows/smoke-soak.yml
Path-based eligibility check for fork_exec_surface trigger updates from userspace/repro_fork/** to tests/userspace/repro_fork/** with accompanying comment adjustments.
Documentation Updates
docs/RFC/0009-std-on-vibix.md, docs/design/dst-478-investigation.md, docs/repros/fork-loop.md
All path references are updated: userspace/vibix_abi/base/vibix_abi/, userspace/vibix_libc/base/vibix_libc/, userspace/repro_fork/tests/userspace/repro_fork/, userspace/lib/ld-musl-x86_64.so.1base/lib/ld-musl-x86_64.so.1, and userspace/init/base/init/.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

  • dburkart/vibix#521: Updates smoke-soak CI path filters and repository layout references for the repro-fork harness relocation from userspace/repro_fork to tests/userspace/repro_fork.
  • dburkart/vibix#684: Migrates userspace artifacts (including shell_pipeline) into tests/userspace/ and updates Cargo/xtask/CI paths accordingly.
  • dburkart/vibix#513: Introduces the repro_fork harness and linker configuration, which this PR subsequently relocates from userspace/ to tests/userspace/ and base/.

Poem

🐰 From userspace chaos, order takes flight,
Base and tests now split just right,
Init and libc find their way,
While fixtures hop to brighter day! 🚀

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely summarizes the main change: reorganizing userspace/ into two new directories (base/ and tests/userspace/).
Description check ✅ Passed The description directly relates to the changeset, providing a clear summary of moves, updates, and test plan verification.
Linked Issues check ✅ Passed All core requirements from issue #872 are met: base system crates moved to base/, test binaries moved to tests/userspace/, all path references updated, and all verification tests passed.
Out of Scope Changes check ✅ Passed All changes are directly related to the reorganization objective. Minor additional fixes (rustfmt, ext2 hash, stale doc paths) support the main reorganization work.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch m872-reorg-userspace

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@Cargo.toml`:
- Around line 19-28: Docs still reference old userspace/... locations; update
those references to the new workspace layout by finding and replacing
occurrences of the legacy "userspace/" paths in documentation (e.g., inspect
dst-478-investigation.md and fork-loop.md for lines mentioning userspace/) with
the appropriate new targets such as "base/..." or "tests/userspace/..." (match
each reference to the corresponding new package like "base/init",
"base/vibix_abi", "tests/userspace/hello", etc.) and verify links render
correctly.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 4b76c9c5-23bc-47f6-96a2-0e9444f6015b

📥 Commits

Reviewing files that changed from the base of the PR and between 8385dca and 6bbab72.

📒 Files selected for processing (52)
  • .github/workflows/smoke-soak.yml
  • Cargo.toml
  • base/init/Cargo.toml
  • base/init/link.ld
  • base/init/src/main.rs
  • base/ld_vibix/Cargo.toml
  • base/ld_vibix/link.ld
  • base/ld_vibix/src/elf.rs
  • base/ld_vibix/src/main.rs
  • base/ld_vibix/src/reloc.rs
  • base/ld_vibix/src/serial.rs
  • base/lib/ld-musl-x86_64.so.1
  • base/vibix_abi/Cargo.toml
  • base/vibix_abi/src/alloc.rs
  • base/vibix_abi/src/errno.rs
  • base/vibix_abi/src/fs.rs
  • base/vibix_abi/src/futex.rs
  • base/vibix_abi/src/lib.rs
  • base/vibix_abi/src/process.rs
  • base/vibix_abi/src/stdio.rs
  • base/vibix_abi/src/syscall.rs
  • base/vibix_abi/src/thread.rs
  • base/vibix_libc/Cargo.toml
  • base/vibix_libc/src/errno.rs
  • base/vibix_libc/src/fcntl.rs
  • base/vibix_libc/src/helpers.rs
  • base/vibix_libc/src/lib.rs
  • base/vibix_libc/src/stat.rs
  • base/vibix_libc/src/unistd.rs
  • base/vibix_libc_defs/Cargo.toml
  • base/vibix_libc_defs/src/lib.rs
  • docs/RFC/0009-std-on-vibix.md
  • library/std/Cargo.toml
  • tests/fixtures/ext2_image.sha256
  • tests/userspace/hello/Cargo.toml
  • tests/userspace/hello/link.ld
  • tests/userspace/hello/src/main.rs
  • tests/userspace/hello_dyn/Cargo.toml
  • tests/userspace/hello_dyn/link.ld
  • tests/userspace/hello_dyn/src/main.rs
  • tests/userspace/pjdfstest_runner/Cargo.toml
  • tests/userspace/pjdfstest_runner/link.ld
  • tests/userspace/pjdfstest_runner/src/main.rs
  • tests/userspace/repro_fork/Cargo.toml
  • tests/userspace/repro_fork/link.ld
  • tests/userspace/repro_fork/src/main.rs
  • tests/userspace/shell_pipeline/Cargo.toml
  • tests/userspace/shell_pipeline/link.ld
  • tests/userspace/shell_pipeline/src/main.rs
  • tests/userspace/std_hello/Cargo.toml
  • tests/userspace/std_hello/src/main.rs
  • xtask/src/main.rs

Comment thread Cargo.toml
Address CI failures (rustfmt line-length, ext2 hash drift) and
CodeRabbit review finding (stale userspace/ paths in docs/repros
and docs/design).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@dburkart dburkart merged commit 98efd7c into main May 5, 2026
15 checks passed
@dburkart dburkart deleted the m872-reorg-userspace branch May 5, 2026 15:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Reorganize userspace/: split into base/ and tests/userspace/

2 participants