Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions crates/fractal-fabric-adapter/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@ tokio = { version = "1", features = ["io-util", "macros", "net", "rt", "signal",
[dev-dependencies]
tempfile = "3"

[[bin]]
name = "fractal-fabric-adapter"
path = "src/main.rs"

# Keep the existing Nix package buildable until its package-name cutover.
[[bin]]
name = "st-fabric-adapter"
path = "src/main.rs"
4 changes: 2 additions & 2 deletions crates/fractal/src/fleet_cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ fn read_code_without_echo() -> Result<String> {
Ok(line.trim().to_owned())
}

const FABRIC_PAIRING_UNAVAILABLE: &str = "Fabric invitations need st-fabric-adapter installed and \
const FABRIC_PAIRING_UNAVAILABLE: &str = "Fabric invitations need fractal-fabric-adapter installed and \
Fabric running with --runtime-peers; use --via tailscale for a Tailscale-only invitation";

/// A configured path that is not a file counts as no helper, so `auto` invitations
Expand Down Expand Up @@ -497,7 +497,7 @@ async fn bootstrap_fabric_invite(
let output = child.wait_with_output().await?;
anyhow::ensure!(
output.status.success(),
"Fabric pairing failed; it needs st-fabric-adapter running on this machine and Fabric \
"Fabric pairing failed; it needs fractal-fabric-adapter running on this machine and Fabric \
running with --runtime-peers"
);
#[derive(serde::Deserialize)]
Expand Down
2 changes: 1 addition & 1 deletion crates/fractal/tests/fleet.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4633,7 +4633,7 @@ async fn an_invitation_only_fabric_could_carry_fails_before_it_exists() {
assert!(!output.status.success(), "{delivery:?} succeeded");
let stderr = String::from_utf8_lossy(&output.stderr);
assert!(
stderr.contains("Fabric invitations need st-fabric-adapter installed"),
stderr.contains("Fabric invitations need fractal-fabric-adapter installed"),
"{delivery:?}: {stderr}"
);
assert!(output.stdout.is_empty(), "{delivery:?} printed a code");
Expand Down
4 changes: 2 additions & 2 deletions crates/smallclaims/src/fleet/join.rs
Original file line number Diff line number Diff line change
Expand Up @@ -532,15 +532,15 @@ impl PairingHelper {
Some(path) => Some(path.to_path_buf()),
None => resolve_fabric_adapter()?,
}
.context("st-fabric-adapter is unavailable; install it alongside st or set ST_FABRIC_ADAPTER")?;
.context("fractal-fabric-adapter is unavailable; install it alongside fractal or set FRACTAL_FABRIC_ADAPTER")?;
let mut child = tokio::process::Command::new(executable)
.arg(command)
.stdin(Stdio::piped())
.stdout(Stdio::piped())
.stderr(Stdio::inherit())
.kill_on_drop(true)
.spawn()
.with_context(|| format!("start st-fabric-adapter {command}"))?;
.with_context(|| format!("start fractal-fabric-adapter {command}"))?;
let input = child.stdin.take().context("open adapter input")?;
let output = tokio::io::BufReader::new(child.stdout.take().context("open adapter output")?).lines();
Ok(Self { child, input, output })
Expand Down
13 changes: 8 additions & 5 deletions docs/fleet-join.md
Original file line number Diff line number Diff line change
Expand Up @@ -247,9 +247,9 @@ allow the peer port. See [Tailscale](st3/tailscale.md) for setup.

### Fabric

Run Fabric with `--runtime-peers` and install the external `st-fabric-adapter` on
both machines. Keep the adapter running on the sponsor. No prior peer trust is
needed:
Run Fabric with `--runtime-peers` and install the external `fractal-fabric-adapter` on
both machines. The old executable name `st-fabric-adapter` is still accepted.
Keep the adapter running on the sponsor. No prior peer trust is needed:

```sh
# On a member:
Expand Down Expand Up @@ -288,8 +288,11 @@ the exposure. The adapter maintains trust and grants; Fractal does not edit

#### Adapter helper boundary

The CLI discovers `st-fabric-adapter` beside its executable or on `PATH`;
`ST_FABRIC_ADAPTER` selects an explicit helper for isolated tests.
The CLI discovers `fractal-fabric-adapter` beside its executable or on `PATH`,
then accepts `st-fabric-adapter` within each searched directory.
`FRACTAL_FABRIC_ADAPTER` selects an explicit helper for isolated tests;
`ST_FABRIC_ADAPTER` is still accepted. If both variables are set, they must name
the same path.
`pairing-invite` accepts one JSON line `{"code":"..."}` on standard input and
returns a JSON line containing the augmented `code`. `pairing-join` is a
private interactive JSON-line protocol: the code produces `node_id`, the signed
Expand Down
2 changes: 1 addition & 1 deletion docs/site/guides/two-machines.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ Success means both machines show the expected membership and initial synchroniza

## Using Fabric

Run Fabric with `--runtime-peers` and install `st-fabric-adapter` on both machines. Keep the external adapter running as a separate service on the sponsor. Create the fleet with `--transports fabric`; the machines need no prior Fabric trust or manual grants.
Run Fabric with `--runtime-peers` and install `fractal-fabric-adapter` on both machines; the old name `st-fabric-adapter` is still accepted. Keep the external adapter running as a separate service on the sponsor. Create the fleet with `--transports fabric`; the machines need no prior Fabric trust or manual grants.

On studio:

Expand Down
11 changes: 11 additions & 0 deletions release-notes/fractal-fabric-adapter-binary.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"version": 1,
"summary": "Add the fractal-fabric-adapter Cargo binary while preserving the existing Nix adapter package",
"replay": {"status": "none", "detail": "No claim replay or recovery behavior changes."},
"schema": {"status": "none", "detail": "No schema or stored-state changes."},
"rules": {"status": "none", "detail": "No checkpoint rules or digest changes."},
"compatibility": {"status": "changed", "detail": "Cargo accepts both fractal-fabric-adapter and st-fabric-adapter binary targets from the same implementation. The existing Nix package still builds and ships st-fabric-adapter. Discovery accepts both names, preferring the new name within each searched directory."},
"downtime": {"status": "none", "detail": "No service, host or runtime changes."},
"manual": {"status": "none", "detail": "Cargo users can select --bin fractal-fabric-adapter; existing Nix consumers keep their package attribute and executable path."},
"recovery": {"status": "none", "detail": "Identity, adapter journals and state paths are unchanged."}
}
Loading