Skip to content

feat(sessions,daemon,vscode): instrument session status delivery - #2082

Merged
newhoggy merged 5 commits into
mainfrom
issue-1447-sessions-logging
Oct 2, 2026
Merged

newhoggy merged 5 commits into
mainfrom
issue-1447-sessions-logging

Conversation

@newhoggy

@newhoggy newhoggy commented Oct 1, 2026

Copy link
Copy Markdown
Contributor

Description

Add diagnostics across session ingestion, registry decisions, daemon subscriptions, and VS Code consumption so stale or missing session cues can be investigated from evidence. daemon.log_level makes tracing configurable for socket-activated launches; OMNI_DEV_CLAUDE_WRAP_LOG opts into bounded, metadata-only wrapper logs.

Existing session transitions, PID takeover rules, attribution ranking, wire payloads, hook exit behavior, wrapper forwarding/title behavior, and companion reconnection policy are preserved.

Type of Change

  • New feature
  • Documentation update
  • Test coverage improvement

Related Issue

Closes #1447.

Changes Made

  • src/utils/settings.rs and src/main.rs: daemon settings, valid RUST_LOG → daemon setting → default filter selection, and bootstrap warnings emitted after tracing initialization.
  • src/daemon/server.rs and the sessions adapter: service rejection warnings, distinct stream termination reasons, pushed/suppressed sample diagnostics, write warnings, and repository-enrichment task failure diagnostics.
  • Registry, shared hook sink, transcript watcher, and stream tracker: transition/bump outcomes, stale PID rejection, reap/eviction and attribution diagnostics, bounded scan summaries, and protocol drift/drop counters.
  • claude_wrap/diagnostics.rs: optional bounded writer queue, restrictive new-file permissions, complete-record appends, timestamps/PID correlation, failed-writer disablement, and periodic/final counters. Conversation/tool content and arbitrary daemon error text are excluded. Unknown notifications likewise log classification metadata rather than raw message text, refining the issue proposal's privacy handling.
  • VS Code: shared request-rejection logging with window context and visible malformed/invalid subscription frames.
  • Configuration and session troubleshooting docs, ADR-0057 amendment, and Unreleased changelog entry.

Testing

  • Formatting and Clippy (--all-targets -- -D warnings) passed.
  • Complete MCP-feature suite: 13,176 library tests passed, 1 existing ignored; binary, integration, and doc tests passed.
  • Complete default Rust suite: 12,353 library tests passed, 1 existing ignored; binary, integration, and doc tests passed.
  • CLI snapshot workflow: all 63 integration tests passed; no snapshots to review or change.
  • Extension: locked dependency install, TypeScript check, and all 248 tests passed.
  • New regressions cover filter precedence, optional settings, registry/hook diagnostics, stream counters and termination, queue saturation, private file permissions, concurrent appends, content exclusion, unchanged wrapper bytes, and invalid client frames.
  • Isolated daemon smoke: two subscribers receive state changes and window attribution; cancelling one preserves the other; bad window reports warn; dedupe and shutdown outcomes appear in logs.

Rebased cleanly onto current main and reran extension checks. Rust sources are identical to the validated tree after this rebase.

Validation commands use the feature worktree's manifest or extension directory:

cargo fmt --all -- --check
cargo clippy --all-targets -- -D warnings
cargo test
cargo test --features mcp
cargo insta test --test integration_test --no-quiet
npm ci
npm run typecheck
npm test

Socket fixtures were run outside the filesystem/network sandbox. The MCP suite and isolated smoke use private request-log fixtures, preventing the always-on GitHub counter service from scanning the live request log.

Coverage percentages were not measured locally; the repository CI coverage job will report them. Native launchd/systemd activation and an interactive VS Code host were not exercised manually.

Review Focus Areas

Metadata allowlisting and fail-open logging; filter precedence/bootstrap warnings; accurate registry bump and stream lifecycle accounting. Post-commit review found and fixed interleaved JSON appends and continued formatting after writer failure. Commit messages were checked with commit-twiddle.

Checklist

  • Self-review completed and findings fixed
  • Documentation and changelog updated
  • Focused regression tests added
  • CLI snapshot review completed
  • PR guidelines followed

Performance and Security Considerations

High-volume sampling stays at trace level; watcher/parser/tee diagnostics use summaries or counters. Disabled wrapper logging creates no writer or tee-counter allocation and formats no diagnostic records. Enabled logging adds a bounded independent queue and at most 200 ms of shutdown flushing. Files append without automatic rotation; queue saturation, disk failure, or process termination can lose records.

Wrapper logs persist identifiers, cwd/model metadata, and outcomes only. Newly created files use 0600; symlinks and nonregular targets are refused. Existing file permissions remain under the user's control. The pure registry remains in memory, and session behavior is unchanged.

Deployment Notes

Restart the daemon after changing daemon.log_level. Enable the optional wrapper log in the environment of newly launched wrapper processes. Troubleshooting docs describe reading, disabling, and removing logs. Diagnosing/fixing the suspected broadcast bug and canonicalizing attribution paths remain follow-up work.

@github-actions

github-actions Bot commented Oct 1, 2026 •

Copy link
Copy Markdown

Coverage

Total: 97.84% ⚪ 0.02 pp vs main

Comparing 186faa7..3978c87 (merge-base → PR head)

File Before After Δ
src/cli/claude_wrap/diagnostics.rs — 100% 🆕 new
src/test_support.rs 98.98% 99.04% 🟢 0.06 pp
src/utils/settings.rs 99.27% 99.34% 🟢 0.08 pp
src/cli/sessions.rs 98.33% 98.45% 🟢 0.11 pp
src/sessions/watcher.rs 96.37% 97.55% 🟢 1.18 pp
src/daemon/server.rs 95.94% 97.13% 🟢 1.19 pp
src/cli/claude_wrap.rs 94.09% 96.64% 🟢 2.55 pp
src/sessions/pid_watcher.rs 92.73% 97.12% 🟢 4.39 pp
🔇 244 ignored region(s), 0 tolerated region(s)

ignore removes the lines from both reports; tolerate keeps them in the reported percentage but scores them against the baseline, so a cross-run flip cannot move a delta. Regions are read from each revision's own source.

File Kind Lines Rev Reason
src/claude/client.rs ignore 815-827 both process-bound: hardcodes SystemEnv with no injectable seam (unlike create_default_claude_client_with's tested Default arm, which this mirrors) and has no in-crate caller; testing it would mean mutating real process env for shared credential vars
src/cli/ai/jev/route.rs ignore 176-251 both RouteCommand::execute is the process-bound wiring shell; fetch_docs, run_route_with_reference_fetch_failures, render_output_with_style and terminal_style_with provide its deterministic seams
src/cli/ai/jev/route.rs ignore 325-330 both the SystemEnv/stdout probe is process-bound; terminal_style_with is exhaustively covered through its injected environment and TTY seam
src/cli/ai/jev/route.rs ignore 879 both guards this test's assumption; the parse above always fails on --ignore-closed with --allow-closed
src/cli/ai/jev/route.rs ignore 911 both guards this test's assumption; the parse above always fails on a malformed --ladder-definition
src/cli/ai/jev/verify_decision.rs ignore 89-142 both VerifyDecisionCommand::execute is the process-bound wiring shell; fetch_input and run_verify provide its deterministic seams
src/cli/claude_wrap.rs ignore 154-164 head process-bound wiring shell: it joins this process's own stdin/stdout and reads the real OMNI_DEV_CLAUDE_WRAP_LOG, which a test must not take over (see the note on run/wrap in the tests module); wrap_io_diagnostics beneath it is covered directly
src/cli/claude_wrap.rs ignore 710-714 head resolve_socket fails only when the platform has no data directory to put the default socket in (no resolvable home), which a test cannot reproduce on macOS or Linux; the fail-open return is what keeps the wrapper forwarding
src/cli/claude_wrap.rs ignore 767-771 head to_value on an ObserveRequest fails only for a non-UTF-8 cwd, and the tracker takes cwd from a JSON string, so it is always UTF-8; the arm exists so a future non-string field cannot silently drop the report
src/cli/claude_wrap/diagnostics.rs ignore 60 head Builder::spawn fails only when the OS refuses a new thread (resource exhaustion), which a test cannot provoke; the fail-open return is what keeps the wrapper forwarding
src/cli/drive/lease.rs ignore 563-567 both a sheet restore's fresh backup is always a DriveCopy — restore.rs's own recheck refuses unless the target is still a spreadsheet, and acquire() only ever takes a Bytes backup of a non-native target; this arm exists solely for exhaustiveness over the shared LeaseBackup enum
src/cli/drive/lease.rs ignore 1273-1276 both guards this test helper against misuse; every call site below passes an acquire subcommand
src/cli/drive/lease.rs ignore 1287-1290 both guards this test helper against misuse; every call site below passes a prune subcommand
src/cli/drive/sheets/values.rs ignore 195 both this closing brace of the if let Some(...) = last (no else) reports 0 hits under llvm-cov even though both inner branches are exercised (csv_interior_blank_line_before_an_unterminated_last_row_is_kept hits the insert path, csv_single_trailing_newline_adds_no_row hits the no-insert path); last is always Some once missing_final_newline is true, since the loop above always runs at least once for non-empty content, so there is no reachable skip path — the same llvm-cov region-attribution artifact on an if-let's closing brace as src/utils/settings.rs:1096
src/cli/gmail/draft/create.rs ignore 2088-2092 both never called: every test using UnreadableStdin gives an HTML body, so resolve_body returns before reading stdin; the panic exists to fail loudly if that ever changes
src/cli/gmail/draft/update.rs ignore 261 both this closing brace reports 0 hits under llvm-cov regardless of test count — verified locally: run_update_sets_a_checked_from_and_keeps_everything_else and run_update_to_the_nameless_primary_leaves_from_to_gmail both complete the block above successfully (proven by the outer if-let's own closing brace and the following let drafts = ... line both measuring as hit), yet this specific inner brace, immediately after a statement with two chained ? operators, never registers a hit; an llvm-cov region-attribution artifact, not an untested path
src/cli/gmail/sync_all.rs ignore 213-246 both SyncAllCommand::execute is the process-bound wiring shell: it loads the real ~/.omni-dev settings and builds clients against the real Gmail host; run_sync_all, load_gmail_sync_config and validate_accounts are its tested seams
src/cli/sessions.rs ignore 272-275 head resolve_socket fails only when the platform has no data directory to put the default socket in (no resolvable home), which a test cannot reproduce on macOS or Linux; the sink is fail-open by design, so this is the same silent return as every other skipped hook
src/cli/sessions.rs ignore 409-416 head to_value on an ObserveRequest fails only for a non-UTF-8 cwd, and the hook payload's cwd is deserialized from a JSON string, so it is always UTF-8; the arm exists so a future non-string field cannot silently drop the report
src/cli/sessions.rs ignore 3303 both the arm above always matches: parse() above always parses an install-hooks argv into SessionsSubcommands::InstallHooks
src/cli/sessions.rs ignore 3307 both the arm above always matches: parse() above always parses an uninstall-hooks argv into SessionsSubcommands::UninstallHooks
src/drive/lease/ledger.rs ignore 1109-1113 both mutate_locked refuses before ever calling the closure, so its body never runs — a hit here is a regression, not a coverage gap
src/drive/lease/restore.rs ignore 1261-1265 both every test using this double refuses before authenticating; a hit here is a regression, not a coverage gap
src/drive/sheets/api.rs ignore 1492 both the assertion arm only fires if the outcome type regresses, in which case the test has already failed
src/drive/sheets/auto_fill.rs ignore 584 both unreachable by construction: source_grid.sheet_id was itself resolved from this same workbook by resolve_grid_range above, so find_sheet_by_id always finds it
src/drive/sheets/auto_fill.rs ignore 802 both every call site resolves grid from a range already checked with grid_range::is_bounded, or computes it from one via compute_destination, which only ever produces a fully bounded range from a fully bounded source; this else-arm exists only to unwrap the shared Option fields
src/drive/sheets/auto_fill.rs ignore 815 both unreachable by construction: compose rejects only a sheet-prefixed or whole-sheet range, and the numeric {start}:{end} built just above is neither
src/drive/sheets/auto_fill.rs ignore 1471 both guards this test's assumption; build_request always returns AutoFill
src/drive/sheets/auto_fill.rs ignore 1488 both guards this test's assumption; build_request always returns AutoFill
src/drive/sheets/auto_fill.rs ignore 2688 both guards this test's assumption; the mocked response above always leads to WouldChange
src/drive/sheets/auto_fill.rs ignore 2736 both guards this test's assumption; the mocked response above always leads to WouldChange
src/drive/sheets/auto_fill.rs ignore 2774 both guards this test's assumption; the mocked response above always leads to WouldChange
src/drive/sheets/auto_fill.rs ignore 2828 both guards this test's assumption; the mocked response above always leads to WouldChange
src/drive/sheets/banding.rs ignore 763 both resolve_sheet_target always resolves AddBanding to a range or has already returned its refusal; this else-arm exists only to unwrap the shared Option
src/drive/sheets/banding.rs ignore 796 both find_existing_banded_range returns Some for UpdateBanding or has already returned RefusedBandedRangeNotFound; this else-arm exists only to unwrap the shared Option
src/drive/sheets/banding.rs ignore 1233 both guards this test's assumption; build_request always returns AddBanding for a BandingVerb::AddBanding verb
src/drive/sheets/banding.rs ignore 1261 both guards this test's assumption; build_request always returns AddBanding for a BandingVerb::AddBanding verb
src/drive/sheets/banding.rs ignore 1302 both guards this test's assumption; build_request always returns UpdateBanding for a BandingVerb::UpdateBanding verb
src/drive/sheets/banding.rs ignore 1342 both guards this test's assumption; build_request always returns UpdateBanding for a BandingVerb::UpdateBanding verb
src/drive/sheets/banding.rs ignore 1373 both guards this test's assumption; build_request always returns UpdateBanding for a BandingVerb::UpdateBanding verb
src/drive/sheets/banding.rs ignore 1398 both guards this test's assumption; build_request always returns UpdateBanding for a BandingVerb::UpdateBanding verb
src/drive/sheets/banding.rs ignore 1511 both guards this test's assumption; build_request always returns UpdateBanding for a BandingVerb::UpdateBanding verb
src/drive/sheets/banding.rs ignore 1524 both guards this test's assumption; build_request always returns DeleteBanding for a BandingVerb::DeleteBanding verb
src/drive/sheets/banding.rs ignore 2026 both guards this test's assumption; only reached when the refusal regresses
src/drive/sheets/cell_format.rs ignore 294 both this closing brace reports 0 hits under llvm-cov regardless of test count — verified locally: render_line_covers_background_bold_number_note_and_validation and render_line_covers_italic_strikethrough_underline_foreground_alignment_and_bare_validation both complete the block above (the pattern and no-pattern pushes both measure as hit), yet this specific brace, closing the format_type.is_empty() check, never registers a hit; the same llvm-cov region-attribution artifact as src/utils/settings.rs:1096
src/drive/sheets/delete_duplicates.rs ignore 1405 both this let-else panic only runs if the match failed to bind the expected variant; an open-ended range always refuses here
src/drive/sheets/developer_metadata.rs ignore 1249 both guards this test's assumption; the multi-row span above always fails resolve_location with RefusedInvalidLocation
src/drive/sheets/developer_metadata.rs ignore 2637 both guards this test's assumption; a start of 0 above always fails resolve_location with RefusedInvalidLocation
src/drive/sheets/dimension_group.rs ignore 469 both find_sheet_id only ever returns an id it read out of this same workbook's sheets, so a lookup by that id in the same workbook always succeeds; this else-arm exists only to unwrap the shared Option
src/drive/sheets/dimension_group.rs ignore 716-718 both resolve_for_update returns Ok only with exactly one group, or the caller has already returned RefusedDimensionGroupNotFound/RefusedAmbiguousDimensionGroup; this else-arm exists only to unwrap the shared enum
src/drive/sheets/dimension_group.rs ignore 735-737 both resolve_for_delete returns Ok only as MaybeOne, or the caller has already returned RefusedDimensionGroupNotFound; this else-arm exists only to unwrap the shared enum
src/drive/sheets/dimension_group.rs ignore 1218 both guards this test's assumption; resolve_for_update always returns RefusedAmbiguousDimensionGroup for more than one candidate with no depth given
src/drive/sheets/dimension_group.rs ignore 1301 both guards this test's assumption; build_request always returns AddDimensionGroup for a DimensionGroupVerb::AddDimensionGroup verb
src/drive/sheets/dimension_group.rs ignore 1321 both guards this test's assumption; build_request always returns UpdateDimensionGroup for a DimensionGroupVerb::UpdateDimensionGroup verb
src/drive/sheets/dimension_group.rs ignore 1339 both guards this test's assumption; build_request always returns DeleteDimensionGroup for a DimensionGroupVerb::DeleteDimensionGroup verb
src/drive/sheets/dimension_group.rs ignore 1841 both guards this test's assumption; the mounted workbook has no sheet titled Q1
src/drive/sheets/embedded_object.rs ignore 1264 both build_plan only calls build_add_chart after matching verb as EmbeddedObjectVerb::AddChart; this else-arm exists only to destructure the already-known variant
src/drive/sheets/embedded_object.rs ignore 1367 both the series_ranges.len() != 1 check immediately above has already returned, so the pop always yields Some; this else-arm exists only to unwrap it
src/drive/sheets/embedded_object.rs ignore 1608 both merge_chart_spec is only ever called from build_update_chart, which build_plan reaches only after matching verb as EmbeddedObjectVerb::UpdateChart; this else-arm exists only to destructure the already-known variant
src/drive/sheets/embedded_object.rs ignore 1688 both merge_pie_chart is only ever called from merge_chart_spec, which has already destructured the same verb as EmbeddedObjectVerb::UpdateChart; this else-arm exists only to destructure the already-known variant
src/drive/sheets/embedded_object.rs ignore 1762 both merge_basic_chart is only ever called from merge_chart_spec, which has already destructured the same verb as EmbeddedObjectVerb::UpdateChart; this else-arm exists only to destructure the already-known variant
src/drive/sheets/embedded_object.rs ignore 1938 both build_plan only calls build_add_slicer after matching verb as EmbeddedObjectVerb::AddSlicer; this else-arm exists only to destructure the already-known variant
src/drive/sheets/embedded_object.rs ignore 2004-2006 both build_plan only calls build_update_slicer after matching verb as EmbeddedObjectVerb::UpdateSlicer; this else-arm exists only to destructure the already-known variant
src/drive/sheets/embedded_object.rs ignore 2291 both build_plan only calls build_move_chart after matching verb as EmbeddedObjectVerb::MoveChart; this else-arm exists only to destructure the already-known variant
src/drive/sheets/embedded_object.rs ignore 2362 both build_plan only calls build_move_slicer after matching verb as EmbeddedObjectVerb::MoveSlicer; this else-arm exists only to destructure the already-known variant
src/drive/sheets/embedded_object.rs ignore 2407 both build_plan only calls build_update_chart_border after matching verb as EmbeddedObjectVerb::UpdateChartBorder; this else-arm exists only to destructure the already-known variant
src/drive/sheets/embedded_object.rs ignore 2421 both validate_verb already refuses UpdateChartBorder { color: None, clear: false, .. } before build_plan is ever reached, so this arm can never run
src/drive/sheets/embedded_object.rs ignore 2736 both every row of the table above pairs its raw value with the kind parse_chart_type returns for it, so the mismatch arm only fires if one of the two assertions above would already have failed
src/drive/sheets/embedded_object.rs ignore 2950 both this test always constructs verb as EmbeddedObjectVerb::AddChart above, so this arm can never run
src/drive/sheets/embedded_object.rs ignore 2961 both this test always constructs verb as EmbeddedObjectVerb::AddChart above, so this arm can never run
src/drive/sheets/embedded_object.rs ignore 2972 both this test always constructs verb as EmbeddedObjectVerb::AddChart above, so this arm can never run
src/drive/sheets/embedded_object.rs ignore 2986 both this test always constructs verb as EmbeddedObjectVerb::AddChart above, so this arm can never run
src/drive/sheets/embedded_object.rs ignore 3089 both this test always constructs verb as EmbeddedObjectVerb::AddChart above, so this arm can never run
src/drive/sheets/embedded_object.rs ignore 3112 both this test always constructs verb as EmbeddedObjectVerb::AddChart above, so this arm can never run
src/drive/sheets/embedded_object.rs ignore 3129 both this test always constructs verb as EmbeddedObjectVerb::AddChart above, so this arm can never run
src/drive/sheets/embedded_object.rs ignore 3150 both this test always constructs verb as EmbeddedObjectVerb::AddChart above, so this arm can never run
src/drive/sheets/embedded_object.rs ignore 3171 both this test always constructs verb as EmbeddedObjectVerb::AddChart above, so this arm can never run
src/drive/sheets/embedded_object.rs ignore 3183 both this test always constructs verb as EmbeddedObjectVerb::AddChart above, so this arm can never run
src/drive/sheets/embedded_object.rs ignore 3432 both this test always constructs verb as EmbeddedObjectVerb::UpdateChart above, so this arm can never run
src/drive/sheets/embedded_object.rs ignore 3449 both this test always constructs verb as EmbeddedObjectVerb::UpdateChart above, so this arm can never run
src/drive/sheets/embedded_object.rs ignore 3467 both this test always constructs verb as EmbeddedObjectVerb::UpdateChart above, so this arm can never run
src/drive/sheets/embedded_object.rs ignore 3520 both this test always constructs verb as EmbeddedObjectVerb::UpdateChart above, so this arm can never run
src/drive/sheets/embedded_object.rs ignore 3569 both this test always constructs verb as EmbeddedObjectVerb::UpdateChart above, so this arm can never run
src/drive/sheets/embedded_object.rs ignore 3598 both this test always constructs verb as EmbeddedObjectVerb::UpdateChart above, so this arm can never run
src/drive/sheets/embedded_object.rs ignore 3623 both this test always constructs verb as EmbeddedObjectVerb::UpdateChart above, so this arm can never run
src/drive/sheets/embedded_object.rs ignore 4150 both this test always constructs verb as EmbeddedObjectVerb::AddChart above, so this arm can never run
src/drive/sheets/embedded_object.rs ignore 4797 both add_chart_verb_with's only callers pass an EmbeddedObjectVerb::AddChart, so this arm can never run
src/drive/sheets/embedded_object.rs ignore 4810 both add_chart_verb_with's only callers pass an EmbeddedObjectVerb::AddChart, so this arm can never run
src/drive/sheets/embedded_object.rs ignore 4830 both add_chart_verb_with's only callers pass an EmbeddedObjectVerb::AddChart, so this arm can never run
src/drive/sheets/embedded_object.rs ignore 4845 both add_chart_verb_with's only callers pass an EmbeddedObjectVerb::AddChart, so this arm can never run
src/drive/sheets/embedded_object.rs ignore 4858 both add_chart_verb_with's only callers pass an EmbeddedObjectVerb::AddChart, so this arm can never run
src/drive/sheets/embedded_object.rs ignore 4873 both add_chart_verb_with's only callers pass an EmbeddedObjectVerb::AddChart, so this arm can never run
src/drive/sheets/embedded_object.rs ignore 4882 both add_chart_verb_with's only callers pass an EmbeddedObjectVerb::AddChart, so this arm can never run
src/drive/sheets/embedded_object.rs ignore 4895 both add_chart_verb_with's only callers pass an EmbeddedObjectVerb::AddChart, so this arm can never run
src/drive/sheets/embedded_object.rs ignore 4908 both add_chart_verb_with's only callers pass an EmbeddedObjectVerb::AddChart, so this arm can never run
src/drive/sheets/embedded_object.rs ignore 4930 both add_chart_verb_with's only callers pass an EmbeddedObjectVerb::AddChart, so this arm can never run
src/drive/sheets/embedded_object.rs ignore 4951 both add_chart_verb_with's only callers pass an EmbeddedObjectVerb::AddChart, so this arm can never run
src/drive/sheets/embedded_object.rs ignore 5070 both update_chart_verb_with's only callers pass an EmbeddedObjectVerb::UpdateChart, so this arm can never run
src/drive/sheets/embedded_object.rs ignore 5094 both update_chart_verb_with's only callers pass an EmbeddedObjectVerb::UpdateChart, so this arm can never run
src/drive/sheets/embedded_object.rs ignore 5109 both update_chart_verb_with's only callers pass an EmbeddedObjectVerb::UpdateChart, so this arm can never run
src/drive/sheets/embedded_object.rs ignore 5125 both update_chart_verb_with's only callers pass an EmbeddedObjectVerb::UpdateChart, so this arm can never run
src/drive/sheets/embedded_object.rs ignore 5143 both update_chart_verb_with's only callers pass an EmbeddedObjectVerb::UpdateChart, so this arm can never run
src/drive/sheets/embedded_object.rs ignore 5161 both update_chart_verb_with's only callers pass an EmbeddedObjectVerb::UpdateChart, so this arm can never run
src/drive/sheets/embedded_object.rs ignore 5188 both update_chart_verb_with's only callers pass an EmbeddedObjectVerb::UpdateChart, so this arm can never run
src/drive/sheets/embedded_object.rs ignore 5233 both update_chart_verb_with's only callers pass an EmbeddedObjectVerb::UpdateChart, so this arm can never run
src/drive/sheets/embedded_object.rs ignore 5364 both update_slicer_verb always builds an EmbeddedObjectVerb::UpdateSlicer, so this arm can never run
src/drive/sheets/embedded_object.rs ignore 5441 both add_slicer_verb always returns an EmbeddedObjectVerb::AddSlicer, so this arm can never run
src/drive/sheets/embedded_object.rs ignore 5472 both add_slicer_verb always returns an EmbeddedObjectVerb::AddSlicer, so this arm can never run
src/drive/sheets/embedded_object.rs ignore 5566 both update_slicer_verb always builds an EmbeddedObjectVerb::UpdateSlicer, so this arm can never run
src/drive/sheets/embedded_object.rs ignore 5576 both update_slicer_verb always builds an EmbeddedObjectVerb::UpdateSlicer, so this arm can never run
src/drive/sheets/embedded_object.rs ignore 5586 both update_slicer_verb always builds an EmbeddedObjectVerb::UpdateSlicer, so this arm can never run
src/drive/sheets/embedded_object.rs ignore 5596 both update_slicer_verb always builds an EmbeddedObjectVerb::UpdateSlicer, so this arm can never run
src/drive/sheets/embedded_object.rs ignore 5606 both update_slicer_verb always builds an EmbeddedObjectVerb::UpdateSlicer, so this arm can never run
src/drive/sheets/embedded_object.rs ignore 5620 both update_slicer_verb always builds an EmbeddedObjectVerb::UpdateSlicer, so this arm can never run
src/drive/sheets/embedded_object.rs ignore 5675 both update_slicer_verb always builds an EmbeddedObjectVerb::UpdateSlicer, so this arm can never run
src/drive/sheets/embedded_object.rs ignore 5684 both update_slicer_verb always builds an EmbeddedObjectVerb::UpdateSlicer, so this arm can never run
src/drive/sheets/embedded_object.rs ignore 5739 both update_slicer_verb always builds an EmbeddedObjectVerb::UpdateSlicer, so this arm can never run
src/drive/sheets/embedded_object.rs ignore 5753 both update_slicer_verb always builds an EmbeddedObjectVerb::UpdateSlicer, so this arm can never run
src/drive/sheets/embedded_object.rs ignore 5805 both callers always pass a verb built by move_chart_verb, which is always MoveChart
src/drive/sheets/embedded_object.rs ignore 5812 both callers always pass a verb built by move_slicer_verb, which is always MoveSlicer
src/drive/sheets/embedded_object.rs ignore 5856 both move_chart_verb always builds an EmbeddedObjectVerb::MoveChart, so this arm can never run
src/drive/sheets/embedded_object.rs ignore 5888 both move_chart_verb always builds an EmbeddedObjectVerb::MoveChart, so this arm can never run
src/drive/sheets/embedded_object.rs ignore 5912 both move_chart_verb always builds an EmbeddedObjectVerb::MoveChart, so this arm can never run
src/drive/sheets/embedded_object.rs ignore 5955 both move_chart_verb always builds an EmbeddedObjectVerb::MoveChart, so this arm can never run
src/drive/sheets/embedded_object.rs ignore 5971 both move_chart_verb always builds an EmbeddedObjectVerb::MoveChart, so this arm can never run
src/drive/sheets/embedded_object.rs ignore 5986 both move_slicer_verb always builds an EmbeddedObjectVerb::MoveSlicer, so this arm can never run
src/drive/sheets/embedded_object.rs ignore 6025 both move_chart_verb always builds an EmbeddedObjectVerb::MoveChart, so this arm can never run
src/drive/sheets/embedded_object.rs ignore 6040 both move_slicer_verb always builds an EmbeddedObjectVerb::MoveSlicer, so this arm can never run
src/drive/sheets/embedded_object.rs ignore 6056 both move_chart_verb always builds an EmbeddedObjectVerb::MoveChart, so this arm can never run
src/drive/sheets/embedded_object.rs ignore 6090 both move_slicer_verb always builds an EmbeddedObjectVerb::MoveSlicer, so this arm can never run
src/drive/sheets/embedded_object.rs ignore 6169 both update_chart_border_verb always builds an EmbeddedObjectVerb::UpdateChartBorder, so this arm can never run
src/drive/sheets/embedded_object.rs ignore 6187 both update_chart_border_verb always builds an EmbeddedObjectVerb::UpdateChartBorder, so this arm can never run
src/drive/sheets/embedded_object.rs ignore 6199 both update_chart_border_verb always builds an EmbeddedObjectVerb::UpdateChartBorder, so this arm can never run
src/drive/sheets/embedded_object.rs ignore 6211 both update_chart_border_verb always builds an EmbeddedObjectVerb::UpdateChartBorder, so this arm can never run
src/drive/sheets/embedded_object.rs ignore 6690 both add_chart_verb_with's only callers pass an EmbeddedObjectVerb::AddChart, so this arm can never run
src/drive/sheets/embedded_object.rs ignore 6865 both add_chart_verb_with's only callers pass an EmbeddedObjectVerb::AddChart, so this arm can never run
src/drive/sheets/embedded_object.rs ignore 7134 both this test always constructs verb as EmbeddedObjectVerb::AddChart above, so this arm can never run
src/drive/sheets/filter.rs ignore 643 both find_existing_filter_view returns Some for UpdateFilterView or has already returned RefusedFilterViewNotFound; this else-arm exists only to unwrap the shared Option
src/drive/sheets/filter.rs ignore 693 both resolve_sheet_target returns Some for SetBasicFilter or has already returned its refusal; this else-arm exists only to unwrap the shared Option
src/drive/sheets/filter.rs ignore 711 both resolve_sheet_target returns Some for ClearBasicFilter or has already returned its refusal; this else-arm exists only to unwrap the shared Option
src/drive/sheets/filter.rs ignore 723 both resolve_sheet_target returns Some for AddFilterView or has already returned its refusal; this else-arm exists only to unwrap the shared Option
src/drive/sheets/filter.rs ignore 745 both update_write is built for UpdateFilterView above or has already returned its refusal; this else-arm exists only to unwrap the shared Option
src/drive/sheets/filter.rs ignore 3932 both this arm only fires if the match failed to bind the expected variant; the assertion below it pins the same variant, so the branch never executes
src/drive/sheets/find_replace.rs ignore 306-310 both request_scope only returns None for a Range target paired with no grid, but resolve_target's Range arm always returns Ok with Some(grid) alongside it; this arm exists only to unwrap the shared Option
src/drive/sheets/find_replace.rs ignore 393-397 both validate_scope_syntax already refuses --all-sheets combined with --sheet before resolve_target is ever reached; this arm exists only as a defensive re-check
src/drive/sheets/find_replace.rs ignore 403-407 both validate_scope_syntax's scope_count check already guarantees --range is unset whenever --whole-sheet is set, before resolve_target is ever reached; this arm exists only as a defensive re-check
src/drive/sheets/find_replace.rs ignore 410-414 both validate_scope_syntax already refuses --whole-sheet without --sheet before resolve_target is ever reached; this arm exists only as a defensive re-check
src/drive/sheets/find_replace.rs ignore 503 both record_attempt is only called when !opts.dry_run, and WouldChange is only ever returned when opts.dry_run is true, so this arm can never run
src/drive/sheets/find_replace.rs ignore 843 both this let-else panic only runs if the match failed to bind the expected variant; this test always constructs that exact variant, so the branch never executes
src/drive/sheets/find_replace.rs ignore 856 both this let-else panic only runs if the match failed to bind the expected variant; this test always constructs that exact variant, so the branch never executes
src/drive/sheets/find_replace.rs ignore 870 both this let-else panic only runs if the match failed to bind the expected variant; this test always constructs that exact variant, so the branch never executes
src/drive/sheets/find_replace.rs ignore 894 both this let-else panic only runs if the match failed to bind the expected variant; this test always constructs that exact variant, so the branch never executes
src/drive/sheets/find_replace.rs ignore 914 both this let-else panic only runs if the match failed to bind the expected variant; this test always constructs that exact variant, so the branch never executes
src/drive/sheets/find_replace.rs ignore 933 both this let-else panic only runs if the match failed to bind the expected variant; this test always constructs that exact variant, so the branch never executes
src/drive/sheets/find_replace.rs ignore 951 both this let-else panic only runs if the match failed to bind the expected variant; this test always constructs that exact variant, so the branch never executes
src/drive/sheets/find_replace.rs ignore 1091 both this let-else panic only runs if the match failed to bind the expected variant; this test always constructs that exact variant, so the branch never executes
src/drive/sheets/find_replace.rs ignore 1155 both this let-else panic only runs if the match failed to bind the expected variant; this test always constructs that exact variant, so the branch never executes
src/drive/sheets/find_replace.rs ignore 1581 both assert_eq!'s message args are only evaluated on failure, and this test always passes
src/drive/sheets/grid_range.rs ignore 1122 both a sheet-only composition always fails at the split_sheet_prefix check above; not_found is never reached in this test
src/drive/sheets/named_range.rs ignore 489 both existing is always Some for UpdateNamedRange: find_existing_named_range above either returns it or refuses and returns early
src/drive/sheets/named_range.rs ignore 541 both existing is always Some for DeleteNamedRange: find_existing_named_range_target above either returns it or refuses and returns early
src/drive/sheets/named_range.rs ignore 564 both new_grid is always Some for AddNamedRange: resolve_grid above either returns it or refuses and returns early
src/drive/sheets/named_range.rs ignore 579 both existing is always Some for UpdateNamedRange: find_existing_named_range above either returns it or refuses and returns early
src/drive/sheets/named_range.rs ignore 590 both existing is always Some for DeleteNamedRange: find_existing_named_range above either returns it or refuses and returns early
src/drive/sheets/named_range.rs ignore 1270 both find_existing_named_range always returns RefusedAmbiguousName here; this test's mounted workbook always has two matching names
src/drive/sheets/named_range.rs ignore 1356 both check_new_name_available always returns RefusedDuplicateName here; this test's new_name always collides with a different named range
src/drive/sheets/named_range.rs ignore 1381 both check_new_name_available always returns RefusedDuplicateName here; this test's new_name always collides with two different named ranges
src/drive/sheets/paste.rs ignore 701 both extents are bounded and non-empty by construction; the fallback exists so an invariant break degrades instead of panicking
src/drive/sheets/pivot.rs ignore 1953 both dry_run plus a fully-allowing gate always reaches WouldChange here; this branch is a safety net against an unexpected refusal, not a coverage gap
src/drive/sheets/randomize_range.rs ignore 678 both this let-else panic only runs if the match failed to bind the expected variant; this test always constructs that exact variant, so the branch never executes
src/drive/sheets/randomize_range.rs ignore 740 both this let-else panic only runs if the match failed to bind the expected variant; this test always constructs that exact variant, so the branch never executes
src/drive/sheets/randomize_range.rs ignore 879 both this let-else panic only runs if the match failed to bind the expected variant; this test always constructs that exact variant, so the branch never executes
src/drive/sheets/randomize_range.rs ignore 916 both this let-else panic only runs if the match failed to bind the expected variant; this test always constructs that exact variant, so the branch never executes
src/drive/sheets/randomize_range.rs ignore 938 both this let-else panic only runs if the match failed to bind the expected variant; this test always constructs that exact variant, so the branch never executes
src/drive/sheets/randomize_range.rs ignore 954 both this let-else panic only runs if the match failed to bind the expected variant; this test always constructs that exact variant, so the branch never executes
src/drive/sheets/randomize_range.rs ignore 979 both this let-else panic only runs if the match failed to bind the expected variant; this test always constructs that exact variant, so the branch never executes
src/drive/sheets/sort_range.rs ignore 790 both this let-else panic only runs if the match failed to bind the expected variant; this test always constructs that exact variant, so the branch never executes
src/drive/sheets/sort_range.rs ignore 879 both this let-else panic only runs if the match failed to bind the expected variant; this test always constructs that exact variant, so the branch never executes
src/drive/sheets/sort_range.rs ignore 894 both this let-else panic only runs if the match failed to bind the expected variant; this test always constructs that exact variant, so the branch never executes
src/drive/sheets/sort_range.rs ignore 911 both this let-else panic only runs if the match failed to bind the expected variant; this test always constructs that exact variant, so the branch never executes
src/drive/sheets/sort_range.rs ignore 928 both this let-else panic only runs if the match failed to bind the expected variant; this test always constructs that exact variant, so the branch never executes
src/drive/sheets/sort_range.rs ignore 942 both this let-else panic only runs if the match failed to bind the expected variant; this test always constructs that exact variant, so the branch never executes
src/drive/sheets/sort_range.rs ignore 957 both this let-else panic only runs if the match failed to bind the expected variant; this test always constructs that exact variant, so the branch never executes
src/drive/sheets/sort_range.rs ignore 1087 both this let-else panic only runs if the match failed to bind the expected variant; this test always constructs that exact variant, so the branch never executes
src/drive/sheets/sort_range.rs ignore 1121 both this let-else panic only runs if the match failed to bind the expected variant; this test always constructs that exact variant, so the branch never executes
src/drive/sheets/sort_range.rs ignore 1142 both this let-else panic only runs if the match failed to bind the expected variant; this test always constructs that exact variant, so the branch never executes
src/drive/sheets/sort_range.rs ignore 1158 both this let-else panic only runs if the match failed to bind the expected variant; this test always constructs that exact variant, so the branch never executes
src/drive/sheets/sort_range.rs ignore 1183 both this let-else panic only runs if the match failed to bind the expected variant; this test always constructs that exact variant, so the branch never executes
src/drive/sheets/structure.rs ignore 1868-1870 both validate_verb_args refuses an UpdateSheetProperties verb that set none of its six properties before structure_inner ever reaches build_request, and every one of those six pushes a fields entry, so fields is never empty here
src/drive/sheets/structure.rs ignore 1962-1966 both every call site matches on the verb as UpdateWorkbookProperties before calling workbook_properties_summary, so this else-arm exists only to destructure the already-known variant
src/drive/sheets/structure.rs ignore 6255 both guards this test's assumption; validate_verb_args always refuses --tab-color with --clear-tab-color as RefusedInvalidRange
src/drive/sheets/structure.rs ignore 6307 both guards this test's assumption; check_freeze_bound always refuses a negative --freeze-rows as RefusedInvalidRange
src/drive/sheets/structure.rs ignore 6335 both guards this test's assumption; check_freeze_bound always refuses a --freeze-rows at or above the sheet's known row count as RefusedInvalidRange
src/drive/sheets/structure.rs ignore 6435 both guards this test's assumption; check_freeze_bound always refuses a negative --freeze-columns as RefusedInvalidRange
src/drive/sheets/structure.rs ignore 6462 both guards this test's assumption; check_freeze_bound always refuses a --freeze-columns at or above the sheet's known column count as RefusedInvalidRange
src/drive/sheets/structure.rs ignore 6508 both guards this test's assumption; validate_verb_args always refuses an update-sheet-properties verb that set no property as RefusedInvalidRange
src/drive/sheets/structure.rs ignore 8052 both build_request always returns UpdateSpreadsheetProperties for an UpdateWorkbookProperties verb, so this else-arm exists only to unwrap the shared enum
src/drive/sheets/structure.rs ignore 8076 both build_request always returns UpdateSpreadsheetProperties for an UpdateWorkbookProperties verb, so this else-arm exists only to unwrap the shared enum
src/drive/sheets/structure.rs ignore 8104 both build_request always returns UpdateSpreadsheetProperties for an UpdateWorkbookProperties verb, so this else-arm exists only to unwrap the shared enum
src/drive/sheets/structure.rs ignore 8156 both guards this test's assumption; a dry run against an allowed target always reaches WouldChange here
src/drive/sheets/structure.rs ignore 8236 both guards this test's assumption; an apply against an allowed target with a mocked batchUpdate always reaches Changed here
src/drive/sheets/target_gate.rs ignore 550 both every operation is granted by the mounted rule, so resolve_all always returns Gated here; this branch is a safety net against an unexpected refusal, not a coverage gap
src/drive/sheets/target_gate.rs ignore 581 both the target has a visible parent with a matching folder rule, so resolve_all always returns Gated here; this branch is a safety net against an unexpected refusal, not a coverage gap
src/drive/sheets/target_gate.rs ignore 609 both the target has a visible parent with a matching folder rule, so resolve_all always returns Gated here; this branch is a safety net against an unexpected refusal, not a coverage gap
src/drive/sheets/target_gate.rs ignore 645 both every operation is granted by a mounted rule, so resolve_all always returns Gated here; this branch is a safety net against an unexpected refusal, not a coverage gap
src/drive/sheets/target_gate.rs ignore 722 both the file rule gives sheets-structure something to deny rather than find nothing, so resolve_all always returns Gated here; this branch is a safety net against an unexpected refusal, not a coverage gap
src/drive/sheets/text_to_columns.rs ignore 1502 both this match's catch-all only runs if build_request failed to return the request variant this test constructs it to build; that never happens, so the branch never executes
src/drive/sheets/text_to_columns.rs ignore 1514 both this match's catch-all only runs if build_request failed to return the request variant this test constructs it to build; that never happens, so the branch never executes
src/drive/sheets/text_to_columns.rs ignore 1584 both would_change_outcome always constructs a WouldChange result, so this catch-all identity arm never runs
src/drive/sheets/text_to_columns.rs ignore 1667 both from_lease_failed always returns Failed; this test's catch-all guards that assumption and never runs
src/drive/sheets/text_to_columns.rs ignore 2308 both this test's mocked responses always drive a WouldChange outcome; this catch-all guards that assumption and never runs
src/drive/sheets/text_to_columns.rs ignore 2403 both this test's mocked responses always drive a Changed outcome; this catch-all guards that assumption and never runs
src/drive/sheets/text_to_columns.rs ignore 2858 both this test's mocked responses always drive a Changed outcome; this catch-all guards that assumption and never runs
src/drive/sheets/trim_whitespace.rs ignore 1315 both this let-else panic only runs if the match failed to bind the expected variant; the mocked run always produces it
src/drive/sheets/trim_whitespace.rs ignore 1436 both this let-else panic only runs if the match failed to bind the expected variant; the mocked run always produces it
src/drive/sheets/validation.rs ignore 1793 both guards this test's assumption; only reached when the refusal regresses
src/drive/test_support.rs ignore 281-287 both only runs if a function mutates a Drive env var without EnvGuard::take(); offenders.is_empty() below is this test's whole point
src/drive/test_support.rs ignore 295 both assert! message args only evaluate when the condition is false, i.e. an offender was found
src/github_issues.rs ignore 549 both validated by the citation parser; every ItemRef reaching here already has a project of the form owner/repo
src/gmail/draft_edit.rs ignore 634 both unreachable: a delimiter line's start is always the position right after some previous line's '\n' (either the outer while loop's line_end, or 0 for the very first line), so it always ends with '\n'; this arm exists solely for exhaustiveness over the byte-slice check
src/jev/citations.rs ignore 127 both unreachable: both call sites (find_citations, first_citation) already filtered out the only alternative with no numbered group (other_url) via number_end before calling this
src/jev/route.rs ignore 306 both defensive: the embedded questions YAML always has all three stage keys, pinned by stage_questions_are_the_tested_wording
src/jev/route.rs ignore 316 both defensive: every embedded stage question is a choice question, pinned by stage_questions_are_the_tested_wording
src/jev/route.rs ignore 324 both defensive: no embedded or custom tier is ever named none, the one fixed criterion (stage_design's no-design-work option)
src/jev/route.rs ignore 1658 both unreachable: https is a special scheme per the WHATWG URL spec, so a URL that already passed the scheme check above can never be cannot-be-a-base and path_segments() is always Some
src/jev/route.rs ignore 1824 both assert_eq!'s message args are only evaluated on failure, and this test always passes
src/jev/route.rs ignore 1834 both assert_eq!'s message args are only evaluated on failure, and this test always passes
src/jev/route.rs ignore 1835 both assert_eq!'s message args are only evaluated on failure, and this test always passes
src/jev/route.rs ignore 3043 both guards this test helper against misuse; every call site below passes an already-routed outcome
src/jev/route.rs ignore 3245 both guards this test's assumption; the mocked response above always answers with a routed outcome
src/jev/route.rs ignore 3308 both guards this test's assumption; the mocked response above always leaves gemini's answers missing
src/sessions/watcher.rs ignore 148-151 head read_dir yields an Err entry only on an I/O fault (EIO, a vanished directory mid-iteration), which a test cannot provoke; the scan counts it and moves on, the same handling as the unreadable project directory below
src/sessions/watcher.rs ignore 159-162 head read_dir yields an Err entry only on an I/O fault (EIO, a vanished directory mid-iteration), which a test cannot provoke; the scan counts it and moves on, the same handling as the unreadable project directory above
src/sessions/watcher.rs ignore 174-177 head DirEntry::metadata does not follow symlinks, so it fails only when the entry vanished between read_dir and the stat, a race a test cannot provoke; the scan counts it and moves on
src/sessions/watcher.rs ignore 183-186 head Metadata::modified fails only on a platform with no mtime, and every supported one (Linux, macOS) has it
src/sessions/watcher.rs ignore 250-254 head spawn_blocking's JoinError needs the scan closure to panic or the runtime to shut down mid-scan; scan has no panicking path, and the runtime outlives the watcher, whose token is cancelled first
src/utils/secret_env.rs ignore 926-934 both the loop above runs this 4 times and every mode fails the same way; verified locally that llvm-cov still reports 0 hits on the matches!( line — a region-attribution artifact on the nested assert!/matches! macro call, not an untested path
src/utils/secret_env.rs ignore 1356 both exercised by strip_test_modules_ignores_braces_in_literals_and_comments's '{' char literal; verified locally that llvm-cov still reports 0 hits — a region-attribution artifact on this closing brace, not an untested path
src/utils/secret_env.rs ignore 1411 both only runs if an unregistered secret-shaped literal exists; the assert below that unknown is empty is this test's whole point, so a passing run never takes this branch
src/utils/secret_env.rs ignore 1469-1471 both only runs if a registered secret is read through a plain accessor outside this module; offenders.is_empty() below is this test's whole point
src/utils/secret_env.rs ignore 1515 both only runs if a _FILE companion collides with an existing variable; collisions.is_empty() below is this test's whole point
src/utils/secret_env.rs ignore 1546 both only runs if a stray file names the companion; strays.is_empty() below is this test's whole point
src/utils/secret_env/command.rs ignore 281-290 both try_wait on a live, owned child fails only if waitpid itself errors (ECHILD/EINTR from outside the process); no in-process test can provoke it, and the arm only reaps and reports
src/utils/settings.rs ignore 1235 both this closing brace reports 0 hits under llvm-cov regardless of test count — verified locally: upsert_account_writes_a_secret_into_its_file_not_settings and several other tests complete the block above (the push on the line just before, and entry.remove(*key) right after, both measure as hit), yet this specific brace, immediately after an if-let whose scrutinee ends in a ? operator, never registers a hit; an llvm-cov region-attribution artifact, not an untested path

Patch coverage

Patch: 99.83% (1151/1153 new lines covered)

File Patch Uncovered new lines
src/cli/claude_wrap.rs 100% (237/237) —
src/cli/claude_wrap/diagnostics.rs 100% (212/212) —
src/cli/sessions.rs 99.12% (112/113) 245
src/daemon/server.rs 100% (165/165) —
src/daemon/services/sessions.rs 100% (1/1) —
src/main.rs 100% (88/88) —
src/sessions.rs 100% (118/118) —
src/sessions/pid_watcher.rs 100% (38/38) —
src/sessions/stream.rs 100% (37/37) —
src/sessions/watcher.rs 98.41% (62/63) 307
src/test_support.rs 100% (19/19) —
src/utils/settings.rs 100% (62/62) —
Uncovered new lines (2)
  • src/cli/sessions.rs:245
  • src/sessions/watcher.rs:307

Indirect coverage changes

🔴 0 lines lost coverage, 🟢 11 lines gained coverage on unchanged code.

Indirect changes
  • src/sessions/pid_watcher.rs:113 🟢 uncovered → covered
  • src/sessions/pid_watcher.rs:114 🟢 uncovered → covered
  • src/sessions/pid_watcher.rs:115 🟢 uncovered → covered
  • src/sessions/pid_watcher.rs:117 🟢 uncovered → covered
  • src/sessions/pid_watcher.rs:120 🟢 uncovered → covered
  • src/sessions/pid_watcher.rs:121 🟢 uncovered → covered
  • src/sessions/pid_watcher.rs:122 🟢 uncovered → covered
  • src/sessions/pid_watcher.rs:123 🟢 uncovered → covered
  • src/sessions/pid_watcher.rs:124 🟢 uncovered → covered
  • src/sessions/pid_watcher.rs:126 🟢 uncovered → covered
  • src/sessions/watcher.rs:171 🟢 uncovered → covered

📦 Full per-file coverage summary · run summary

@newhoggy
newhoggy force-pushed the issue-1447-sessions-logging branch from 4e70efb to 8b05e18 Compare October 1, 2026 12:27
@newhoggy
newhoggy enabled auto-merge October 1, 2026 12:37
@newhoggy
newhoggy added this pull request to the merge queue Oct 1, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to a conflict with the base branch Oct 1, 2026
@newhoggy
newhoggy force-pushed the issue-1447-sessions-logging branch from 8b05e18 to 873ad4f Compare October 1, 2026 13:01
@newhoggy
newhoggy force-pushed the issue-1447-sessions-logging branch from 873ad4f to 530b028 Compare October 1, 2026 14:02
@newhoggy
newhoggy enabled auto-merge October 1, 2026 14:07
@newhoggy
newhoggy disabled auto-merge October 1, 2026 14:11
@newhoggy
newhoggy force-pushed the issue-1447-sessions-logging branch from 530b028 to 3901815 Compare October 1, 2026 23:32
@newhoggy
newhoggy added this pull request to the merge queue Oct 1, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to a conflict with the base branch Oct 1, 2026
Make session ingestion, registry decisions, subscription delivery, and
companion rejection paths observable without changing session behavior.

Add daemon tracing settings and a bounded opt-in wrapper metadata sink.
Keep conversation content out of diagnostics and byte forwarding free
of file I/O. Document troubleshooting and add regression coverage.

Closes #1447
Serialize complete records before appending so simultaneous wrappers
cannot interleave JSON tokens. Include timestamps and wrapper PID for
correlation, and stop formatting records after the writer has failed.

Add a concurrent-append regression and repair stream lifecycle docs.
Use let-else and if-let in diagnostic error branches, following the
repository pedantic Clippy rules. Preserve outcomes and counters.
Close the remaining coverage gaps in the diagnostics added for #1447, mostly
by testing the new log lines and failure arms directly rather than excluding
them.

Pull a few small seams out of the bodies that held the untestable branches,
without changing behavior:

- Diagnostics::drain takes the writer and receiver, so a failing writer can
  drive the abandon-the-log path.
- HookCommand::read_input takes a reader, so a broken or non-UTF-8 stdin
  can be fed in.
- watcher::session_id_of isolates the file-stem rule behind scan.
- main::daemon_filter_from and emit_bootstrap_warnings split the bootstrap
  settings load from the warnings it owes once tracing exists.
- Settings::warn_settings_fallback takes its dedup, so the once-only
  warning is asserted on a private one.

Mark the arms that only an OS fault can reach (a thread that will not spawn,
a read_dir error entry, a missing data directory) with coverage ignores that
state why a test cannot reproduce them.

Make capture_at and capture_future_at deterministic. tracing-core recomputes a
callsite's cached interest against only the calling thread's default while a
single dispatcher is registered, so a thread with no subscriber could cache
"never" and silently drop the capturing test's event. Keeping one extra
dispatcher registered for the life of the process keeps it on the path that
consults every live dispatcher.
Clippy 1.99 deprecates `AtomicU64::fetch_update` in favour of
`try_update`, which failed the Clippy CI job under `-D warnings`.
`try_update` is newer than the 1.88 MSRV, so use a `compare_exchange_weak`
loop instead: same saturating semantics, no deprecation on any toolchain.

Add tests for the saturation bound and for lost updates under
contention (which also exercises the retry path).
@newhoggy
newhoggy force-pushed the issue-1447-sessions-logging branch from 3901815 to 3978c87 Compare October 1, 2026 23:54
@newhoggy
newhoggy added this pull request to the merge queue Oct 2, 2026
Merged via the queue into main with commit 9bde7a5 Oct 2, 2026
19 checks passed
@newhoggy
newhoggy deleted the issue-1447-sessions-logging branch October 2, 2026 00:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Insufficient logging in the Claude sessions feature blocks investigating status-broadcast bugs

1 participant