worker: implement session explore extract worker

This commit is contained in:
2026-07-18 10:35:59 +09:00
parent 92a825fd15
commit 7e43c10e2d
12 changed files with 959 additions and 83 deletions
+4 -2
View File
@@ -1,9 +1,11 @@
---
title: 'session-explore feature付きextract workerを実装する'
state: 'planning'
state: 'closed'
created_at: '2026-07-16T04:34:01Z'
updated_at: '2026-07-17T18:10:00Z'
updated_at: '2026-07-18T01:35:46Z'
assignee: null
queued_by: 'yoi ticket'
queued_at: '2026-07-18T01:12:22Z'
---
## 背景
+10
View File
@@ -0,0 +1,10 @@
Implemented the session-explore-backed extract worker.
The extract worker now receives an immutable `SessionReferenceView` snapshot and only the `builtin:session-explore` tool surface. It can search/read bounded evidence, stage one flat candidate per `stage_candidate` call with resolved source anchors, and finish cleanly with `finish_extraction` including the no-candidate path.
Validation passed:
- `cargo fmt --check`
- `cargo test -p worker`
- `cargo test -p memory`
- `nix build .#yoi`
- `yoi ticket doctor`
+97
View File
@@ -57,4 +57,101 @@ Rescoped from broad Overview-first extract implementation to the worker implemen
Design updated: abandon the old batch `write_extracted` / `decisions` / `discussions` / `attempts` / `requests` staging direction. Extract now stages flat candidate records with `stage_candidate` and finishes with `finish_extraction`. The older dependency on 00001KXNYXNM6 is historical; the active schema dependency is 00001KXRM6G0G.
---
<!-- event: intake_summary author: hare at: 2026-07-18T01:12:22Z -->
## Intake summary
Marked ready by `yoi ticket state`.
---
<!-- event: state_changed author: "yoi ticket" at: 2026-07-18T01:12:22Z from: planning to: ready reason: cli_state field: state -->
## State changed
Marked ready by `yoi ticket state`.
---
<!-- event: state_changed author: "yoi ticket" at: 2026-07-18T01:12:22Z from: ready to: queued reason: queued field: state -->
## State changed
Ticket を `yoi ticket` が queued にしました。
---
<!-- event: state_changed author: "yoi ticket" at: 2026-07-18T01:12:22Z from: queued to: inprogress reason: cli_state field: state -->
## State changed
State changed to `inprogress`.
---
<!-- event: implementation_report author: hare at: 2026-07-18T01:35:46Z -->
## Implementation report
Implemented the session-explore-backed memory extract worker.
Changes:
- Added `builtin:session-explore` with `search_evidence`, `read_evidence`, `stage_candidate`, and `finish_extraction`.
- Extract worker now builds an immutable `SessionReferenceView` at extract start and enables only session-explore tools for the internal worker.
- Added overview-first / evidence-index-second extract input rendering over the reference view.
- `stage_candidate` writes one flat staging record per call, resolving evidence ids into bounded staging evidence and `SourceEvidenceRef` anchors.
- `finish_extraction` supports normal no-candidate completion with `staged_count = 0`.
- Updated `memory_extract_system.md` to the session-explore / stage / finish contract.
- Added a single-candidate staging helper in `memory::extract::staging`.
- Updated extract-trigger tests to use `finish_extraction` and added session-explore unit tests.
Validation:
- `cargo fmt --check`
- `cargo test -p worker`
- `cargo test -p memory`
- `nix build .#yoi`
- `yoi ticket doctor`
---
<!-- event: state_changed author: "yoi ticket" at: 2026-07-18T01:35:46Z from: inprogress to: done reason: cli_state field: state -->
## State changed
State changed to `done`.
---
<!-- event: state_changed author: hare at: 2026-07-18T01:35:46Z from: done to: closed reason: closed field: state -->
## State changed
Ticket を closed にしました。
---
<!-- event: close author: hare at: 2026-07-18T01:35:46Z status: closed -->
## 完了
Implemented the session-explore-backed extract worker.
The extract worker now receives an immutable `SessionReferenceView` snapshot and only the `builtin:session-explore` tool surface. It can search/read bounded evidence, stage one flat candidate per `stage_candidate` call with resolved source anchors, and finish cleanly with `finish_extraction` including the no-candidate path.
Validation passed:
- `cargo fmt --check`
- `cargo test -p worker`
- `cargo test -p memory`
- `nix build .#yoi`
- `yoi ticket doctor`
---