main
22
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
ef5d27b6c5 |
feat(m1): storage info command and tf card identity record (#16)
## What - M1 firmware: new `storage info` console command printing the mounted TF card identity from `sdmmc_card_t` (CID: manufacturer/OEM/product name/revision/serial/date; CSD: capacity in MiB, sectors, sector size). `storage: no card` when not mounted. CID/CSD are copied out under a new mutex that also guards mount/unmount, so the console never dereferences a half-initialized or freed card. No other behavior changed. - Lab config `_doc/lab/board-c1810c76790e.json`: `tf.tf_card` upgraded from `pending-visual-read` to the values read on the real board (`SD16G`, 14910 MiB, serial `0x00000024`, mfg 2026-05), citing the in-repo transcript. - ADR-0003: TF record acceptance checkbox ticked with citation; blockers list updated. ## Evidence - `poc/evidence/tf-info-20260907/tf-cid-transcript-20260907.log`: RTS-reset boot, two identical `storage info` reads (L188-189, L192-193), `status --json` sanity (L197, `tf":"READY`), serial non-zero. - Board restored to PoC-A firmware after the read (`poca status` verified). Co-authored-by: ania-lain <[email protected]> |
||
|
|
f04326d1b7 |
docs(adr-0003): record lab config, tf card, and license inventory (#15)
Bounded doc/evidence package completing the three currently-satisfiable ADR-0003 acceptance items. ## Artifacts - `_doc/lab/board-c1810c76790e.json` — machine-readable lab config: board identity (product/module/board_id + photo shas recomputed), ST7305 display (SPI3 mode0 10 MHz, pin map), I2C (PCF85063@0x51, SHTC3@0x70), KEY GPIO18, SDMMC 1-bit TF (no card-detect, FAT32), software locks (IDF v6.0.2, xtensa gcc 15.2.0, clang-format CI-18 authority), current-firmware hashes cited from the M1 and PoC-A manifests. - `_doc/licenses/INVENTORY.md` — license inventory for both ADR-0003 sources: Waveshare official repo @`eb1f6342` (root Apache-2.0 + bundled SensorLib/U8g2/LVGL/codec components, each read from its LICENSE at the pinned commit; reference-only, nothing vendored) and the vendored elf_loader v1.3.3 @`6526c5b1` (Apache-2.0, license.txt sha `cfc7749b…` recomputed) + managed dep cmake_utilities 0.5.3 (Apache-2.0 verified from the local component cache zip). - `_doc/decisions/0003-waveshare-rlcd42-hardware.md` — checkboxes ticked only where in-repo evidence exists, each with a citation: boot record (M1-002 + N16R8 marking photo), lab config, PCF85063/SHTC3/KEY (M1-004), Flash/PSRAM mode (boot.log QIO/80 MHz/octal + manifest sdkconfig sha), license inventory. TF model/capacity NOT found in M1 evidence (device never logs card name/CID) → `tf_card: pending-visual-read`, TF checkbox honestly left open. Status stays Blocked (fixture + spare board). ## Gates - `frame-doc-links`: green (clean worktree; local `.omo/plans` noise is gitignored harness state, CI unaffected) - `pytest`: 87 collected, 0 failed (86 passed + 1 pyserial-environment skip, documented steady state) - `python3 -m json.tool` on the new JSON: OK No code or firmware changes. Co-authored-by: ania-lain <[email protected]> |
||
|
|
d644b895fa |
docs(evidence): record gate-a pass (owner confirmed) (#14)
Completes the PENDING OWNER CONFIRMATION block in `poc/evidence/poc-a-20260901/GATE-A-REPORT.md` per development-plan §4 / GOV-006; ADR-0002 owner record complete. Mirrors the M1-008 owner-record pattern (PR #10). Evidence-only change — no code affected. Co-authored-by: ania-lain <[email protected]> |
||
|
|
e71842aa8a |
feat(poc-a): gate-a dynamic elf proof of concept (#13)
## Summary PoC-A proved that dynamically loaded ELF plugins are workable on ESP32-S3: plugins ship as signed MPB packages, are parsed by a strict single-type parser shared between host and target, and execute from PSRAM+IRAM within a measured admission budget. A 1000-cycle load/unload soak passed 18/18 trend gates with stable heaps, the capacity ladder settled at 8 coexisting plugin instances with a 3356B per-instance budget, and the fail-closed corpus executed zero attacker-controlled bytes across 14 rejection classes. Scheduler semantics (strand FIFO ordering, completion-cancel CAS, quiesce-as-noop ABI) were validated on both host (TSan suite) and target. **Gate-A verdict: PASS** — ADR-0002 moves to **Accepted** with the capacity value 8 and global-sum admission rule as PoC-derived proposals. ## Changes by area Grouped from `git log main..HEAD --oneline` (18 commits): - **Vendored loader + patches**: `4bb53f2` vendor elf_loader 1.3.3 + harness scaffold; `2f67b4f` plugin_iram loader patch with budget consistency (p1-p5 patch series in `PATCHES.md`). - **MPB toolchain**: `4793cc2` deterministic MPB manifest builder with test signing; `408df44` strict single-type MPB parser shared host/target; `796f9d2` host MPB corpus + policy CI lane. - **Plugin pipeline + probes**: `21d2842` plugin pipeline and first PSRAM execution on target; `cab9664` relocation/import allowlist matrix with probes; `c5d6c6c` C++ feature rejection matrix. - **Harness commands**: `e0e7159` generation coexistence with measured admission budget; `2a37556` thousand-cycle lifecycle soak with heap trend gate; `093a72b` on-target scheduler semantics validation (+ `eea3876` clang-format-18 sweep); `a302151` capacity ladder with signed budget; `f34dc72` fail-closed corpus with execution sentinel. - **Host prototypes**: `6198bca` strand FIFO prototype with TSan suite; `1c3ad59` completion-cancel CAS and cleanup semantics. - **Evidence + ADR/docs**: `887d0f7` Gate-A manifest and report; `1c29e8a` ADR-0002 outcome + frozen PoC values. ## QA evidence - `poc/evidence/poc-a-20260901/manifest.json` — 67-artifact hash index, every sha256 recomputed at assembly. - `poc/evidence/poc-a-20260901/GATE-A-REPORT.md` — full nine-item development-plan §4 mapping; TEST-003 10/10 clauses. - 14 verbatim per-task transcripts (`task-1` … `task-15-*.log`) + fresh build artifacts (`build/frame_poc_a.map`, size components). - Frozen in-repo references: `ALLOWLIST.md`, `REJECT-MATRIX.md`, `ADMISSION-BUDGET.md`, `soak_samples_1000.csv`, fc corpus (33 committed `.mpb` containers). - F1-F4 final-wave verdicts: **APPROVE**. - Key numbers: soak **18/18** trend gates over 1000 cycles; capacity **8/8** instances, **3356B** per-instance; fc corpus **14 rejection classes, zero attacker bytes executed**; **4 upstream loader defects found and patched** (p1-p5). ## Requirement IDs (GOV-006) ADR-0002; TEST-002, TEST-003; PLUG-001, PLUG-004, PLUG-008, PLUG-009; MEM-001, MEM-003, MEM-007, MEM-008; LIFE-001, LIFE-002, LIFE-005, LIFE-007; SEC-002, SEC-003, SEC-004, SEC-005; GH-003; GOV-004, GOV-005. ## Risks / known limitations From `GATE-A-REPORT.md` §(f) plus the trade-off table: 1. **Capacity descent path 7-5 unexercised** — rung 8 passed first attempt; rungs 7/6/5 and retry-once logic never ran on hardware (untested against real OOM). 2. **No Wi-Fi in the harness (MEM-001 caveat)** — all PSRAM/IRAM budget numbers are radio-off harness-class; product admission budgets must be re-measured with the network stack active. 3. **On-target scheduler vectors are a subset of the host suite** (256-node pool / 2e4 storm posts vs host 31000 / 1e5); consistency declaration covers only the vectors actually run. 4. **Quiesce is a no-op by ABI semantics** — plugin ABI 1.2 has no quiesce slot; NULL entry is defined as trivial success; real quiesce coordination is later-gate work. 5. **MEMPROT=n trade-off** — `CONFIG_ESP_SYSTEM_MEMPROT=n` is required for the IDF exec heap (`MALLOC_CAP_EXEC`) that `.plugin_iram` needs; software-only PMP config, no eFuse burned (documented in `PATCHES.md` p5); production must re-decide security vs plugin IRAM. 6. **Owner sign-off PENDING** — Gate-A PASS is the PoC team's verdict; formal acceptance of ADR-0002 awaits the owner. ## Not in scope - Product components (GOV-004) — this PR is PoC evidence only; no product code paths change. - **Merge is the owner's call** — do not merge without owner sign-off on ADR-0002. --------- Co-authored-by: ania-lain <[email protected]> |
||
|
|
0018ebbb8f |
chore(deps): bump ruff from 0.16.5 to 0.16.6 (#12)
Bumps [ruff](https://github.com/astral-sh/ruff) from 0.16.5 to 0.16.6. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/astral-sh/ruff/releases">ruff's releases</a>.</em></p> <blockquote> <h2>0.16.6</h2> <h2>Release Notes</h2> <p>Released on 2026-09-03.</p> <h3>Preview features</h3> <ul> <li>Move <code>pytest-fixture-autouse</code> to the <code>restriction</code> category (<a href="https://redirect.github.com/astral-sh/ruff/pull/28219">#28219</a>)</li> <li>[<code>flake8-pytest-style</code>] Add an autofix for <code>PT020</code> (<a href="https://redirect.github.com/astral-sh/ruff/pull/27993">#27993</a>)</li> <li>[<code>flake8-tidy-imports</code>] Prevent fix loop between <code>TID254</code> and <code>TID255</code> (<a href="https://redirect.github.com/astral-sh/ruff/pull/28262">#28262</a>)</li> <li>[<code>isort</code>] Exclude pragma comments from line length calculation (<code>I001</code>) (<a href="https://redirect.github.com/astral-sh/ruff/pull/27313">#27313</a>)</li> </ul> <h3>Bug fixes</h3> <ul> <li>Validate unary expressions when parsing (<a href="https://redirect.github.com/astral-sh/ruff/pull/28233">#28233</a>)</li> <li>[<code>flake8-async</code>, <code>pylint</code>] Recognize <code>builtins.open</code> (<code>ASYNC230</code>, <code>PLW1514</code>) (<a href="https://redirect.github.com/astral-sh/ruff/pull/28021">#28021</a>)</li> <li>[<code>flake8-bugbear</code>] Fix panic on <code>match</code> subjects (<code>B031</code>) (<a href="https://redirect.github.com/astral-sh/ruff/pull/27781">#27781</a>)</li> <li>[<code>flake8-datetimez</code>] Reject <code>tzinfo=None</code> for <code>datetime</code> bounds (<code>DTZ901</code>) (<a href="https://redirect.github.com/astral-sh/ruff/pull/28022">#28022</a>)</li> <li>[<code>flake8-pytest-style</code>] Avoid duplicate <code>PT017</code> diagnostics (<a href="https://redirect.github.com/astral-sh/ruff/pull/27918">#27918</a>)</li> <li>[<code>ruff</code>] Remove <code>lint.external</code> hint for Ruff-specific suppressions (<code>RUF102</code>) (<a href="https://redirect.github.com/astral-sh/ruff/pull/27923">#27923</a>)</li> </ul> <h3>Rule changes</h3> <ul> <li>[<code>flake8-use-pathlib</code>] Add display-only fix for <code>os.listdir</code> (<code>PTH208</code>) (<a href="https://redirect.github.com/astral-sh/ruff/pull/28027">#28027</a>)</li> </ul> <h3>Documentation</h3> <ul> <li>Add another example and glob reference for <code>lint.per-file-ignores</code> (<a href="https://redirect.github.com/astral-sh/ruff/pull/28106">#28106</a>)</li> <li>Add duplicate work guidance (<a href="https://redirect.github.com/astral-sh/ruff/pull/28229">#28229</a>)</li> <li>[<code>flake8-async</code>] Document thread offloading (<code>ASYNC240</code>) (<a href="https://redirect.github.com/astral-sh/ruff/pull/28008">#28008</a>)</li> <li>[<code>pyupgrade</code>] Clarify default <code>encoding</code> argument handling (<code>UP012</code>) (<a href="https://redirect.github.com/astral-sh/ruff/pull/27315">#27315</a>)</li> </ul> <h3>Other changes</h3> <ul> <li>Allow unary plus in match patterns on Python 3.15 (<a href="https://redirect.github.com/astral-sh/ruff/pull/28231">#28231</a>)</li> </ul> <h3>Contributors</h3> <ul> <li><a href="https://github.com/flying-sheep"><code>@flying-sheep</code></a></li> <li><a href="https://github.com/pikammmmm"><code>@pikammmmm</code></a></li> <li><a href="https://github.com/fly1d"><code>@fly1d</code></a></li> <li><a href="https://github.com/waterWang"><code>@waterWang</code></a></li> <li><a href="https://github.com/Pierre-Sassoulas"><code>@Pierre-Sassoulas</code></a></li> <li><a href="https://github.com/ntBre"><code>@ntBre</code></a></li> <li><a href="https://github.com/jelle-openai"><code>@jelle-openai</code></a></li> <li><a href="https://github.com/ericbuehl"><code>@ericbuehl</code></a></li> <li><a href="https://github.com/tjkuson"><code>@tjkuson</code></a></li> <li><a href="https://github.com/AbhinavMir"><code>@AbhinavMir</code></a></li> <li><a href="https://github.com/Whning0513"><code>@Whning0513</code></a></li> <li><a href="https://github.com/chirizxc"><code>@chirizxc</code></a></li> </ul> <!-- raw HTML omitted --> </blockquote> <p>... (truncated)</p> </details> <details> <summary>Changelog</summary> <p><em>Sourced from <a href="https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md">ruff's changelog</a>.</em></p> <blockquote> <h2>0.16.6</h2> <p>Released on 2026-09-03.</p> <h3>Preview features</h3> <ul> <li>Move <code>pytest-fixture-autouse</code> to the <code>restriction</code> category (<a href="https://redirect.github.com/astral-sh/ruff/pull/28219">#28219</a>)</li> <li>[<code>flake8-pytest-style</code>] Add an autofix for <code>PT020</code> (<a href="https://redirect.github.com/astral-sh/ruff/pull/27993">#27993</a>)</li> <li>[<code>flake8-tidy-imports</code>] Prevent fix loop between <code>TID254</code> and <code>TID255</code> (<a href="https://redirect.github.com/astral-sh/ruff/pull/28262">#28262</a>)</li> <li>[<code>isort</code>] Exclude pragma comments from line length calculation (<code>I001</code>) (<a href="https://redirect.github.com/astral-sh/ruff/pull/27313">#27313</a>)</li> </ul> <h3>Bug fixes</h3> <ul> <li>Validate unary expressions when parsing (<a href="https://redirect.github.com/astral-sh/ruff/pull/28233">#28233</a>)</li> <li>[<code>flake8-async</code>, <code>pylint</code>] Recognize <code>builtins.open</code> (<code>ASYNC230</code>, <code>PLW1514</code>) (<a href="https://redirect.github.com/astral-sh/ruff/pull/28021">#28021</a>)</li> <li>[<code>flake8-bugbear</code>] Fix panic on <code>match</code> subjects (<code>B031</code>) (<a href="https://redirect.github.com/astral-sh/ruff/pull/27781">#27781</a>)</li> <li>[<code>flake8-datetimez</code>] Reject <code>tzinfo=None</code> for <code>datetime</code> bounds (<code>DTZ901</code>) (<a href="https://redirect.github.com/astral-sh/ruff/pull/28022">#28022</a>)</li> <li>[<code>flake8-pytest-style</code>] Avoid duplicate <code>PT017</code> diagnostics (<a href="https://redirect.github.com/astral-sh/ruff/pull/27918">#27918</a>)</li> <li>[<code>ruff</code>] Remove <code>lint.external</code> hint for Ruff-specific suppressions (<code>RUF102</code>) (<a href="https://redirect.github.com/astral-sh/ruff/pull/27923">#27923</a>)</li> </ul> <h3>Rule changes</h3> <ul> <li>[<code>flake8-use-pathlib</code>] Add display-only fix for <code>os.listdir</code> (<code>PTH208</code>) (<a href="https://redirect.github.com/astral-sh/ruff/pull/28027">#28027</a>)</li> </ul> <h3>Documentation</h3> <ul> <li>Add another example and glob reference for <code>lint.per-file-ignores</code> (<a href="https://redirect.github.com/astral-sh/ruff/pull/28106">#28106</a>)</li> <li>Add duplicate work guidance (<a href="https://redirect.github.com/astral-sh/ruff/pull/28229">#28229</a>)</li> <li>[<code>flake8-async</code>] Document thread offloading (<code>ASYNC240</code>) (<a href="https://redirect.github.com/astral-sh/ruff/pull/28008">#28008</a>)</li> <li>[<code>pyupgrade</code>] Clarify default <code>encoding</code> argument handling (<code>UP012</code>) (<a href="https://redirect.github.com/astral-sh/ruff/pull/27315">#27315</a>)</li> </ul> <h3>Other changes</h3> <ul> <li>Allow unary plus in match patterns on Python 3.15 (<a href="https://redirect.github.com/astral-sh/ruff/pull/28231">#28231</a>)</li> </ul> <h3>Contributors</h3> <ul> <li><a href="https://github.com/flying-sheep"><code>@flying-sheep</code></a></li> <li><a href="https://github.com/pikammmmm"><code>@pikammmmm</code></a></li> <li><a href="https://github.com/fly1d"><code>@fly1d</code></a></li> <li><a href="https://github.com/waterWang"><code>@waterWang</code></a></li> <li><a href="https://github.com/Pierre-Sassoulas"><code>@Pierre-Sassoulas</code></a></li> <li><a href="https://github.com/ntBre"><code>@ntBre</code></a></li> <li><a href="https://github.com/jelle-openai"><code>@jelle-openai</code></a></li> <li><a href="https://github.com/ericbuehl"><code>@ericbuehl</code></a></li> <li><a href="https://github.com/tjkuson"><code>@tjkuson</code></a></li> <li><a href="https://github.com/AbhinavMir"><code>@AbhinavMir</code></a></li> <li><a href="https://github.com/Whning0513"><code>@Whning0513</code></a></li> <li><a href="https://github.com/chirizxc"><code>@chirizxc</code></a></li> </ul> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/astral-sh/ruff/commit/22f65a2ab5052990503985c7c794de37598d531e"><code>22f65a2</code></a> Bump 0.16.6 (<a href="https://redirect.github.com/astral-sh/ruff/issues/28280">#28280</a>)</li> <li><a href="https://github.com/astral-sh/ruff/commit/7cc9f1ed53e5ce175f17fde3a75fe792ac41e8cd"><code>7cc9f1e</code></a> [ty] Document <code>CallableTypeKind</code> variants (<a href="https://redirect.github.com/astral-sh/ruff/issues/28277">#28277</a>)</li> <li><a href="https://github.com/astral-sh/ruff/commit/056ce07a895c217dab7929a616540c246cf8a078"><code>056ce07</code></a> Add UV_LOCKED to all workflows (<a href="https://redirect.github.com/astral-sh/ruff/issues/28261">#28261</a>)</li> <li><a href="https://github.com/astral-sh/ruff/commit/6d6e35d03a72d23d3b0f23fb348692b03c9b81b6"><code>6d6e35d</code></a> [<code>flake8-pytest-style</code>] Avoid duplicate <code>PT017</code> diagnostics (<a href="https://redirect.github.com/astral-sh/ruff/issues/27918">#27918</a>)</li> <li><a href="https://github.com/astral-sh/ruff/commit/80b4891b64cb916dce080e8fa15af5c2179d776a"><code>80b4891</code></a> [ty] Temporarily disable tuple types in property tests (<a href="https://redirect.github.com/astral-sh/ruff/issues/28275">#28275</a>)</li> <li><a href="https://github.com/astral-sh/ruff/commit/3f7a54d1d7b9480a18d86a8211bf676354a2f8a0"><code>3f7a54d</code></a> [<code>flake8-tidy-imports</code>] Prevent fix loop between <code>TID254</code> and <code>TID255</code> (<a href="https://redirect.github.com/astral-sh/ruff/issues/28262">#28262</a>)</li> <li><a href="https://github.com/astral-sh/ruff/commit/35656cf37d34f30116d4f4a9cb13853a6ad9fd0d"><code>35656cf</code></a> [ty] Preserve deprecations on decorated callables (<a href="https://redirect.github.com/astral-sh/ruff/issues/28256">#28256</a>)</li> <li><a href="https://github.com/astral-sh/ruff/commit/d2626c866ee08495cfa0da5236e130030d37e0cf"><code>d2626c8</code></a> [ty] Reject missing attributes on <code>type[]</code> aliases (<a href="https://redirect.github.com/astral-sh/ruff/issues/28267">#28267</a>)</li> <li><a href="https://github.com/astral-sh/ruff/commit/ee6a6d19aa0707df942febe9768488d39f383c8c"><code>ee6a6d1</code></a> [ty] Support ParamSpecs in <code>ConstraintSet</code> (<a href="https://redirect.github.com/astral-sh/ruff/issues/28028">#28028</a>)</li> <li><a href="https://github.com/astral-sh/ruff/commit/7f6a170080dab08f754ef086369a2623c70f753d"><code>7f6a170</code></a> [ty] Move bound APIs to constraint owners (<a href="https://redirect.github.com/astral-sh/ruff/issues/28094">#28094</a>)</li> <li>Additional commits viewable in <a href="https://github.com/astral-sh/ruff/compare/0.16.5...0.16.6">compare view</a></li> </ul> </details> <br /> [](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) </details> Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> |
||
|
|
d53c56ab95 |
docs(adr): fill ADR-0002 loader candidate matrix from verified research (#11)
## Requirements (GOV-006) - **ADR-0002** — replaces the TBD candidate matrix with three verified candidates (espressif/elf_loader v1.3.3 primary, igrr/hotreload 0.10.0 secondary/pattern source, self-built contingency) plus per-candidate evaluation evidence, correction log, and candidate priority. Status remains Blocked per development-plan L1: the ADR is only Accepted after full PoC-A evidence. - **TEST-003** — Selection Rule Review adds one clarification probe item for PoC-A: elf_loader's narrow relocation allowlist (RELATIVE/RTLD/GLOB_DAT/JMP_SLOT) couples plugins to its project_so link flags; this is verified as the TEST-003 relocation-allowlist probe, not a rule change. - **GOV-006** — this PR cites the impacted requirement/ADR IDs; research method: librarian primary-source verification 2026-08-31 (repository/commit/issue/doc URLs recorded in the ADR); corrections logged (espressif/esp-elf-loader 404, ARMAnt no results, R_XTENSA_REGISTER nonexistent). ## Scope - Only `_doc/decisions/0002-elf-loader.md` changes; no code, no plan checkboxes. - `uv run frame-doc-links` green; all new links are external http(s). - Gate Impact appends the PoC-A candidate line (primary = espressif/elf_loader v1.3.3+). Co-authored-by: ania-lain <[email protected]> |
||
|
|
68f2d0bcfb |
docs(evidence): record M1 pass (owner confirmed) (#10)
## Summary Flips the decision block in `poc/evidence/m1-20260831/M1-PASS-RECORD.md` from `PENDING OWNER CONFIRMATION` to **M1 Pass recorded (owner confirmed in work session, 2026-08-31 UTC)**. This formally closes milestone M1. - Closes the M1-008 owner-record requirement (single owner edit, exact planned block). - M1-001..M1-008 are all evidenced (manifest verdict PASS); known limitations preserved. - Refs PRs #1, #3-#9. ## Verification - `uv run frame-evidence` green (manifest untouched). - Exactly one file changed, one line replaced. Co-authored-by: ania-lain <[email protected]> |
||
|
|
e8ac2c1c5d |
docs(evidence): complete M1-008 artifacts and draft owner pass record (#9)
## Summary
Completes the remaining M1-008 evidence gaps and drafts the owner pass
record (requirement **M1-008**; heap/stack instrumentation also closes
the M1-006 soak heap-integrity note "internal_free not evaluable").
### Firmware: `metrics` console command (console_service.{cc,hh})
- Machine-parseable `heap internal|psram free=<u> largest=<u>
min_ever=<u>` (heap_caps 8-bit pools) and `task <name>
stack_hwm_bytes=<u>` per FreeRTOS task via `uxTaskGetSystemState` (all
tasks: frame-sd/board/display/prov-mon/console_repl/IDLE/ipc/Tmr
Svc/esp_timer/wifi/tcpip/sys_evt).
- ESP-IDF Xtensa reports the high-water mark directly in bytes
(`StackType_t` = uint8_t), so the unit is documented in the field name
itself.
- Companion one-line sdkconfig change:
`CONFIG_FREERTOS_USE_TRACE_FACILITY=y` (required for
`uxTaskGetSystemState`; necessary build-config companion to the mandated
API).
- No JSONL/display/snapshot changes; no new files; partitions untouched;
clang-format 18.1.8 clean; build 0 warnings.
### Evidence (poc/evidence/m1-20260831/)
- `build/m1_frame_m1_hardware.map` — linker map of the instrumented
build (binary sha256 a0e937ba… pinned in the manifest note).
- `build/m1_size_components.txt` — `idf.py size` summary + `idf.py
size-components` breakdown.
- `build/m1_metrics_samples.txt` — three on-device samples (t≈14 s
boot-ish / post-selftest / post-60 s-idle) + selftest + status --json.
Highlights: internal heap min_ever 123295 B (largest block 53248 B),
PSRAM min_ever 8362016 B, smallest task stack HWM ipc0 552 B,
console_repl 2652 B free of 6144 B, idle drift ~36 B/min.
- `M1-PASS-RECORD.md` — completeness table for every M1-008 artifact
(path+sha256), M1-001..007 one-line acceptance summary, known
limitations; **ships PENDING owner confirmation, does not record Pass**.
- manifest.json: 3 artifact entries (+notes); .gitignore: re-include
`poc/evidence/**/build/` (map/size/metrics), same mechanism as the
existing `!poc/evidence/**/*.log`.
## Requirement refs
- M1-008 (pass-record artifacts: linker map, size-components, heap/stack
metrics, owner record draft)
- M1-006 (heap-integrity: heap free/largest/min-ever + per-task stack
HWM now instrumented)
## Gates
Build 0 warnings (clean rebuild, evidence-logged); ruff format/check,
pyright (0 errors), pytest 31 passed 1 skipped, frame-evidence validated
(1 manifest, 47 artifacts).
Co-authored-by: ania-lain <[email protected]>
|
||
|
|
61a01671cb |
docs(evidence): add M1 board and module marking photos (#8)
## What Archives the two M1 board photos into the evidence set at `poc/evidence/m1-20260831/photos/` (full-resolution JPEGs, 3024x4032, no recompression) and registers both in the run manifest. Same pattern as the status-page photo in #7. ## What the photos show - `board_front_20260831.jpg` — front/button face; silkscreen BOOT / KEY / PWR visible (the buttons driven in the M1 assist windows). - `board_back_module_20260831.jpg` — back face with the module shield: ESPRESSIF logo and marking lines ESP32-S3-WROOM-1 / N16R8 / FCC ID:2AC7Z-ESP32S3WROOM1 / IC:21008-ESP32S3WROOM1 / CMIIT ID:20220P20920 (uncertain reading). ## Cross-check Module marking N16R8 (16 MiB flash, 8 MiB PSRAM) matches the M1-002 boot-log assertions flash=16777216 bytes and psram=8388608 bytes. With this PR the M1-008 photo requirements are complete: status page + board front + module marking. ## Hashes - Front JPEG sha256: `87d232943d4328a15f3d6047fc25d2acd53fea210e29889836df47c44b8c9dcf` (verified byte-identical after copy); HEIC source `20260831_083817376_iOS.heic` sha256: `a849979c49cfcf4c94805309019ce75f39e071f047ff012ec8da9bc068e7deb7`. - Back JPEG sha256: `6576c98d54097f85554f013c34f96922082de96cb7413f654d074d04fe376b60` (verified byte-identical after copy); HEIC source `20260831_083821798_iOS.heic` sha256: `67b0e24720c263653202b92515a15f1bd1e5b4dd3ac8151f64ebac05516d9da2`. The HEIC sources stay out of the repository; filenames and hashes are recorded in the artifact notes. Co-authored-by: ania-lain <[email protected]> Co-authored-by: ania-lain <[email protected]> |
||
|
|
9e24763ce2 |
docs(evidence): add M1 status-page photo (#7)
## What Archives the M1 status-page photo into the evidence set at `poc/evidence/m1-20260831/photos/status_page_20260831.jpg` (full-resolution JPEG, 4032x3024, no recompression) and registers it in the run manifest. ## What the photo shows The live Frame status page on the Waveshare ESP32-S3-RLCD-4.2 after the M1 soak: the UTC+8 time line, KEY/BOOT/RST counters, WiFi `CONNECTED 192.168.50.178`, and TF `READY` / log OK. The on-screen timestamp 16:28:52 UTC+8 correlates with the capture filename epoch 2026-08-31T08:29:02.935Z. ## Hashes - Archived JPEG sha256: `03817e0424452eba786768960645aa9e369bdfef08fe1da9883a7b9b035e82ec` (verified byte-identical after copy) - Original HEIC source `20260831_082902935_iOS.HEIC` sha256: `62b86a8c0316fcd4ef5fbcc3ca59e308982627db5ef18d9b71bf9409cc446b9e` — the HEIC itself stays out of the repository; filename and hash are recorded in the artifact note. ## Schema change (minimal additive) `poc/evidence/schema.json` artifact items gain an optional `note` string so provenance (source file, screen-content summary, timestamp correlation) can travel with the artifact entry; `frame-evidence` needed no code change (generic jsonschema validation) and one test covers the new field. ## Remaining Board and module photos remain TODO for M1-008; this PR only adds the status-page photo. Co-authored-by: ania-lain <[email protected]> |
||
|
|
f5f944bef0 |
feat(m1): local time display and three-button monitoring (#6)
## Summary Two M1 firmware enhancements on the Waveshare ESP32-S3-RLCD-4.2: **Local-time display (UTC+8, fixed offset — China has no DST).** Internal time stays strictly UTC (RTC chip, JSONL `utc`, console `--json` keep the `Z`-suffixed machine format). Only human-facing surfaces convert via the new `board::kLocalUtcOffsetSeconds`: - display RTC line renders `unix + 8*3600` labeled `UTC+8` (split after the date: measured montserrat16 widths 157px + 119px fit the 179px status column; the old one-line layout was already 223px and overflowed) - text `status` and `rtc status` show the labeled UTC+8 line and keep both the raw unix and a UTC line - `rtc set` now takes UTC+8 local time (validates the local calendar round-trip, converts -8h before `set_rtc_time`); help/usage/README updated **Three buttons.** - KEY (GPIO18) unchanged (short <1s / long 1-3s / >=3s portal). - BOOT (GPIO0, strapping pin — input + pull-up, runtime read only): mirrors the KEY 30ms debounce and release bands (short <1s, long >=1s), new `boot_short_presses` / `boot_long_presses`, no portal binding. - RST is hardwired to chip reset, so it is tracked as a persistent boot counter: NVS namespace `frame`, key `rst_cnt`, incremented once per boot after `nvs_flash_init`, exposed as `reset_count`. - Surfaces: display `KEY:a/b BOOT:c/d` + `RST:e` lines, console text + `--json` (`boot_short`, `boot_long`, `reset_count`), JSONL `boot_short`/`boot_long` only — measured 594B worst observed line vs the 640B buffer (46B headroom, gate was >=40B); `reset_count` is static per boot so it is `--json`-only. ## On-device verification (34/34 deterministic asserts PASS + user assist) Evidence: `.omo/evidence/m1wp/tz-buttons-finish-m1-wifi-provisioning.log` - Build 0 warnings; clang-format 18.1.8 clean on whole `main/`. - `rtc status`/text status UTC+8 lines match host `date` +8h (<=3s skew); `rtc set` with a UTC+8 local time round-trips (`1788157541 = 14:25:41 local - 8h`). - JSONL `utc` unchanged UTC-with-Z, crc32c intact, max line 594B < 640. - KEY short press: +1 with BOOT unchanged (user-assisted). BOOT short: +2 (user-assisted). BOOT long: not physically exercised this session — code path is the device-proven KEY band logic (same constants); noted in `.omo/notepads` for the next bench session. - RST/reset_count: host RTS-pulse reboot 3->4 with boot banner; `--json` agrees. - Regressions: wifi auto-connect CONNECTED, tf_logging true, selftest `wifi_config: ok` + `bad ignored`, `prov status` three-state. Co-authored-by: ania-lain <[email protected]> |
||
|
|
e9f8b7386b |
fix(m1): add rtc time sources, responsive status rendering, and key documentation (#5)
## Summary
Fixes three user-reported M1 defects (root causes pre-diagnosed):
1. **RTC permanently invalid** (`-` on screen, `"utc":""` in JSONL, 228x
`ESP_ERR_INVALID_CRC`):
nothing ever wrote the PCF85063, so after power loss its OS (oscillator
stopped) bit stays set.
- `board_service::set_rtc_time(int64_t)`: gmtime_r -> BCD -> multi-byte
I2C write of registers
0x04-0x0A with seconds bit7=0 (clears OS), then re-read confirms; I2C
access serialized
against `read_rtc` with a FreeRTOS mutex (console/SNTP context safe).
- `time_sync` service: on Wi-Fi CONNECTED starts `esp_netif_sntp`
(ntp.aliyun.com +
pool.ntp.org, `CONFIG_LWIP_SNTP_MAX_SERVERS=2`), and once `time()`
passes 2020-01-01 writes
the RTC once per sync (`rtc synced from sntp`).
- Console: `rtc status` (valid/unix/utc/OS bit), `rtc raw` (0x00-0x0A
hex + decode),
`rtc set YYYY-MM-DD HH:MM:SS` (strptime, UTC, range + calendar
round-trip validation).
2. **KEY feels slow**: display rendering was throttled to 10 s.
`display_service::run` now keeps
the 10 s full-render heartbeat (with memory refresh) but adds a 500 ms
fast path that
re-renders as soon as a signature over volatile fields (key counters,
key_pressed, wifi/storage
state, tf_logging_ok, ap_active, ssid_configured, rtc valid+minute)
changes. KEY counter now
appears within ~0.5-1 s.
3. **Which button?**: README now documents that only KEY (GPIO18) is
monitored; RST reboots and
BOOT (GPIO0) does nothing, plus the `rtc` commands, SNTP behavior, and
the CR1220 coin-cell
note (without a battery every power loss clears the clock again).
## On-device evidence
Single-session serial on /dev/ttyACM0 (see
`.omo/evidence/m1wp/rtc-render-fix-finish-m1-wifi-provisioning.log`):
- Post-flash boot auto-connected Wi-Fi and SNTP-synced the RTC before
the console attached
(pre-manual-set `rtc status` already showed real UTC 2026-08-31
05:17:55, OS bit clear).
- `rtc set 2026-08-31 12:00:00` -> `ESP_OK`; `rtc status` valid and
advancing across polls
(12:14:59 -> 12:15:49); JSONL `utc_valid:true` + non-empty `utc` with 10
s cadence and crc32c.
- Explicit RTS reset round captured live: `frame-time: sntp started
(ntp.aliyun.com,
pool.ntp.org)` and `frame-time: rtc synced from sntp (unix 1788154496)`
7.8 s after reset;
device-vs-host time delta 4 s.
- Pre-fix invalid state (OS bit set -> ESP_ERR_INVALID_CRC) is
documented in the prior soak
evidence (F3 log); the fix clears it on the first SNTP sync.
- KEY latency: no user press within the two assist windows;
console-observer polling at 500 ms
shows counters served immediately from the shared snapshot the display
fast path renders
(CITED: `volatile_signature` + 500 ms check in `display_service.cc`), 10
s heartbeat captured
via memory-metric refresh.
- Regression: `status --json` tf_logging=true, wifi=CONNECTED, selftest
`wifi_config: ok`.
Build 0 warnings; clang-format 18 clean;
pytest/ruff/frame-evidence/frame-doc-links green.
Co-authored-by: ania-lain <[email protected]>
|
||
|
|
5bbd2fe6cc |
fix(m1): drive wifi reconnect through the disconnect event (#4)
## Fix The M1 soak (m1-20260831, PR #3) found console `wifi reconnect` never returns to CONNECTED: **0/5 soak cycles + 0/1 controlled repro = 0/6**. Root cause: `wifi_service.cc reconnect()` called `esp_wifi_connect()` while the STA was still associated — IDF v6 rejects it (`sta is connected, disconnect before connecting to new ap`), no `WIFI_EVENT_STA_DISCONNECTED` fires, so the event-driven retry never engaged and the app stayed CONNECTING indefinitely. `reconnect()` now calls `esp_wifi_disconnect()`; the existing disconnect handler drives `esp_wifi_connect()` while `configured_`. Already-idle (`ESP_ERR_WIFI_NOT_CONNECT`) keeps a direct connect. `connect_sta`/`initialize`/portal paths unchanged (already disconnect first). ## On-device re-verify (fixed build, /dev/ttyACM0) - **3/3 cycles** `wifi reconnect` → CONNECTED again in **~10s**, same IP restored (192.168.50.178); telemetry `CONNECTED→DISCONNECTED→CONNECTED` per cycle proves the handler path (DISCONNECTED state is only set by the event handler); IDF log shows `state: init→auth→assoc→run` → `connected` → `sta ip:`; zero `Reconnect failed:` warnings. [PASS-fix-cycle-1..3] - Boot regression: auto-connect GOT_IP, JSONL `ap_setup:false`, `tf_logging:true`. [PASS-fix-boot] ## Evidence amendment `poc/evidence/m1-20260831/manifest.json`: verdict FAIL → **PASS** with the fix commit recorded (`d084276`) and re-verify stats added to metrics; soak artifacts and the historical FAIL notes kept unchanged. `frame-evidence` green. Diff: 5 insertions / 1 deletion in `wifi_service.cc` + manifest note. --------- Co-authored-by: ania-lain <[email protected]> |
||
|
|
b6ed3234a1 |
docs(evidence): add M1 soak and TF transition results (#3)
## M1 soak evidence (1h) + TF/KEY assist windows **Manifest verdict: FAIL — one criterion.** Console `wifi reconnect` never returns to CONNECTED (0/5 soak cycles + 0/1 controlled repro). Root cause: `wifi_service.cc reconnect()` calls `esp_wifi_connect()` while still associated; IDF v6 rejects it (`sta is connected, disconnect before connecting to new ap`), no disconnect event fires, so the event-driven auto-reconnect never engages. Boot auto-connect and the portal path are unaffected (`connect_stored` disconnects first). Fix tracked as a follow-up task. ### Soak metrics (3600s, run m1-20260831T021427Z) | criterion | result | | --- | --- | | JSONL count 360±10 | 358 PASS | | sequence strictly monotonic | 25..384 PASS | | status:FAILED lines | 0 PASS | | reset_reason constant | 11 everywhere PASS | | tf state | READY all samples PASS | | wifi reconnect → CONNECTED | 0/5 **FAIL** | | internal_free decline <15% | N/A (heap not instrumented) | ### Assist windows - W1 KEY ≥3s portal hold: PASS (AP up, auto-recovery to CONNECTED ≤120s) - W1 short/long: +2/+2 exact, no spurious (via retry window) PASS - W2 TF: 2 pull→insert cycles, 4/4 transitions PASS - W3 absent-boot: classified ≤0.9s, DEGRADED never FAILED, logging resumed PASS ### Tooling `frame-m1-capture` gains `--command`/`--command-interval` (periodic `wifi reconnect`) with pytest coverage. Gates: ruff/pyright/pytest/frame-partitions/frame-evidence/frame-doc-links/frame-sbom all green locally. Co-authored-by: ania-lain <[email protected]> |
||
|
|
d73cadbcd6 |
ci: repair first-run workflow failures (#1)
## Root causes (run 33344835245)
| Job | Cause | Fix |
|---|---|---|
| Host GCC compatibility | Runner GCC 13.3 has no `-std=c++26`;
`poc/host` sets `CMAKE_CXX_STANDARD 26` | Install `gcc-14`/`g++-14`, set
`CC`/`CXX` |
| Host branch coverage | `llvm-profdata: command not found` (clang-18
present, LLVM tools absent) | Install `llvm-18`, prepend
`/usr/lib/llvm-18/bin` to PATH |
| ESP-IDF dev firmware | `cmake: command not found` — action overrides
container entrypoint so the IDF env is never sourced | Source `.
/opt/esp/idf/export.sh` in the build step |
| ESP-IDF M1 hardware firmware | same as above | same |
| Repository gates | clang-format v22-formatted sources vs CI
clang-format-18 (console_service.cc:260,300; display_service.cc:31;
status_log.cc:34) | Reformatted with clang-format 18.1.8 semantics; full
dry-run green |
| Gitleaks | No secret finding: the push-event scan range referenced
stale pre-rewrite revision `7bae861` (unknown revision); scan infra
failed | No change — one-time bootstrap artifact; PR/post-merge events
have valid ranges (verified by this run) |
Host Clang ASan/UBSan and Host clang-tidy were already green; `required`
is the aggregate.
Formatting diffs are formatting-only (`struct tm utc_time{}` -> `struct
tm utc_time {}`).
---------
Co-authored-by: ania-lain <[email protected]>
|
||
|
|
2851ac7fc5 |
fix(m1): harden provisioning per F2 review findings
- bound-check the portal option row snprintf against truncation - guard the pending-credential handoff with the provision mutex - selftest now restores (or clears) the saved wifi config instead of wiping it - mark the two conscious error-code ignores |
||
|
|
5f7c60c899 |
feat(m1): hardware status firmware with wifi web provisioning
Add the M1 milestone tree under poc/ (m1_hardware + poc_a apps, shared common components, evidence schema). Merges the plan's 'm1 baseline+fixes' and 'wifi provisioning' batches: the poc/ tree is entirely untracked and both concerns share files. M1 hardware baseline: - landscape ST7305 RIP display via LVGL I1 driver - TF-card status log: JSONL telemetry with CRC32C per line; append buffer widened to line[640] after the 512-byte truncation defect (payload ~550B with real values) was root-caused on-device - PCF85063 RTC read, SHTC3 temperature/humidity with plausibility checks, KEY input with short/long/portal press thresholds - boot-time partition identity check and M1-002 boot record fields (device_id, image_sha256, reset_reason, services status) WiFi web provisioning: - softAP portal Frame-Setup-xxxx with HTTP endpoints /scan, /connect, /clear; httpd handlers never call httpd_stop (deadlock hazard) — a 1s monitor task executes stop/start/connect actions - credentials persist to system_fs wifi.json (littlefs) per the SEC-010 development exception (plaintext, documented in _doc) - fallback: 5 disconnects without IP or 60s no-IP -> stop retry, portal returns; GOT_IP tears the AP down - KEY >=3s hold requests the portal; prov start/stop/status console commands; ap_active/ap_mode_requested surfaces in status JSON/text Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <[email protected]> |
||
|
|
e71bcce56e |
chore(build): reduce root firmware to no-op stub and freeze layout
Retire the product-firmware skeleton until the v4.2 architecture is signed off (README marks the repo draft/PoC): - main/ reduced to a no-op stub (main.cc + CMakeLists registering only main.cc; idf_component.yml with the cjson managed dependency), root app builds clean under both dev and prod presets (IDF v6.0.2) - delete the 13 product components/ files (app_framework, and the display/network/ota/startup_ui/storage service stubs) - freeze root build/layout: CMakeLists.txt, CMakePresets.json, partitions.csv (16 MiB custom layout), sdkconfig.defaults, dependencies.lock, cmake/ helpers - add tooling config: .clang-format, .clang-tidy, .clangd, .devcontainer/, .vscode/ Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <[email protected]> |
||
|
|
a6d6168fd5 |
chore: add community files, CI workflows, and host test tooling
Add the repository-facing scaffolding: - Community/legal: README.md, LICENSE (GPL-3.0-or-later), NOTICE, CONTRIBUTING.md, SECURITY.md, CODE_OF_CONDUCT.md, .gitleaks.toml - CI: .github/ workflows (ci.yml aggregate gate, nightly.yml, codeql.yml), issue/PR templates, dependabot config (pinned Actions per README) - Host tooling: tools/frame_tools (ruff/pyright/pytest gates, partition, evidence-schema, doc-links, SBOM checks), tests/, pyproject.toml, uv.lock - poc/ host side: poc/host contract-test suite (ASan/TSan-capable), poc/README.md, poc/poc-a.code-workspace Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <[email protected]> |
||
|
|
dbb7c13729 |
docs: add v4.2 requirements, plan, and hardware ADRs
Add the v4.2 working documentation set under _doc/: - requirements-v4.2.md and project-v4.2-draft.md (architecture draft) - development-plan.md, project.md, README.md (index/navigation) - decisions/: hardware architecture decision records backing the milestone gates (ST7305 display, PCF85063 RTC, SHTC3 sensor, TF-card JSONL evidence, KEY input, power/boot policy) Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <[email protected]> |
||
|
|
3d2c14c7aa |
chore: ignore agent session state
Append .omo/ and .opencode/ (local coding-agent harness state) to .gitignore so session data can never be staged. Also carries pending hygiene entries (.pytest_cache, .ruff_cache, .mypy_cache, .coverage, coverage/, .venv-idf/) and restores the trailing newline. Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <[email protected]> |
||
|
|
7bae861437 | #add: 完成基础的项目结构搭建 |