Skip to content

feat(config): add circular dependency detection to ContractKeySchema …#1029

Open
Eromosele0110 wants to merge 1 commit into
solutions-plug:mainfrom
Eromosele0110:fix/issue-939-contract-key-schema-cycle
Open

feat(config): add circular dependency detection to ContractKeySchema …#1029
Eromosele0110 wants to merge 1 commit into
solutions-plug:mainfrom
Eromosele0110:fix/issue-939-contract-key-schema-cycle

Conversation

@Eromosele0110

Copy link
Copy Markdown

…validation

Implement DFS with 3-color marking to detect circular references between template field placeholders. A template may reference another schema field via {field_name} placeholders (excluding {id}). Cycles are reported with the full dependency path in the validation error.

Adds unit tests for:

  • Two-node cycle detection (market ↔ platform_stats)
  • Three-node cycle detection (market → user_bets → oracle_result → market)
  • Acyclic default configuration validation

Description

Type of Change

  • Bug fix
  • New feature
  • Refactor / code cleanup
  • Documentation update
  • CI / tooling change
  • Breaking change

Testing Done

Checklist

  • Tests pass locally
  • Documentation updated (if applicable)
  • No breaking changes, or breaking changes are documented above

Related Issues

Closes #939

…validation

Implement DFS with 3-color marking to detect circular references between
template field placeholders. A template may reference another schema field
via {field_name} placeholders (excluding {id}). Cycles are reported with
the full dependency path in the validation error.

Adds unit tests for:
- Two-node cycle detection (market ↔ platform_stats)
- Three-node cycle detection (market → user_bets → oracle_result → market)
- Acyclic default configuration validation
@drips-wave

drips-wave Bot commented Jun 29, 2026

Copy link
Copy Markdown

@Eromosele0110 Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

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.

Contract key schema validation missing circular dependency check

2 participants