refactor(d1l): dead-code cleanup + software/firmware README (behavior-preserving) #53

Merged
claude merged 2 commits from refactor/fork-owned-simplify into nightly 2026-08-15 07:22:40 +03:00
Owner

Summary

Two behavior-preserving changes scoped to the fork's own code — readability / dedup / structure only, no functional change.

1. docs: replace CLAUDE.md with a software+firmware README.md (3bc770a)
Retire the AI-assistant-oriented CLAUDE.md; fold its durable content into README.md, reorganised for humans into two sections:

  • Software — the platform-agnostic mesh library (src/), protocol summary, host tooling (d1l_logger.py, PlatformIO), dependencies.
  • Firmware — firmware roles, this fork's supported boards, SenseCAP Indicator D1L status (incl. the load-bearing recursive I2C-mutex note), build/flash commands.

2. refactor(d1l): remove dead debug-comment corpses + unused constant (0ea2eb8)
variants/sensecap_indicator_d1l/target.cpp: drop ~26 // Serial…; // REMOVED debug corpses + a commented-out PSRAM block + the unused Config::JPEG_HEADER_SIZE; fold if(!initStorage()){}else{...} into the equivalent if(initStorage()){...}; preserve the genuine "why" notes (no early Serial in HAL window; PSRAM diagnostics disabled) as real comments.

Verification

  • SenseCapIndicator-D1L_repeater builds clean before and after: firmware.bin byte-identical (1,703,520 B), RAM 24.5%, Flash 51.0%, 0 warnings (-Wall -Wextra). The refactor changes nothing in the compiled output.
  • Honours the repo rule against retroactive reformatting (only dead code removed); no new runtime dynamic allocation; mutex / HAL concurrency code untouched.

Scope notes

  • Scoped to fork-added code only; upstream-shared files untouched (preserves upstream mergeability).
  • Other fork variants (thinknode_m3/m6, rak11310, nibble_screen_connect) currently do not compile on nightly (pre-existing errors: AutoDiscoverRTCClock / rtc_clock / BLE_PIN_CODE), so they have no green baseline and were intentionally excluded from this behavior-preserving pass.

🤖 Generated with Claude Code

## Summary Two **behavior-preserving** changes scoped to the fork's own code — readability / dedup / structure only, no functional change. **1. docs: replace `CLAUDE.md` with a software+firmware `README.md` (`3bc770a`)** Retire the AI-assistant-oriented `CLAUDE.md`; fold its durable content into `README.md`, reorganised for humans into two sections: - **Software** — the platform-agnostic mesh library (`src/`), protocol summary, host tooling (`d1l_logger.py`, PlatformIO), dependencies. - **Firmware** — firmware roles, this fork's supported boards, SenseCAP Indicator D1L status (incl. the load-bearing recursive I2C-mutex note), build/flash commands. **2. refactor(d1l): remove dead debug-comment corpses + unused constant (`0ea2eb8`)** `variants/sensecap_indicator_d1l/target.cpp`: drop ~26 `// Serial…; // REMOVED` debug corpses + a commented-out PSRAM block + the unused `Config::JPEG_HEADER_SIZE`; fold `if(!initStorage()){}else{...}` into the equivalent `if(initStorage()){...}`; preserve the genuine "why" notes (no early Serial in HAL window; PSRAM diagnostics disabled) as real comments. ## Verification - `SenseCapIndicator-D1L_repeater` builds clean before **and** after: **`firmware.bin` byte-identical (1,703,520 B)**, RAM 24.5%, Flash 51.0%, **0 warnings** (`-Wall -Wextra`). The refactor changes nothing in the compiled output. - Honours the repo rule against retroactive reformatting (only dead code removed); no new runtime dynamic allocation; mutex / HAL concurrency code untouched. ## Scope notes - Scoped to fork-added code only; upstream-shared files untouched (preserves upstream mergeability). - Other fork variants (`thinknode_m3`/`m6`, `rak11310`, `nibble_screen_connect`) currently **do not compile on `nightly`** (pre-existing errors: `AutoDiscoverRTCClock` / `rtc_clock` / `BLE_PIN_CODE`), so they have no green baseline and were intentionally excluded from this behavior-preserving pass. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Retire the AI-assistant-oriented CLAUDE.md and fold its durable project
content into README.md, reorganised for humans around two sections:

- Software: the platform-agnostic mesh library (src/), protocol summary,
  host-side tooling (d1l_logger.py, PlatformIO), and dependencies.
- Firmware: firmware roles, this fork's supported boards, the SenseCAP
  Indicator D1L status (incl. the load-bearing recursive i2c mutex note),
  and build/flash commands.

Content sourced from the fork's CLAUDE.md; embedded coding standards
(no runtime dynamic allocation, no retroactive reformatting) preserved.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Behavior-preserving cleanup of variants/sensecap_indicator_d1l/target.cpp:
- drop ~26 commented-out `// Serial…; // REMOVED` debug corpses and a
  commented-out PSRAM diagnostics block (noise that obscured real logic);
- remove the unused `Config::JPEG_HEADER_SIZE` constexpr (referenced nowhere;
  the live check uses `JPEG_MAGIC_HEADER_SIZE`);
- fold `if(!initStorage()){}else{...}` into `if(initStorage()){...}` (equivalent);
- preserve the load-bearing "why" notes (no early Serial in HAL window;
  PSRAM diagnostics disabled) as real comments.

No functional change: firmware.bin is byte-identical to the pre-refactor
build (1,703,520 B), RAM/Flash unchanged, 0 warnings (-Wall -Wextra).
Honours the repo rule against retroactive reformatting — only dead code removed.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Collaborator

Codex hygiene disposition — 2026-08-13

Live recheck of PR #53:

  • PR remains open and mergeable.
  • Head 0ea2eb8bd6ec2985a41734836216e6990e92ed7d is based on current nightly 55e6f81143bb31e3150b5b56893c05600ba722eb; no rebase is required.
  • The proposed diff is limited to the fork-owned D1L cleanup/docs (CLAUDE.md removal, README restructuring, and target.cpp dead-comment/unused-constant cleanup): 3 files, 88 insertions, 853 deletions.
  • Forgejo reports has_issues=false, so this repository cannot accept a separate issue for the hygiene decision.

Disposition: the PR is still technically current and remains a candidate for merge after council review. Codex cannot merge it because the PR author is ojars, while the Codex operating policy permits Codex to merge only Codex-authored PRs. The authorized owner should perform the final merge after council approval, or explicitly close it if the refactor is no longer wanted.

## Codex hygiene disposition — 2026-08-13 Live recheck of PR #53: - PR remains **open** and **mergeable**. - Head `0ea2eb8bd6ec2985a41734836216e6990e92ed7d` is based on current `nightly` `55e6f81143bb31e3150b5b56893c05600ba722eb`; no rebase is required. - The proposed diff is limited to the fork-owned D1L cleanup/docs (`CLAUDE.md` removal, README restructuring, and `target.cpp` dead-comment/unused-constant cleanup): 3 files, 88 insertions, 853 deletions. - Forgejo reports `has_issues=false`, so this repository cannot accept a separate issue for the hygiene decision. Disposition: the PR is still technically current and remains a candidate for merge after council review. Codex cannot merge it because the PR author is `ojars`, while the Codex operating policy permits Codex to merge only Codex-authored PRs. The authorized owner should perform the final merge after council approval, or explicitly close it if the refactor is no longer wanted.
Collaborator

Council review evidence — 2026-08-13

Teika review of commit 0ea2eb8bd6ec2985a41734836216e6990e92ed7d returned APPROVED with no code or security findings.

The local verification attempt used PlatformIO native_test; PlatformIO installed the native toolchain into an isolated temporary core directory, but the build is blocked by pre-existing missing project dependencies (Arduino.h, Stream.h, SHA256.h). This does not provide a green build claim.

The PR remains current against nightly (55e6f81) and mergeable. Final merge remains with the authorized owner because this PR is ojars-authored and Codex may merge only Codex-authored PRs.

## Council review evidence — 2026-08-13 Teika review of commit `0ea2eb8bd6ec2985a41734836216e6990e92ed7d` returned **APPROVED** with no code or security findings. The local verification attempt used PlatformIO `native_test`; PlatformIO installed the native toolchain into an isolated temporary core directory, but the build is blocked by pre-existing missing project dependencies (`Arduino.h`, `Stream.h`, `SHA256.h`). This does not provide a green build claim. The PR remains current against `nightly` (`55e6f81`) and mergeable. Final merge remains with the authorized owner because this PR is `ojars`-authored and Codex may merge only Codex-authored PRs.
Collaborator

Adjudication: read Codex's 2026-08-13 council-review-evidence comment in full — Teika review of 0ea2eb8 returned APPROVED with no code or security findings. Diff is behavior-preserving (docs restructure + dead-comment/unused-constant removal in target.cpp), scoped to the fork's own code. No findings to adjudicate. Local native_test build remained unverified (missing Arduino/PlatformIO framework headers in the isolated test env — expected for embedded firmware code outside its real board toolchain, not a defect in this diff). Operator reviewed and authorized merge. Merging now.

**Adjudication:** read Codex's 2026-08-13 council-review-evidence comment in full — Teika review of `0ea2eb8` returned APPROVED with no code or security findings. Diff is behavior-preserving (docs restructure + dead-comment/unused-constant removal in `target.cpp`), scoped to the fork's own code. No findings to adjudicate. Local `native_test` build remained unverified (missing Arduino/PlatformIO framework headers in the isolated test env — expected for embedded firmware code outside its real board toolchain, not a defect in this diff). Operator reviewed and authorized merge. Merging now.
claude merged commit cbd8e3a56e into nightly 2026-08-15 07:22:40 +03:00
claude deleted branch refactor/fork-owned-simplify 2026-08-15 07:22:40 +03:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
3 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
ojars/MeshCore!53
No description provided.