Skip to content

test(emit): add golden equivalence test for context_block() (#34) - #40

Open
Sarcastic-Soul wants to merge 2 commits into
nossa-y:mainfrom
Sarcastic-Soul:test/context-block-golden-equivalence
Open

test(emit): add golden equivalence test for context_block() (#34)#40
Sarcastic-Soul wants to merge 2 commits into
nossa-y:mainfrom
Sarcastic-Soul:test/context-block-golden-equivalence

Conversation

@Sarcastic-Soul

Copy link
Copy Markdown
Contributor

Follow-up to #34 / #23 as requested by @nossa-y.

What this changes

Adds a golden equivalence test (test_context_block_golden_equivalence) in tests/test_frames_emit.py:

  1. Defines _context_block_legacy() as a reference implementation of the pre-optimization context_block() (which converted all frames via doc.to_dict(False) upfront).
  2. Verifies that the optimized context_block() produces 100% byte-identical output against _context_block_legacy() across varied frame budgets (max_frames), duration filters (min_minutes), and text inclusion flags (include_text).

Checklist

  • Output stays deterministic (no clock, network, randomness, or model calls)
  • New behavior has a test; pytest -q passes
  • New schema fields, if any, are measured - or live in the tier-2 inferred block with a confidence tag
  • No typed text or page content is emitted by default

@nossa-y
nossa-y force-pushed the main branch 3 times, most recently from 972b4d9 to e92e599 Compare August 6, 2026 18:51
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