Skip to content

fix(stack): native compress telemetry NameError - #64

Draft
cursor[bot] wants to merge 1 commit into
cursor/modernize-all-tiers-fda8from
cursor/critical-bug-investigation-db52-fix
Draft

fix(stack): native compress telemetry NameError#64
cursor[bot] wants to merge 1 commit into
cursor/modernize-all-tiers-fda8from
cursor/critical-bug-investigation-db52-fix

Conversation

@cursor

@cursor cursor Bot commented Aug 25, 2026

Copy link
Copy Markdown
Contributor

Bug and impact

HiveStack.compress() crashes with NameError when:

  • backend="native" (or HIVE_BACKEND=native with an explicit rust_brain)
  • telemetry is enabled

The native path builds result but telemetry still referenced the Python-only out variable.

Root cause

PR #62 added a native compress branch that assigns native_out/result, but left record_compression() reading out.role, out.original_tokens, etc. from the Python path.

Fix

Record telemetry from result fields (same shape for both backends).

Validation

  • Reproduced NameError with mocked native_compress
  • Added test_native_compress_with_telemetry_does_not_crash
  • HLC snapshot/gossip tests still pass
Open in Web View Automation 

The native compress path builds a CompressedTurn in `result` but
telemetry still referenced the Python-only `out` variable, causing
NameError when backend=native, rust_brain is explicit, and telemetry
is enabled.

Co-authored-by: Daniel <DJLougen@users.noreply.github.com>
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.

1 participant