Skip to content

refactor(ci): drop fbuild→.pio mirror; read merged-bin from active backend - #2299

Merged
zackees merged 2 commits into
masterfrom
feat/ci-fbuild-emu-migration
Apr 18, 2026
Merged

zackees merged 2 commits into
masterfrom
feat/ci-fbuild-emu-migration

Conversation

@zackees

@zackees zackees commented Apr 18, 2026 •

Copy link
Copy Markdown
Member

Summary

  • Add PioCompiler._artifacts_dir(env_name) returning .fbuild/build/<env>/release/ when use_fbuild=True, else .pio/build/<env>/. build_with_merged_bin and get_merged_bin_path now read from whichever backend produced the artifacts, so esptool merge_bin runs against fbuild output without any cross-directory copy.
  • Delete _mirror_fbuild_artifacts_to_pio and its call site in _build_with_fbuild. The function was added in fix(ci): repair all four emulation workflows (ESP32 QEMU + AVR8JS Uno) #2285 and extended in perf(ci): use fbuild for ESP32 QEMU merged-bin builds #2292 to bridge fbuild output into .pio/build/. Its consumers — QEMU/AVR8JS workflow scripts (now read fbuild dir directly via fbuild test-emu in feat(ci): migrate AVR8JS + QEMU emulation to fbuild test-emu #2296), the crash decoder (already fbuild-aware), and build_with_merged_bin (this PR) — no longer need it.
  • Diagnostic dump in the missing-artifacts branch now labels the active backend's dir explicitly and lists both possible locations, preserving (and improving) the debug story.
  • Merge orphan tests/fl/url_lnk.cpp into existing tests/fl/stl/url.cpp so TestPathStructureChecker is satisfied (parse_lnk lives in src/fl/stl/url.h).

This is the cleanup follow-up the c62f200 commit message called out, completed now that #2292 added boot-artifact emission to fbuild's ESP32 orchestrator.

Test plan

  • bash lint ci/compiler/pio.py — passes
  • bash test url --debug — passes (10 url + parse_lnk subcases)
  • CI green on bash test --qemu for esp32c3/esp32s3 (FBUILD_BOARDS path)
  • CI green on QEMU/AVR8JS emulation workflows (already migrated to fbuild test-emu)

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Chores

    • Refactored build system's artifact directory handling to support flexible backend configuration.
  • Tests

    • Consolidated and reorganized URL parsing test suite with comprehensive coverage scenarios including edge cases for whitespace, comments, and line endings.

zackees and others added 2 commits April 17, 2026 22:35
TestPathStructureChecker rejected tests/fl/url_lnk.cpp — the test path
didn't match a source file at src/fl/url_lnk.{h,hpp,cpp.hpp}. Since
parse_lnk lives in src/fl/stl/url.h alongside the rest of the fl::url
API, consolidate its tests into the existing tests/fl/stl/url.cpp.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
… mirror

Replaces the ``_mirror_fbuild_artifacts_to_pio`` workaround with a direct
read from whichever backend produced the artifacts. Adds
``PioCompiler._artifacts_dir(env_name)`` returning either
``.fbuild/build/<env>/release/`` (when use_fbuild=True) or
``.pio/build/<env>/`` (PlatformIO). ``build_with_merged_bin`` and
``get_merged_bin_path`` both use the helper, so esptool merge_bin runs
against fbuild's output without any cross-directory copy.

The mirror was added in #2285 and extended in #2292 to bridge fbuild
output into ``.pio/build/`` so legacy consumers (QEMU/AVR8JS workflows,
crash decoder, ``build_with_merged_bin``) kept working. The new
``fbuild test-emu`` workflows (#2296) read fbuild's release dir
directly, leaving ``build_with_merged_bin`` as the only remaining
consumer — and that is now also fbuild-aware, so the mirror has no
callers left.

Diagnostic dump in the missing-artifacts branch now labels the active
backend's dir explicitly and lists both possible locations, so the
debug story when artifacts vanish is at least as good as before.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
@coderabbitai

coderabbitai Bot commented Apr 18, 2026 •

Copy link
Copy Markdown

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: c2c791b5-a24d-4a8a-a7a3-166dd6058d39

📥 Commits

Reviewing files that changed from the base of the PR and between d73789f and 3c40cb8.

📒 Files selected for processing (3)
  • ci/compiler/pio.py
  • tests/fl/stl/url.cpp
  • tests/fl/url_lnk.cpp

📝 Walkthrough

Walkthrough

This PR removes the fbuild artifact mirroring mechanism that copied build outputs from .fbuild/build/ to .pio/build/, replacing it with a dynamic artifact directory selector that chooses the active backend's directory. URL parsing tests are consolidated and enhanced with string_view support.

Changes

Cohort / File(s) Summary
CI Build Artifact Resolution
ci/compiler/pio.py
Removed _mirror_fbuild_artifacts_to_pio() post-build copy step; added _artifacts_dir() method to abstract backend-specific artifact directory selection (fbuild vs. PlatformIO); updated get_merged_bin_path() and build_with_merged_bin() to use the active backend directory for merged-binary discovery and improved diagnostics.
URL Parsing Tests
tests/fl/stl/url.cpp, tests/fl/url_lnk.cpp
Consolidated parse_lnk test suite from url_lnk.cpp to stl/url.cpp with enhanced coverage for string_view inputs, testing URL variants with trailing newlines, CRLF, comments, leading whitespace, and metadata lines; removed old test file.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related issues

Possibly related PRs

Poem

🐰 The mirrors come down, the artifacts flow,
From fbuild's domain where the outputs do grow,
No copying now—just a neat selector's choice,
The tests leap ahead with a string_view voice!
✨ Cleaner builds, smarter paths, huzzah! 🎉

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/ci-fbuild-emu-migration

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

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