Skip to content

Add pure-function test suite (59 tests, zero dependencies)#37

Open
hai-pilgrim wants to merge 2 commits into
heiervang-technologies:mainfrom
hai-pilgrim:test/pure-helpers
Open

Add pure-function test suite (59 tests, zero dependencies)#37
hai-pilgrim wants to merge 2 commits into
heiervang-technologies:mainfrom
hai-pilgrim:test/pure-helpers

Conversation

@hai-pilgrim

Copy link
Copy Markdown

Summary

  • First test suite for supercompact — previously zero tests existed
  • 59 pure-function tests covering 6 modules with no I/O, network, or GPU
  • Tests run in ~3 s with standard pytest

Coverage

Module Functions tested
lib/parser.py _is_user_message, extract_text, Turn.append
lib/fitness.py _extract_vocab, _idf, FitnessResult.f1
lib/scorer.py _format_instruct, _last_token_pool
lib/types.py build_query
lib/dedup.py SuffixAutomaton (build, propagate, match)

Test plan

  • python3 -m pytest tests/test_pure_helpers.py -v → 59 passed, 0 failed

🤖 Generated with Claude Code

marksverdhei and others added 2 commits February 13, 2026 13:59
…ompaction

- install.sh now auto-configures ~/.claude/settings.json (creates pluginDirs
  entry, idempotent across create/add/already-exists cases)
- uninstall.sh now cleans up the settings.json pluginDirs entry
- Add compact-session.sh: self-contained script that finds JSONL, runs
  supercompact, backs up original, replaces, and reports results
- Simplify /supercompact command from 5-step multi-bash prompt to single
  script call with CLAUDE_PLUGIN_ROOT fallback to hardcoded install path
- Simplify PreCompact hook to backup-only (removes wasted supercompact run
  that Claude's LLM compaction immediately overwrites)
- Update README: accurate hook description, file tree with compact-session.sh,
  update/upgrade docs, standalone binary limitations clearly stated

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
59 tests covering parser._is_user_message, parser.extract_text, Turn,
fitness._extract_vocab, fitness._idf, FitnessResult.f1, scorer._format_instruct,
scorer._last_token_pool, types.build_query, and dedup.SuffixAutomaton.

All pure functions — no file system, network, or GPU access required.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.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.

2 participants