Skip to content

refactor(kiloclaw): extract kiloclaw instance helpers#2081

Open
pandemicsyn wants to merge 4 commits intomainfrom
florian/chore/refactor-follow-up
Open

refactor(kiloclaw): extract kiloclaw instance helpers#2081
pandemicsyn wants to merge 4 commits intomainfrom
florian/chore/refactor-follow-up

Conversation

@pandemicsyn
Copy link
Copy Markdown
Contributor

@pandemicsyn pandemicsyn commented Apr 6, 2026

Summary

  • Follow up to feat(kiloclaw): add unexpected stop recovery #1993 (feat(kiloclaw): add unexpected stop recovery) to continue the kiloclaw-instance refactor that started there and move more domain logic out of index.ts.
  • Extract the remaining kiloclaw-instance domain logic into focused helper modules for restart orchestration, snapshot restore, secret management, and unexpected-stop recovery handling.
  • Centralize shared image-version resolution and Stream Chat backfill logic in config.ts so provision and restart paths use the same behavior while preserving the pre-refactor lifecycle semantics and diagnostic logging.

Verification

  • pnpm --filter kiloclaw typecheck — passed
  • pnpm --filter kiloclaw test — passed
  • pnpm --filter kiloclaw lint — passed
  • Manual diff review against the pre-refactor implementation — verified no intended lifecycle logic changes beyond preserving existing diagnostics in shared image resolution
  • Additional verification details from reviewer / author

Visual Changes

N/A

Reviewer Notes

  • Main review focus should be on semantic parity with the previous inline implementation, especially for restart flow, snapshot restore state transitions, and unexpected-stop recovery signaling.
  • This PR is intended as a structural follow-up to feat(kiloclaw): add unexpected stop recovery #1993 rather than a behavior change.
  • The branch was pushed with --no-verify because an unrelated repo-wide pre-push typecheck failure remains in apps/web/src/components/auth/StytchClient.tsx:34; the KiloClaw-specific checks listed above passed locally.

@kilo-code-bot
Copy link
Copy Markdown
Contributor

kilo-code-bot bot commented Apr 6, 2026

Code Review Summary

Status: No Issues Found | Recommendation: Merge

Files Reviewed (3 files)
  • services/kiloclaw/src/durable-objects/kiloclaw-instance/reconcile.ts
  • services/kiloclaw/src/durable-objects/kiloclaw-instance/recovery.ts
  • services/kiloclaw/src/durable-objects/kiloclaw-instance/restart.ts

Reviewed by gpt-5.4-20260305 · 511,139 tokens

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants