|
80 | 80 | # containers at once. |
81 | 81 | _WIRE_FREEZE_CORPUS_F8 = Path(__file__).parent / "fixtures" / "wire_freeze_corpus_f8" |
82 | 82 |
|
| 83 | +# The F8-singleton distinguishing stage (its own tree, its own CLI run). |
| 84 | +# Measured 2026-09-05 on 21 frozen external repositories: the segment lane |
| 85 | +# emits clone groups carrying exactly ONE item -- 378 of them, across 17 of |
| 86 | +# the 21 members -- and ``CloneGroupRow`` refuses a group of one, so those |
| 87 | +# documents cannot be ingested at all. No fixture in this suite had ever |
| 88 | +# carried the shape: the base corpus pins segment groups at zero and this |
| 89 | +# repository emits no clones family whatsoever, so the segment path was |
| 90 | +# never proven on data. The stage carries BOTH merge branches that produce |
| 91 | +# the shape -- overlapping windows and adjacent windows -- because |
| 92 | +# ``merge_overlapping_items`` reaches them through different comparisons and |
| 93 | +# a stage carrying one would leave the other unproven. |
| 94 | +_WIRE_FREEZE_CORPUS_F8_SINGLETON = ( |
| 95 | + Path(__file__).parent / "fixtures" / "wire_freeze_corpus_f8_singleton" |
| 96 | +) |
| 97 | + |
| 98 | +# The F7-namespace distinguishing stage (its own tree, its own CLI run). |
| 99 | +# Measured 2026-09-05: the dependency lane emits an edge whose endpoint is a |
| 100 | +# NAMESPACE PACKAGE -- ``packaging`` in kivy, ``pyglet.experimental`` in |
| 101 | +# pyglet -- which ``metrics.dependencies._is_internal_target`` admits as |
| 102 | +# internal precisely because it is a ``package_prefixes`` node, while |
| 103 | +# ``build_identity_index`` is assembled from file-bearing ``(path, module)`` |
| 104 | +# pairs alone and so cannot resolve it. ``nsp/`` carries no ``__init__.py``: |
| 105 | +# that absence is the whole point of the stage, and adding one erases it. |
| 106 | +_WIRE_FREEZE_CORPUS_F7_NAMESPACE = ( |
| 107 | + Path(__file__).parent / "fixtures" / "wire_freeze_corpus_f7_namespace" |
| 108 | +) |
| 109 | + |
83 | 110 | # The post-baseline stage: materialized only after the baseline is written, |
84 | 111 | # so its clone pair is the corpus's one genuinely NEW novelty row. |
85 | 112 | _WIRE_FREEZE_POST_BASELINE = "pkg/clones_three.py" |
@@ -218,6 +245,42 @@ def corpus_f5_report( |
218 | 245 | return _corpus_document(report_path) |
219 | 246 |
|
220 | 247 |
|
| 248 | +@pytest.fixture(scope="session") |
| 249 | +def corpus_f8_singleton_report( |
| 250 | + tmp_path_factory: pytest.TempPathFactory, |
| 251 | +) -> dict[str, object]: |
| 252 | + """One single-stage F8-singleton corpus run (no baseline: the segment |
| 253 | + lane is an analysis-tier fact of the current run). |
| 254 | +
|
| 255 | + The stage exists to carry the one clone-group shape the ingest oracle |
| 256 | + refuses, so that the refusal is measured on a document this project's |
| 257 | + own CLI produced rather than on an external checkout. |
| 258 | + """ |
| 259 | + root = tmp_path_factory.mktemp("wire_freeze_corpus_f8_singleton") |
| 260 | + report_path = root / "corpus.report.json" |
| 261 | + _materialize_corpus_tree(_WIRE_FREEZE_CORPUS_F8_SINGLETON, root) |
| 262 | + _run_corpus_cli([str(root), "--json", str(report_path), "--no-progress"]) |
| 263 | + return _corpus_document(report_path) |
| 264 | + |
| 265 | + |
| 266 | +@pytest.fixture(scope="session") |
| 267 | +def corpus_f7_namespace_report( |
| 268 | + tmp_path_factory: pytest.TempPathFactory, |
| 269 | +) -> dict[str, object]: |
| 270 | + """One single-stage F7-namespace corpus run (no baseline: the dependency |
| 271 | + lane is an analysis-tier fact of the current run). |
| 272 | +
|
| 273 | + ``_materialize_corpus_tree`` copies ``*.txt`` carriers only, so the |
| 274 | + namespace package stays a directory without ``__init__.py`` -- the |
| 275 | + condition the stage measures. |
| 276 | + """ |
| 277 | + root = tmp_path_factory.mktemp("wire_freeze_corpus_f7_namespace") |
| 278 | + report_path = root / "corpus.report.json" |
| 279 | + _materialize_corpus_tree(_WIRE_FREEZE_CORPUS_F7_NAMESPACE, root) |
| 280 | + _run_corpus_cli([str(root), "--json", str(report_path), "--no-progress"]) |
| 281 | + return _corpus_document(report_path) |
| 282 | + |
| 283 | + |
221 | 284 | # --------------------------------------------------------------------------- |
222 | 285 | # The run-store serving corpus: what an MCP execution serves from RAM beside |
223 | 286 | # the canonical run the same execution published. |
|
0 commit comments