Agent web-search/report pipeline: 8 fixes proven on the clean soul — patch ready for main (soul.c + chat.el upstream) #74
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Tim's 'research MSFT + build HTML report' failed silently (real server-side searches ran, zero shown, no report). Root-caused and FIXED on the clean :7798 soul, E2E-proven (full report on disk, all actions visible). Patch:
neuron-container-build/soul-webfix-20260711.patch(185 lines vs origin/main dist/soul.c) — needs your .el-side mirror + regen for main/prod.The 8 fixes, each E2E-verified:
web_searchrequest flag ignored — handle_chat_agentic never attaches the server-side search tool (older deployed binaries had it). Restored, honoring the app's flag.server_tool_useblocks now counted generically by name into tools_used (future server tools appear automatically — code_execution already shows up via the new search variant's dynamic filtering).web_search_20250305(deprecated) → config-driven via state keyweb_search_tool_version, defaultweb_search_20260209; on API rejection falls back to 20250305, logs[soul] DRIFT:+ sets stateweb_search_version_drift(verified with a bogus version end-to-end).web_searchstripped when the server tool is attached (model was picking nondeterministically between the two).container.idon follow-ups or the API 400s; now captured + carried.Also: runtime env
EL_HTTP_TIMEOUT_MS=300000needed for long agentic turns (60s default times out; knob already existed). launch-clean.sh sets it; prod launcher should too.Architecture recommendation (your call): provider-facing literals (model IDs, tool versions, stop reasons, wire shapes) are sprinkled through chat.el — by VBD they belong in one accessor layer with config overrides. Today's drift class keeps recurring until then.
App-side companion: neuron-ui PR #123 (workspace grounding line). Monthly drift audit now in our BACKLOG (next due 2026-08-11).
— Tim + Neuron
Addendum: the sandbox soul now also implements GET/POST /api/safety-contact per issue #97's spec and the app's exact contract (DaemonClient.kt shapes; 988 auto-fill; RFC3339 set_at; persist path env-overridable via SOUL_SAFETY_CONTACT_PATH so clean-profile testing never writes ~/.neuron). Round-trip verified: unset GET -> {configured:false}; POST 988 -> full record + ok; GET -> persists. This unblocked the Hard Bell gate (BUG-5) on the clean profile — main's soul.c still needs your .el-side implementation for prod. Updated patch: neuron-container-build/soul-webfix-20260711.patch superseded by the full diff in ~/soul-fix-build/soul.c (regenerating the .patch file now includes safety-contact + all 8 web fixes).
Second addendum — RUNTIME BUG FOUND during the safety-contact work, worth its own attention: HTTP responses that embed an fs_read string get clamped to the FILE's byte count (Content-Length pinned to file size, body truncated mid-JSON). Reproduced deterministically; survived three dodges (fresh str_slice copy, full rebuild-from-parsed-fields — truncation persisted as long as fs_read ran in the request). Workaround shipped: read the file via exec_capture('cat ...') whose buffer path flows through responses intact. This same aliasing may explain the historical /api/graph/edges emptiness and other truncation ghosts. Suspect: response writer measuring an aliased/stale allocation from fs_read. el_runtime-level fix belongs with you. Sandbox soul now serves valid safety-contact JSON both verbs (strict-validated); Hard Bell gate cleared; tamper-notice dialog fired correctly for the out-of-band change — L1 behaving beautifully.
Second addendum — RUNTIME BUG FOUND during the safety-contact work: HTTP responses embedding an fs_read string get clamped to the FILE's byte count (Content-Length pinned to file size, body truncated mid-JSON). Deterministic; survived three dodges (str_slice copy, rebuild-from-parsed-fields) — truncation persisted whenever fs_read ran in-request. Workaround: read via exec_capture('cat ...'), whose buffers flow through responses intact. May explain historical /api/graph/edges emptiness + other truncation ghosts. el_runtime-level fix belongs with you. Sandbox now serves valid safety-contact JSON both verbs (strict-validated); Hard Bell gate cleared; tamper-notice fired correctly for the out-of-band change — L1 behaving exactly as designed.
Second addendum — RUNTIME BUG FOUND during the safety-contact work, worth separate attention:
HTTP responses that embed an
fs_readstring get clamped to the FILE's byte count — Content-Length pinned to the file's size, body truncated mid-JSON. Deterministic repro; survived three dodges (freshstr_slicecopy, full rebuild-from-parsed-fields) — the truncation persisted as long asfs_readran anywhere in the request. Workaround shipped: read the file viaexec_capture("cat ..."), whose buffer path provably flows through responses intact. This same aliasing may explain the historical/api/graph/edgesemptiness and other truncation ghosts. Suspect: the response writer measuring a stale/aliased allocation fromfs_read. The el_runtime-level fix belongs with you.Status: sandbox soul now serves valid safety-contact JSON on both verbs (strict-validated); the Hard Bell gate cleared; and the tamper-notice dialog fired correctly for the out-of-band contact change — the L1 layer behaving exactly as designed. Full updated patch:
neuron-container-build/soul-webfix-20260711.patch.