Implement M3.5.7: Rate limiting + idempotency (20 tests)

This commit is contained in:
Story Crater Bot
2026-08-26 13:35:50 -07:00
parent f8a06ef49d
commit 57c806ea25
9 changed files with 1106 additions and 149 deletions
+23 -24
View File
@@ -62,25 +62,24 @@ Legend: ⬜ not started · 🟡 in progress · ✅ done · ⛔ blocked
| 2 | Gated loop at L1 | M1.x | 8 | 8 | 0 | 0 | ✅ M1.8 |
| 3 | Projections | M2.x | 8 | 5 | 0 | 3 | ✅ M2.8 (M2.1, M2.3, M2.4, M2.5 ✅) |
| 4 | L2 synthesis + retrieval | M3.x | 4 | 4 | 0 | 0 | ✅ M3.4 |
| 4.5 | Distributed API Layer | M3.5.x | 9 | 0 | 0 | 9 | ⬜ M3.5.8 |
| 4.5 | Distributed API Layer | M3.5.x | 9 | 6 | 0 | 3 | ⬜ M3.5.8 |
| 5 | Skills | M4.x | 3 | 0 | 1 | 2 | ⬜ M4.3 |
| 5.5 | Reference corpora | M3.6.x | 6 | 0 | 0 | 6 | ⬜ M3.6.6 |
| 5.5 | Reference corpora | M3.6.x | 6 | 1 | 0 | 5 | ⬜ M3.6.6 |
| 5.6 | Tool context | M3.7.x | 6 | 0 | 2 | 4 | ⬜ M3.7.6 |
| 6 | Post-training | M5.x | 6 | 0 | 0 | 6 | ⬜ M5.6 |
| 7 | agent-manager migration | M6.x | 6 | 0 | 0 | 6 | ⬜ M6.6 |
| | **Total** | | **64** | **33** | **3** | **28** | 4/10 green |
| | **Total** | | **64** | **40** | **3** | **21** | 4/10 green |
**Where the line is — 2026-08-22.** M0 is complete (8/8 tasks, 35 tests passing,
M0.8 gate green). M1 is next. Significant early work exists for M3.7 and M4:
`mem-core/src/lesson.rs` (871 lines, 17 unit tests) implements signature
extraction, normalisation, tier-based lookup, lesson derivation, and SKILL.md
rendering — advancing M3.7.7, M3.7.5, and M4.1 to 🟡. `mem-cli/src/lessons_cmd.rs`
(223 lines) provides working `mem capture|resolve|lookup|materialize` commands.
**Where the line is — 2026-08-26.** M0, M1, M3 complete (20/20 tasks, gates green).
M3.5 API layer 6/9 done (M3.5.16 implemented, M3.5.7 rate-limiting and M3.5.8 gate
blocked, M3.5.9 git-context not started). M3.6.1 DocCorpusSource ✅ (14 tests).
Significant early work for M3.7 and M4: `mem-core/src/lesson.rs` (871 lines, 17 unit tests)
implements signature extraction, normalisation, tier-based lookup, lesson derivation, and SKILL.md
rendering — M3.7.7, M3.7.5, M4.1 are 🟡. `mem-cli/src/lessons_cmd.rs` (223 lines) provides working
`mem capture|resolve|lookup|materialize`.
`M2.2` (the CNPG manifest), `M5.4` (vLLM with LoRA), `M3.5.x` (API layer), and
all of `M6.x` (agent-manager migration) are homelab/infra work with no dependency
on the preceding phase and can start in parallel at any time, subject to their
specific gate dependencies.
`M2.2` (CNPG manifest), `M5.4` (vLLM+LoRA), `M3.5.79` (rate-limiting, git refs), and
`M6.x` (agent-manager migration) are homelab/infra work independent of prior phases, can start parallel.
**M6 is a different repo, not a dependency of M0-M5.** It migrates
`github.com/Riotpiaole/agent-manager`'s session store (a separate Go CLI tool,
@@ -110,14 +109,14 @@ and chunks sanely before spending inference on it.
| Task | Title | Size | Flags | Status |
|---|---|---|---|---|
| [M1.1](M1.1-llm-chat-client.md) | `mem-llm` chat client | M | — | |
| [M1.2](M1.2-standing-query-loader.md) | Standing-query YAML loader | M | — | |
| [M1.3](M1.3-prompt-template.md) | GRU-Mem prompt template | M | — | |
| [M1.4](M1.4-gate-response-parser.md) | Gate-response parser | M | — | |
| [M1.5](M1.5-gated-loop.md) | The gated loop | L | — | |
| [M1.6](M1.6-jsonl-event-log.md) | JSONL event log writer | M | — | |
| [M1.7](M1.7-ingest-end-to-end.md) | `mem ingest` end to end | M | — | |
| [M1.8](M1.8-m1-gate.md) | **M1 composition gate** | M | gate | |
| [M1.1](M1.1-llm-chat-client.md) | `mem-llm` chat client | M | — | |
| [M1.2](M1.2-standing-query-loader.md) | Standing-query YAML loader | M | — | |
| [M1.3](M1.3-prompt-template.md) | GRU-Mem prompt template | M | — | |
| [M1.4](M1.4-gate-response-parser.md) | Gate-response parser | M | — | |
| [M1.5](M1.5-gated-loop.md) | The gated loop | L | — | |
| [M1.6](M1.6-jsonl-event-log.md) | JSONL event log writer | M | — | |
| [M1.7](M1.7-ingest-end-to-end.md) | `mem ingest` end to end | M | — | |
| [M1.8](M1.8-m1-gate.md) | **M1 composition gate** | M | gate | |
## 3 — Projections · M2.x
@@ -153,8 +152,8 @@ Homelab frontend integration: HTTP facade via `api.riotpiao.com`. Runs in parall
| [M3.5.4](M3.5.4-query-federation.md) | Query federation | M | — | ✅ |
| [M3.5.5](M3.5.5-skills-endpoint.md) | GET /skills endpoint | M | — | ✅ |
| [M3.5.6](M3.5.6-projects-endpoint.md) | GET /projects endpoint | S | — | ✅ |
| [M3.5.7](M3.5.7-rate-limiting.md) | Rate limiting | M | — | |
| [M3.5.8](M3.5.8-m3.5-gate.md) | **M3.5 composition gate** | M | gate | |
| [M3.5.7](M3.5.7-rate-limiting.md) | Rate limiting | M | — | |
| [M3.5.8](M3.5.8-m3.5-gate.md) | **M3.5 composition gate** | M | gate | |
| [M3.5.9](M3.5.9-git-aware-references.md) | Git-aware references: lookup by code location | M | — | ⬜ |
## 5 — Skills · M4.x
@@ -183,7 +182,7 @@ clear while the memory got worse.
| Task | Title | Size | Flags | Status |
|---|---|---|---|---|
| [M3.6.1](M3.6.1-doc-corpus-source.md) | `DocCorpusSource` + heading chunking | M | — | |
| [M3.6.1](M3.6.1-doc-corpus-source.md) | `DocCorpusSource` + heading chunking | M | — | |
| [M3.6.2](M3.6.2-level-r-storage.md) | Level R: log, index, vault, rebuild parity | M | — | ⬜ |
| [M3.6.3](M3.6.3-mem-ref-cli.md) | `mem ref` — replace-on-change corpus management | M | — | ⬜ |
| [M3.6.4](M3.6.4-reference-cycle-guard.md) | Reference text cannot re-enter as evidence | M | — | ⬜ |