Skip to content

feat(context-rewrite): add shared observability events - #23

Merged
Xubqpanda merged 2 commits into
zjunlp:mainfrom
lingsanbuer:feature/context-rewrite-observability
Aug 5, 2026
Merged

feat(context-rewrite): add shared observability events#23
Xubqpanda merged 2 commits into
zjunlp:mainfrom
lingsanbuer:feature/context-rewrite-observability

Conversation

@lingsanbuer

Copy link
Copy Markdown
Collaborator

Summary

  • add six shared context rewrite lifecycle events
  • persist sanitized events through the existing event-trace.jsonl store
  • enforce a whitelist-only event boundary for persisted observability data
  • summarize content using SHA-256 digests and character counts
  • redact unsafe free-text reason and error values into digest codes
  • add tests for event definitions, normalization, redaction, and trace persistence

Events

  • context_rewrite_planned
  • context_rewrite_validated
  • context_rewrite_applied
  • context_rewrite_deferred
  • context_rewrite_failed
  • context_rewrite_bypassed

Privacy

Raw payloads, headers, authorization values, source text, and error messages are not persisted. Content samples are
converted to SHA-256 digests with character counts before writing.

Scope

This PR only changes the shared host-adapter observability boundary. It does not modify the Claude Code, Codex, or
OpenClaw adapters.

Validation

  • targeted observability tests: 6 passed
  • host-adapter tests: 48 passed
  • host-adapter typecheck
  • package boundary validation
  • workspace recursive typecheck
  • git diff --check

@Xubqpanda
Xubqpanda merged commit 883d67c into zjunlp:main Aug 5, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants