diff --git a/docs/adr-011-runtime-ownership-and-task-lifetime-boundaries.md b/docs/adr-011-runtime-ownership-and-task-lifetime-boundaries.md index 17391520e..a81cf2fab 100644 --- a/docs/adr-011-runtime-ownership-and-task-lifetime-boundaries.md +++ b/docs/adr-011-runtime-ownership-and-task-lifetime-boundaries.md @@ -47,7 +47,7 @@ hot cases; the one-time cases are justified on clarity grounds alone: per pushed message; - the client-pool scheduler couples an `Arc` root, a `Mutex`, an atomic single-flight flag, and spawn-on-demand - service tasks (`src/client/pool/scheduler.rs`) — once per acquisition or + service tasks (`src/client/pool/scheduler/mod.rs`) — once per acquisition or lease drop; - `ProtocolHooks::from_protocol` clones the same `Arc` of the protocol object once per callback adapter — six clones for one protocol diff --git a/docs/adr-013-client-pool-scheduler-and-slot-ownership.md b/docs/adr-013-client-pool-scheduler-and-slot-ownership.md index e41065b16..4c8a8aa0e 100644 --- a/docs/adr-013-client-pool-scheduler-and-slot-ownership.md +++ b/docs/adr-013-client-pool-scheduler-and-slot-ownership.md @@ -107,7 +107,7 @@ single-owner coordination rule. Primary code surfaces: - `src/client/pool/client_pool.rs`; -- `src/client/pool/scheduler.rs`; +- `src/client/pool/scheduler/mod.rs`; - `src/client/pool/handle.rs`; - `src/client/pool/lease.rs`; - `src/client/pool/slot.rs`; diff --git a/docs/adr-014-server-shutdown-ownership.md b/docs/adr-014-server-shutdown-ownership.md index bcbe5946c..68488b180 100644 --- a/docs/adr-014-server-shutdown-ownership.md +++ b/docs/adr-014-server-shutdown-ownership.md @@ -38,11 +38,11 @@ This ADR governs the server-runtime half of Epic Primary code surfaces: -- `src/server/runtime/mod.rs` and `src/server/runtime/server.rs`; +- `src/server/runtime/mod.rs` and `src/server/runtime/server/mod.rs`; - `src/server/runtime/supervisor.rs`; - `src/server/shutdown.rs`; - `src/server/error.rs`; -- `src/metrics.rs`. +- `src/metrics/mod.rs`. Related issues and decisions: diff --git a/docs/developers-guide.md b/docs/developers-guide.md index 65143abaa..9a301d64b 100644 --- a/docs/developers-guide.md +++ b/docs/developers-guide.md @@ -1092,7 +1092,7 @@ build standard. The exception stands. Three test binaries fail: `panic_in_server_is_mapped_to_io_error_other`, a handler panic that is not caught. -The `src/metrics.rs` doctest still fails to link, with undefined AWS-LC +The `src/metrics/mod.rs` doctest still fails to link, with undefined AWS-LC symbols. Re-measure on the next toolchain pin. ## Cargo workspace semantics diff --git a/docs/runtime-ownership-baselines.md b/docs/runtime-ownership-baselines.md index 23ad3adcb..14172c106 100644 --- a/docs/runtime-ownership-baselines.md +++ b/docs/runtime-ownership-baselines.md @@ -776,7 +776,7 @@ The mechanism the rework removed is verifiable in the source, and it is worth stating because it is what makes the result explicable rather than merely observed. `stop_servicing` — the only writer that clears `is_servicing` to false — has exactly one caller, `take_next_waiter_or_stop` -(`src/client/pool/scheduler.rs`). The immediate-lease arm instead resolves +(`src/client/pool/scheduler/mod.rs`). The immediate-lease arm instead resolves through `next_waiter`, which selects a queued request and never clears the flag, so a servicing worker can no longer be orphaned by a concurrent resolver. The pre-#535 code cleared the guard on that path, leaving waiters queued with diff --git a/docs/users-guide.md b/docs/users-guide.md index 927f747c2..4c1bf9222 100644 --- a/docs/users-guide.md +++ b/docs/users-guide.md @@ -2906,7 +2906,7 @@ directories (one per shard on full dispatch runs) for offline triage. [^29]: Implemented in `src/fairness.rs` (lines 1-79). [^30]: Implemented in `src/connection.rs` (lines 240-441). [^31]: Implemented in `src/connection.rs` (lines 22-46). -[^33]: Implemented in `src/metrics.rs` (lines 21-111). +[^33]: Implemented in `src/metrics/mod.rs` (lines 21-111). [^34]: Implemented in `src/response.rs` (lines 46-151). [^35]: Implemented in `src/response.rs` (lines 156-209). [^36]: Demonstrated in `examples/async_stream.rs` (lines 1-23). diff --git a/src/client/pool/scheduler.rs b/src/client/pool/scheduler/mod.rs similarity index 99% rename from src/client/pool/scheduler.rs rename to src/client/pool/scheduler/mod.rs index b1cf6c1a3..36a95e2d7 100644 --- a/src/client/pool/scheduler.rs +++ b/src/client/pool/scheduler/mod.rs @@ -392,7 +392,7 @@ where } #[cfg(test)] -#[path = "scheduler_tests.rs"] +#[path = "../scheduler_tests.rs"] mod poison_tests; mod service; #[cfg(test)] diff --git a/src/metrics.rs b/src/metrics/mod.rs similarity index 100% rename from src/metrics.rs rename to src/metrics/mod.rs diff --git a/src/server/runtime/server.rs b/src/server/runtime/server/mod.rs similarity index 99% rename from src/server/runtime/server.rs rename to src/server/runtime/server/mod.rs index 6faaab059..dec38d693 100644 --- a/src/server/runtime/server.rs +++ b/src/server/runtime/server/mod.rs @@ -395,5 +395,5 @@ where } #[cfg(test)] -#[path = "server/observation_tests.rs"] +#[path = "observation_tests.rs"] mod observation_tests; diff --git a/tests/workflow_contracts/dependency_scoping_test.py b/tests/workflow_contracts/dependency_scoping_test.py index a1a410ca4..3379e58a1 100644 --- a/tests/workflow_contracts/dependency_scoping_test.py +++ b/tests/workflow_contracts/dependency_scoping_test.py @@ -55,8 +55,8 @@ def test_prometheus_exporter_remains_available_to_non_loom_doctests(manifest: di "metrics-exporter-prometheus must be available to non-Loom doctests" ) assert "use metrics_exporter_prometheus::PrometheusBuilder;" in ( - ROOT / "src" / "metrics.rs" - ).read_text(), "src/metrics.rs must retain the documented Prometheus example" + ROOT / "src" / "metrics" / "mod.rs" + ).read_text(), "src/metrics/mod.rs must retain the documented Prometheus example" def test_metrics_feature_does_not_enable_exporter(manifest: dict[str, typ.Any]) -> None: