Skip to content

Commit 7e34d49

Browse files
fluffy314cursoragent
authored andcommitted
fix(autoresearch): recognize formatted L-function gaps
Version the mapper capability when mathematical notation wraps trusted symbol names so representation reports retain complete, auditable coverage. Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent 054d939 commit 7e34d49

2 files changed

Lines changed: 6 additions & 4 deletions

File tree

autoresearch/prefill/candidate_representation.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313

1414
REPRESENTATION_ANALYSIS_VERSION = 1
15-
MAPPER_CAPABILITY_VERSION = 1
15+
MAPPER_CAPABILITY_VERSION = 2
1616

1717

1818
def _digest(value: object) -> str:
@@ -166,7 +166,8 @@ def _primitive_ids(text: str) -> tuple[str, ...]:
166166
("ESSENTIAL_SPECTRUM", (r"essential spectrum",)),
167167
("SPECTRAL_GAP", (r"spectral gap",)),
168168
("DIRICHLET_L_FUNCTION", (
169-
r"dirichlet l[- ]function", r"\bl[- ]function",
169+
r"dirichlet(?:\s|\$|\\)*l(?:\s|\$|-)*function",
170+
r"(?:\b|\$)l(?:\s|\$|-)*function",
170171
)),
171172
("SELBERG_CLASS", (r"selberg class",)),
172173
("RANK_ONE_PERTURBATION", (r"rank-1", r"rank-one")),

tests/inference_engine/bench/test_candidate_representation_analysis.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,8 @@
3434
"A stochastic PDE operator case split and spectral gap proposal.",
3535
{"DISCONNECTED_FROM_TARGET"}, {"SPECTRAL_GAP"}),
3636
("XC-261076a02069094a733b", "SUFFICIENT_CONDITION",
37-
"For any L-function satisfying the Riemann Hypothesis, choose an analytic map.",
37+
"For any Dirichlet $L$-function satisfying the Riemann Hypothesis, "
38+
"choose an analytic map.",
3839
set(), {"DIRICHLET_L_FUNCTION"}),
3940
("XC-d3c0a173f7ff728d29a2", "EQUIVALENT_CRITERION",
4041
"A zeta zero sequence GUE condition equivalent to the assertion that no "
@@ -175,7 +176,7 @@ def test_state_machine_inserts_analysis_before_rejection():
175176

176177

177178
def test_mapper_catalog_is_closed_content_addressed_and_sourced():
178-
assert MAPPER_CAPABILITY_VERSION == 1
179+
assert MAPPER_CAPABILITY_VERSION == 2
179180
assert len(mapper_capability_hash()) == 64
180181
assert all(item.primitive_id == key for key, item in PRIMITIVE_CATALOG.items())
181182
assert all(

0 commit comments

Comments
 (0)