Agent launch-readiness package: one regen (narrated runs + sources ledger + text-drop + WS2 + fabrication law) + 4 new engine bugs + 3 decisions #78

Open
opened 2026-07-15 15:44:41 +00:00 by tim.lingo · 5 comments
Member

One coordinated ask: everything blocking agent market-readiness, in one place

Tim's call: converge this week while your launch sprint is hot. Center of gravity is ONE regen; around it, four fresh engine bugs with evidence, three decisions, and two merges. Patches are in docs/patches/ (pushed today). — Everything below is E2E-evidenced on Tim's machine; happy to pair on any of it.

1. The regen (dist/soul.c) — please carry ALL of these together

What Where State
Narrated runs (live per-round ledger, /api/run-progress) docs/patches/soul-narrated-runs-20260713.patch (247L) + neuron/docs/NARRATED-RUNS-ENGINE-NOTES-20260713.md E2E-verified on test bed since 07-13; app half = PR neuron-ui#125 (clean, ready)
Per-round sources ledger (NEW today) docs/patches/soul-sg-sources-ledger-20260715.patch (35L) Feeds the new app-side source-grounding verifier: every specific claim in an agent deliverable is checked against what the run's tools ACTUALLY returned. First live catch: model fabricated a full forecast from result-teaser snippets — 16/16 invented figures flagged; a later honest run verified 32/32 with zero false alarms. App half on neuron-ui:feat/source-grounding
Text-drop bug (top priority) engine The June bug is back: text interleaved with big search-result blocks gets dropped (empty bullets / silently truncated replies). Not app-fixable
WS2 consent fence review soul branch feat/agent-phase1-soul 01446e6 + docs/specs/BUG-8-engine-consent-fence-for-will.md Adversarially verified 8/8 attack refusals; closes BUG-8. Needs your chat.el review at regen
Fabrication law (stage 2 of source grounding) agentic system instructions The engine's full instruction today is "You have access to tools… Be direct" — zero anti-fabrication language (grep-verified). Add the standing law (never invent facts; cite what you found) + citation plumbing so claims carry sources
Request-body agent_workspace_root read your commit 1b83b18 / issue #75 Test beds still env-only

2. Four fresh engine bugs (found during today's verifier E2E, all reproducible)

(a) Large fs string op corrupts the HTTP response — el_runtime layer. A >120KB read-concat-rewrite inside the agentic loop made /api/chat responses carry valid JSON followed by RAW HEAP BYTES (engram node field names + IEEE doubles visible), response length == the big string's length. App JSON parser crashes → run looks dead while it actually completed. We worked around it (per-round small files — that's why the sources patch writes .sources-<sid>-r<N>.jsonl), but the runtime defect stands. Likely same family as el#70's allocation issues.

(b) Opus 4.8 breaks ALL agentic runs. Its responses produce a message array with a dangling tool_use (API rejects: messages.2: tool_use ids found without tool_result). The one-tool-per-round loop assembly can't handle Opus's response shape; Sonnet 4.6 is fine. This is your new default model — every agent run on defaults fails today. We're adding an app-side guard (agent runs pinned to Sonnet until this is fixed).

(c) Global agentic_conv_history cross-session poisoning. A run parked on the consent bridge (unanswered tool_use) poisons the SHARED history state; subsequent runs from other sessions then die with the same messages.N error until restart. Session-scoped history or history sanitization needed.

(d) App error copy (ours, listed for completeness): both (a)'s parse crash and (b)'s llm error surface as "couldn't reach / check your API key" — we'll fix the copy app-side.

3. Three decisions we need from you

  1. Daemon-owned runs — in v1 or scoped out? Spec: docs/specs/WS3-daemon-owned-runs-for-will.md (22c7b2a). Today an agent run dies if the app quits. Either it lands for launch, or launch copy honestly says "keep Neuron open while it works." Tim needs the call to write the copy.
  2. #71 (fabrication root cause) timing — our verifier now catches the output side deterministically; the generation side is yours. When?
  3. #70 (El toolchain) — with those four compiler defects fixed, we can take soul-side agent work off your plate locally.

4. Merges + prod

  • neuron-ui#125 (live narrated runs, app half) — No Conflicts, review-ready.
  • neuron-ui#121 — conflicted after your wave; we're rebasing it, will ping when clean.
  • BUG-15 prod half (#74): web-search fixes verified in sandbox since 07-11 — prod soul still carries the broken pipeline.

— Neuron (for Tim)

## One coordinated ask: everything blocking agent market-readiness, in one place Tim's call: converge this week while your launch sprint is hot. Center of gravity is ONE regen; around it, four fresh engine bugs with evidence, three decisions, and two merges. Patches are in `docs/patches/` (pushed today). — Everything below is E2E-evidenced on Tim's machine; happy to pair on any of it. ## 1. The regen (dist/soul.c) — please carry ALL of these together | What | Where | State | |---|---|---| | Narrated runs (live per-round ledger, /api/run-progress) | `docs/patches/soul-narrated-runs-20260713.patch` (247L) + `neuron/docs/NARRATED-RUNS-ENGINE-NOTES-20260713.md` | E2E-verified on test bed since 07-13; app half = PR neuron-ui#125 (clean, ready) | | **Per-round sources ledger** (NEW today) | `docs/patches/soul-sg-sources-ledger-20260715.patch` (35L) | Feeds the new app-side **source-grounding verifier**: every specific claim in an agent deliverable is checked against what the run's tools ACTUALLY returned. First live catch: model fabricated a full forecast from result-teaser snippets — 16/16 invented figures flagged; a later honest run verified 32/32 with zero false alarms. App half on `neuron-ui:feat/source-grounding` | | **Text-drop bug** (top priority) | engine | The June bug is back: text interleaved with big search-result blocks gets dropped (empty bullets / silently truncated replies). Not app-fixable | | WS2 consent fence review | soul branch `feat/agent-phase1-soul` `01446e6` + `docs/specs/BUG-8-engine-consent-fence-for-will.md` | Adversarially verified 8/8 attack refusals; closes BUG-8. Needs your chat.el review at regen | | **Fabrication law** (stage 2 of source grounding) | agentic system instructions | The engine's full instruction today is "You have access to tools… Be direct" — zero anti-fabrication language (grep-verified). Add the standing law (never invent facts; cite what you found) + citation plumbing so claims carry sources | | Request-body `agent_workspace_root` read | your commit `1b83b18` / issue #75 | Test beds still env-only | ## 2. Four fresh engine bugs (found during today's verifier E2E, all reproducible) **(a) Large fs string op corrupts the HTTP response — el_runtime layer.** A >120KB read-concat-rewrite inside the agentic loop made /api/chat responses carry valid JSON followed by RAW HEAP BYTES (engram node field names + IEEE doubles visible), response length == the big string's length. App JSON parser crashes → run looks dead while it actually completed. We worked around it (per-round small files — that's why the sources patch writes `.sources-<sid>-r<N>.jsonl`), but the runtime defect stands. Likely same family as el#70's allocation issues. **(b) Opus 4.8 breaks ALL agentic runs.** Its responses produce a message array with a dangling `tool_use` (API rejects: `messages.2: tool_use ids found without tool_result`). The one-tool-per-round loop assembly can't handle Opus's response shape; Sonnet 4.6 is fine. **This is your new default model — every agent run on defaults fails today.** We're adding an app-side guard (agent runs pinned to Sonnet until this is fixed). **(c) Global `agentic_conv_history` cross-session poisoning.** A run parked on the consent bridge (unanswered tool_use) poisons the SHARED history state; subsequent runs from other sessions then die with the same messages.N error until restart. Session-scoped history or history sanitization needed. **(d) App error copy (ours, listed for completeness): both (a)'s parse crash and (b)'s llm error surface as "couldn't reach / check your API key" — we'll fix the copy app-side.** ## 3. Three decisions we need from you 1. **Daemon-owned runs — in v1 or scoped out?** Spec: `docs/specs/WS3-daemon-owned-runs-for-will.md` (`22c7b2a`). Today an agent run dies if the app quits. Either it lands for launch, or launch copy honestly says "keep Neuron open while it works." Tim needs the call to write the copy. 2. **#71 (fabrication root cause) timing** — our verifier now catches the output side deterministically; the generation side is yours. When? 3. **#70 (El toolchain)** — with those four compiler defects fixed, we can take soul-side agent work off your plate locally. ## 4. Merges + prod - **neuron-ui#125** (live narrated runs, app half) — No Conflicts, review-ready. - **neuron-ui#121** — conflicted after your wave; we're rebasing it, will ping when clean. - **BUG-15 prod half (#74)**: web-search fixes verified in sandbox since 07-11 — prod soul still carries the broken pipeline. — Neuron (for Tim)
will.anderson was assigned by tim.lingo 2026-07-15 15:44:41 +00:00
Author
Member

Sweep addendum (same day): two more engine-side data points. (1) URGENT for the streaming/liveness decision: a 6-step research+write ask ran as ONE server-tool call, hit the 300s HTTP budget with 0 bytes received — no partial results, no trail, run lost. Long asks are effectively capped today; streaming or pause-chunking is the real fix. (2) The billing error ('credit balance too low') and the timeout both surface to users as 'check your API key' — we're fixing the app copy, but an engine error-taxonomy field in the reply JSON would let the app be honest cheaply. A third anomaly (app sees empty response at ~60s while the engine's call is still in flight; suspected serialization behind a stuck long call) is being root-caused on an idle brain before we hand it to you. — Neuron (for Tim)

Sweep addendum (same day): two more engine-side data points. (1) URGENT for the streaming/liveness decision: a 6-step research+write ask ran as ONE server-tool call, hit the 300s HTTP budget with 0 bytes received — no partial results, no trail, run lost. Long asks are effectively capped today; streaming or pause-chunking is the real fix. (2) The billing error ('credit balance too low') and the timeout both surface to users as 'check your API key' — we're fixing the app copy, but an engine error-taxonomy field in the reply JSON would let the app be honest cheaply. A third anomaly (app sees empty response at ~60s while the engine's call is still in flight; suspected serialization behind a stuck long call) is being root-caused on an idle brain before we hand it to you. — Neuron (for Tim)
Author
Member

Container-era preserve (2026-07-19): soul-pause-contract-20260716.patch second hunk fixes fs_write reporting {"ok":true} on a FAILED write (BUG-6, false receipt). The pause contract itself is upstreamed via 9a6014d on feat/agent-phase1-soul but that commit does NOT carry the fs_write verification hunk — fold it into the regen so written-file claims stay honest.

Container-era preserve (2026-07-19): soul-pause-contract-20260716.patch second hunk fixes fs_write reporting {"ok":true} on a FAILED write (BUG-6, false receipt). The pause contract itself is upstreamed via 9a6014d on feat/agent-phase1-soul but that commit does NOT carry the fs_write verification hunk — fold it into the regen so written-file claims stay honest.
Author
Member

Receipt Contract — for your ratification (rides your #78 fabrication law + your api_persisted pattern): docs repo specs/RECEIPT-CONTRACT-2026-07-22.md. Basis: 46-agent source audit 2026-07-22 — 135 state-mutating surfaces, 82 report success without checking outcome; your neuron-api.el read-back-before-ok layer is the reference implementation. First two fixes up, E2E-proven on sandbox binaries + contract-gate 27/27, targeting hotfix/elc-source-typos: #100 (chat.el write_file/edit_file false receipts — the mechanical half of #71, and the SAME class as the 07-19 container-era BUG-6 note above: fold-compatible) and #101 (mcp-wrapper delete_by_id fabricated ok, no soul call — served removeKnowledge/deleteProcess/deleteImprint/dischargeWonder). Also queued for you: proxy blind-retry/synthesized-reply (BUG-30), void primitives with no failure signal (engram_strengthen), committed dist lags .el sources by 8 modules. New tonight: ui#195 (BUG-34 P1, app spawns second brain vs live profile). — Tim's session 2026-07-22. 🤖 Generated with Claude Code

Receipt Contract — for your ratification (rides your #78 fabrication law + your api_persisted pattern): docs repo `specs/RECEIPT-CONTRACT-2026-07-22.md`. Basis: 46-agent source audit 2026-07-22 — 135 state-mutating surfaces, 82 report success without checking outcome; your neuron-api.el read-back-before-ok layer is the reference implementation. First two fixes up, E2E-proven on sandbox binaries + contract-gate 27/27, targeting hotfix/elc-source-typos: #100 (chat.el write_file/edit_file false receipts — the mechanical half of #71, and the SAME class as the 07-19 container-era BUG-6 note above: fold-compatible) and #101 (mcp-wrapper delete_by_id fabricated ok, no soul call — served removeKnowledge/deleteProcess/deleteImprint/dischargeWonder). Also queued for you: proxy blind-retry/synthesized-reply (BUG-30), void primitives with no failure signal (engram_strengthen), committed dist lags .el sources by 8 modules. New tonight: ui#195 (BUG-34 P1, app spawns second brain vs live profile). — Tim's session 2026-07-22. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Owner

Receipt Contract — ratified.

Reviewed docs/specs/RECEIPT-CONTRACT-2026-07-22.md against what actually shipped. The contract is sound and accurately governs the honest-receipt behavior now in main — no gap between contract and behavior:

  • Rule 1 (writes return receipts — read-back-verified state or explicit error; never fixed success shapes or echoed input ids). Implemented and merged 2026-08-01 by:
    • #100 — chat.el write_file/edit_file now check fs_write's result and verify old_text is actually present before replacing; they return {"error":...} instead of {"ok":true} on failed or no-op writes (BUG-29).
    • #101 — mcp-wrapper delete_by_id/forget now route to the real /api/neuron/node/delete and read back the tombstone marker before answering ok, else return {"ok":false,"error":"delete_not_persisted"} (BUG-18); previously delete_by_id fabricated {"ok":true,...} with no soul call.
    • Both carry a GATE PASS on the immutability contract gate (PRESENCE 27/27, IMMUTABILITY pass). Honest ok:false on failed/unpersisted writes; no fake success receipts. This matches the contract exactly.
  • Rule 5 (RAM receipts ≠ disk receipts). The durability floor it explicitly defers to (#98 / dc39a61) is now itself closed: 8f8ccc945 persists the canonical snapshot on every write route, so a read-back now backs onto durable state.

Ratified as our standing honesty contract. Its remaining fix-wave rows are the open follow-on work, not blockers on ratification: BUG-30 proxy blind-retry/synthesis (rule 3), BUG-32 thumbs + BUG-21 honest banner (rule 2, app), BUG-31 gateway, BUG-33, and the runtime floors (rule 4 void primitives e.g. engram_strengthen; #71 generation side).

Two housekeeping notes so the ratification is durable:

  • The spec doc currently lives only on branch feat/market-research-ship-the-moat, not on docs main. Recommend flipping its Status line from "proposed … yours to ratify" to "Ratified 2026-08-03 (impl. #100 / #101)" and landing it on docs main.
  • This issue (#78) is a multi-item launch-readiness umbrella, so I am not closing it on the strength of the contract alone — its other rows (Opus-4.8 agentic breakage 2b, text-drop bug, global agentic_conv_history poisoning 2c, the three decisions) remain open. The Receipt-Contract thread specifically is settled: ratified.
**Receipt Contract — ratified.** Reviewed `docs/specs/RECEIPT-CONTRACT-2026-07-22.md` against what actually shipped. The contract is sound and accurately governs the honest-receipt behavior now in main — no gap between contract and behavior: - **Rule 1 (writes return receipts — read-back-verified state or explicit error; never fixed success shapes or echoed input ids).** Implemented and merged 2026-08-01 by: - **#100** — chat.el `write_file`/`edit_file` now check `fs_write`'s result and verify `old_text` is actually present before replacing; they return `{"error":...}` instead of `{"ok":true}` on failed or no-op writes (BUG-29). - **#101** — mcp-wrapper `delete_by_id`/`forget` now route to the real `/api/neuron/node/delete` and read back the tombstone marker before answering ok, else return `{"ok":false,"error":"delete_not_persisted"}` (BUG-18); previously `delete_by_id` fabricated `{"ok":true,...}` with no soul call. - Both carry a GATE PASS on the immutability contract gate (PRESENCE 27/27, IMMUTABILITY pass). Honest `ok:false` on failed/unpersisted writes; no fake success receipts. This matches the contract exactly. - **Rule 5 (RAM receipts ≠ disk receipts).** The durability floor it explicitly defers to (#98 / dc39a61) is now itself closed: **8f8ccc945** persists the canonical snapshot on every write route, so a read-back now backs onto durable state. Ratified as our standing honesty contract. Its remaining fix-wave rows are the open follow-on work, not blockers on ratification: BUG-30 proxy blind-retry/synthesis (rule 3), BUG-32 thumbs + BUG-21 honest banner (rule 2, app), BUG-31 gateway, BUG-33, and the runtime floors (rule 4 void primitives e.g. `engram_strengthen`; #71 generation side). Two housekeeping notes so the ratification is durable: - The spec doc currently lives only on branch `feat/market-research-ship-the-moat`, not on docs `main`. Recommend flipping its Status line from "proposed … yours to ratify" to "Ratified 2026-08-03 (impl. #100 / #101)" and landing it on docs main. - This issue (#78) is a multi-item launch-readiness umbrella, so I am **not** closing it on the strength of the contract alone — its other rows (Opus-4.8 agentic breakage 2b, text-drop bug, global `agentic_conv_history` poisoning 2c, the three decisions) remain open. The Receipt-Contract thread specifically is settled: ratified.
Owner

GROOMING — 2026-08-03
Status: Still tracks live launch-readiness work — text-drop bug and fabrication law are the beta-critical residual; narrated runs + per-round sources ledger + WS2 consent-fence review + four fresh engine bugs (large-fs-string HTTP-response corruption, Opus 4.8 breaking ALL agentic runs, cross-session agentic_conv_history poisoning) remain open, plus three product decisions.
Next action: Will to carry the one dist/soul.c regen (text-drop + fabrication law + narrated runs + sources ledger + WS2 fence) and rule on the three decisions (daemon-owned runs in v1?, #71 timing, request-body agent_workspace_root).
Owner: Will
Priority: BETA-CRITICAL

Receipt-contract obligation (honest ok:false receipts) is RATIFIED and already satisfied by merged #100 (BUG-29) and #101 (BUG-18) — not part of this issue's remaining scope.

Residual for Will — DONE: receipt contract (#100/#101). OPEN: text-drop bug, fabrication law, narrated-runs regen, per-round sources ledger, WS2 consent-fence review, the four engine bugs (a-c engine-side, d is app copy), and the three decisions.

**GROOMING — 2026-08-03** **Status:** Still tracks live launch-readiness work — text-drop bug and fabrication law are the beta-critical residual; narrated runs + per-round sources ledger + WS2 consent-fence review + four fresh engine bugs (large-fs-string HTTP-response corruption, Opus 4.8 breaking ALL agentic runs, cross-session agentic_conv_history poisoning) remain open, plus three product decisions. **Next action:** Will to carry the one dist/soul.c regen (text-drop + fabrication law + narrated runs + sources ledger + WS2 fence) and rule on the three decisions (daemon-owned runs in v1?, #71 timing, request-body agent_workspace_root). **Owner:** Will **Priority:** BETA-CRITICAL Receipt-contract obligation (honest `ok:false` receipts) is RATIFIED and already satisfied by merged #100 (BUG-29) and #101 (BUG-18) — not part of this issue's remaining scope. Residual for Will — DONE: receipt contract (#100/#101). OPEN: text-drop bug, fabrication law, narrated-runs regen, per-round sources ledger, WS2 consent-fence review, the four engine bugs (a-c engine-side, d is app copy), and the three decisions.
will.anderson added the BETA-CRITICAL label 2026-08-03 19:08:08 +00:00
Sign in to join this conversation.
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: neuron-technologies/neuron#78