Sonalmahajan15/add guard rail to backprop#4
Conversation
There was a problem hiding this comment.
PR Summary
This pull request refactors the backpropagation logic to add guard rails and extra fixpoint tracking, while updating tests to use a centralized comment extraction utility.
• In assertion/function/analyzer.go, analyzeFunc now discards the extra round count returns while still wrapping errors with context.
• In assertion/anonymousfunc/analyzer_test.go, tests were updated to use nilawaytest.FindExpectedValues for closure extraction.
• In assertion/function/assertiontree/backprop.go, BackpropAcrossFunc returns roundCount and stableRoundCount, improving fixpoint diagnostics.
• In assertion/function/assertiontree/parse_expr_producer.go, the index branch now enforces stability using isIndexTrackable checks.
• In assertion/function/assertiontree/root_assertion_node.go, guard rails were added to filter duplicate nodes in LandAtPath.
8 file(s) reviewed, 1 comment(s)
Edit PR Review Bot Settings | Greptile
| ctx, cancel := context.WithCancel(context.Background()) | ||
| defer cancel() | ||
|
|
There was a problem hiding this comment.
style: Using 'defer cancel()' inside the loop may delay context release; consider explicit cancel() after usage to reduce resource retention in long loops.
No description provided.