Skip to content

Commit 33b8a57

Browse files
committed
Milestone 6 - Step 0
codetracer-python-recorder/src/monitoring/callbacks.rs: codetracer-python-recorder/src/monitoring/mod.rs: codetracer-python-recorder/src/runtime/tracer/mod.rs: design-docs/codetracer-architecture-refactor-implementation-plan.status.md: Signed-off-by: Tzanko Matev <[email protected]>
1 parent f41a125 commit 33b8a57

File tree

4 files changed

+12
-9
lines changed

4 files changed

+12
-9
lines changed

codetracer-python-recorder/src/monitoring/callbacks.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ use recorder_errors::ErrorCode;
1616
use super::api::Tracer;
1717
use super::{register_callback, EventId, EventSet, MonitoringEvents, ToolId};
1818

19-
pub use super::{events_union, CallbackFn, CallbackOutcome, CallbackResult};
19+
pub use super::{CallbackFn, CallbackOutcome, CallbackResult};
2020

2121
/// Global tracer state shared between callback invocations and installer.
2222
pub(super) struct Global {
@@ -486,6 +486,7 @@ type CallbackFactory = for<'py> fn(&Bound<'py, PyModule>) -> PyResult<CallbackFn
486486
/// Metadata describing how to register a sys.monitoring callback.
487487
pub struct CallbackSpec {
488488
/// Debug label (mirrors the PyO3 function name).
489+
#[allow(dead_code)]
489490
pub name: &'static str,
490491
event: fn(&MonitoringEvents) -> EventId,
491492
factory: CallbackFactory,

codetracer-python-recorder/src/monitoring/mod.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ use pyo3::prelude::*;
44
use pyo3::types::PyCFunction;
55
use std::sync::OnceLock;
66

7-
pub mod api;
8-
pub mod callbacks;
9-
pub mod install;
7+
pub(crate) mod api;
8+
pub(crate) mod callbacks;
9+
pub(crate) mod install;
1010
pub mod tracer;
1111

1212
pub use api::Tracer;

codetracer-python-recorder/src/runtime/tracer/mod.rs

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
//! Collaborators for the runtime tracer lifecycle, IO coordination, filtering, and event handling.
22
//!
3-
//! Re-exports [`RuntimeTracer`] so downstream callers continue using `crate::runtime::RuntimeTracer`.
3+
//! Re-exports [`RuntimeTracer`] so downstream callers continue using `crate::runtime::RuntimeTracer`
4+
//! without exposing the implementation modules outside the crate.
45
5-
pub mod events;
6-
pub mod filtering;
7-
pub mod io;
8-
pub mod lifecycle;
6+
pub(crate) mod events;
7+
pub(crate) mod filtering;
8+
pub(crate) mod io;
9+
pub(crate) mod lifecycle;
910

1011
mod runtime_tracer;
1112

design-docs/codetracer-architecture-refactor-implementation-plan.status.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@
8585
- ✅ Milestone 5 Step 4: carved lifecycle orchestration into `runtime::tracer::lifecycle::LifecycleController`, covering activation gating, writer initialisation/finalisation, policy enforcement, failure cleanup, and trace id scoping. Added focused unit tests for the controller and re-ran `just test` (nextest + pytest) to verify no behavioural drift.
8686
- ✅ Milestone 5 Step 5: shifted event handling into `runtime::tracer::events`, relocating the `Tracer` trait implementation alongside failure-injection helpers and telemetry wiring. `RuntimeTracer` now exposes a slim collaborator API (`mark_event`, `flush_io_before_step`, `ensure_function_id`), while tests import the trait explicitly. `just test` (nextest + pytest) confirms the callbacks behave identically after the split.
8787
- ✅ Milestone 5 Step 6: harmonised the tracer module facade by tightening `IoCoordinator` visibility, pruning unused re-exports, documenting the `runtime::tracer` layout, and updating design docs that referenced the legacy `runtime_tracer.rs` path. `just test` (Rust nextest + Python pytest) verified the cleanup.
88+
- 🔄 Milestone 6 Kickoff: audited crate exports to keep the new module tree internal by default (runtime tracer collaborators + monitoring submodules now `pub(crate)`), and confirmed packaging metadata/docs already reference the updated paths so no additional adjustments are required yet. Pending follow-up: sweep for dead imports and finalise documentation/CI updates before ADR 0011 sign-off.
8889

8990

9091
### Planned Extraction Order (Milestone 4)

0 commit comments

Comments
 (0)