Document 2026-10-04 followup fix set in LOOP-MANAGEMENT.md (backfill semantics, final_nudge_target, placement gate, multi-RESULT)
This commit is contained in:
@@ -158,6 +158,42 @@ super loop remediate [--dry-run]
|
|||||||
- `POST /api/box/loop/resolve` → Body: `{"dm_id": "...", "note": "..."}`.
|
- `POST /api/box/loop/resolve` → Body: `{"dm_id": "...", "note": "..."}`.
|
||||||
- `POST /api/box/loop/remediate` → Runs progressive remediation cycle.
|
- `POST /api/box/loop/remediate` → Runs progressive remediation cycle.
|
||||||
|
|
||||||
|
#### Followup record fields & nudge→reply matching (2026-10-04 fix set)
|
||||||
|
|
||||||
|
Followup records in [`followups.json`](file:///home/super/Projects/NetVM/followups.json) carry two fields
|
||||||
|
introduced by the 2026-10-04 reliability fix set (see `docs/SIDECHAT-RELIABILITY.md`):
|
||||||
|
|
||||||
|
- **`thread_uuid` backfill** — when a followup is created but the sidechat thread
|
||||||
|
autoprovisioning failed (no UUID captured), the sweeper retries on each nudge.
|
||||||
|
Once a nudge send succeeds with autoprovisioning (`sidechat_autoprovisioned`
|
||||||
|
in `dm-log.jsonl`), the sweeper backfills `thread_uuid` into the record. Once
|
||||||
|
set, the field is **never overwritten with null** — a followup with a null
|
||||||
|
`thread_uuid` can never match a reply, so it would ghost-nudge then escalate
|
||||||
|
on a thread that never existed.
|
||||||
|
- **`final_nudge_target`** — set to `"main"` when the final nudge routes to the
|
||||||
|
main chat instead of a sidechat (routing policy: nudge in-thread first, main
|
||||||
|
only on the final attempt).
|
||||||
|
|
||||||
|
**Nudge→reply matching matrix** (implemented in `bin/response-harvester.py`):
|
||||||
|
|
||||||
|
| Nudge routing | Reply location | Resolves when |
|
||||||
|
|---|---|---|
|
||||||
|
| In-thread nudge | Assistant reply in the thread whose UUID == `thread_uuid` | UUID match |
|
||||||
|
| Final nudge → main | Assistant reply in main chat | `final_nudge_target == "main"` |
|
||||||
|
| Any | Reply in a different thread | Never auto-resolves (manual `loop close`) |
|
||||||
|
|
||||||
|
The sweeper also backfills `thread_uuid` immediately after a successful nudge
|
||||||
|
send when the send itself autoprovisioned the thread, so later replies match.
|
||||||
|
|
||||||
|
**`dm.py` placement assertion** — before sending to a sidechat, `dm.py` fails
|
||||||
|
closed (loud refusal, no `verified:true`) if the post-navigation browser URL
|
||||||
|
does not contain the target thread UUID. The `"main"` target is exempt. This
|
||||||
|
catches silent `sidechat use` failures and wrong-thread sends.
|
||||||
|
|
||||||
|
**Multi-`[RESULT]` harvesting** — the harvester processes **every** `[RESULT …]`
|
||||||
|
marker in a message (previously only the first), so replies that batch several
|
||||||
|
job results each resolve their followup and trigger their own chain step.
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## 4. Background Services & Daemons
|
## 4. Background Services & Daemons
|
||||||
@@ -212,3 +248,4 @@ python3 -m unittest discover -s tests -v
|
|||||||
- [`tests/test_modulate_strategy.py`](file:///home/super/Projects/NetVM/tests/test_modulate_strategy.py): Hierarchical override cascade and dynamic evaluation.
|
- [`tests/test_modulate_strategy.py`](file:///home/super/Projects/NetVM/tests/test_modulate_strategy.py): Hierarchical override cascade and dynamic evaluation.
|
||||||
- [`tests/test_loop_health_remediation.py`](file:///home/super/Projects/NetVM/tests/test_loop_health_remediation.py): Progressive remediation, diagnostics, and loop reconstruction.
|
- [`tests/test_loop_health_remediation.py`](file:///home/super/Projects/NetVM/tests/test_loop_health_remediation.py): Progressive remediation, diagnostics, and loop reconstruction.
|
||||||
- [`tests/test_main_nav.py`](file:///home/super/Projects/NetVM/tests/test_main_nav.py): Sidechat navigation and Main Chat policy enforcement.
|
- [`tests/test_main_nav.py`](file:///home/super/Projects/NetVM/tests/test_main_nav.py): Sidechat navigation and Main Chat policy enforcement.
|
||||||
|
- [`bin/tests/test_followup_fixes.py`](file:///home/super/Projects/NetVM/bin/tests/test_followup_fixes.py): DM-machinery harness (25 tests) — sweeper backfill, final-nudge routing/marking, harvester matching matrix, multi-`[RESULT]` extraction, and the `dm.py` placement assertion (incl. main-exempt).
|
||||||
|
|||||||
Reference in New Issue
Block a user