Skip to content

Sync current main into server consolidation - #58

Merged
masarray merged 63 commits into
agent/complete-server-consolidationfrom
main
Aug 11, 2026
Merged

masarray merged 63 commits into
agent/complete-server-consolidationfrom
main

Conversation

@masarray

Copy link
Copy Markdown
Owner

Mechanical synchronization PR: merge the current main lineage into agent/complete-server-consolidation before final validation of PR #51. This must not introduce new server features; it only brings the consolidation branch current with the latest main commits so conflicts and regressions are caught before #51 is merged.

Merge the validated ESP32-P4 live Sampled Values control runtime as the foundation for the GUI and SCL-driven injector integration.
Merge the validated operator-facing GUI for live ESP32-P4 Sampled Values control onto main.
Merge the completed SCL-driven ESP32-P4 Sampled Values injector flow, including smart profile compilation, GUI deployment, runtime 4000/4800 scheduling, and completion-status documentation.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 056c6a71f8

ℹ️ 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".

Comment on lines +115 to +119
!profile.sample_counter_modulus.has_value()) {
return false;
}
if (profile.asdu_options.refresh_time || profile.asdu_options.security ||
profile.asdu_options.synch_source_id) {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Validate the fixed 4I+4V channel order

For an SCL stream with 16 alternating INT32/Quality leaves but reordered FCDA entries, this loop still returns true because it checks only widths and types. Using the added fixture with the first current and voltage FCDAs swapped, the tool emits deviceSupport:"ready" even though payload slot 0 is U01A.Vol; firmware patch_packet() maps fixed live-channel index 0 (IA) directly to that slot in embedded/esp32p4_smv_injector/main/app_main.cpp, so deployment silently injects current controls into a voltage or other signal. Verify the required IA/IB/IC/IN/UA/UB/UC/UN references and order before reporting the profile as ready.

Useful? React with 👍 / 👎.

Comment on lines +263 to +267
} finally {
state.reader = null;
state.port = null;
setConnected(false);
setRunning(false);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Clear deployment state when the serial session ends

After deploying a profile, disconnecting or rebooting the board leaves profileBridge.deployed true; reconnecting, including to a different device, therefore re-enables Start without redeployment and continues to display the imported profile as armed. Firmware runtime profiles are volatile and reset to defaults in runtime_profile_initialize(), so this can silently start the default stream while the GUI claims the SCL profile is active. Clear the deployment state on disconnect and require redeployment or device-side verification for each serial session.

Useful? React with 👍 / 👎.

Comment on lines +217 to +218
await state.sendChain;
return true;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Propagate serial write failures to callers

When getWriter() or write() rejects, the preceding catch logs the error but resolves state.sendChain, so these lines still return true. A device unplug or port failure during deploySelectedProfile() is consequently treated as successful delivery, allowing the remaining profile commands to continue and leaving the GUI stuck deploying or operating on a partial profile; applyAll() can likewise show success after failed writes. Return false or rethrow after the catch so callers can abort and reset their state.

Useful? React with 👍 / 👎.

@masarray
masarray merged commit f67bba8 into agent/complete-server-consolidation Aug 11, 2026
36 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