Class: Rigor::Inference::DefHandle
- Inherits:
-
Data
- Object
- Data
- Rigor::Inference::DefHandle
- Defined in:
- lib/rigor/inference/def_handle.rb
Overview
ADR-85 WD3 — a lazy reference to a Prism::DefNode stored in a cross-file discovery table, in place of
the live node itself. When an incremental recheck rebuilds the discovery index from cached per-file seed
bundles (ADR-85 WD2), the def_nodes / singleton_def_nodes tables carry handles for every unchanged
file's methods: the file was never parsed this run, so there is no live node to store. A handle records
the three things needed to resolve or fingerprint it without the node:
path+node_id— the resolution key. The per-run parse memo (Scope#resolve_def_handle) parses the file once and returns thePrism::DefNodewhosenode_idmatches (Prismnode_idis stable across repeated parses of identical bytes).nameis the cross-check: a resolved node whosenamediffers from the handle's forces a fresh walk (bundle/source skew that the digest gate should make impossible — conservative, never silent).fingerprint— the SHA-256 of the def's source slice, captured when the bundle was built. This letsRunner#symbol_fingerprintsread the change-detection fingerprint (ADR-46 slice 4) off the handle without re-parsing the file — the one value-deref consumer besides the three accessor choke points.
Marshal-clean by construction (Integer + Strings), so it rides the IncrementalSnapshot blob directly.
Instance Attribute Summary collapse
-
#fingerprint ⇒ Object
readonly
Returns the value of attribute fingerprint.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#node_id ⇒ Object
readonly
Returns the value of attribute node_id.
-
#path ⇒ Object
readonly
Returns the value of attribute path.
Instance Attribute Details
#fingerprint ⇒ Object (readonly)
Returns the value of attribute fingerprint
21 22 23 |
# File 'lib/rigor/inference/def_handle.rb', line 21 def fingerprint @fingerprint end |
#name ⇒ Object (readonly)
Returns the value of attribute name
21 22 23 |
# File 'lib/rigor/inference/def_handle.rb', line 21 def name @name end |
#node_id ⇒ Object (readonly)
Returns the value of attribute node_id
21 22 23 |
# File 'lib/rigor/inference/def_handle.rb', line 21 def node_id @node_id end |
#path ⇒ Object (readonly)
Returns the value of attribute path
21 22 23 |
# File 'lib/rigor/inference/def_handle.rb', line 21 def path @path end |