Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create a live sanity checker #14

Open
1 task done
mxgrey opened this issue Aug 3, 2024 · 0 comments
Open
1 task done

Create a live sanity checker #14

mxgrey opened this issue Aug 3, 2024 · 0 comments

Comments

@mxgrey
Copy link
Contributor

mxgrey commented Aug 3, 2024

Before proceeding, is there an existing issue or discussion for this?

Description

bevy_impulse is completely event-driven which is good for efficiency, but introduces a non-zero risk that a subtle uncaught bug somewhere in the implementation (perhaps an extremely rare race condition) could cause execution of a workflow to get permanently stuck.

While we strive to not have any bugs at all in the implementation, the reality of the risk should not be ignored. We should implement a system that can periodically audit the ongoing workflows to verify that all activities are running as expected and that no workflows have come to an unexplained stop. If anything is found to be out of order, the affected workflow should be cancelled and the situation should be logged in UnhandledErrors in as much detail as possible.

Things to examine:

  • Can all ongoing scoped sessions reach their terminal nodes?
  • Are all buffers of finished session cleared out?
  • Are all inputs of finished sessions cleared out?
  • Are all finished impulses despawned?

This tool should be applied to every test in the library. We should also make it something that users can configure to run periodically to prevent problematic halts in deployments, although it should not be run very frequently.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Todo
Development

No branches or pull requests

1 participant