Conversation
The logging is also improved a little by saving reasons
Upstream (Erosika et al.) landed saveMessages=false enforcement at the provider layer (sync_turn, memory mirror, on_session_end, shutdown), superseding this branch's _flush_session gate — dropped in favor of theirs. Kept this branch's injection.sessionStart / explicitObservations controls, subject header + directive, and injection audit log, rewired onto upstream's reworked prefetch flow. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Merge resolution moved the injection config resolvers out of the try/except that used to guard them, so a config without .raw broke init instead of failing open (tests/test_honcho_startup_fail_open.py). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Keeps this PR to the config-key repairs (injection.sessionStart, the injection audit log). The identity-binding header, applying-memory directive, and injection.explicitObservations mode land separately in eugene/first_turn_prompt_configuration. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
૮ >ﻌ< ა ci reviewrunning on db1405a — Merge remote-tracking branch 'origin/main' into eugene/fix-h Still running 2 jobs: ❌ Job failuresCheck contributors / check-attribution · View jobJob Check contributors / check-attribution failed.
|
What does this PR do?
Repairs two Honcho memory plugin config keys that were parsed but never consulted at runtime.
Before this change,
injection.sessionStartand theloggingkey /HONCHO_LOGGINGenv var were accepted by the config parser and then ignored — a caller pinning which context components get injected still received everything, and there was no way to see what memory was actually injected on a given turn or why an injection came back empty.This is the base of a two-PR stack; the follow-up (
eugene/first_turn_prompt_configuration) builds on the session-start rendering added here to shape the first-turn memory prompt.Related Issue
No open issue — found while auditing the Honcho plugin's config handling.
Fixes #
Type of Change
Changes Made
plugins/memory/honcho/__init__.pyinjection.sessionStartis now honoured: a pinned component list filters which context components (summary,peerRepresentation,peerCard,aiRepresentation,aiCard) render at session start. Unset keeps the historical render-everything behaviour; an explicitly empty list injects nothing. Render order is fixed by a component table, independent of the order the list is written in. Suppressed components are logged, not dropped silently.loggingconfig key andHONCHO_LOGGINGenv var (previously no-ops) now enable a JSONL audit at~/.honcho/injection.log;HONCHO_INJECTION_LOGoverrides the destination. Each record captures turn, session key, recall mode, byte count, payload, and the reason, sinceprefetchhas several distinct ways to return an empty string (cron guard, tools-only mode, session not ready, trivial prompt, fetched-but-empty) with opposite fixes. Off by default: the record contains the representation verbatim. Log writes never raise into the agent path.How to Test
pytest tests/honcho_plugin/ -q— all tests pass.HONCHO_LOGGING=1and inspect~/.honcho/injection.log— every turn produces a record with areason, empty-injection turns included.injection.sessionStart: pin e.g.["summary", "peerCard"]and confirm via the audit log that only those components appear in the first-turn payload.Checklist
Code
fix(scope):,feat(scope):, etc.)pytest tests/ -qand all tests passDocumentation & Housekeeping
docs/, docstrings) — or N/A (docstrings; behavior config lives in~/.honcho/config.json, not hermes docs)cli-config.yaml.exampleif I added/changed config keys — or N/A (keys are Honcho plugin config in~/.honcho/config.json;cli-config.yaml.examplehoncho section is unchanged)CONTRIBUTING.mdorAGENTS.mdif I changed architecture or workflows — or N/Aos.path.join/expanduser)Screenshots / Logs
Sample injection audit record (
~/.honcho/injection.log, one JSON object per line):{"ts": "2026-08-24T10:12:03", "turn": 1, "session_key": "abc123", "recall_mode": "auto", "reason": "injected", "bytes": 4821, "payload": "## Session Summary\n..."} {"ts": "2026-08-24T10:12:41", "turn": 2, "session_key": "abc123", "recall_mode": "auto", "reason": "trivial-prompt", "bytes": 0, "payload": ""}