fix(honcho): scrub private runtime log payloads #375

Merged
pdurlej merged 1 commit from codex/domain/honcho-log-privacy into main 2026-05-18 23:18:31 +02:00
Collaborator

Canary status: missing - security-sensitive Honcho log privacy guard; require full review/checks before merge

Canary Context Pack

Product story

During the 2026-05-18 Gemma/Ollama soak, Honcho logs exposed raw memory/tool-result content during a timeout path. The temporary runtime mitigation was HONCHO_LOG_LEVEL=WARNING, but the platform needs a durable boundary so future Honcho deploys cannot regress into raw private payload logging.

What changed

  • Routes honcho-api and honcho-deriver stdout/stderr through scripts/honcho/honcho_log_sanitize_exec.py before output reaches Docker logs.
  • Sets the Honcho compose log-level default to WARNING while keeping the sanitizer as the actual privacy boundary.
  • Adds scripts/honcho/check_honcho_log_privacy.py for synthetic marker/log checks.
  • Adds tests proving JSON/private payload fields and secret-shaped values are redacted while metadata survives.
  • Documents verification and rollback in the Honcho Gemma/Ollama runbook and closeout plan.

Why it changed

Config-only mitigation is fragile. The entrypoint wrapper provides a platform-owned guard even when the upstream app or provider client emits raw prompt/memory/tool payloads.

Files touched

  • compose/apps/compose.yaml
  • scripts/honcho/honcho_log_sanitize_exec.py
  • scripts/honcho/check_honcho_log_privacy.py
  • tests/test_honcho_log_privacy.py
  • runbooks/honcho-ollama-gemma-switch.md
  • state/cutover/honcho-closeout-plan.md

Relevant context

  • Issue #371: Honcho raw memory/tool-result content in runtime logs.
  • Honcho closeout plan H3: durable log privacy PR; config-only is not enough.
  • Current LLM switch keeps embeddings on OpenAI; this PR does not alter provider or embedding config.

Runtime evidence

No production mutation was performed by this PR. Runtime evidence before this fork remained green: Honcho API/Deriver healthy, 0 unhealthy containers, and no deploy-runner pickup regression. This PR should be deployed through the normal control-plane smoke path after merge.

Known constraints

The platform repo does not contain Honcho application source. The durable control available here is the compose entrypoint boundary plus metadata-only verification tooling.

Explicit out-of-scope

  • Changing Honcho provider/model behavior.
  • Switching embeddings or #357 work.
  • Closing #359.
  • Running production apply/recreate before merge.
  • Quoting raw prompts, messages, memory, email, transcript, or tool output in evidence.

Requested decision

Approve and merge the platform-side log privacy guard. After merge, run sequential Honcho no-op applies/smokes and then close #371 only if the runtime log privacy checker passes.

Merge blockers

  • Sanitizer breaks Honcho startup or signal handling.
  • Checker produces likely false positives on normal redacted logs.
  • Review finds a simpler source-level Honcho fix already available in this repo.

Spec sources read

  • Issue #371 body - acceptance criteria and incident context.
  • state/cutover/honcho-closeout-plan.md - H3 closeout requirements.
  • runbooks/honcho-ollama-gemma-switch.md - deploy/verification/rollback contract.
  • compose/apps/compose.yaml - Honcho entrypoints and log-level configuration.

Validation

  • python3 -m py_compile scripts/honcho/honcho_log_sanitize_exec.py scripts/honcho/check_honcho_log_privacy.py - pass.
  • python3 -m pytest tests/test_honcho_log_privacy.py -q - 4 passed.
  • Pure-worktree compose contract parse with PyYAML - pass.
  • Synthetic sanitizer/checker pipeline with private markers - pass.

Refs #371

Canary status: missing - security-sensitive Honcho log privacy guard; require full review/checks before merge ## Canary Context Pack ### Product story During the 2026-05-18 Gemma/Ollama soak, Honcho logs exposed raw memory/tool-result content during a timeout path. The temporary runtime mitigation was `HONCHO_LOG_LEVEL=WARNING`, but the platform needs a durable boundary so future Honcho deploys cannot regress into raw private payload logging. ### What changed - Routes `honcho-api` and `honcho-deriver` stdout/stderr through `scripts/honcho/honcho_log_sanitize_exec.py` before output reaches Docker logs. - Sets the Honcho compose log-level default to `WARNING` while keeping the sanitizer as the actual privacy boundary. - Adds `scripts/honcho/check_honcho_log_privacy.py` for synthetic marker/log checks. - Adds tests proving JSON/private payload fields and secret-shaped values are redacted while metadata survives. - Documents verification and rollback in the Honcho Gemma/Ollama runbook and closeout plan. ### Why it changed Config-only mitigation is fragile. The entrypoint wrapper provides a platform-owned guard even when the upstream app or provider client emits raw prompt/memory/tool payloads. ### Files touched - `compose/apps/compose.yaml` - `scripts/honcho/honcho_log_sanitize_exec.py` - `scripts/honcho/check_honcho_log_privacy.py` - `tests/test_honcho_log_privacy.py` - `runbooks/honcho-ollama-gemma-switch.md` - `state/cutover/honcho-closeout-plan.md` ### Relevant context - Issue #371: Honcho raw memory/tool-result content in runtime logs. - Honcho closeout plan H3: durable log privacy PR; config-only is not enough. - Current LLM switch keeps embeddings on OpenAI; this PR does not alter provider or embedding config. ### Runtime evidence No production mutation was performed by this PR. Runtime evidence before this fork remained green: Honcho API/Deriver healthy, 0 unhealthy containers, and no deploy-runner pickup regression. This PR should be deployed through the normal control-plane smoke path after merge. ### Known constraints The platform repo does not contain Honcho application source. The durable control available here is the compose entrypoint boundary plus metadata-only verification tooling. ### Explicit out-of-scope - Changing Honcho provider/model behavior. - Switching embeddings or #357 work. - Closing #359. - Running production apply/recreate before merge. - Quoting raw prompts, messages, memory, email, transcript, or tool output in evidence. ### Requested decision Approve and merge the platform-side log privacy guard. After merge, run sequential Honcho no-op applies/smokes and then close #371 only if the runtime log privacy checker passes. ### Merge blockers - Sanitizer breaks Honcho startup or signal handling. - Checker produces likely false positives on normal redacted logs. - Review finds a simpler source-level Honcho fix already available in this repo. ## Spec sources read - Issue #371 body - acceptance criteria and incident context. - `state/cutover/honcho-closeout-plan.md` - H3 closeout requirements. - `runbooks/honcho-ollama-gemma-switch.md` - deploy/verification/rollback contract. - `compose/apps/compose.yaml` - Honcho entrypoints and log-level configuration. ## Validation - `python3 -m py_compile scripts/honcho/honcho_log_sanitize_exec.py scripts/honcho/check_honcho_log_privacy.py` - pass. - `python3 -m pytest tests/test_honcho_log_privacy.py -q` - 4 passed. - Pure-worktree compose contract parse with PyYAML - pass. - Synthetic sanitizer/checker pipeline with private markers - pass. Refs #371
fix(honcho): scrub private runtime log payloads
All checks were successful
base-is-main / guard (pull_request) Successful in 1s
canary-required / collect-diff (pull_request) Successful in 4s
patchwarden-pr-sanity / collect-diff (pull_request) Successful in 4s
platformctl plan / auto-apply scope (pull_request) Successful in 21s
python-ci / Python 3.11 (pull_request) Successful in 38s
python-ci / Python 3.12 (pull_request) Successful in 37s
python-ci / Python 3.13 (pull_request) Successful in 39s
canary-required / canary (pull_request) Successful in 16s
patchwarden-pr-sanity / sanity (pull_request) Successful in 21s
355438c717
Sign in to join this conversation.
No reviewers
No labels
W6d-automerge-calibration
agent/claude-code
agent/codex
agent/hermes
agent/iskra
agent/ollama
agent/patchwarden
automerge-candidate
class/security-sensitive
cutover-gate
dependency/blocked
dependency/blocks-others
dependency/cross-repo
dependency/needs-confirmation
domain:agents
domain:ci
domain:docs
domain:forgejo
domain:infra
domain:memory
domain:runtime
domain:signal
domain:ux
flow/architecture
flow/blocked
flow/deployed
flow/done
flow/implementation
flow/intake
flow/maintained
flow/observed
flow/ready
flow/refining
flow/retired
flow/review
iterating
judge/codex-candidate
judge/hermes-candidate
judge/low-confidence
judge/needs-refinement
judge/operator-needed
judge/p0
judge/p1
judge/p2
judge/p3
judge/park
judge/patchwarden-candidate
judge/stale-priority
kind/adr
kind/bug
kind/chore
kind/feature
kind/infra
kind/ops
kind/refactor
kind/research
large-impact
merge/auto
merge/manual
merge/manual-dependency-conflict
merge/manual-failing-tests
merge/manual-merge-conflict
merge/manual-missing-review
merge/manual-operator-preference
merge/manual-red-zone
merge/manual-security-sensitive
merge/manual-unclear-scope
merge/manual-unknown
meta
mode:operator-only
mode:patchwarden-iskra-approved
mode:safe-auto
needs-operator-decision
needs-triage
not-ready
observed/erroring
observed/needs-followup
observed/pending
observed/retire-candidate
observed/unused
observed/used
operator-emotional
owner-attention
phase/02
phase/03
priority:p0
priority:p1
priority:p2
priority:p3
proposed
ready-for-agent
ready-for-operator
recovery
review:claude-reviewed
review:codex-reviewed
review:dziadek-reviewed
review:needs-human
risk/exposure
risk/process
risk/product
risk/runtime
safety:external-write
safety:no-prod-mutation
safety:prod-impact
safety:secret-touch
size/large
size/medium
size/small
size/tiny
size/unknown
source/adr
source/agent-generated
source/manual
source/operator-chat
source/voice-note
status:blocked
status:codex-ready
status:merged:pending-evidence
status:needs-evidence
status:operator-needed
status:parked
tier/full
tier/lite
tier/stacked
tier:0-platform-substrate
tier:1-iskra-value-layer
tier:2-tools-products-modules
type:bug
type:chore
type:docs
type:feat
type:policy
type:research
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
pdurlej/platform!375
No description provided.