|
1 | 1 | # BUILD_REPORT |
2 | 2 |
|
3 | 3 | ## sprint objective |
4 | | -Implement Bridge Sprint 1 (`B1`) Hermes provider contract foundation by extending the shipped provider with bridge-phase config normalization, deterministic lifecycle hooks (`prefetch`, `queue_prefetch`, `sync_turn`, `on_session_end`), provider status/readiness validation, and the new automation-oriented MCP prefetch surface `alice_prefetch_context`. |
| 4 | +Implement Bridge Sprint 2 (`B2`) auto-capture pipeline on top of the shipped Hermes provider and B1 contract foundation: candidate extraction, commit policy, mode support (`manual`, `assist`, `auto`), review-queue persistence for non-auto-saved items, and deterministic idempotent/no-op behavior. |
5 | 5 |
|
6 | 6 | ## completed work |
7 | | -- Extended (not replaced) the shipped Hermes Alice provider with bridge contract behavior: |
8 | | - - normalized canonical bridge config keys for lifecycle operation |
9 | | - - preserved legacy config-key compatibility |
10 | | - - added provider status/readiness reporting without live network dependency |
11 | | - - added deterministic session-end flush behavior |
12 | | - - added duplicate-write suppression for repeated `sync_turn` and `on_memory_write` callback execution |
13 | | - - fixed capture-queue worker start race and bounded dedupe behavior to avoid suppressing valid later repeats |
14 | | -- Added MCP tool `alice_prefetch_context` with deterministic prefetch text assembled from existing continuity resumption semantics. |
15 | | -- Updated smoke script to emit provider bridge status/lifecycle readiness evidence. |
16 | | -- Updated install and integration docs for bridge contract keys, lifecycle mapping, compatibility keys, and MCP tool surface. |
17 | | -- Added/updated unit and integration coverage for: |
18 | | - - provider config compatibility and invalid-config status |
19 | | - - deterministic lifecycle dedupe/flush behavior |
20 | | - - MCP tool surface stability including `alice_prefetch_context` |
21 | | -- Aligned control-doc truth checks and active control docs to the current bridge-phase baseline. |
22 | | -- Clarified architecture docs so B2+ capture/review surfaces are marked as planned (not shipped in B1). |
23 | | - |
24 | | -Legacy compatibility keys preserved: |
25 | | -- `prefetch_limit` |
26 | | -- `max_recent_changes` |
27 | | -- `max_open_loops` |
28 | | -- `include_non_promotable_facts` |
29 | | -- `auto_capture` |
30 | | -- `mirror_memory_writes` |
| 7 | +- Added B2 capture pipeline core in Alice continuity: |
| 8 | + - implemented `alice_capture_candidates` extraction from user/assistant turn pairs |
| 9 | + - implemented `alice_commit_captures` commit policy over extracted candidates |
| 10 | + - implemented candidate classes: `decision`, `commitment`, `waiting_for`, `blocker`, `preference`, `correction`, `note`, `no_op` |
| 11 | + - candidate payloads now include confidence, trust class, evidence snippet, and proposed action |
| 12 | +- Implemented commit policy operating modes: |
| 13 | + - `manual`: routes non-`no_op` candidates to review persistence |
| 14 | + - `assist`: auto-saves only explicit high-confidence allowlist candidates |
| 15 | + - `auto`: auto-saves allowlist candidates at the auto-mode confidence gate |
| 16 | +- Implemented policy allowlist and review routing evidence: |
| 17 | + - auto-save allowlist categories: `correction`, `preference`, `decision`, `commitment`, `waiting_for`, `blocker` |
| 18 | + - review-routed categories by type policy: `note` |
| 19 | + - additionally, low-confidence or policy-disallowed candidates route to review under mode gates |
| 20 | +- Added idempotent commit behavior using commit fingerprint + candidate fingerprint lookup to prevent duplicate writes on repeated sync attempts. |
| 21 | +- Added no-op protection so no-op turns (`no_op`) produce no memory writes. |
| 22 | +- Wired new HTTP surfaces: |
| 23 | + - `POST /v0/continuity/captures/candidates` |
| 24 | + - `POST /v0/continuity/captures/commit` |
| 25 | +- Wired new MCP surfaces: |
| 26 | + - `alice_capture_candidates` |
| 27 | + - `alice_commit_captures` |
| 28 | + - preserved existing `alice_capture` and other shipped tools for fallback/manual workflows |
| 29 | +- Wired Hermes provider B2 flow in `sync_turn`: |
| 30 | + - `assist`/`auto` modes now run candidate extraction then commit |
| 31 | + - `manual` mode suppresses automatic `sync_turn` capture |
| 32 | + - fallback to legacy `/v0/continuity/captures` path when B2 endpoints are unavailable |
| 33 | + - preserved dedupe queue and session-end flush behavior |
| 34 | +- Updated sprint-scoped integration docs and smoke script for B2 mode/pipeline truth. |
| 35 | +- Updated control-doc truth checker markers from B1-active to B2-active so required verification reflects active sprint state. |
31 | 36 |
|
32 | 37 | ## incomplete work |
33 | | -- No code deliverable remains incomplete in B1 scope. |
| 38 | +- None in B2 packet scope. |
34 | 39 |
|
35 | 40 | ## files changed |
36 | 41 | - `ARCHITECTURE.md` |
37 | 42 | - `BUILD_REPORT.md` |
38 | 43 | - `PRODUCT_BRIEF.md` |
39 | 44 | - `README.md` |
| 45 | +- `REVIEW_REPORT.md` |
40 | 46 | - `ROADMAP.md` |
41 | | -- `RULES.md` |
42 | | -- `docs/integrations/hermes-memory-provider/plugins/memory/alice/__init__.py` |
| 47 | +- `apps/api/src/alicebot_api/continuity_capture.py` |
| 48 | +- `apps/api/src/alicebot_api/contracts.py` |
| 49 | +- `apps/api/src/alicebot_api/main.py` |
43 | 50 | - `apps/api/src/alicebot_api/mcp_tools.py` |
| 51 | +- `apps/api/src/alicebot_api/store.py` |
| 52 | +- `docs/integrations/hermes-memory-provider/plugins/memory/alice/__init__.py` |
44 | 53 | - `docs/integrations/hermes-memory-provider.md` |
45 | 54 | - `docs/integrations/mcp.md` |
46 | | -- `scripts/check_control_doc_truth.py` |
47 | | -- `scripts/install_hermes_alice_memory_provider.py` |
48 | 55 | - `scripts/run_hermes_memory_provider_smoke.py` |
49 | | -- `tests/unit/test_hermes_memory_provider.py` |
| 56 | +- `scripts/check_control_doc_truth.py` |
| 57 | +- `tests/unit/test_continuity_capture.py` |
| 58 | +- `tests/integration/test_continuity_capture_api.py` |
50 | 59 | - `tests/unit/test_mcp.py` |
51 | | -- `tests/integration/test_mcp_server.py` |
| 60 | +- `tests/unit/test_hermes_memory_provider.py` |
52 | 61 |
|
53 | 62 | ## tests run |
54 | 63 | 1. `python3 scripts/check_control_doc_truth.py` |
55 | 64 | - Result: PASS |
56 | | - - Output: `Control-doc truth check: PASS` |
| 65 | + - Output summary: verified README, ROADMAP, sprint packet, RULES, current state, archive planning marker |
57 | 66 | 2. `./.venv/bin/python -m pytest tests/unit tests/integration -q` |
58 | 67 | - Result: PASS |
59 | | - - Output: `1174 passed in 186.28s (0:03:06)` |
| 68 | + - Output: `1188 passed in 191.85s (0:03:11)` |
60 | 69 | 3. `./.venv/bin/python scripts/run_hermes_memory_provider_smoke.py` |
61 | 70 | - Result: PASS |
62 | 71 | - Output summary: |
63 | 72 | - single external provider enforcement validated |
64 | | - - provider registered with expected tool set |
65 | | - - `structural.bridge_status.ready=true` |
66 | | - - `structural.bridge_status.errors=[]` |
67 | | - - lifecycle hooks status present for `prefetch`, `queue_prefetch`, `sync_turn`, `on_session_end` |
| 73 | + - provider registered with expected tool schemas |
| 74 | + - `bridge_contract_version` reported as `bridge_b2` |
| 75 | + - bridge status `ready=true`, `errors=[]` |
| 76 | + - config includes `bridge_mode=assist` |
| 77 | + - lifecycle hooks report `prefetch`, `queue_prefetch`, `sync_turn`, `on_session_end`, and `bridge_mode` |
68 | 78 |
|
69 | 79 | ## blockers/issues |
70 | 80 | - None. |
71 | 81 |
|
72 | 82 | ## recommended next step |
73 | | -Proceed with reviewer re-check against B1 acceptance criteria using this updated evidence set. |
| 83 | +Run B2 review against acceptance criteria with focus on policy calibration (confidence thresholds) and confirm desired `auto`-mode aggressiveness before promoting B3 review actions. |
0 commit comments