← Archive
DemosBlogTry PViz

Addendum · reference analyzer preview, not yet enabled in the hosted product

This page re-examines Scrapy: Structural Evolution Across 68 Iterations. The original page and its evidence are unchanged.

October 2026scrapy/scrapyPythonaddendumreference analyzerSCC analysisTYPE_CHECKING

Scrapy SCC Refactor: Reference-Analyzer Addendum

The study's starting point recovered and re-examined; the refactoring sequence itself is not reproducible.

  • The starting point is upstream commit `7010985e4f37`; the reference analyzer reproduces its 63-module cycle exactly.
  • The study's runtime figure of 23 modules matches the source; neither current analyzer reports a separate runtime figure.
  • Intermediate refactoring states are not available, so the refactoring sequence is not re-examined.
Starting cycle (source)
63 modules
Runtime (source)
23 modules
Reference vs source
exact

Evaluation evidence

Primary artifacts for auditing the evaluation and its source records.

Addendum evidence (zip)
Bundles and run records for the recovered baseline and current commits, the AST import check and the recovery log.
UI metrics (.json)
Small UI-ready summary payload
PViz schema [email protected]Metrics schema showcase-metrics@v1Generated 2026-10-26
⚠

Addendum: re-examined with the reference analyzer

This page re-examines the April showcase with the PViz reference analyzer, which is not yet enabled in the hosted product. The original report, metrics, snapshots and alignment notes are unchanged. Only the starting point of the study could be recovered; the intermediate refactoring states could not, so this addendum does not reproduce the refactoring sequence.

1. Original research question

How was Scrapy's large dependency cycle traced, measured and broken through a sequence of targeted edge removals in a local working copy?

2. Original analyzer and evidence

The study used the analyzer of that time (bundle schema v1.1) on a series of iterations of a locally modified Scrapy working copy, and published a report, a metrics file, snapshots of selected iterations and redacted alignment notes.

3. Source availability

The first published snapshot (`Iteration 01`) is byte-identical to upstream commit `7010985e4f37` (2026-02-23) for every file it hashed: the study started from unmodified upstream code, and that starting point is reproducible. Later iterations differ from any upstream commit and exist only in the author's working copy, which is not available here. A separately labelled analysis of the current upstream commit `1cd9afb208fc` (2026-10-26) is included; it is not a reproduction of the experiment.

4. Reference analyzer and configuration

Reference analyzer (preview: not enabled in the hosted product), release-candidate image revision `08823e7d7662`, run offline on the recovered source with the product's own analysis call. The legacy analyzer was run as a control and the `scrapy/` package's imports were parsed independently with Python's `ast` module.

5. The study's starting point, recomputed

AST: every `import` in the scrapy package, classified by position. The analyzers report a runtime figure equal to their full figure.

FigurePublished (v1.1)Source (AST)Legacy (current)Reference
Largest cycle, all imports (modules)66633963
Largest cycle without TYPE_CHECKING imports23233963
Largest cycle, module-level imports only—19——
Internal import relations in `scrapy/`: missing / extra vs AST—82782 / 10 / 0

6. Material differences

The reference analyzer reproduces the package's import relations exactly (827 relations, none missing or extra) and finds the same 63-module cycle as the source. The published starting cycle had 66 files; 3 of them (`scrapy/http/cookies.py`, `scrapy/utils/curl.py`, `scrapy/utils/ossignal.py`) are not in the source's cycle and came from relations the earlier analyzer recorded but the source does not contain. The current legacy analyzer misses 82 relations and reports a 39-module cycle.

The study's runtime figure (23 modules without `TYPE_CHECKING` imports) matches the source exactly. Neither current analyzer reproduces that split: both report the runtime cycle equal to the full one. For this study, which used `TYPE_CHECKING` guards as a refactoring tool, that is a regression relative to the earlier analyzer.

7. Findings retained, revised and new

Original findingStatusAddendum
Scrapy began as a single large conceptual cycle spanning orchestration, HTTP, spiders and settingsRetainedConfirmed on the recovered source: 63 modules, the same set in the source and the reference analyzer.
Runtime and conceptual coupling diverged: TYPE_CHECKING guards separate themRetained (starting point only)At the starting point the source's runtime cycle is 23 modules, as published. The later runtime figures cannot be checked.
The cycle was broken through targeted edge removals; one removal collapsed a large part of itNot re-examinedThe intermediate states are not available.
(new) Module-level importsNewImports executed at module load form a 19-module cycle at the starting point.
(new) Call graph and fixturesNew19,657 call sites at the starting point, 7,115 resolved inside the repository; 61 pytest fixtures recorded.

8. Supporting evidence

The AST results, both bundles of both commits and the per-relation comparison are in the downloads below.

Current upstream Scrapy (separately labelled, not a reproduction)

At `1cd9afb208fc` the source's package cycle has 67 modules (30 without `TYPE_CHECKING` imports, 25 at module load). The reference analyzer reports 65: it misses 31 relations and records 13 that the source does not contain, all from imports of underscore-prefixed modules such as `scrapy.utils._ssl` being attributed to the package's `__init__.py`. The legacy analyzer reports 61.

9. Limitations and comparability

Only the starting point is comparable. The refactoring sequence, its iteration counts and its per-iteration figures remain the study's own evidence and are not restated or recomputed.

10. Updated conclusion

The cycle that motivated the study is real and is reproduced exactly by the reference analyzer at the study's starting point. The earlier analyzer's runtime view, which the study relied on, was accurate at the start and is not reproduced by either current analyzer. Whether the refactoring sequence would be measured the same way today cannot be determined, because its intermediate sources are not available.