Skip to content

feat: explain value display failures and capture limits - #304

Merged
swananan merged 1 commit into
mainfrom
feature/value-diagnostics
Sep 9, 2026
Merged

feat: explain value display failures and capture limits#304
swananan merged 1 commit into
mainfrom
feature/value-diagnostics

Conversation

@swananan

@swananan swananan commented Sep 9, 2026

Copy link
Copy Markdown
Owner

Rust values that fall back to internal fields or contain missing data need an explanation at the point of use. This change adds consistent value markers and trace details for unavailable variables, failed memory reads, unsupported semantic layouts or read plans, and capture limits. Successfully captured fields remain visible.

  • Carry structured, path-qualified diagnostics from DWARF planning through compilation to CLI and TUI output. CLI setup notes remain available with --no-log --no-status; TUI users can inspect them with info trace.
  • Keep static display notes independent of capture selection. Ordinary aggregates retain their normal read path and null-dereference behavior, and register-backed arguments retain the same notes as memory-backed values. Runtime read failures remain distinct from static depth limits.
  • Add the offline --value-diagnostics-help guide, matching English and Chinese documentation, README links, and runtime-analysis skill version 0.0.6. Explain why errno alone cannot distinguish a page that cannot be faulted in from an invalid address, when --sleepable-uprobe may help and its performance cost, and when an incorrect computed address indicates a GhostScope bug.
  • Consolidate 14 diagnostic e2e cases covering reasons, retained contents, capture budgets, null and unreadable pointers, register-backed values, output streams, and embedded-help parity.

Validation completed on the final code tree:

  • cargo fmt --all
  • cargo clippy --all-targets --all-features -- -D warnings
  • cargo clippy -p ghostscope-e2e-tests --test value_diagnostics_execution --all-features -- -D warnings
  • cargo test -p ghostscope-dwarf -p ghostscope-compiler -p ghostscope-protocol --lib --all-features: 585 tests passed.
  • cargo test -p ghostscope-e2e-tests --tests --all-features: 373 tests passed through the runner service with host tracing host targets, including all 14 diagnostic cases.
  • Embedded-help parity and bilingual guide coverage passed. Container-topology e2e was intentionally skipped because the change does not affect container or namespace behavior.

Expose stable value diagnostics in printed values and trace details so
users can distinguish unavailable variables, failed reads, adapter
fallbacks, and capture limits. Preserve path-qualified notes in CLI and
TUI output independently of capture selection and register locations.

Embed --value-diagnostics-help, provide matching English and Chinese
guidance, and update the runtime-analysis skill to 0.0.6. Explain failed
read triage without treating errno or static display limits as a cause.

Consolidate diagnostic e2e coverage around reasons, retained values,
streams, and exit status, including ordinary null-pointer reads and
register-backed arguments with static display notes.
@swananan
swananan merged commit 5db88d1 into main Sep 9, 2026
10 checks passed
@swananan
swananan deleted the feature/value-diagnostics branch September 9, 2026 16:08
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.

1 participant