这是一篇由原始材料转换而来的阅读页,保留了源文件的主要结构,并补充了可追溯的来源说明与链接。
Rollback ensures failed or non beneficial changes do not poison the current best known state.
Pattern: Rollback
Purpose
Rollback ensures failed or non-beneficial changes do not poison the current best-known state.
Principle
Autoresearch assumes many experiments will fail. The system must make failure cheap.
When to rollback
Rollback when: - the primary metric gets worse - the run crashes in a way that invalidates the idea - complexity increases without sufficient gain - resource cost rises beyond acceptable bounds - the run violates policy or scope
Keep / discard / retry
These are distinct decisions:
- keep: new best or justified improvement
- discard: valid experiment, but not worth advancing
- retry: execution noise or trivial implementation issue makes one more run reasonable
Retries should be limited.
Implementation strategies
Typical mechanisms: - keep a best-known commit pointer - commit every experiment before running - reset to best-known state after discard - log every rollback decision
Why rollback is essential
Without rollback: - bad changes accumulate - attribution becomes impossible - search quality degrades over time - the system becomes harder to trust
Anti-patterns
- keeping all changes “just in case”
- failing to distinguish crash from discard
- retrying the same weak idea repeatedly
- making rollback manual and inconsistent
Recommendation
Treat rollback as a first-class part of the loop, not as an exception path.
来源与参考
源文件: autoresearch/patterns/rollback.md
来源目录: /srv/project/harness-engineering