[codex] add freenove route parity checker and lightweight workflow #97

Merged
electron-rare merged 1 commits from codex/zacus-issue-94-route-parity-gate into main 2026-02-20 23:55:29 +00:00
electron-rare commented 2026-02-20 23:54:24 +00:00 (Migrated from github.com)

Scope

Implements issue #94 with a low-cost static route parity gate for Freenove WebUI.

Changes

  • Added checker script:
    • hardware/firmware/tools/dev/check_freenove_web_route_parity.py
    • Parses backend routes from g_web_server.on(...) and frontend routes from embedded WebUI calls (fetch(...) and post(...)) in ui_freenove_allinone/src/main.cpp.
    • Fails when a frontend route has no backend route.
  • Added lightweight GitHub workflow:
    • .github/workflows/freenove-route-parity.yml
    • Triggered only when relevant Freenove WebUI/parity files change.
  • Updated spec pointer in:
    • hardware/firmware/hardware/firmware/docs/SPEC_FREENOVE_WEB_ROUTE_PARITY_V1.md

Validation

  • python3 -m py_compile hardware/firmware/tools/dev/check_freenove_web_route_parity.py -> PASS
  • python3 hardware/firmware/tools/dev/check_freenove_web_route_parity.py -> PASS

Notes

## Scope Implements issue #94 with a low-cost static route parity gate for Freenove WebUI. ## Changes - Added checker script: - `hardware/firmware/tools/dev/check_freenove_web_route_parity.py` - Parses backend routes from `g_web_server.on(...)` and frontend routes from embedded WebUI calls (`fetch(...)` and `post(...)`) in `ui_freenove_allinone/src/main.cpp`. - Fails when a frontend route has no backend route. - Added lightweight GitHub workflow: - `.github/workflows/freenove-route-parity.yml` - Triggered only when relevant Freenove WebUI/parity files change. - Updated spec pointer in: - `hardware/firmware/hardware/firmware/docs/SPEC_FREENOVE_WEB_ROUTE_PARITY_V1.md` ## Validation - `python3 -m py_compile hardware/firmware/tools/dev/check_freenove_web_route_parity.py` -> PASS - `python3 hardware/firmware/tools/dev/check_freenove_web_route_parity.py` -> PASS ## Notes - This keeps CI cost low by running a narrow workflow only on relevant path changes. - Closes #94
chatgpt-codex-connector[bot] (Migrated from github.com) reviewed 2026-02-20 23:57:26 +00:00
chatgpt-codex-connector[bot] (Migrated from github.com) left a comment

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: a3a180e0e5

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

### 💡 Codex Review Here are some automated review suggestions for this pull request. **Reviewed commit:** `a3a180e0e5` <details> <summary>ℹ️ About Codex in GitHub</summary> <br/> [Your team has set up Codex to review pull requests in this repo](http://chatgpt.com/codex/settings/general). Reviews are triggered when you - Open a pull request for review - Mark a draft as ready - Comment "@codex review". If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". </details>
@@ -0,0 +23,4 @@
parser = argparse.ArgumentParser(description="Check Freenove WebUI route parity.")
parser.add_argument(
"--source",
default="hardware/firmware/hardware/firmware/ui_freenove_allinone/src/main.cpp",
chatgpt-codex-connector[bot] (Migrated from github.com) commented 2026-02-20 23:57:26 +00:00

P2 Badge Resolve default source path from script directory

The --source default is hardcoded as a repo-root-relative path, so running this tool from hardware/firmware (the standard firmware working directory) resolves to a non-existent location and crashes with FileNotFoundError before any parity result is produced. This makes local use brittle outside CI; computing the default from __file__ (or repo root discovery) would keep behavior consistent regardless of current working directory.

Useful? React with 👍 / 👎.

**<sub><sub>![P2 Badge](https://img.shields.io/badge/P2-yellow?style=flat)</sub></sub> Resolve default source path from script directory** The `--source` default is hardcoded as a repo-root-relative path, so running this tool from `hardware/firmware` (the standard firmware working directory) resolves to a non-existent location and crashes with `FileNotFoundError` before any parity result is produced. This makes local use brittle outside CI; computing the default from `__file__` (or repo root discovery) would keep behavior consistent regardless of current working directory. Useful? React with 👍 / 👎.
Sign in to join this conversation.