Skip to content

fix(ci): restore green main baseline — handoff for PR #1084 (2 fixes remain) #1085

Description

@zackees

Parent: FastLED/FastLED#3648. Implementation PR: #1084 (branch fix/main-ci-baseline). Registry side: FastLED/boards#55 (merged & published — done). Related: #1061 (regression source), #1082/#1083 (prior hub-hardening work).

Status: main has been fully red; 6 failure classes diagnosed; 2 small fixes remain to land PR #1084

HANDOFF — this document is the complete state. PR #1084 already contains 5 commits fixing four classes; two follow-up edits are still needed on that branch (exact instructions below), then merge.

Already fixed in PR #1084 (verified locally)

  1. Check Windows — pyo3 policy test expected PYO3_NO_PYTHON=1 soldr build --release \; the xwin CRT fixes changed template_native_build.yml to soldr --no-cache build. Test expectations updated (crates/fbuild-python/tests/pyo3_policy.rs). Green locally.
  2. Check Ubuntu/macOS (picotool test)combined_failure_preserves_both_transport_diagnostics asserted the Windows-only WinUSB hint on every OS. format_failure now takes windows: bool; test asserts both variants. Green locally.
  3. Documentation — rustdoc intra-doc links to private consts (ENVIRONMENT_TO_VCOM, BOARD_FINGERPRINTS) in fbuild-cli/src/cli/serial_probe.rs + fbuild-serial/src/boards.rs. Unlinked; full workspace RUSTDOCFLAGS="-D warnings" cargo doc green locally.
  4. Dylintcrates/fbuild-toolchain/src/toolchain/rp2040_picotool.rs was split out of allowlisted rp2040_pqt.rs without a ban_std_pathbuf allowlist entry. Entry added to dylints/ban_std_pathbuf/src/allowlist.txt (sorted before rp2040_pqt.rs).
  5. SAMD USB_VID not declared — root cause was refactor(usb): source compile identities from boards registry #1061: fbuild sources USB_VID/USB_PID from the FastLED/boards registry, but the registry extractor only honored explicit build.vid/build.pid, publishing primary_compile_identity: null for every hwids-only manifest (all five SAMD CI boards). fix(extract): derive compile identity from hwids[0] when build.vid/pid absent boards#55 (merged, site rebuilt) adds the PlatformIO-parity hwids[0] fallback; the live usb-profiles.json now publishes feather_m0 239a:800b, zeroUSB 2341:804d, qt_py_m0 239a:80cb, feather_m4 239a:8031, grandcentral_m4 239a:8020 (verified). PR fix(ci): restore green main baseline (policy tests, docs links, dylint allowlist, fmt toolchain, SAMD USB defines) #1084 additionally ships the compliant fbuild complement: USB_PRODUCT/USB_MANUFACTURER defines gated on usb_product (atmelsam arduino-common.py semantics), build.hwids parsing for project-local manifests (bundled snapshots stay hwids-free, guard test extended), usb_product strings for the five bundled SAMD JSONs, SAM cache-fingerprint coverage.

Remaining work item 1 — Formatting (root cause now fully understood)

The committed codebase is formatted in rustfmt style-edition 2024, but .rustfmt.toml (committed, sets edition = "2021", max_width = 100) does not pin style_edition, so CI's pinned 1.94.1 rustfmt applies 2021 style rules (case-sensitive import sort, different width decisions) and diffs files nobody touched (fbuild-serial/src/boards.rs, daemon test files). Verified locally: soldr rustfmt --check --edition 2021 --style-edition 2024 crates/fbuild-serial/src/boards.rszero diff; without --style-edition 2024 → diffs matching CI.

Fix: add style_edition = "2024" to .rustfmt.toml. Then verify with a per-file sweep (do NOT trust soldr cargo fmt --all -- --check locally — it silently reported clean while per-file rustfmt disagreed; that discrepancy is itself worth a soldr issue): git ls-files "*.rs" | xargs -n 40 soldr rustfmt --check. Expect zero diffs; if a handful appear, run without --check and commit as style:. Keep the fmt.yml soldr rustup component add rustfmt step already in the PR (it made CI use the pinned rustfmt at all; without it, minimal-profile installs fall back to the runner's stable).

Remaining work item 2 — escaped_quote_usage_is_restricted (new failure introduced by PR #1084 itself)

crates/fbuild-build/tests/flag_escaping_lint.rs bans the literal 3-char source pattern \\\" outside canonical define files. Production code (methods.rs) is allowlisted and fine, but the new test file crates/fbuild-config/src/board/tests_usb_vid.rs spells expected define values literally at lines 118, 122, 139, 143, 209, 213.

Fix: in that test module, build expected strings without the literal pattern, e.g.

// Spelled \u{5C} so flag_escaping_lint's source scan does not match.
const ESCAPED_QUOTE: &str = "\u{5C}\"";
fn quoted(value: &str) -> String { format!("{ESCAPED_QUOTE}{value}{ESCAPED_QUOTE}") }

and replace the six literal assertions (e.g. Some(&quoted("Adafruit Feather M0"))). Verify: soldr cargo test -p fbuild-build --test flag_escaping_lint and soldr cargo test -p fbuild-config.

Then: land PR #1084

  1. Commit the two fixes (conventional messages; branch fix/main-ci-baseline).
  2. Push; wait for CI. The ~75 board builds include the SAMD five — the registry is already healed, so they should pass; if any SAMD build ran before the Pages CDN propagated (~07:15Z), re-run failed jobs.
  3. Expected fully green (first green main in the repo's recent history). If green: normal squash-merge. If only pre-existing-on-main stragglers remain, follow the inherited-failure triage pattern documented in harden(rp2040): hub-path deploy robustness — retries, picotool fallback, topology diagnostics, tunable budgets #1083 (comment) (admin-merge with a triage comment).
  4. Close this issue on merge.

Verification evidence so far

Open followups (nice-to-have, separate)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status
    Triage

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions