Skip to content

docs(fled): document FLED container format - #3318

Merged
zackees merged 1 commit into
masterfrom
docs/fled-format-3310
Jun 20, 2026
Merged

zackees merged 1 commit into
masterfrom
docs/fled-format-3310

Conversation

@zackees

@zackees zackees commented Jun 20, 2026 •

Copy link
Copy Markdown
Member

Summary

  • Add src/fl/fled/FLED_FORMAT.md as the local .fled v1 container format mirror with canonical ledmapper authority links.
  • Add the required top-of-file src/fl/fled/README.md format-spec link and a legacy src/fl/video/ pointer to the local mirror.
  • Add agent-facing .fled docs and a focused pytest contract test for the documentation links/content.

Closes #3310

Tests

  • uv run pytest tests/test_fled_format_docs.py
  • bash lint

Summary by CodeRabbit

Release Notes

  • Documentation

    • Added comprehensive specifications for the .fled container format, including binary structure, JSON metadata layout, frame payload specifications, and roadmap for future extensions.
  • Tests

    • Added validation tests to ensure documentation consistency and cross-reference accuracy.

@coderabbitai

coderabbitai Bot commented Jun 20, 2026 •

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 4c26417d-8f23-46ea-8555-efae80d0026d

📥 Commits

Reviewing files that changed from the base of the PR and between 8f8779c and cbf2845.

📒 Files selected for processing (6)
  • CLAUDE.md
  • agents/docs/fled-format.md
  • src/fl/fled/FLED_FORMAT.md
  • src/fl/fled/README.md
  • src/fl/video/_build.cpp.hpp
  • tests/test_fled_format_docs.py

📝 Walkthrough

Walkthrough

Adds a local mirror of the FLED v1 container format specification at src/fl/fled/FLED_FORMAT.md, populates src/fl/fled/README.md with a mandatory spec link, creates a short agent summary at agents/docs/fled-format.md, updates CLAUDE.md guidance tables, appends a cross-reference comment to src/fl/video/_build.cpp.hpp, and validates all cross-links with a new Python test module.

Changes

FLED v1 Format Documentation

Layer / File(s) Summary
FLED v1 format specification
src/fl/fled/FLED_FORMAT.md
Introduces the full local spec mirror: 12-byte binary header layout (magic, version, pixel_format, reserved, json_length), pixel format enum (0x00–0x04 defined, 0x05–0xFF reserved), JSON envelope semantics governed by json_length, frame payload byte ordering, and growth notes covering planned channels, MicroPython, and WASM envelope sections.
Cross-linking spec into README, agent docs, video code, and CLAUDE.md
src/fl/fled/README.md, agents/docs/fled-format.md, src/fl/video/_build.cpp.hpp, CLAUDE.md
Populates src/fl/fled/README.md with the spec link as its first content block; adds a 9-line agent summary doc describing consumers (fl::Fled, legacy fl::Video) and the roadmap; inserts a one-line FLED_FORMAT.md reference comment into the video build header; updates CLAUDE.md's "By what you're doing" and "By directory" tables with fled-related entries.
Doc consistency tests
tests/test_fled_format_docs.py
Adds three tests with a _read() helper asserting that FLED_FORMAT.md contains authority/source markers and table keywords, README.md opens with # fl::Fled and the required spec link, and that routing docs in the video build file, agent summary, and CLAUDE.md all reference the correct spec paths.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~5 minutes

Poem

🐇 A spec was once lost in the void,
No header, no enum, no JSON deployed.
Now FLED_FORMAT.md stands proud and tall,
With magic bytes, pixel types, and all!
The rabbit has mirrored the ledmapper lore —
.fled shall confuse our dear devs no more. ✨

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The PR title 'docs(fled): document FLED container format' directly and concisely summarizes the main objective—adding documentation for the FLED container format.
Linked Issues check ✅ Passed All five coding-related objectives from issue #3310 are met: FLED_FORMAT.md created with spec details, README.md with prominent format link, video subsystem reference added, agent documentation updated in CLAUDE.md and agents/docs/fled-format.md, and contract tests validating documentation integrity.
Out of Scope Changes check ✅ Passed All changes align with issue #3310 scope: documentation files, reference pointers, agent docs, and validation tests. No out-of-scope implementation changes detected.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ 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 docs/fled-format-3310

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.

@zackees
zackees merged commit d20d978 into master Jun 20, 2026
9 of 11 checks passed
@fastled-project-sync fastled-project-sync Bot moved this from Triage to Done in FastLED Tracker Jun 20, 2026
@zackees
zackees deleted the docs/fled-format-3310 branch August 21, 2026 19:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

docs(video): document the .fled container format (video, screenmaps, future scripts) in fl/video/ + agents/docs/

1 participant