Summary

  • Add Relationships and Attributes fields to the Scenario struct, enabling scenarios to define their own relationships and attributes in addition to global definitions
  • Process scenario-specific relationships and attributes before running checks in both the development engine (RunWithShape) and the CLI validate command
  • Update coverage calculations to aggregate global and scenario-specific data for accurate coverage reporting
  • Add test cases verifying scenario-specific relationships and attributes in coverage analysis
  • Update four example YAML schemas (custom-roles, banking-system, user-groups, organizations-hierarchies) to demonstrate the new capability

Test plan

  • All existing coverage tests pass (Cases 1-3)
  • New test Case 4 validates scenario-specific relationships are included in coverage calculations
  • New test Case 5 validates scenario-specific attributes are included in coverage calculations
  • Full go build ./... succeeds with no compilation errors
  • Manual testing with permify validate command against updated YAML files
  • Verify backward compatibility: existing YAML files without scenario-specific fields parse and work correctly

/claim #838

🤖 Generated with Claude Code

Summary by CodeRabbit

Release Notes

  • New Features

    • Support for defining attributes and relationships at the scenario level enables more granular test configuration
    • Enhanced coverage tracking now includes condition-based coverage metrics for permission schemas with detailed breakdown of covered and uncovered components
  • Tests

    • Added comprehensive test scenarios for scenario-specific relationships and attributes
    • Expanded test examples demonstrating updated validation and coverage capabilities

Claim

Total prize pool $200
Total paid $0
Status Pending
Submitted February 17, 2026
Last updated February 17, 2026

Contributors

28

285729101

@285729101

100%

Sponsors

PE

Permify.co

@Permify

$200