-
-
Notifications
You must be signed in to change notification settings - Fork 5
Provenance
GDShrapt provides provenance for every non‑trivial reference when --explain is used.
Provenance answers the question:
Why does this call site resolve to this symbol?
Tracks how a value acquires its type across assignments, arguments, and returns.
Example: EnemyBase via target at tower_base.gd:L127
EnemyBase (element of Array[EnemyBase]) for enemy in enemies_in_range
ProjectileBase.area_entered -> _on_area_entered(area: Area2D)
GDShrapt:
- Reads signal signature
- Tracks the parameter type
- Enumerates scene instances of that type
(filtered by scene collision_layer)
This removes impossible runtime targets and enables promotion from potential to strict.
Area2D descendants with take_damage: EnemyBasic, EnemyFast, EnemyTank, Entity
Promotion occurs only when all candidates implement the method.
A potential reference is promoted when:
- All runtime types are known
- All implement the target symbol
- Scene filters exclude incompatible nodes
This converts dynamic calls into provably safe edits.
Without provenance, dynamic calls are unsafe to refactor.
With provenance:
- Refactors become deterministic
- Users can audit the proof chain
- CI can trust --apply