Skip to content

refactor(threads): replace manual enum dispatches with enum_dispatch - #4639

Merged
atuin-bot merged 1 commit into
mainfrom
taylordotfish/harnesstools-dispatch
Nov 3, 2026
Merged

atuin-bot merged 1 commit into
mainfrom
taylordotfish/harnesstools-dispatch

Conversation

@taylordotfish

Copy link
Copy Markdown
Member

Replaces 13 match expressions that simply forwarded to each harness type with auto-generated dispatch impls from enum_dispatch, which harnesstools was already using, but only partially.

Given the speed at which harnesses are being added, it's worth making that process as easy as possibleβ€”instead of updating a dozen-plus match expressions, you only have to implement a few traits.

New extension traits are introduced in some cases, as enum_dispatch works at the trait level rather than the method level.

@greptile-apps

greptile-apps Bot commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge; no actionable issues were found.

Summary

Replaces manual forwarding with enum_dispatch.

  • Harness calls now route through shared traits on AnyHarness.
  • Session capture and import now use shared adapters for harness records.

No actionable issues found. Builds and tests were not run.

Reviews (1) Β· Last reviewed commit: "Replace manual enum dispatches with `enu..." Β· Reviewed by Greptile

@taylordotfish

Copy link
Copy Markdown
Member Author

/merge

@atuin-bot

atuin-bot commented Nov 3, 2026 •

Copy link
Copy Markdown
Collaborator

Landed as 7886d59. GitHub shows this merged once it reaches main.

#4639)

Replaces 13 match expressions that simply forwarded to each harness type with auto-generated dispatch impls from `enum_dispatch`, which harnesstools was already using, but only partially.

Given the speed at which harnesses are being added, it's worth making that process as easy as possibleβ€”instead of updating a dozen-plus match expressions, you only have to implement a few  traits.

New extension traits are introduced in some cases, as `enum_dispatch` works at the trait level rather than the method level.
@atuin-bot
atuin-bot force-pushed the taylordotfish/harnesstools-dispatch branch from a45d34e to 7886d59 Compare November 3, 2026 05:58
@atuin-bot
atuin-bot merged commit 7886d59 into main Nov 3, 2026
2 checks passed
@atuin-bot
atuin-bot deleted the taylordotfish/harnesstools-dispatch branch November 3, 2026 05:58
atuin-bot pushed a commit that referenced this pull request Nov 3, 2026
### Bug Fixes

- *(daemon)* Include pre-session history in session-preload search ([#4536](#4536))
- *(deps)* Bump pulldown-cmark to 0.13.6 for RUSTSEC-2026-0433 ([#4631](#4631))


### Features

- *(api)* Delete a thread with its descendants, and refuse threads under a deleted one
- *(client)* Load ai-session records by id
- *(daemon)* Upload captured threads to octavo
- *(devenv)* A dev shell with CI's toolchain and a sandboxed Atuin ([#4616](#4616))
- *(setup)* New onboarding that asks what to capture and how to search it ([#4637](#4637))
- *(threads)* Add Grok Build session capture, resume, and sync ([#4583](#4583))
- *(threads)* Capture Amp threads through a generic atuin threads push, and import them ([#4635](#4635))
- *(web)* Derive thread state and transcripts, and fake thread rpcs


### Refactor

- *(threads)* Replace manual enum dispatches with `enum_dispatch` ([#4639](#4639))


### Testing

- Keep two tests from reading the real environment ([#4617](#4617))
atuin-bot pushed a commit that referenced this pull request Nov 4, 2026
### Bug Fixes

- *(daemon)* Include pre-session history in session-preload search ([#4536](#4536))
- *(deps)* Bump pulldown-cmark to 0.13.6 for RUSTSEC-2026-0433 ([#4631](#4631))
- *(mcp)* Show the input schema on bad arguments, and accept query and a string as search terms ([#4640](#4640))
- *(scripts)* Run scripts with process's original umask ([#4651](#4651))
- *(threads)* Open written pi and omp sessions on one root, and on a model omp can use ([#4649](#4649))
- *(threads)* Key a Grok tool result by its call, not its output ([#4652](#4652))


### Features

- *(ai)* Remove TERMINAL.md user context ([#4646](#4646))
- *(api)* Delete a thread with its descendants, and refuse threads under a deleted one
- *(client)* Load ai-session records by id
- *(daemon)* Upload captured threads to octavo
- *(devenv)* A dev shell with CI's toolchain and a sandboxed Atuin ([#4616](#4616))
- *(setup)* New onboarding that asks what to capture and how to search it ([#4637](#4637))
- *(setup)* Ask what to import on a screen of its own, with checkboxes and a button to continue ([#4650](#4650))
- *(threads)* Add Grok Build session capture, resume, and sync ([#4583](#4583))
- *(threads)* Capture Amp threads through a generic atuin threads push, and import them ([#4635](#4635))
- *(threads)* Kiro CLI harness ([#4611](#4611))
- *(threads)* Capture Kiro subagents as child sessions ([#4612](#4612))
- *(threads)* Write, fork, continue into and sync Kiro sessions ([#4614](#4614))
- *(threads)* Carry Kiro's write, edit and search tools, and fix its read offset ([#4633](#4633))
- *(web)* Derive thread state and transcripts, and fake thread rpcs


### Miscellaneous Tasks

- Remove vestigial mentions of TERMINAL.md ([#4648](#4648))


### Refactor

- *(threads)* Replace manual enum dispatches with `enum_dispatch` ([#4639](#4639))


### Testing

- Keep two tests from reading the real environment ([#4617](#4617))
eleboucher pushed a commit to eleboucher/homelab that referenced this pull request Nov 4, 2026
…) (#2542)

This PR contains the following updates:

| Package | Update | Change |
|---|---|---|
| [ghcr.io/atuinsh/atuin](https://github.com/atuinsh/atuin) | patch | `18.24.4` β†’ `18.24.5` |

---

### Release Notes

<details>
<summary>atuinsh/atuin (ghcr.io/atuinsh/atuin)</summary>

### [`v18.24.5`](https://github.com/atuinsh/atuin/blob/HEAD/CHANGELOG.md#18245)

[Compare Source](atuinsh/atuin@v18.24.4...v18.24.5)

##### Bug Fixes

- *(daemon)* Include pre-session history in session-preload search ([#&#8203;4536](atuinsh/atuin#4536))
- *(deps)* Bump pulldown-cmark to 0.13.6 for RUSTSEC-2026-0433 ([#&#8203;4631](atuinsh/atuin#4631))
- *(mcp)* Show the input schema on bad arguments, and accept query and a string as search terms ([#&#8203;4640](atuinsh/atuin#4640))
- *(scripts)* Run scripts with process's original umask ([#&#8203;4651](atuinsh/atuin#4651))
- *(threads)* Open written pi and omp sessions on one root, and on a model omp can use ([#&#8203;4649](atuinsh/atuin#4649))
- *(threads)* Key a Grok tool result by its call, not its output ([#&#8203;4652](atuinsh/atuin#4652))

##### Features

- *(ai)* Remove TERMINAL.md user context ([#&#8203;4646](atuinsh/atuin#4646))
- *(api)* Delete a thread with its descendants, and refuse threads under a deleted one
- *(client)* Load ai-session records by id
- *(daemon)* Upload captured threads to octavo
- *(devenv)* A dev shell with CI's toolchain and a sandboxed Atuin ([#&#8203;4616](atuinsh/atuin#4616))
- *(setup)* New onboarding that asks what to capture and how to search it ([#&#8203;4637](atuinsh/atuin#4637))
- *(setup)* Ask what to import on a screen of its own, with checkboxes and a button to continue ([#&#8203;4650](atuinsh/atuin#4650))
- *(threads)* Add Grok Build session capture, resume, and sync ([#&#8203;4583](atuinsh/atuin#4583))
- *(threads)* Capture Amp threads through a generic atuin threads push, and import them ([#&#8203;4635](atuinsh/atuin#4635))
- *(threads)* Kiro CLI harness ([#&#8203;4611](atuinsh/atuin#4611))
- *(threads)* Capture Kiro subagents as child sessions ([#&#8203;4612](atuinsh/atuin#4612))
- *(threads)* Write, fork, continue into and sync Kiro sessions ([#&#8203;4614](atuinsh/atuin#4614))
- *(threads)* Carry Kiro's write, edit and search tools, and fix its read offset ([#&#8203;4633](atuinsh/atuin#4633))
- *(web)* Derive thread state and transcripts, and fake thread rpcs

##### Miscellaneous Tasks

- Remove vestigial mentions of TERMINAL.md ([#&#8203;4648](atuinsh/atuin#4648))

##### Refactor

- *(threads)* Replace manual enum dispatches with `enum_dispatch` ([#&#8203;4639](atuinsh/atuin#4639))

##### Testing

- Keep two tests from reading the real environment ([#&#8203;4617](atuinsh/atuin#4617))

</details>

---

### Configuration

πŸ“… **Schedule**: (UTC)

- Branch creation
  - At any time (no schedule defined)
- Automerge
  - At any time (no schedule defined)

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

β™» **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

πŸ”• **Ignore**: Close this PR and you won't be reminded about these updates again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Mend Renovate CLI](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0NC4xOTkuMiIsInVwZGF0ZWRJblZlciI6IjQ0LjE5OS4yIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->

Reviewed-on: https://git.erwanleboucher.dev/eleboucher/homelab/pulls/2542
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants