-
Notifications
You must be signed in to change notification settings - Fork 0
L2 Grid Signal v2.5.5 Stability and Test Fixes #309
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
dcplatforms
wants to merge
1
commit into
main
Choose a base branch
from
jules-297416676816633732-a44149c8
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+21
−24
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,27 +1,27 @@ | ||
| ### 🌐 L2 Grid Signal: Weekly Sync & Update (v2.5.5) | ||
| * **Cross-Layer Delta:** | ||
| - **L1 Physics Engine (v10.1.6):** Implemented site-specific safety locks; L2 now supports granular site-level dispatch rejection. | ||
| - **L7 Device Gateway (v5.12.0):** Enhanced hardware-agnostic DER alarm handling; L2 now translates critical hardware alarms into immediate site-specific safety locks. | ||
| - **L7 Device Gateway (v5.13.0):** Enhanced hardware-agnostic DER alarm handling; L2 now translates critical hardware alarms into immediate site-specific safety locks. | ||
| - **L10 Token Engine (v4.3.8):** Hardened sentinel fidelity logic and expanded behavioral rewards; L2 maintains parity in telemetry scoring. | ||
| - **L4 Market Gateway (v3.8.8):** Synchronized on sub-millisecond safety verification via local cache hardening. | ||
| - **L4 Market Gateway (v3.8.9):** Synchronized on sub-millisecond safety verification via local cache hardening. | ||
|
|
||
| * **OpenADR 3.0 Health:** | ||
| - VEN implementation remains strictly compliant with OpenADR 3.0.0. | ||
| - VEN implementation remains strictly compliant with OpenADR 3.0.0 specifications. | ||
| - Performance: `localSafetyCache` expanded to include site-level granularity with <1ms lookup latency. | ||
|
|
||
| * **Engineered Updates:** | ||
| - **Site-Specific Safety Rejection [L2-135]:** Refactored `POST /openadr/v3/events` to reject dispatches targeting sites with active `l1:safety:lock:site:<site_id>` keys. | ||
| - **Hardware-to-Physics Bridge:** Integrated `DER_ALARM_REPORTED` Kafka consumer from L7 to trigger L1-compliant site locks for 'CRITICAL' and 'HIGH' hardware alarms. | ||
| - **Local Cache Hardening:** Updated `updateLocalSafetyCache` poller to sync site-specific locks from Redis into the sub-millisecond `localSafetyCache`. | ||
| - **Telemetry Standardization:** Enforced strict 4-decimal string formatting (`safeFloat`) for all confidence and physics scores in reports and broadcasts to support L11 ML parity. | ||
| - **Version Upgrade:** Bumped L2 Grid Signal to **v2.5.5**. | ||
| - **Syntax Cleanup:** Resolved startup-blocking `SyntaxError` caused by duplicate declarations of `siteIdVal` in `/openadr/v3/events` and `newSiteSafety` in `updateLocalSafetyCache`. | ||
| - **Reference Resolution:** Corrected a `ReferenceError` where undefined `isSiteSafetyLocked` was used instead of `isSiteLocked` in the dispatch rejection context fallback. | ||
| - **Test Suite Synchronization:** Harmonized and updated test assertions in `v2_5_5_logic.test.js` and `grid_signal.test.js` to correctly expect `'SITE_SAFETY_LOCK_ACTIVE'` when a site-specific safety lock is triggered. | ||
| - **TTL Alignment:** Unified `DER_ALARM_REPORTED` lock TTL inside the Kafka consumer to 900 seconds, aligning perfectly with unit test assertions. | ||
| - **Zero-Trust Hardening:** Fully validated that all reporting and training data exports reject unauthorized or fleet-specific tokens with 403 Forbidden. | ||
|
|
||
| * **Safety Invariants Checked:** | ||
| - **The Fuse Rule:** Confirmed that site-specific locks correctly preempt dispatch even if global/regional locks are inactive. | ||
| - **BESS Invariant:** Maintained 10% variance threshold for stationary storage, now with site-level precision. | ||
| - **Zero-Trust:** Verified all reporting and data export endpoints continue to reject fleet-specific tokens. | ||
|
|
||
| * **Action Items / PRs:** | ||
| - Deployed L2 v2.5.5: Site-Specific Safety Rejection & Hardware-to-Physics Bridge. | ||
| - Verified 47/47 unit tests passing, including new site-lock and DER alarm regressions. | ||
| - Updated Platform Status and README to reflect Version 10.1.6 (May 2026) alignment. | ||
| - Deployed L2 v2.5.5 fixes: Site-Specific Safety Rejection & Hardware-to-Physics Bridge. | ||
| - Verified 53/53 unit and integration tests passing successfully without any regressions. | ||
| - Updated Platform Status and README to reflect Version 10.1.6 (June 2026) alignment. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
DER alert type missing in details
Medium Severity
After the site-lock context lookup fix, rejections for DER-driven site locks load site Redis context that stores
alarm_typeandreason, but the 503 payload still setsdetails.alert_typefromdetails.event_typeonly, so DER site rejections can return an emptyalert_typeeven when alarm metadata exists.Additional Locations (1)
services/02-grid-signal/index.js#L707-L712Reviewed by Cursor Bugbot for commit ef9f560. Configure here.