From a3872dcfca530dee5b66a9c9f84a1100365edac0 Mon Sep 17 00:00:00 2001 From: Soares Chen Date: Sat, 19 Sep 2026 13:33:25 +0000 Subject: [PATCH] Retire "capability" in test comments The comments now say trait, method, operation, or component for what a `#[cgp_fn]` function or a component defines, matching the vocabulary the knowledge base and the skill now use. The word names a different construct in the object-capability model and in Rust's context-and-capabilities proposal. Co-Authored-By: Claude Fable 5.1 --- .../tests/cgp-tests/tests/dispatching/auto_dispatch_shape.rs | 2 +- .../cgp-tests/tests/extensible_records/build_field_derive.rs | 2 +- .../cgp-tests/tests/generic_components/fn_impl_generics.rs | 2 +- .../tests/cgp-tests/tests/impl_side_dependencies/fn_uses.rs | 2 +- .../tests/cgp-tests/tests/impl_side_dependencies/impl_uses.rs | 2 +- crates/tests/cgp-tests/tests/impl_side_dependencies/mod.rs | 4 ++-- crates/tests/cgp-tests/tests/impl_side_dependencies_tests.rs | 2 +- .../cgp-tests/tests/implicit_arguments/cgp_fn_calling_fn.rs | 2 +- .../tests/cgp-tests/tests/namespaces/namespace_header_only.rs | 2 +- 9 files changed, 10 insertions(+), 10 deletions(-) diff --git a/crates/tests/cgp-tests/tests/dispatching/auto_dispatch_shape.rs b/crates/tests/cgp-tests/tests/dispatching/auto_dispatch_shape.rs index bf27f5f8..d90bf4c4 100644 --- a/crates/tests/cgp-tests/tests/dispatching/auto_dispatch_shape.rs +++ b/crates/tests/cgp-tests/tests/dispatching/auto_dispatch_shape.rs @@ -1,7 +1,7 @@ //! A realistic `#[cgp_auto_dispatch]` example: dispatching over a `Shape` enum of //! `Circle`/`Rectangle`, with one immutable method (`area`, `&self`) and one //! mutating method (`scale`, `&mut self`). Exercises that a single enum can carry -//! several auto-dispatched capabilities at once. +//! several auto-dispatched operations at once. //! //! See cgp-knowledge-base/cgp/reference/macros/cgp_auto_dispatch.md and //! cgp-knowledge-base/cgp/concepts/dispatching.md. diff --git a/crates/tests/cgp-tests/tests/extensible_records/build_field_derive.rs b/crates/tests/cgp-tests/tests/extensible_records/build_field_derive.rs index 97a5c915..06caa5cb 100644 --- a/crates/tests/cgp-tests/tests/extensible_records/build_field_derive.rs +++ b/crates/tests/cgp-tests/tests/extensible_records/build_field_derive.rs @@ -9,7 +9,7 @@ //! `HasField` getters on the original struct and no `HasFields` representation //! impls, which `#[derive(HasField)]` and `#[derive(HasFields)]` supply. //! -//! Two capabilities come from field-crate blanket impls over the generated +//! Two operations come from field-crate blanket impls over the generated //! `UpdateField`, rather than from the derive, and this file exercises both in //! opposite directions: `BuildField` sets an absent field (`IsNothing` to //! `IsPresent`) and `TakeField` removes a present one (`IsPresent` back to diff --git a/crates/tests/cgp-tests/tests/generic_components/fn_impl_generics.rs b/crates/tests/cgp-tests/tests/generic_components/fn_impl_generics.rs index 1fdfcb2b..09c2ad4b 100644 --- a/crates/tests/cgp-tests/tests/generic_components/fn_impl_generics.rs +++ b/crates/tests/cgp-tests/tests/generic_components/fn_impl_generics.rs @@ -4,7 +4,7 @@ //! `greet` reads a `&Name` field implicitly, but `Name` is bound only where the //! impl needs it, so the trait stays parameter-free (`Greet`) while the impl //! carries `Name: Display`. A second `#[cgp_fn]` (`test_greet`) then imports the -//! `Greet` capability with `#[uses(...)]` and drives the runtime assertion. +//! `Greet` trait with `#[uses(...)]` and drives the runtime assertion. //! //! See cgp-knowledge-base/cgp/reference/macros/cgp_fn.md. diff --git a/crates/tests/cgp-tests/tests/impl_side_dependencies/fn_uses.rs b/crates/tests/cgp-tests/tests/impl_side_dependencies/fn_uses.rs index 6c78615c..d1f56c8f 100644 --- a/crates/tests/cgp-tests/tests/impl_side_dependencies/fn_uses.rs +++ b/crates/tests/cgp-tests/tests/impl_side_dependencies/fn_uses.rs @@ -1,5 +1,5 @@ //! `#[uses(...)]` on a `#[cgp_fn]` imports a `Self` trait bound, read like a -//! `use` statement, so the function body can call another capability. Here +//! `use` statement, so the function body can call another trait's method. Here //! `scaled_rectangle_area` declares `#[uses(RectangleArea)]` and calls //! `self.rectangle_area()`; the import lands as `Self: RectangleArea` in the //! generated impl's `where` clause — an impl-side dependency the consumer trait diff --git a/crates/tests/cgp-tests/tests/impl_side_dependencies/impl_uses.rs b/crates/tests/cgp-tests/tests/impl_side_dependencies/impl_uses.rs index 04b44ee5..1417987c 100644 --- a/crates/tests/cgp-tests/tests/impl_side_dependencies/impl_uses.rs +++ b/crates/tests/cgp-tests/tests/impl_side_dependencies/impl_uses.rs @@ -1,5 +1,5 @@ //! `#[uses(...)]` on a `#[cgp_impl]` provider imports a `Self` trait bound, read -//! like a `use` statement, so the provider body can call another capability. Here +//! like a `use` statement, so the provider body can call another trait's method. Here //! `RectangleAreaCalculator` declares `#[uses(RectangleArea)]` and calls //! `self.rectangle_area()`; the import becomes an impl-side dependency //! (`Self: RectangleArea`) that the `CanCalculateArea` consumer trait does not diff --git a/crates/tests/cgp-tests/tests/impl_side_dependencies/mod.rs b/crates/tests/cgp-tests/tests/impl_side_dependencies/mod.rs index 3091b2ef..f2365282 100644 --- a/crates/tests/cgp-tests/tests/impl_side_dependencies/mod.rs +++ b/crates/tests/cgp-tests/tests/impl_side_dependencies/mod.rs @@ -3,7 +3,7 @@ //! scope so that the type-level wiring of one test never leaks into another. // `#[uses(...)]` on `#[cgp_fn]`: imports a `Self` trait bound so the function can -// call another capability. This concept owns the snapshot showing how `#[uses]` +// call another trait's method. This concept owns the snapshot showing how `#[uses]` // lands on the generated impl's `where` clause. pub mod fn_uses; @@ -18,7 +18,7 @@ pub mod fn_uses_associated_type; pub mod fn_extend; // `#[uses(...)]` on a `#[cgp_impl]` provider: imports a `Self` trait bound so the -// provider can call another capability. The provider is written plainly. +// provider can call another trait's method. The provider is written plainly. pub mod impl_uses; // `#[uses(...)]` with an associated-type-equality bound on a `#[cgp_impl]` diff --git a/crates/tests/cgp-tests/tests/impl_side_dependencies_tests.rs b/crates/tests/cgp-tests/tests/impl_side_dependencies_tests.rs index 2e77a1cc..9fd4c8b3 100644 --- a/crates/tests/cgp-tests/tests/impl_side_dependencies_tests.rs +++ b/crates/tests/cgp-tests/tests/impl_side_dependencies_tests.rs @@ -1,6 +1,6 @@ //! Entrypoint for the `impl_side_dependencies` concept. //! -//! Covers the capabilities a provider or `#[cgp_fn]` function requires but the +//! Covers the traits a provider or `#[cgp_fn]` function requires but the //! consumer trait does not itself expose — CGP's form of dependency injection. //! These impl-side dependencies are declared with `#[uses(...)]` (import `Self` //! trait bounds, read like a `use` statement) and `#[extend(...)]` (add a diff --git a/crates/tests/cgp-tests/tests/implicit_arguments/cgp_fn_calling_fn.rs b/crates/tests/cgp-tests/tests/implicit_arguments/cgp_fn_calling_fn.rs index 9d19146d..d05f34a7 100644 --- a/crates/tests/cgp-tests/tests/implicit_arguments/cgp_fn_calling_fn.rs +++ b/crates/tests/cgp-tests/tests/implicit_arguments/cgp_fn_calling_fn.rs @@ -1,4 +1,4 @@ -//! One `#[cgp_fn]` capability calling another through a `where Self: …` bound. +//! One `#[cgp_fn]` trait calling another through a `where Self: …` bound. //! //! `scaled_rectangle_area` depends on `RectangleArea` (an impl-side dependency //! stated as an explicit `where` clause) and calls `self.rectangle_area()`. The diff --git a/crates/tests/cgp-tests/tests/namespaces/namespace_header_only.rs b/crates/tests/cgp-tests/tests/namespaces/namespace_header_only.rs index 5f28f1c1..220f1bea 100644 --- a/crates/tests/cgp-tests/tests/namespaces/namespace_header_only.rs +++ b/crates/tests/cgp-tests/tests/namespaces/namespace_header_only.rs @@ -7,7 +7,7 @@ //! Both snapshots belong to this concept, which owns `cgp_namespace!`. `App` then //! joins the header-only inheriting namespace and wires the inherited error type //! and raiser components under their full `@cgp.core.error.*` paths, and the -//! `CheckApp` bundle asserts each wired capability resolves, confirming the +//! `CheckApp` bundle asserts each wired component resolves, confirming the //! braceless definition is a usable namespace and not just a parse. That //! `delegate_components!` is written plainly, since its `namespace` form is //! pinned in `prefix_default_namespace`.