Skip to content

refactor(application): add bounded typed controller command queue - #216

Merged
stritti merged 1 commit into
mainfrom
refactor/controller-command-queue
Oct 10, 2026
Merged

stritti merged 1 commit into
mainfrom
refactor/controller-command-queue

Conversation

@stritti

@stritti stritti commented Oct 4, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds the allocation-free queue needed to route adapter requests into the Core-1 application owner without exposing mutable controller objects.

Changes

  • add ControllerCommandQueue with fixed capacity 16
  • queue stores copies of trivially-copyable ControllerCommand values
  • ESP32 synchronization uses a short portMUX critical section
  • native builds use std::mutex
  • add FIFO, full-queue and wrap-around regression tests
  • update the architecture OpenSpec task list

Scope

This PR intentionally does not replace MqttCommandQueue yet. That existing queue is already a production safety boundary introduced by #209. A later migration can translate MQTT/Web/local-UI input into typed commands incrementally and remove the protocol-specific queue only after equivalent coverage exists.

Ownership model

Adapters are producers. The Core-1 application loop is the intended single consumer and single writer of mutable controller/domain state.

Stacked on #214.

@github-actions

github-actions Bot commented Oct 4, 2026 •

Copy link
Copy Markdown
Contributor

✅⚠️MegaLinter analysis: Success with warnings

Descriptor Linter Files Fixed Errors Max errors Warnings Elapsed time
✅ ACTION actionlint 8 0 0 0.76s
✅ BASH bash-exec 2 0 0 0.65s
✅ BASH shellcheck 2 0 0 0.65s
✅ BASH shfmt 2 0 0 0.01s
✅ C clang-format 1 0 0 0.07s
✅ C cppcheck 1 0 0 0.03s
✅ C cpplint 1 0 0 0.35s
✅ CPP clang-format 92 0 0 0.78s
✅ CPP cppcheck 92 0 0 6.54s
✅ CPP cpplint 92 0 0 7.87s
✅ EDITORCONFIG editorconfig-checker 277 0 0 0.83s
✅ JSON jsonlint 6 0 0 0.11s
✅ JSON v8r 6 0 0 4.7s
⚠️ MARKDOWN markdownlint 107 4 0 4.33s
✅ YAML yamllint 26 0 0 0.97s

Detailed Issues

⚠️ MARKDOWN / markdownlint - 4 errors
.opencode/skills/web-ui/SKILL.md:34 error MD028/no-blanks-blockquote Blank line inside blockquote
docs/superpowers/plans/2026-08-10-olimex-c6-local-ui-implementation.md:106:401 error MD013/line-length Line length [Expected: 400; Actual: 452]
docs/superpowers/plans/2026-08-16-norvi-button-calibration.md:7:401 error MD013/line-length Line length [Expected: 400; Actual: 412]
openspec/changes/controller-architecture-contracts/design.md:171:401 error MD013/line-length Line length [Expected: 400; Actual: 448]

Notices

⚠️ Your configuration references items that have been removed from MegaLinter and are ignored: MAKEFILE, MAKEFILE_CHECKMAKE, MARKDOWN_MARKDOWN_LINK_CHECK. See Removed linters to find their replacements.

See detailed reports in MegaLinter artifacts

Your project could benefit from a custom flavor, which would allow you to run only the linters you need, and thus improve runtime performances. (Skip this info by defining FLAVOR_SUGGESTIONS: false)

  • Documentation: Custom Flavors
  • Command: npx mega-linter-runner@10.1.0 --custom-flavor-setup --custom-flavor-linters ACTION_ACTIONLINT,BASH_EXEC,BASH_SHELLCHECK,BASH_SHFMT,C_CPPCHECK,C_CPPLINT,C_CLANG_FORMAT,CPP_CPPCHECK,CPP_CPPLINT,CPP_CLANG_FORMAT,EDITORCONFIG_EDITORCONFIG_CHECKER,JSON_JSONLINT,JSON_V8R,MARKDOWN_MARKDOWNLINT,YAML_YAMLLINT

MegaLinter is provided by OX Security
Show us your support by starring ⭐ the repository

@github-actions

github-actions Bot commented Oct 4, 2026

Copy link
Copy Markdown
Contributor

Native Test Coverage

Metric Value
Line Coverage 49.8%
Branch Coverage 75.2%
Lines Hit/Total 418/840
Branches Hit/Total 182/242

Report from native unit tests (ASan + gcov).

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@github-actions

github-actions Bot commented Oct 4, 2026

Copy link
Copy Markdown
Contributor

Native Test Coverage

Metric Value
Line Coverage 49.8%
Branch Coverage 75.2%
Lines Hit/Total 418/840
Branches Hit/Total 182/242

Report from native unit tests (ASan + gcov).

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@github-actions

github-actions Bot commented Oct 4, 2026

Copy link
Copy Markdown
Contributor

Native Test Coverage

Metric Value
Line Coverage 49.8%
Branch Coverage 75.2%
Lines Hit/Total 418/840
Branches Hit/Total 182/242

Report from native unit tests (ASan + gcov).

2 similar comments
@github-actions

github-actions Bot commented Oct 4, 2026

Copy link
Copy Markdown
Contributor

Native Test Coverage

Metric Value
Line Coverage 49.8%
Branch Coverage 75.2%
Lines Hit/Total 418/840
Branches Hit/Total 182/242

Report from native unit tests (ASan + gcov).

@github-actions

github-actions Bot commented Oct 5, 2026

Copy link
Copy Markdown
Contributor

Native Test Coverage

Metric Value
Line Coverage 49.8%
Branch Coverage 75.2%
Lines Hit/Total 418/840
Branches Hit/Total 182/242

Report from native unit tests (ASan + gcov).

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@github-actions

github-actions Bot commented Oct 6, 2026

Copy link
Copy Markdown
Contributor

Native Test Coverage

Metric Value
Line Coverage 50.9%
Branch Coverage 76.7%
Lines Hit/Total 437/859
Branches Hit/Total 198/258

Report from native unit tests (ASan + gcov).

@stritti
stritti changed the base branch from refactor/controller-architecture-contracts to main October 10, 2026 20:42
Co-authored-by: stritti <stritti@users.noreply.github.com>
@stritti
stritti force-pushed the refactor/controller-command-queue branch from 87e7192 to b879777 Compare October 10, 2026 20:44
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@github-actions

Copy link
Copy Markdown
Contributor

Native Test Coverage

Metric Value
Line Coverage 50.9%
Branch Coverage 76.7%
Lines Hit/Total 437/859
Branches Hit/Total 198/258

Report from native unit tests (ASan + gcov).

@stritti
stritti merged commit f450a5f into main Oct 10, 2026
15 checks passed
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