headroom/tests/parity/fixtures/cache_aligner/e7a901cbf00a645f.json
chopratejas 0414cb70e4 feat(rust): scaffold workspace + parity harness (phase-0)
Bootstrap the Rust port of Headroom. Additive only — no existing Python
code modified. Ships the workshop, not the widgets.

Layout
  Cargo.toml (workspace) + rust-toolchain.toml
  crates/headroom-core    — transform library, stub only
  crates/headroom-proxy   — axum binary, /healthz only
  crates/headroom-py      — PyO3 cdylib, exposes headroom._core.hello()
  crates/headroom-parity  — Rust-vs-Python oracle harness + parity-run CLI

Tooling
  Makefile: test, test-parity, bench, build-proxy, build-wheel, fmt, lint
  .github/workflows/rust.yml: test, wheels (linux/mac), audit, parity-nightly
  deny.toml for cargo-deny

Parity corpus
  tests/parity/recorder.py + scripts/record_fixtures.py
  125 recorded fixtures across 5 leaf transforms (ccr, tokenizer,
  log_compressor, diff_compressor, cache_aligner)

Docs
  RUST_DEV.md — developer setup and workspace reference
  docs/spec/022-rust-migration.md — migration plan and stage breakdown

.gitignore: whitelist scripts/record_fixtures.py; ignore target/

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-24 13:39:48 -07:00

64 lines
1.7 KiB
JSON

{
"config": {
"collapse_blank_lines": true,
"date_patterns": [
"Current [Dd]ate:?\\s*\\d{4}-\\d{2}-\\d{2}",
"Today is \\w+,?\\s+\\w+ \\d+",
"Today's date:?\\s*\\d{4}-\\d{2}-\\d{2}",
"\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}"
],
"detection_tiers": [
"regex"
],
"dynamic_tail_separator": "\n\n---\n[Dynamic Context]\n",
"enabled": false,
"entropy_threshold": 0.7,
"extra_dynamic_labels": [],
"normalize_whitespace": true,
"use_dynamic_detector": true
},
"input": [
{
"content": "You are a helpful assistant. The date is 2026-04-23. Request id 3.",
"role": "system"
},
{
"content": "Question number 3: what is 2+2?",
"role": "user"
}
],
"input_sha256": "e7a901cbf00a645fb14d9c0d0fec1cff05a1e54ce124f51497461605a5d5e5ba",
"output": {
"cache_metrics": {
"prefix_changed": true,
"previous_hash": "b903dee7e3bdfda5",
"stable_prefix_bytes": 56,
"stable_prefix_hash": "387e30c8b8e09c1b",
"stable_prefix_tokens_est": 15
},
"diff_artifact": null,
"markers_inserted": [
"stable_prefix_hash:387e30c8b8e09c1b"
],
"messages": [
{
"content": "You are a helpful assistant. The date is . Request id 3.\n\n---\n[Dynamic Context]\n2026-04-23",
"role": "system"
},
{
"content": "Question number 3: what is 2+2?",
"role": "user"
}
],
"timing": {},
"tokens_after": 51,
"tokens_before": 47,
"transforms_applied": [
"cache_align"
],
"warnings": [],
"waste_signals": null
},
"recorded_at": "2026-04-23T23:51:37.779295+00:00",
"transform": "cache_aligner"
}