brokerd: ask_memory, a built-in memory tool that memoryd runs
Co-Authored-By: ornith-1.5-35b-a3b <agent@wntrmute.dev>
This commit is contained in:
@@ -6,6 +6,7 @@ reviewer adds findings under "Reviews" once per milestone.
|
||||
|
||||
| Task | Date | Status | Gate runs | First gate | Deviations | Notes | Model |
|
||||
|---|---|---|---|---|---|---|---|
|
||||
| M5c2/02-brokerd-ask-memory | 2026-09-28 | done | 1 | pass | none | Copied the given tests from `docs/plans/M5c2/files/crates/brokerd/tests/`: `ask_memory_tool.rs` (new) and new versions of `grants.rs` and `memory_tools.rs`. Step 2 (`cargo build --tests --keep-going -p brokerd`) showed exactly the 11 named failures: one E0432 `unresolved import brokerd::builtin::ASK_MEMORY`, one E0599 for `AskMemory` on `ToolArgs`, nine E0599 for `AskMemory` on `ToolName`; every other target compiled. `cargo test --no-fail-fast` on `grants` and `memory_tools` failed the two named lines (`an_empty_directory_is_a_valid_empty_set`, `grant_files_cannot_name_the_memory_tools_or_take_a_built_in_id`). Made edits A1 (`use bxcore::AskMemoryArgs`), A2 (`ToolName::AskMemory`), A3 (`ask_memory` in `parse`), A4 (`ask_memory` in `as_str`), A5 (`is_memory`), A6 (`ToolArgs::AskMemory`), A7 (`tool()`), A8 (`canonical_json`), A9 (`parse` decodes then runs `check`); B1 (module doc naming the three tools), B2 (`ASK_MEMORY` grant text, `BUILT_IN` sentence naming the three, `sources` with `builtin-ask-memory` last), C1 (`time_limit`), P1 (`matching` takes no constraints), R1 (`runner` no mounts/egress). `cargo check -p brokerd` clean. `cargo test` passes: 9 in `ask_memory_tool`, 17 in `grants`, 4 in `memory_tools`, 5 in `memory_port`, 8 in `runner`. `git diff --stat -- crates/brokerd/src` lists only the five files, not `grants.rs`/`container.rs`/`memory_port.rs`; the other-crates diff is empty. `make gate` printed `gate: ok` with 1381 tests (1380 in `cargo test --workspace`, plus the 1 ignored `end_to_end`; the +9 over the 1372 before is exactly the 9 new `ask_memory_tool` tests). No new dependency, so `Cargo.lock` unchanged. | ornith-1.5-35b-a3b |
|
||||
| M5c2/01-wire-ask-memory | 2026-09-28 | done | 2 | pass | none | Copied the given test `crates/bxcore/tests/ask_memory_args.rs` from `docs/plans/M5c2/files/`. Step 2 (`cargo build --tests --keep-going -p bxcore`) showed exactly the two named failures: E0432 `unresolved import bxcore::AskMemoryArgs` and E0432 for `bxcore::memory::ASK_MEMORY`, `MAX_QUESTION`, `MAX_WORKSPACE_NAME`, `MAX_WORKSPACES`, `OWN_WORKSPACE`; every other target compiled. Made the edits exactly as the task gives: M1 (module doc naming `ask_memory` and the `[honcho]` content rule), M2 (`ASK_MEMORY`), M3 (`MAX_QUESTION` 2000, `MAX_WORKSPACES` 2, `MAX_WORKSPACE_NAME` 512, `OWN_WORKSPACE` "own"), M4 (`AskMemoryArgs { question, workspaces }` with `deny_unknown_fields`, `workspaces` `serde(default)`), M5 (`check` in the fixed order — the question empty then its length in characters, the number of names, then each name empty/form/repeat — and `asked` returning `["own"]` for an empty list), the private `workspace_name`, M6 (`MemoryCall` doc), X1 (`pub use memory::AskMemoryArgs` in lib.rs after the `log` line, leaving the `pub use memory::{...}` block). No `skip_serializing_if` on `AskMemoryArgs`; `grep -c 'skip_serializing_if'` prints 5. `cargo check -p bxcore` clean. `cargo test` passes: 8 in `ask_memory_args`, 6 in `memory_args`, 5 in `memory_wire`. `git diff --stat` lists only lib.rs (1 added) and memory.rs. `make gate` printed `gate: ok` with 1372 tests (1371 in `cargo test --workspace`, plus the 1 ignored `end_to_end` the gate runs separately; the +8 over the 1364 before is exactly the 8 new `ask_memory_args`). No new dependency, so `Cargo.lock` unchanged. | ornith-1.5-35b-a3b |
|
||||
| M5c1/15-memoryd-honcho-began | 2026-09-28 | done | 2 | pass | none | Copied the given tests from `docs/plans/M5c1/files/crates/memoryd/tests/`: the three new `honcho_ledger_began.rs` (5), `honcho_decide_began.rs` (4), `honcho_began_serve.rs` (2) and new versions of `honcho_ledger.rs`, `honcho_ledger_file.rs`, `honcho_decide.rs`, `honcho_turns.rs`, `honcho_naming.rs`, `honcho_serve.rs`, `honcho_mirror.rs`, `honcho_mirror_serve.rs`, `honcho_edits.rs`, `honcho_worker_more.rs`, `honcho_sync.rs` and the support `ledger.rs`, `turns.rs`, `worker.rs` (14 modified, 3 new). Step 2 (`cargo build --tests --keep-going -p memoryd`) showed the 14 named targets not compiling: E0061 (`decide` 5 args, `conclusion` 3), E0432 (`BEFORE_SYNC`), E0559 (`Unconclude` no `peer`), E0599 (no `began`/`begin`/`BeganNotFirst`/`Began`); every other target compiled. Made the edits exactly as the task gives: L1-L13 in `ledger.rs` (`Unconclude.peer`; `Record::Began`; the `BeganNotFirst`/`NotBegun` errors and their two Display lines; the `began`/`records` fields and init, the `first_not_began` check in `open`, the new `began()`, `conclusion` by peer, `check` refusing a second `Began`, `apply` counting records and setting `began`); D1-D5 in `decide.rs` (`Timestamp` import, `BEFORE_SYNC`, the doc, the `began` parameter, the first check on the `User` record's time); T1 (`turns.rs` passing `ledger().began()`); M1 (`mirror.rs` `Unconclude`'s `peer`); W1 (`worker.rs` `conclusion` with `peer`); A1-A2 (`start.rs` imports and `Opened::begin`, writing `Began` once when `began().is_none()`); S1-S2 (`serve.rs` doc and `opened.begin()` after `store.init`, before the sockets). `cargo check -p memoryd` clean after all edits; `cargo test -p memoryd` every suite passes; the other-crates `git diff --stat` is empty. `make gate` printed `gate: ok` with 1345 tests (1344 in `cargo test --workspace`, plus the 1 ignored `end_to_end` the gate runs separately; the +13 over baseline is exactly the 11 in the three new files, 1 more in `honcho_mirror.rs`, 1 more in `honcho_edits.rs`). One `loopd` `pointers` test failed once in a manual full-workspace run under load (`6 passed; 1 failed`) but passes in isolation and in a clean run without my change, and both `make gate` runs printed `gate: ok`: it is a load-dependent flake, not this task (loopd is untouched, the edit is all in memoryd). | ornith-1.5-35b-a3b |
|
||||
| M5c1/14-bxctl-memory-sync | 2026-09-28 | done | 1 | pass | none | Copied the two given tests from `docs/plans/M5c1/files/`: `crates/memoryd/tests/honcho_sync.rs` (from `honcho_sync.rs-task14`) and `crates/bxctl/tests/cli_memory_sync.rs`, and the skeleton `crates/memoryd/src/honcho/report.rs`. Step 2 showed exactly the named failures: `honcho_sync` with 5 (E0432 for `memoryd::honcho::report`, E0432 for `...::ledger::Failure`/`label`, two E0599 for `failures`, one E0599 for the missing `Sync`); `cli_memory_sync` with 6 (all the missing `Sync`). Made X1 (`MemoryCommand::Sync`), B1-B3 (`memory sync` parsed as `Ask::Admin(MemoryCommand::Sync, String::new())`, the module doc), U1 (the usage line), L1-L9 (`Failure { item, time, status, kind }`; `State::Failed { time, status, kind }`; the `fails: Vec<Item>` field, kept in `apply` on every `Failed` record; `failures()` oldest first via `filter_map`; renamed private `describe` to public `label`); R1 (`use crate::honcho::report`; `Mirror::report` under the ledger's lock); H1 (`pub mod report;`); S1/S2 (`Sync` answered with `mirror.report()` or `NOT_CONFIGURED`). Copied the skeleton. The task's U1 code block rendered every line with one extra leading space, but the actual `USAGE` literal uses two spaces before a command and six before its explanation (as `cli::usage_explains_the_speaker_flag` enforces), so I matched those. `cargo check -p memoryd` clean after filling the body: `counts()` for the first line, then when `failures()` is non-empty push `"\nfailed, oldest first:"` and each `format!("\n {} {} {}", time.to_rfc3339(), label(&item), kind)` with ` (HTTP {status})` appended when `status` is `Some`. `cargo test` all pass: `honcho_sync` 4, `honcho_ledger` 12, `honcho_ledger_file` 12, `honcho_worker` 12, `cli_memory_sync` 4, every other suite unchanged. `grep -n 'MemoryCommand::Sync'` prints two lines, `git diff --stat -- crates/loopd crates/brokerd crates/gatewayd Cargo.toml Cargo.lock` prints nothing. `make gate` printed `gate: ok` with 1332 tests (1331 in `cargo test --workspace`, plus the 1 ignored `end_to_end` the gate runs separately). No new dependency, so `Cargo.lock` is unchanged. | ornith-1.5-35b-a3b |
|
||||
|
||||
Reference in New Issue
Block a user