Skip to content

Modernize macos fskit 9p versions#12

Draft
ericvh wants to merge 21 commits into
benavento:masterfrom
ericvh:modernize-macos-fskit-9p-versions
Draft

Modernize macos fskit 9p versions#12
ericvh wants to merge 21 commits into
benavento:masterfrom
ericvh:modernize-macos-fskit-9p-versions

Conversation

@ericvh
Copy link
Copy Markdown

@ericvh ericvh commented Apr 23, 2026

Attempting to see if AI can modernize this for me...

ericvh added 20 commits April 23, 2026 12:40
Update build defaults for current Xcode SDK discovery, add mount-time negotiation for 9P2000/9P2000.u/9P2000.L, and prefer kmutil on modern macOS. Add initial FSKit-based (kext-less) rewrite scaffolding with docs.

Made-with: Cursor
Factor version candidate ordering into a shared helper and add a small test runner wired to `make test`.

Made-with: Cursor
Add separate workflows to build userland targets and run `make test` on macOS runners for every push and PR.

Made-with: Cursor
Print and run the test binary without silencing the execution line so CI logs clearly show the test step running.

Made-with: Cursor
Add a user-space test runner that round-trips key 9P messages and Dir stat encodings through convS2M/convM2S and convD2M/convM2D. Wire into `make test` and CI.

Made-with: Cursor
Introduce a Mac9PCore Swift package with XCTest coverage for mount string parsing and version candidate ordering, and run it in CI. Parse the custom `9p://` scheme without Foundation.URL to avoid digit-leading scheme restrictions.

Made-with: Cursor
Remove fskit-core/.build from the repository and ignore SwiftPM build outputs so FSKit core tests stay clean.

Made-with: Cursor
Run FSKit core SwiftPM tests by default in CI and gate the kext/codec job behind workflow dispatch or a PR label. Expand the codec round-trip tests to cover all 9P message types implemented by Mac9P.

Made-with: Cursor
Implement a user-space 9P client (version negotiation, attach, walk, open, read, stat, readdir, clunk) with a minimal wire codec and blocking TCP transport. Add a BSD-socket mock 9P server and an integration test that exercises a simple readonly file tree.

Made-with: Cursor
Introduce NinePAsyncClient with a background reader loop that demultiplexes replies by tag into awaiting continuations, enabling safe concurrent RPCs over a single TCP connection. Add XCTest coverage that performs concurrent reads against the mock 9P server.

Made-with: Cursor
Add an AI-generated Werner Herzog–style mirror of README.md and a CI guard that requires updating HERZOG.md whenever README.md changes.

Made-with: Cursor
Update the FSKit glue layer to use the fskit-core 9P client configuration and connect+attach during mount. Add Xcode packaging/setup notes and refresh README/TODO (and HERZOG mirror) to reflect the FSKit-core test path.

Made-with: Cursor
Add initial FSKit volume support for lookup, attribute fetch, directory enumeration (packer-based), and file reads by delegating to the async 9P client in fskit-core. Expose fid allocation in the core client and update README/TODO (and HERZOG mirror) to reflect readonly progress.

Made-with: Cursor
Add fid pooling in the async 9P core client (releaseFid + free list) and introduce a per-inode fid table with reference counting in the FSKit volume. Items clunk and return fids to the pool only when the last reference is reclaimed.

Made-with: Cursor
Track in-use fids in the async client, expose debug accounting for tests, and add long-running integration tests that allocate, walk, clunk, and release fids to confirm reuse and no leaks at completion.

Made-with: Cursor
Implement per-directory enumeration snapshots with generation-encoded cookies to keep enumeration stable while still fetching a fresh view from the server on each new enumeration (cookie.initial). Return generation-based verifiers and request read-only mount options.

Made-with: Cursor
Finalize the readonly FSKit volume by providing requestedMountOptions as a stored value and implementing volumeStatistics. Update README/TODO and the HERZOG mirror to reflect the completed readonly MVP behavior.

Made-with: Cursor
Add an XcodeGen spec and minimal macOS app + FSKit extension templates wired to the local fskit-core Swift package and fskit sources, so the filesystem can be built and tested against real 9P servers.

Made-with: Cursor
Add a repeatable script that generates and builds the FSKit Xcode project, prompts for enabling the extension, mounts a real 9P URL, runs basic readonly checks, and unmounts. Document usage in README and HERZOG mirror.

Made-with: Cursor
Add a script to build/run diod as a real 9P server exporting a local directory and an XCTest that exercises the core client against MAC9P_E2E_URL. Add an optional GitHub Actions job to run these tests on workflow_dispatch.

Made-with: Cursor
Comment thread HERZOG.md Outdated
### From the Finder

*(Broken if the binary is not signed)*
In Finder: **Go** → **Connect to Server...** and enter: *9p://sources.cs.bell-labs.com*.
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

sources.cs.bell-labs.com is gone - use 9p.io

Comment thread kext/9p.h Outdated
FLAG_CHATTY9P = 1<<0,
FLAG_DSSTORE = 1<<1,
FLAG_DOTU = 1<<2,
FLAG_DOTL = 1<<3,
Copy link
Copy Markdown

@yrk-lab yrk-lab Apr 24, 2026

Choose a reason for hiding this comment

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

Changes to the kext would probably be better off as a separate branch/PR

Comment thread fskit/README.md Outdated

```bash
mkdir -p /tmp/mac9p
mount -t mac9p "9p://sources.cs.bell-labs.com:564/?vers=9P2000" /tmp/mac9p
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

old server, use 9p.io instead

Remove kext- and kext-userland-related changes from the branch to keep the FSKit-focused PR reviewable. Replace the example host `sources.cs.bell-labs.com` with `9p.io` across docs.

Credit: Yaroslav Kolomiiets
Made-with: Cursor
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.

2 participants