feat(act): add settle() for debounced correlate→drain#424
Merged
Conversation
6c50c7b to
5a4ce77
Compare
…lifecycle event
Consolidates the scheduleDrain()/eventBus pattern (previously reimplemented
in every scaffolded app) into a framework-level settle() method. drain()
remains unchanged as the synchronous single-cycle method for tests/scripts.
- Add SettleOptions type extending DrainOptions
- Add settle() method with debounce, guard, and correlate→drain loop
- Add "settled" lifecycle event emitted when system reaches consistency
- Add stop_settling() for cleanup symmetry with stop_correlations()
- Normalize timer field naming (_correlation_timer, _settle_timer)
- Update skill templates to use app.settle() + app.on("settled")
- Update docs (CLAUDE.md, AGENT.md, README.md)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
5a4ce77 to
303cc4b
Compare
|
🎉 This PR is included in version @rotorsoft/act-v0.16.0 🎉 The release is available on:
Your semantic-release bot 📦🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
app.settle()— a debounced, non-blocking correlate→drain loop that emits a"settled"lifecycle event when the system reaches consistencyscheduleDrain()/eventBuspattern (previously reimplemented in every scaffolded app'shelpers.ts) into the frameworkdrain()remains unchanged as the synchronous single-cycle method for tests/scriptsSettleOptionstype,stop_settling()cleanup method, and normalizes timer field namingTest plan
"settled"event emission, concurrent settle guard, custom optionspnpm typecheckcleanpnpm lintcleanapp.settle()+app.on("settled")pattern in new apps🤖 Generated with Claude Code