Skip to content

control: replace afp_client with afpc namespaces - #311

Merged
rdmark merged 1 commit into
mainfrom
301-create-a-generic-afp-client
Aug 6, 2026
Merged

control: replace afp_client with afpc namespaces#311
rdmark merged 1 commit into
mainfrom
301-create-a-generic-afp-client

Conversation

@rdmark

@rdmark rdmark commented Aug 5, 2026

Copy link
Copy Markdown
Member

Introduce the afpc control client as the single entry point for discovery, stateless-log operations, and FUSE mount management. FUSE commands now live under the fs namespace and afpsld commands under sl, providing unambiguous command ownership and clearer diagnostics for missing namespaces.

Retain mount_afpfs as an AFP-URL compatibility symlink command by dispatching it through afpc, while removing the afp_client command which was previously a symlink to mount_afpfs with a different invocation mode.

Update Meson integration so afpc is available regardless of FUSE support, with filesystem-specific command handling compiled only when FUSE is enabled.

Harden controller IPC writes and response framing, including bounded response handling and exact command matching.

Refresh manuals and project documentation for the new syntax, and add parser/invocation coverage alongside the existing discovery and FUSE test updates.

@rdmark
rdmark requested a review from andylemin as a code owner August 5, 2026 17:58
@rdmark rdmark linked an issue Aug 5, 2026 that may be closed by this pull request
@augmentcode

augmentcode Bot commented Aug 5, 2026

Copy link
Copy Markdown
🤖 Augment PR Summary

Summary: This PR replaces the legacy afp_client compatibility entrypoint with a new unified afpc control client that dispatches explicit namespaces for discovery, FUSE mount control, and stateless-log operations.

Changes:

  • Introduces control/afpc as the primary dispatcher with discover, sl, and (when built) fs namespaces
  • Moves former FUSE-control commands under afpc fs and stateless-controller commands under afpc sl
  • Retains mount_afpfs as an AFP-URL compatibility symlink that routes to afpc; removes the old afp_client symlink
  • Refactors Meson build wiring so afpc is built regardless of FUSE support, with FS-specific code linked only in FUSE builds
  • Hardens controller IPC by adding full-write helpers, readable-waiting, and bounded response framing in the FUSE client
  • Updates manpages/docs to the new syntax and removes the old afp_client(1) page
  • Adds/updates tests for invocation-name dispatch and updated discovery/FUSE command expectations

Technical Notes: The FS command implementation is now exposed as afpc_fs_command()/afpc_mount_url_command() and linked into afpc only when FUSE is enabled; discovery remains available in all builds.

🤖 Was this summary useful? React with 👍 or 👎

@augmentcode augmentcode Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Review completed. 3 suggestions posted.

Fix All in Augment

Comment augment review to trigger a new review at any time.

Comment thread fuse/client.c Outdated
Comment thread fuse/client.c
Comment thread control/afpc.c
@rdmark
rdmark force-pushed the 301-create-a-generic-afp-client branch 2 times, most recently from 96d5720 to a0d88fe Compare August 5, 2026 18:23
Introduce the afpc control client as the single entry point for discovery, stateless-log operations, and FUSE mount management. FUSE commands now live under the fs namespace and afpsld commands under sl, providing unambiguous command ownership and clearer diagnostics for missing namespaces.

Retain mount_afpfs as an AFP-URL compatibility symlink command by dispatching it through afpc, while removing the afp_client command which was previously a symlink to mount_afpfs with a different invocation mode.

Update Meson integration so afpc is available regardless of FUSE support, with filesystem-specific command handling compiled only when FUSE is enabled.

Harden controller IPC writes and response framing, including bounded response handling and exact command matching.

Refresh manuals and project documentation for the new syntax, and add parser/invocation coverage alongside the existing discovery and FUSE test updates.
@rdmark
rdmark force-pushed the 301-create-a-generic-afp-client branch from a0d88fe to 01800e0 Compare August 5, 2026 18:27
@sonarqubecloud

sonarqubecloud Bot commented Aug 5, 2026

Copy link
Copy Markdown

@rdmark

rdmark commented Aug 5, 2026

Copy link
Copy Markdown
Member Author

@andylemin this is ready for review, see the readmes and man pages for descriptions of the new usage patterns

the one thing I'm on the fence about is whether to introduce symlink aliases for afpc fs -> afpfs and afpc sl -> afpsl -- I like the symmetry of afpfs controlling afpfsd and afpsl controlling afpsld but it does clutter the namespace a bit and requires us to ship man pages for two additional commands

what do you think?

@andylemin

Copy link
Copy Markdown
Contributor

This is great! This makes me very happy and avoids stress on the little finger by not having to type _ 😁

@rdmark
rdmark merged commit 9a6401e into main Aug 6, 2026
23 checks passed
@rdmark
rdmark deleted the 301-create-a-generic-afp-client branch August 6, 2026 16:53
@rdmark

rdmark commented Aug 6, 2026

Copy link
Copy Markdown
Member Author

agreed, it's much more typable... only drawback is that afpcmd is not as convenient to type anymore with tab completion

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.

create a generic AFP client

2 participants