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
8 changes: 4 additions & 4 deletions distributed_cli/tests/cli_client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@ fn write_document(project: &Path, relative: &str, source: &str) {
fs::write(path, source).expect("write GraphQL document");
}

fn dctl_client(project: &Path, args: &[&str]) -> Output {
fn distributed_client(project: &Path, args: &[&str]) -> Output {
Command::new(env!("CARGO_BIN_EXE_distributed"))
.arg("client")
.args(args)
Expand All @@ -332,7 +332,7 @@ fn generate(project: &Path, documents: &str, extra: &[&str]) -> Output {
"generated",
];
args.extend_from_slice(extra);
dctl_client(project, &args)
distributed_client(project, &args)
}

fn assert_success(output: &Output, context: &str) {
Expand Down Expand Up @@ -526,7 +526,7 @@ fn selected_role_manifest_rejects_role_name_and_application_kind_mismatches() {
let project = project_dir("client-surface-mismatch");
write_document(&project, "queries/todos.graphql", TODOS_QUERY);

let wrong_role = dctl_client(
let wrong_role = distributed_client(
&project,
&[
"--manifest",
Expand All @@ -545,7 +545,7 @@ fn selected_role_manifest_rejects_role_name_and_application_kind_mismatches() {
"role-name mismatch",
);

let wrong_kind = dctl_client(
let wrong_kind = distributed_client(
&project,
&[
"--manifest",
Expand Down
8 changes: 4 additions & 4 deletions distributed_cli/tests/cli_skills_init.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ fn project_dir(name: &str) -> PathBuf {
}

/// Run `distributed skills <args...>` with the given project directory as cwd.
fn dctl_skills(cwd: &Path, args: &[&str]) -> Output {
fn distributed_skills(cwd: &Path, args: &[&str]) -> Output {
Command::new(env!("CARGO_BIN_EXE_distributed"))
.arg("skills")
.args(args)
Expand All @@ -31,7 +31,7 @@ fn dctl_skills(cwd: &Path, args: &[&str]) -> Output {
}

fn init_ok(cwd: &Path, args: &[&str]) -> (String, String) {
let output = dctl_skills(cwd, args);
let output = distributed_skills(cwd, args);
assert!(
output.status.success(),
"distributed skills {args:?} failed:\n{}",
Expand Down Expand Up @@ -272,7 +272,7 @@ fn target_path_that_is_a_file_is_a_clear_error() {
let dir = project_dir("skills-path-is-file");
fs::write(dir.join(".distributed"), "not a directory").unwrap();

let output = dctl_skills(&dir, &["init"]);
let output = distributed_skills(&dir, &["init"]);
assert!(!output.status.success(), "init should fail");
let stderr = String::from_utf8_lossy(&output.stderr);
assert!(stderr.contains("not a directory"), "stderr: {stderr}");
Expand All @@ -281,7 +281,7 @@ fn target_path_that_is_a_file_is_a_clear_error() {
#[test]
fn list_prints_every_skill_with_its_description() {
let dir = project_dir("skills-list");
let output = dctl_skills(&dir, &["list"]);
let output = distributed_skills(&dir, &["list"]);
assert!(output.status.success());
let stdout = String::from_utf8_lossy(&output.stdout);
for skill in SKILL_NAMES {
Expand Down
4 changes: 2 additions & 2 deletions js/tests/sveltekit-vite.test.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import {
generateDistributedSvelteKit
} from '../dist/sveltekit/vite.js';

const fakeDctlSource = String.raw`
const fakeDistributedSource = String.raw`
import {
appendFileSync,
existsSync,
Expand Down Expand Up @@ -80,7 +80,7 @@ async function fixture(t) {
const root = await mkdtemp(join(tmpdir(), 'distributed-vite-test-'));
const script = join(root, 'fake-distributed.mjs');
const log = join(root, 'commands.log');
await writeFile(script, fakeDctlSource, 'utf8');
await writeFile(script, fakeDistributedSource, 'utf8');
await writeFile(log, '', 'utf8');
await mkdir(join(root, 'src/routes/todos'), { recursive: true });
await mkdir(join(root, 'src/routes/admin'), { recursive: true });
Expand Down
6 changes: 3 additions & 3 deletions scripts/graphql-skill-dry-run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,13 @@ echo "OK: README + skill present and teach query layout"
# 2) Build distributed
cd "$ROOT"
cargo build -p distributed_cli --quiet
DCTL="$ROOT/target/debug/distributed"
test -x "$DCTL"
DISTRIBUTED="$ROOT/target/debug/distributed"
test -x "$DISTRIBUTED"

# 3) Scaffold --query-api (as skill documents)
DEMO="$SCRATCH/skill-dry-run-service"
rm -rf "$DEMO"
"$DCTL" scaffold skill-dry-run \
"$DISTRIBUTED" scaffold skill-dry-run \
--path "$DEMO" \
--query-api \
--store sqlite \
Expand Down
3 changes: 2 additions & 1 deletion src/graphql/client_manifest/codec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,8 @@ pub(super) fn hash_json(value: &impl Serialize) -> Result<String, ClientManifest
///
/// `serde_json::Value` object order otherwise depends on whether another crate
/// enabled serde_json's `preserve_order` feature in the final Cargo graph.
/// Client-manifest bytes must be identical in the server harness and dctl.
/// Client-manifest bytes must be identical in the server harness and the
/// distributed CLI.
pub(super) fn canonical_json_value(value: serde_json::Value) -> serde_json::Value {
match value {
serde_json::Value::Array(values) => {
Expand Down
2 changes: 1 addition & 1 deletion src/graphql/client_manifest/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
//! [`Surface`](super::surface::Surface).
//!
//! This module is intentionally pool-free. Runtime schema construction, engine
//! export, and `dctl` all hand the same Surface to
//! export, and the `distributed` CLI all hand the same Surface to
//! [`DistributedClientSurfaceExport::manifest`]; no consumer re-walks a table,
//! command, permission, relationship, or projector registry.

Expand Down
4 changes: 2 additions & 2 deletions src/graphql/mod.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//! Auto-generated read-only GraphQL over relational read models.
//!
//! `naming` and `sdl` always compile (zero deps beyond the rest of the crate)
//! so `dctl schema --format graphql` works without enabling the `graphql`
//! so `distributed schema --format graphql` works without enabling the `graphql`
//! feature. Execution, the dynamic schema, and the axum router sit behind
//! `feature = "graphql"`.

Expand All @@ -13,7 +13,7 @@ pub mod sdl;
pub mod surface;

// These modules are structural GraphQL metadata and deliberately remain
// pool/server independent. `dctl` and the runtime engine must compile the same
// pool/server independent. `distributed` and the runtime engine must compile the same
// surface without pulling in async-graphql or a database adapter.
mod commands;
mod complexity_contract;
Expand Down
2 changes: 1 addition & 1 deletion src/graphql/sdl.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//! Dep-free SDL text renderer for `dctl schema --format graphql`.
//! Dep-free SDL text renderer for `distributed schema --format graphql`.
//!
//! Renders the dialect-independent core query surface from `&[TableSchema]`.
//! Artifact scope grows with the crate version (aggregates in phase 3,
Expand Down
2 changes: 1 addition & 1 deletion src/graphql/surface/application.rs
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,7 @@ pub fn surface_for_role(
/// Composite identities are valid for isolated roots. Relationship compilation
/// still uses a single-column join contract, so reject the topology only when
/// both ends are reachable on this selected authorization surface. Keeping the
/// check here makes runtime role schemas and pool-free/dctl exports fail at the
/// check here makes runtime role schemas and pool-free CLI exports fail at the
/// same boundary without rejecting unrelated hidden catalog metadata.
pub(in crate::graphql::surface) fn validate_selected_composite_relationships(
models: &BTreeMap<String, SurfaceModel>,
Expand Down
2 changes: 1 addition & 1 deletion src/graphql/surface/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
//! SDL emission and (over time) runtime schema construction consume this IR so
//! dialect-honest comparison ops, roots, and column grants cannot diverge.
//!
//! Core types compile without the `graphql` feature so `dctl schema --format graphql`
//! Core types compile without the `graphql` feature so `distributed schema --format graphql`
//! can share the same IR path.

use std::collections::{BTreeMap, BTreeSet};
Expand Down
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#![allow(clippy::module_inception)]
#![doc = include_str!("../README.md")]
// Projection + GraphQL client surfaces always compile (dctl / shared types), but many
// Projection + GraphQL client surfaces always compile (shared types), but many
// call sites live behind optional features. Without those features rustc reports
// false "never used" warnings for the protocol store helpers. CI builds with features.
#![cfg_attr(
Expand Down
2 changes: 1 addition & 1 deletion tests/e2e-ui/ui/.gitops/deploy/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ clusterDev:
cd /workspace/js && npm install && npm run build
cd /workspace/tests/e2e-ui/ui
npm install
# Skip dctl/cargo: generated clients are committed under src/lib/generated.
# Skip the distributed CLI/cargo: generated clients are committed under src/lib/generated.
export DISTRIBUTED_SKIP_CLIENT_COMPILE=1
# In-cluster API service (not host localhost).
export E2E_API_ORIGIN="${E2E_API_ORIGIN:-http://e2e-ui-api:8791}"
Expand Down
2 changes: 1 addition & 1 deletion tests/e2e-ui/ui/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import { distributedViteOptions } from './distributed.config.js';

const api = process.env.E2E_API_ORIGIN || process.env.E2E_BASE_URL || 'http://127.0.0.1:8791';

// Cluster-dev node images often lack cargo/dctl. Prefer committed generated
// Cluster-dev node images often lack cargo/the distributed CLI. Prefer committed generated
// clients when present so vite can start without a Rust toolchain.
const generatedReady = distributedViteOptions.clients.every((client: { out: string }) =>
existsSync(resolve(distributedViteOptions.cwd, client.out, 'sveltekit.ts'))
Expand Down
Loading