Skip to content

refactor(application): add coherent controller snapshot store - #217

Merged
stritti merged 1 commit into
mainfrom
refactor/controller-snapshot-store
Oct 10, 2026
Merged

stritti merged 1 commit into
mainfrom
refactor/controller-snapshot-store

Conversation

@stritti

@stritti stritti commented Oct 4, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds the synchronized read-model store needed to move MQTT, Web and display code away from direct reads of global mutable nodes.

Changes

  • add ControllerSnapshotStore
  • publish/read complete SystemSnapshot values under a short critical section
  • ESP32 uses portMUX; native tests use std::mutex
  • adapters receive copies, never references into mutable controller state
  • add tests for empty state, complete-copy semantics and whole-snapshot replacement
  • update the architecture OpenSpec task list

Why

#170 establishes a single-writer ownership boundary for mutable controller state. This store gives outbound adapters the matching read boundary: one coherent value object instead of individually synchronized fields or direct Nodes.hpp access.

Scope

This PR does not yet migrate MQTT/Web/display call sites. That migration can be done independently once the store exists and the Core-1 runtime publishes the projection.

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.53s
✅ BASH bash-exec 2 0 0 0.43s
✅ BASH shellcheck 2 0 0 0.46s
✅ BASH shfmt 2 0 0 0.01s
✅ C clang-format 1 0 0 0.04s
✅ C cppcheck 1 0 0 0.02s
✅ C cpplint 1 0 0 0.29s
✅ CPP clang-format 94 0 0 0.63s
✅ CPP cppcheck 94 0 0 5.25s
✅ CPP cpplint 94 0 0 6.11s
✅ EDITORCONFIG editorconfig-checker 279 0 0 0.55s
✅ JSON jsonlint 6 0 0 0.15s
✅ JSON v8r 6 0 0 3.8s
⚠️ MARKDOWN markdownlint 107 4 0 3.71s
✅ YAML yamllint 26 0 0 0.75s

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.5%
Branch Coverage 75.0%
Lines Hit/Total 413/835
Branches Hit/Total 180/240

Report from native unit tests (ASan + gcov).

@stritti stritti mentioned this pull request Oct 4, 2026
5 tasks
@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.5%
Branch Coverage 75.0%
Lines Hit/Total 413/835
Branches Hit/Total 180/240

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.5%
Branch Coverage 75.0%
Lines Hit/Total 413/835
Branches Hit/Total 180/240

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.5%
Branch Coverage 75.0%
Lines Hit/Total 413/835
Branches Hit/Total 180/240

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.5%
Branch Coverage 75.0%
Lines Hit/Total 413/835
Branches Hit/Total 180/240

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.6%
Branch Coverage 76.6%
Lines Hit/Total 432/854
Branches Hit/Total 196/256

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
@stritti
stritti force-pushed the refactor/controller-snapshot-store branch from 3a123e2 to e8f4021 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.6%
Branch Coverage 76.6%
Lines Hit/Total 432/854
Branches Hit/Total 196/256

Report from native unit tests (ASan + gcov).

Co-authored-by: stritti <stritti@users.noreply.github.com>
@stritti
stritti force-pushed the refactor/controller-snapshot-store branch from e8f4021 to 186937e Compare October 10, 2026 21:02
@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 52.0%
Branch Coverage 76.9%
Lines Hit/Total 458/880
Branches Hit/Total 200/260

Report from native unit tests (ASan + gcov).

@stritti
stritti merged commit 25a4ade 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