microsoft / microsoft/amplifier

[context-intelligence] Local events.jsonl mirror is unconditional — add a config option to disable it

Open
#334 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
3.1k
Forks
261
Avg merge
3h 28m
Merged PRs (30d)
13

Description

Summary

hook-context-intelligence writes a near-duplicate of the session event stream to <session>/context-intelligence/events.jsonl unconditionally — the local disk write is always-on even when no CI server is configured. This is asserted by design:

  • test_silent_by_default.py: "Disk always writes even without server config (always-on JSONL)"
  • mount() docstring: "Always: ... LoggingHandler — writes events.jsonl + dispatches to CI server(s)"

The only way to avoid the duplicate today is to not compose the bundle at all.

Measured impact (one real machine)

  • 1.5 GB of duplicate JSONL across 59 session files
  • Each mirror is nearly identical in size to the parent events.jsonl (e.g. 75.77 MB vs 75.79 MB for one active session), doubling the cost of already-unbounded event logs (see #332 for the raw: true default that makes individual files huge, and #333 for the lack of any retention option)

Ask

A config knob to disable the local disk copy while keeping server dispatch, for users who compose the bundle only for the graph-server features, e.g.:

hooks:
  - module: hook-context-intelligence
    config:
      local_mirror: false

Related: #332, #333.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with test_silent_by_default.py and the mount() docstring, which describe the current always-on JSONL behavior. Trace how hook-context-intelligence reads its config and how LoggingHandler is composed. Add coverage for local_mirror: false while retaining server dispatch, and confirm the default behavior remains unchanged.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
observability
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.