Skip to content

Consider reciprocal flag on network when building rota#621

Merged
jakub-id merged 3 commits into
mainfrom
crosslink-290
May 29, 2026
Merged

Consider reciprocal flag on network when building rota#621
jakub-id merged 3 commits into
mainfrom
crosslink-290

Conversation

@jakub-id
Copy link
Copy Markdown
Contributor

No description provided.

Copilot AI review requested due to automatic review settings May 29, 2026 05:50
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Updates Crosslink’s broker-side Directory adapter to take a network-level reciprocal flag into account when deciding whether a supplier tier (free vs paid) is eligible, and extends the Directory OpenAPI schema accordingly.

Changes:

  • Add reciprocal (optional boolean) to the Directory Network schema and the broker’s internal Network model.
  • Extend ApiDirectory.FilterAndSort to require that a tier’s cost is compatible with at least one shared network between requester and supplier.
  • Add tests covering paid vs reciprocal network filtering behavior in rota building.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

File Description
directory/directory_api.yaml Adds reciprocal: boolean to the Network schema so clients can consume the flag.
broker/adapter/directory.go Extends internal Network model with Reciprocal *bool to carry the API field through.
broker/adapter/api_directory.go Applies network reciprocity constraints when matching tiers during FilterAndSort.
broker/test/adapter/api_directory_test.go Adds unit tests verifying paid/reciprocal network constraints affect supplier selection as intended.

Comment thread broker/adapter/api_directory.go
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated no new comments.

@jakub-id jakub-id merged commit 7d67893 into main May 29, 2026
6 of 7 checks passed
@jakub-id jakub-id deleted the crosslink-290 branch May 29, 2026 14:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants