Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
4245db6
feat(pkg/go)!: classify validation findings by severity, category and…
SoulPancake Aug 18, 2026
e5663ec
refactor(pkg/go): let each raise site name the part of the model at f…
SoulPancake Aug 21, 2026
cf9a9c9
refactor: inline wireName into String, make IsValid a switch
SoulPancake Aug 25, 2026
edba5c0
refactor(pkg/go): raise validation errors at the point they are found
SoulPancake Aug 28, 2026
799e3fe
refactor(pkg/go): give the wide error constructors struct arguments
SoulPancake Aug 28, 2026
6ac3ca1
refactor(pkg/go)!: restructure validation around findings returned up…
SoulPancake Sep 1, 2026
07a329f
docs(tests): drop stale severity note from shared corpus header
SoulPancake Sep 1, 2026
d3186db
refactor(validation): return errors from phases, drop the Findings type
SoulPancake Sep 3, 2026
7a2f1e6
refactor(validation): keep ExtractAllAs iterative, drop the (*Finding…
SoulPancake Sep 14, 2026
643a12c
refactor(validation): return error from internal validators
SoulPancake Sep 18, 2026
dac4cbd
Merge remote-tracking branch 'origin/develop' into feat/converged-err…
SoulPancake Sep 22, 2026
7610c09
Merge branch 'develop' into feat/converged-error-taxonomy
SoulPancake Sep 22, 2026
f7a75e8
Merge remote-tracking branch 'origin/develop' into feat/converged-err…
SoulPancake Oct 16, 2026
e512853
refactor(validation): simplify name and condition phases, add tests
SoulPancake Oct 19, 2026
4b43c9b
refactor(validation): correct comments and docs, test the phase gates
SoulPancake Oct 19, 2026
09111ff
Merge branch 'develop' into feat/converged-error-taxonomy
SoulPancake Oct 19, 2026
afb2f64
refactor(validation): remove never-emitted codes and converge on shar…
SoulPancake Oct 27, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 1 addition & 9 deletions docs/validation/model/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,31 +21,23 @@ OpenFGA model validation ensures that authorization models are syntactically cor
|------------|------------|---------|---------------|
| `schema-version-required` | Schema | Schema version must be specified | [schema-version-required.md](./schema-version-required.md) |
| `schema-version-unsupported` | Schema | Unsupported schema version | [schema-version-unsupported.md](./schema-version-unsupported.md) |
| `invalid-schema-version` | Schema | Invalid schema version format | [invalid-schema-version.md](./invalid-schema-version.md) |
| `invalid-schema` | Schema | Unsupported or unrecognized schema version | [invalid-schema.md](./invalid-schema.md) |
| `reserved-type-keywords` | Naming | Type name uses reserved keyword | [reserved-type-keywords.md](./reserved-type-keywords.md) |
| `reserved-relation-keywords` | Naming | Relation name uses reserved keyword | [reserved-relation-keywords.md](./reserved-relation-keywords.md) |
| `self-error` | Naming | Invalid use of 'self' or 'this' | [self-error.md](./self-error.md) |
| `invalid-name` | Naming | Invalid type or relation name format | [invalid-name.md](./invalid-name.md) |
| `duplicated-error` | Structure | Duplicate type or relation definition | [duplicated-error.md](./duplicated-error.md) |
| `missing-definition` | Semantic | Referenced type or relation not defined | [missing-definition.md](./missing-definition.md) |
| `undefined-type` | Semantic | Type is referenced but not defined | [undefined-type.md](./undefined-type.md) |
| `undefined-relation` | Semantic | Relation is referenced but not defined | [undefined-relation.md](./undefined-relation.md) |
| `invalid-relation-type` | Semantic | Invalid relation type in reference | [invalid-relation-type.md](./invalid-relation-type.md) |
| `invalid-type` | Semantic | Invalid type in relation definition | [invalid-type.md](./invalid-type.md) |
| `relation-no-entry-point` | Semantic | Relation has no entry point for assignment | [relation-no-entry-point.md](./relation-no-entry-point.md) |
| `cyclic-error` | Semantic | Circular dependency in relations | [cyclic-error.md](./cyclic-error.md) |
| `cyclic-relation` | Semantic | Circular relation dependency detected | [cyclic-relation.md](./cyclic-relation.md) |
| `invalid-relation-on-tupleset` | Structure | Invalid relation in tuple-to-userset | [invalid-relation-on-tupleset.md](./invalid-relation-on-tupleset.md) |
| `tupleuserset-not-direct` | Structure | Tuple-to-userset must have direct assignment | [tupleuserset-not-direct.md](./tupleuserset-not-direct.md) |
| `invalid-wildcard-error` | Wildcard | Invalid wildcard usage in relation | [invalid-wildcard-error.md](./invalid-wildcard-error.md) |
| `assignable-relation-must-have-type` | Wildcard | Assignable relation must specify type | [assignable-relation-must-have-type.md](./assignable-relation-must-have-type.md) |
| `type-wildcard-relation` | Wildcard | Type restriction cannot have wildcard and relation | [type-wildcard-relation.md](./type-wildcard-relation.md) |
| `condition-not-defined` | Condition | Referenced condition is not defined | [condition-not-defined.md](./condition-not-defined.md) |
| `condition-not-used` | Condition | Defined condition is never used | [condition-not-used.md](./condition-not-used.md) |
| `different-nested-condition-name` | Condition | Condition name mismatch in nested structure | [different-nested-condition-name.md](./different-nested-condition-name.md) |
| `multiple-modules-in-file` | Multi-file | Multiple modules detected in single file | [multiple-modules-in-file.md](./multiple-modules-in-file.md) |
| `invalid-schema` | Schema | Invalid schema structure | [invalid-schema.md](./invalid-schema.md) |
| `invalid-syntax` | Syntax | Invalid DSL syntax | [invalid-syntax.md](./invalid-syntax.md) |

## Usage

Expand Down
11 changes: 3 additions & 8 deletions docs/validation/model/TROUBLESHOOTING_GUIDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,42 +9,37 @@ This guide provides quick solutions to common OpenFGA validation errors. For det
| Error | Quick Fix | Link |
|-------|-----------|------|
| `schema-version-required` | Add `schema 1.1` after `model` | [Details](./schema-version-required.md) |
| `undefined-relation` | Define the missing relation or fix typo | [Details](./undefined-relation.md) |
| `undefined-type` | Define the missing type or fix typo | [Details](./undefined-type.md) |
| `missing-definition` | Define the missing relation or fix typo | [Details](./missing-definition.md) |
| `invalid-type` | Define the missing type or fix typo | [Details](./invalid-type.md) |
| `invalid-name` | Use lowercase with underscores only | [Details](./invalid-name.md) |
| `duplicated-error` | Remove or rename duplicate definitions | [Details](./duplicated-error.md) |

### Schema and Structure Issues

| Error | Quick Fix | Link |
|-------|----------------------------------------------|------|
| `invalid-syntax` | Check indentation and keyword spelling | [Details](./invalid-syntax.md) |
| `invalid-schema` | Ensure proper `model` and `schema` structure | [Details](./invalid-schema.md) |
| `invalid-schema` | Declare a recognized version (`1.1` or `1.2`) | [Details](./invalid-schema.md) |
| `schema-version-unsupported` | Use supported version (`1.1` or `1.2`) | [Details](./schema-version-unsupported.md) |
| `invalid-schema-version` | Use format `X.Y` (e.g., `1.1`) | [Details](./invalid-schema-version.md) |

### Relationship and Reference Errors

| Error | Quick Fix | Link |
|-------|-----------|------|
| `relation-no-entry-point` | Add `[user]` or direct assignment | [Details](./relation-no-entry-point.md) |
| `cyclic-relation` | Break circular references | [Details](./cyclic-relation.md) |
| `invalid-relation-type` | Fix `type#relation` syntax | [Details](./invalid-relation-type.md) |
| `tupleuserset-not-direct` | Add direct assignment to tupleset relation | [Details](./tupleuserset-not-direct.md) |

### Naming and Keyword Issues

| Error | Quick Fix | Link |
|-------|-----------|------|
| `self-error` | Don't use `self` or `this` as names | [Details](./self-error.md) |
| `reserved-type-keywords` | Use different type names | [Details](./reserved-type-keywords.md) |
| `reserved-relation-keywords` | Use different relation names | [Details](./reserved-relation-keywords.md) |

### Wildcard and Advanced Features

| Error | Quick Fix | Link |
|-------|-----------|------|
| `invalid-wildcard-error` | Use correct `[type:*]` syntax | [Details](./invalid-wildcard-error.md) |
| `type-wildcard-relation` | Don't mix wildcard with relation | [Details](./type-wildcard-relation.md) |

### 🎯 Condition Errors
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -143,9 +143,8 @@ type document

## Related Errors

- [`invalid-wildcard-error`](./invalid-wildcard-error.md) - General wildcard usage issues
- [`type-wildcard-relation`](./type-wildcard-relation.md) - Conflicting wildcard and relation usage
- [`undefined-type`](./undefined-type.md) - When referenced types don't exist
- [`invalid-type`](./invalid-type.md) - When referenced types don't exist

## Implementation Notes

Expand Down
2 changes: 1 addition & 1 deletion docs/validation/model/condition-not-defined.md
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ condition is_weekday(current_time: timestamp) {

- [`condition-not-used`](./condition-not-used.md) - When conditions are defined but never used
- [`different-nested-condition-name`](./different-nested-condition-name.md) - Condition name mismatches
- [`undefined-relation`](./undefined-relation.md) - Similar pattern for relation references
- [`missing-definition`](./missing-definition.md) - Similar pattern for relation references

## Implementation Notes

Expand Down
178 changes: 0 additions & 178 deletions docs/validation/model/cyclic-error.md

This file was deleted.

Loading
Loading