Skip to content

[Upstream #233] Add logging instrumentation to 5 uninstrumented source modules #170

@quangdang46

Description

@quangdang46

Mirrored from upstream 1jehuang/jcodeIssue #233 by @xukai92
Original state: open
Created: 2026-05-19T19:16:10Z · Updated: 2026-05-19T19:16:10Z
This issue is an auto-mirrored copy. Comments and edits here are local to quangdang46/jcode — do not expect them to propagate upstream.


Factory experiment 1. Hypothesis: Add logging instrumentation to 5 uninstrumented source modules to improve observability score.

What to Build

Add use crate::logging; and targeted logging::info/error/warn/debug calls to these 5 files:

  1. src/channel.rs (26 functions) — log channel send/receive operations, errors, connection state changes
  2. src/process_memory.rs (31 functions) — log memory snapshots, allocation events, cleanup operations
  3. src/telemetry.rs (66 functions) — log telemetry event emission, queue state, flush operations
  4. src/message.rs (7 functions) — log message processing, format conversions, error paths
  5. src/embedding_stub.rs (15 functions) — log embedding lookup requests, cache hits/misses, fallback behavior

Add 3-5 meaningful log calls per file at:

  • Function entry points for key operations
  • Error paths (especially where errors are silently swallowed)
  • State transitions

Acceptance Criteria

  • All 5 files have use crate::logging; imports
  • At least 15 new logging calls total (3+ per file)
  • Log calls use appropriate levels (info for normal ops, warn for unusual, error for failures, debug for verbose)
  • Tests pass
  • Eval score does not regress

Constraints

  • Read CLAUDE.md before starting
  • Do NOT touch files outside declared scope (src//*.rs, crates//*.rs)
  • Do NOT modify eval/score.py or .factory/ files
  • Use the existing crate::logging module (info, error, warn, debug functions)
  • Do NOT add new dependencies

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions