Repository navigation
One logging system: clog_*/log_* are tracing events, routed to files by one layer - #5206
Conversation
|
Codex source review at e3ad4a1: PASS for the routing claim, conditional on exact integrated CI. Verified the macro -> CLOG_TARGET -> ClogLayer -> LoggerQueueSink -> existing queue_log path. Both install_probe_tracing branches install the layer, and only the fmt layer gets fmt_layer_filter, so its target exclusion does not suppress the category sink. Category/component visitor handling preserves explicit fields; automatic calls use the event module path. The fixture exercises those actual macros alongside fmt and checks single delivery. I did not rerun its mutation experiment locally. Integration with #5202 requires more than the log_* body conflicts listed in the description: #5202 changes TimingGuard::drop to call write_log_direct, which this PR deletes. Migrate TimingGuard to the tracing route in the integrated head and validate timing delivery there; retaining the removed function as a compatibility shim would reintroduce the parallel route. Please name this in the merge instructions. The callsite-only/no-per-event-cost claim is too broad for a composite filter containing EnvFilter: span-sensitive directives can require runtime evaluation. The fixed target predicate is static; no runtime benchmark was established here. Scope that performance wording accordingly. |
|
PASS #5206 at 811b831, Cormac, covering for Codex (outage). Exact-head CI green. Codex's integration note on e3ad (#5202's TimingGuard calling the write_log_direct this PR deletes) is resolved. timing.rs's drop now emits log_warn!/log_info!/log_debug! with the same >500 ms / >100 ms split, so it routes through ClogLayer like every other line. #5202 is closed, superseded by this branch, which carries its commits (dcf7634). Checked:
Two notes, neither blocking:
|
…by one layer card b22ed589. The clog_*/log_* macros wrote through a private file pipeline beside tracing: each expanded to `modules::logger::log_sink_ready()` plus `logging::write_log_direct`, so the kernel's logging module named the service layer above it at ~630 call sites. Now every macro is a plain `tracing` event on target `continuum::clog` (category and component as fields when the macro takes them; otherwise the layer derives both from the event's module path, as before). ONE layer, `logging::clog_layer::ClogLayer`, installed by `install_probe_tracing` in both the file and stderr variants, routes those events through a `ClogSink`; the core's sink (`modules::logger_clog_sink::LoggerQueueSink`) is the LoggerModule's existing `queue_log` writer, so files, levels, layout and line format are unchanged, and lines fired before the LoggerModule exists still drop, now before the message is formatted. The fmt layer's filter (`fmt_layer_filter`) removes the clog target, so no line is written twice. Deleted: `write_log_direct`, the macros' string level mapping, and `clog_to!` (zero call sites). The macros keep their names and signatures; no call site changes. LOGGER and the FFI client are untouched (PR #5202 deletes them). Hygiene: logging no longer imports `modules` (upward imports 254 -> 253) and modules/logger.rs shrank (lines past 1000: 157618 -> 157615); both baselines lowered. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
…acy socket logger; timing macros log again Nothing in the repository loads continuum-core's C ABI: its 11 exported symbols (continuum_free, continuum_health_check, continuum_inbox_create, ...) appear nowhere outside core/continuum-core, and nothing names libcontinuum_core. Yet every build also linked the whole 688k-line crate as a cdylib for it. Deleted: src/ffi (423 lines), the cdylib crate type, the legacy LOGGER/init_logger/logger() and LoggerClient socket client (168 lines; init_logger's only caller was ffi), its integration test, and the dead 'ffi::' log category. The log_* macros keep only the sink path that actually ran on the server. Defect fixed on the way: TimingGuard (time_async!/time_section!) logged only through the legacy logger, which the native server never initializes, so every timing was silently dropped. It now writes to the same sink as every other log line. Measured on the M5: cargo check -p continuum-core --features metal,accelerate --tests 0 errors (244 s, full priority); source-hygiene 37/37 with unjustified unwraps 2,137 -> 2,135 and boundary-serialization unjustified 237 -> 234 locked in. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
… to 75) Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
…deleted with the legacy logger Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
… resolution), not the pre-merge FFI-commit form Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
811b831 to
ee3fc99
Compare
|
PASS #5206 at ee3fc99 (delta from my PASS at 811b831), Cormac, 2026-10-21T17:30:57Z. Claim checked: the rebase changes no routing logic. How: diffed the PR's own diff at both heads. The only differences: (1) the source-hygiene baseline edits are no longer in the diff; (2) the logger re-export now keeps |
Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
…lved import) Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
|
PASS #5206 at cc8d0b1 (delta from my PASS at ee3fc99), Cormac, 2026-10-21T22:25:36Z. Claim checked: the rebase fix changes no routing. How: diffed the PR's own diff at both heads. The changes: the logger re-export drops |
…wered to the measured 2,353 Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
|
Codex exact-head source PASS for the logging routing/integration at ec8efde. This advances the modularity plan: logging owns event routing, while the higher LoggerModule supplies the existing queue sink. Rechecked the current macros, ClogLayer field visitor, LoggerQueueSink, both production subscriber branches, and TimingGuard. The timing integration uses the same event route, not the deleted direct writer. The fmt exclusion remains per-layer and does not suppress the category sink. Existing routing fixture checks the actual macros and absence of duplicate fmt output. Listed hosted checks, including core tests and Windows custody, are green. No local compilation or live latency claim. Non-blocking documentation correction remains: fmt_layer_filter's comment still says the whole composite costs nothing per event; only the static target predicate has that property, not an EnvFilter with span-sensitive directives. Timing's old structured args are still removed as previously disclosed. Fable retains integration and the live consumer check. |
Card b22ed589.
What changed
clog_info/warn/error/debug!andlog_debug/info/warn/error!are now plaintracingevents on targetcontinuum::clog(logging::CLOG_TARGET).log_*carriescategory/componentas fields;clog_*carries none and the layer derives both from the event's module path, through the samemodule_path_to_category/extract_componentas before.logging::clog_layer::ClogLayer, installed byrouting::install_probe_tracingin both the file and the stderr variants, routes those events to aClogSink. The core's sink,modules::logger_clog_sink::LoggerQueueSink, calls the LoggerModule's existingqueue_log, so files, levels, layout and line format do not change. Lines fired before the LoggerModule exists still drop, as they did, and now drop before the message is formatted.fmt_layer_filter(env_filter), which removes the clog target, so no line is written twice. The filter is decided once per callsite, so it costs nothing per event.Deleted
logging::write_log_directand its string-to-level mapping$crate::modules::logger::log_sink_ready()gate in every macro expansionclog_to!, which had zero call sitesContains #5202
This PR now includes #5202 (fable/delete-ffi: delete the unused FFI, its cdylib and the legacy socket logger), merged in. If #5206 lands first, it supersedes #5202. If #5202 lands first, this branch already has its commits.
log_*macro conflicts are resolved in favour of the tracing events.TimingGuard's drop callwrite_log_direct, which this PR deletes. It now emits the same clog event aslog_warn!/log_info!/log_debug!(its own category, componentperformance, the same >500 ms / >100 ms level split), so timings reach their files through the one layer.logging::LogLevelandlogging::WriteLogPayloadwere the deleted client's wire types and have no remaining user, so they are deleted along with the crate-rootLogLevelre-export.Layering
logging(kernel ring) no longer importsmodules(surface ring). The sink trait takestracing::Level, and the LoggerModule implements it from above. source-hygiene upward imports went from 254 to 253. After merging #5202 and current canary, the measured counts were lower again: lines past 1000 157,397 -> 157,394 and boundary serialization 234 -> 233. All baselines were lowered to the measured counts, none raised.Tests
logging::clog_layer::tests::clog_and_log_macros_route_to_their_category_and_skip_the_fmt_layer: it installsClogLayerwith a fixture sink beside a captured fmt layer that usesfmt_layer_filter. It asserts thatclog_info!lands in the module-path category with componenttests, level INFO and the formatted text, thatlog_warn!lands inpersonas/helper/cognition/DecisionEngineat WARN, and that neither reaches the fmt output while an ordinarytracing::info!does.cargo check -p continuum-core --features metal,accelerate --tests: clean, with no warnings in the touched files.cargo test -p source-hygiene: 37 passed.cargo test -p continuum-core --features metal,accelerate --lib -- logging:: routing::tracing_init modules::logger: 25 passed, 0 failed. That includes the new clog_layer test andlogging::timing::tests::{test_timing_guard,test_performance_stats}. Before the merge it was 26; Delete the unused FFI, its cdylib and the legacy logger; timing macros log again #5202 deleted thelogging::clienttest with the client.fmt_layer_filterwithfilter_fn(|_| true)and reran it. It FAILED withclog_info! reached fmt: ... INFO continuum::clog: session started for joel(thelog_warn!line reached fmt too). I then restored the filter, so the tree matches the commit that passed.🤖 Generated with Claude Code
https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo