Copilot commented on code in PR #1038:
URL: https://github.com/apache/burr/pull/1038#discussion_r4660491271
##########
burr/core/application.py:
##########
@@ -2827,6 +2827,20 @@ def _get_built_graph(self) -> Graph:
)
return self.graph_builder.build()
+ def _validate_graph(self):
+ """Validates the graph against the state a fresh run starts with. This
runs before any
+ persisted state is loaded, so the result does not depend on what has
been saved."""
+ initial_state_keys = set(self.state.keys())
Review Comment:
After a builder loads persisted state, `self.state` retains it, so `build()`
followed by `build(validate=True)` can accept a read key that exists only in
saved state. The same problem affects `abuild()`, violating the promised
persistence-independent validation. When an initializer is configured, validate
using only `default_state` keys, and add a repeated-build regression test.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]