Skip to content

Reject split gridpool relations of a market location - #156

Open
cwasicki wants to merge 1 commit into
frequenz-floss:v0.x.xfrom
cwasicki:relation
Open

cwasicki wants to merge 1 commit into
frequenz-floss:v0.x.xfrom
cwasicki:relation

Conversation

@cwasicki

@cwasicki cwasicki commented Dec 1, 2026

Copy link
Copy Markdown
Collaborator

A market location tied to a microgrid joins a gridpool through the three-sided relation. A gridpool relation naming it without the microgrid, next to one naming the microgrid, leaves it unclear whether it trades standalone or as part of the microgrid. Only overlapping relations are rejected, so a market location may move from standalone to a microgrid over time.

@cwasicki
cwasicki requested review from a team as code owners December 1, 2026 16:47
@cwasicki
cwasicki requested review from Linus404 and florian-wagner-frequenz and a balanced review from Copilot and removed request for a team December 1, 2026 16:47
@github-actions github-actions Bot added part:docs Affects the documentation part:tests Affects the unit, integration and performance (benchmarks) tests labels Dec 1, 2026

Copilot AI 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.

🟢 Approval recommended

No active review issues remain for the change rejecting overlapping standalone and microgrid market-location membership.

No open issues 🎉

What changed in this PR

This PR strengthens topology validation by rejecting overlapping relations that place a market location both standalone in a gridpool and within a microgrid. Non-overlapping relations remain valid, allowing transitions over time.

Changes:

  • Add relation-overlap detection and reject ambiguous split gridpool membership.
  • Test overlapping, timeless, adjacent, and disjoint validity periods, including different market participations.
  • Document the constraint in the configuration API and release notes.
File Description
tests/​test_topology.py Tests rejected overlaps and permitted relation combinations.
src/​frequenz/​gridpool/​config/​_topology.py Adds overlap detection and documents the relation constraint.
src/​frequenz/​gridpool/​config/​_assets.py Enforces split-market-location validation during configuration checks.
RELEASE_NOTES.md Announces the stricter validation and migration guidance.

Review effort: Balanced

A market location tied to a microgrid joins a gridpool through the
three-sided relation. A gridpool relation naming it without the
microgrid, next to one naming the microgrid, leaves it unclear whether
it trades standalone or as part of the microgrid. Only overlapping
relations are rejected, so a market location may move from standalone
to a microgrid over time.

Signed-off-by: cwasicki <126617870+cwasicki@users.noreply.github.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

part:docs Affects the documentation part:tests Affects the unit, integration and performance (benchmarks) tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants