Skip to content

fix(symbols): expose graph loss when tool discovery falls back from aliases metadata #1659

Closed

Description

@zackees

Context

Coordinated dashboard consumer: FastLED/dashboard#18

In fbuild v2.5.37, dashboard ESP32-S3 APA102/master (FastLED a439902ac6af64e600031c01b5c2ac0df2e690bc) analysis succeeded with 4,447 symbol rows and 2,000 rows containing referenced_by, but zero rows with called_by or references_to.

The dashboard fallback metadata is PlatformIO-shaped: {esp32s3:{aliases:{nm,c++filt,objdump,...},prog_path,defines,cxx_flags}}. load_build_info requires the complete native BuildInfo struct, so it rejects this partial metadata; CLI tool resolution falls back to PATH. A host nm can read the Xtensa ELF, while the corresponding host objdump cannot provide its graph. Empty graph arrays remain a successful JSON result with no machine-readable analysis status.

Reproduction: analyze the SAME saved ELF twice:

  1. fbuild symbols firmware.elf --output-dir implicit
  2. fbuild symbols firmware.elf --nm <xtensa-esp32s3-elf-nm> --cppfilt <xtensa-esp32s3-elf-c++filt> --output-dir explicit

The second result has incoming references on 3,481 rows and outgoing references on 2,752 rows. Memory totals and symbol identities/sizes are unchanged. The dashboard now supplies explicit cross-toolchain tools, but fbuild should make this failure visible and/or consume the supported alias metadata.

Paths: crates/fbuild-cli/src/cli/symbols_cmd.rs::ToolPaths::resolve, crates/fbuild-build-engine/src/build_info.rs::load_build_info, symbol_analyzer/mod.rs::run_objdump_and_attribute.

Proposal

Resolve diagnostic tool paths from aliases when native metadata cannot be decoded, or reject incompatible metadata clearly. Never silently present a missing/failed cross-disassembly pass as a successfully analyzed empty graph. Export selected tool paths and structured per-analysis availability/failure reason for dashboard consumption.

Acceptance criteria

Decisions

P2: collection can work around this today; silent loss of graph coverage still warrants a producer fix. Do not claim the partial dashboard metadata is a complete native BuildInfo document.

Related issues

#428 introduced BuildInfo diagnostic paths; #478 introduced symbol-level incoming edges. This is a confirmed uncovered fallback scenario, not a request to repeat those completed features.

Coordination

Dashboard consumer: FastLED/dashboard #18. Producer work is coordinated across #1659, #1660, and #1661; availability and typed-edge/root contracts must stay consistent.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions