diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml
new file mode 100644
index 0000000..485d1f2
--- /dev/null
+++ b/.github/workflows/tests.yml
@@ -0,0 +1,54 @@
+name: Tests and package checks
+
+on:
+ pull_request:
+ push:
+ branches: ['**']
+ workflow_call:
+
+permissions:
+ contents: read
+
+jobs:
+ test:
+ runs-on: ${{ matrix.os }}
+ timeout-minutes: 15
+ strategy:
+ fail-fast: false
+ matrix:
+ include:
+ - os: ubuntu-latest
+ python: '3.8'
+ extras: test
+ - os: ubuntu-latest
+ python: '3.12'
+ extras: 'test,full'
+ - os: ubuntu-latest
+ python: '3.14'
+ extras: 'test,full'
+ - os: windows-latest
+ python: '3.14'
+ extras: test
+ defaults:
+ run:
+ shell: bash
+ steps:
+ - uses: actions/checkout@v4
+ - uses: actions/setup-python@v6
+ with:
+ python-version: ${{ matrix.python }}
+ cache: pip
+ - name: Install package and test dependencies
+ run: |
+ python -m pip install --upgrade pip
+ python -m pip install ".[${{ matrix.extras }}]" "setuptools>=61" build wheel twine
+ - name: Run deterministic regression and integration tests
+ run: python -m pytest
+ - name: Build and validate distributions
+ run: |
+ python -m build --no-isolation
+ python -m twine check dist/*
+ - name: Smoke test the installed wheel outside the source import path
+ run: |
+ python -m pip install --no-deps --force-reinstall dist/*.whl
+ python -I tests/wheel_smoke.py
diff --git a/.github/workflows/tfq0seo-publish.yml b/.github/workflows/tfq0seo-publish.yml
index 1889f2f..5858ff4 100644
--- a/.github/workflows/tfq0seo-publish.yml
+++ b/.github/workflows/tfq0seo-publish.yml
@@ -1,36 +1,71 @@
name: Publish to PyPI
on:
- release:
- types: [created]
push:
tags:
- - 'v*' # Trigger on version tags
+ - 'v*'
+
+permissions:
+ contents: read
jobs:
+ checks:
+ if: github.event.deleted == false
+ uses: ./.github/workflows/tests.yml
+ build:
+ needs: checks
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v4
+ - uses: actions/setup-python@v6
+ with:
+ python-version: '3.14'
+ - name: Install build tools
+ run: python -m pip install build twine
+ - name: Build package
+ run: python -m build
+ - name: Validate release version and distributions
+ env:
+ RELEASE_TAG: ${{ github.ref_name }}
+ run: |
+ python -m twine check dist/*
+ python - <<'PY'
+ import os
+ from email.parser import BytesParser
+ from pathlib import Path
+ from zipfile import ZipFile
+
+ wheel, = Path('dist').glob('*.whl')
+ with ZipFile(wheel) as archive:
+ metadata_path, = (
+ name for name in archive.namelist()
+ if name.endswith('.dist-info/METADATA')
+ )
+ metadata = BytesParser().parsebytes(archive.read(metadata_path))
+ expected = 'v' + metadata['Version']
+ if os.environ['RELEASE_TAG'] != expected:
+ raise SystemExit('Release tag must match package version: ' + expected)
+ PY
+ - name: Store validated distributions
+ uses: actions/upload-artifact@v7
+ with:
+ name: python-distributions
+ path: dist/
+ if-no-files-found: error
+
deploy:
+ needs: build
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/p/tfq0seo
permissions:
- id-token: write # IMPORTANT: mandatory for trusted publishing
-
+ id-token: write
steps:
- - uses: actions/checkout@v4
-
- - name: Set up Python
- uses: actions/setup-python@v4
- with:
- python-version: '3.x'
-
- - name: Install dependencies
- run: |
- python -m pip install --upgrade pip
- pip install build twine
-
- - name: Build package
- run: python -m build
-
- - name: Publish package distributions to PyPI
- uses: pypa/gh-action-pypi-publish@release/v1
+ - name: Download validated distributions
+ uses: actions/download-artifact@v8
+ with:
+ name: python-distributions
+ path: dist/
+ - name: Publish distributions to PyPI
+ uses: pypa/gh-action-pypi-publish@release/v1
diff --git a/.gitignore b/.gitignore
index f4d054a..0d889b8 100644
--- a/.gitignore
+++ b/.gitignore
@@ -144,6 +144,8 @@ cython_debug/
# Reports
reports/
*.html
+# Bundled report templates are source files, not generated reports.
+!tfq0seo/templates/*.html
*.csv
*.xlsx
*.json
diff --git a/MANIFEST.in b/MANIFEST.in
index b670bce..74ac621 100644
--- a/MANIFEST.in
+++ b/MANIFEST.in
@@ -4,6 +4,8 @@ include requirements.txt
include pyproject.toml
recursive-include tfq0seo/templates *.html
recursive-include tfq0seo *.py
+recursive-include tests *.py
+recursive-include docs *.md *.benchmark
global-exclude __pycache__
global-exclude *.py[co]
global-exclude .DS_Store
diff --git a/README.md b/README.md
index cf70e29..a354347 100644
--- a/README.md
+++ b/README.md
@@ -1,46 +1,421 @@
-# TFQ0SEO - SEO Analysis Tool
+# TFQ0SEO
-[](https://pypi.org/project/tfq0seo/)
-[](https://github.com/tfq0/tfq0seo/blob/main/LICENSE)
-[](https://pypi.org/project/tfq0seo/)
-[](https://pypi.org/project/tfq0seo/)
+TFQ0SEO is a Python library and CLI for crawling HTML and producing static SEO
+reports. It checks metadata, content, technical markup, resource hints, and
+links. Reports distinguish failed analyses from unavailable measurements.
-A high-performance SEO analysis tool that generates professional reports.
+## Installation
-## Features
+Python 3.8 or newer is supported. Install from this checkout to use these changes:
-- **Comprehensive analysis**
-- **Handles 500+ pages**
-- **Beautiful reports**
-- **Concurrent processing**
-- **Simple CLI**
+```bash
+python -m pip install .
+# Optional lxml parser, Excel export, and pandas compatibility dependency:
+python -m pip install ".[full]"
+```
-## Installation
+`python -m pip install tfq0seo` installs the published release, which may differ
+from this checkout. JSON, HTML, and CSV work with the base installation. XLSX
+requires `openpyxl`, included in the `full` extra.
+
+## CLI
```bash
-pip install tfq0seo
+# Single page; JSON goes to stdout when --output is omitted.
+tfq0seo analyze https://example.com --format json
+
+# Site crawl with explicit scope limits.
+tfq0seo crawl https://example.com --depth 5 --max-pages 500 --concurrent 10 --format html --output report.html
+
+# UTF-8 file: one URL per line; blank lines and # comments are ignored.
+tfq0seo batch urls.txt --format json --output batch.json
+
+# XML sitemap or sitemap index.
+tfq0seo sitemap https://example.com/sitemap.xml --max-pages 500 --format json --output sitemap.json
+
+# Convert an existing page or site report.
+tfq0seo export --input batch.json --format xlsx --output batch.xlsx
```
-## Quick Start
+All commands accept `--config config.yaml` (JSON is also supported). Use
+`tfq0seo COMMAND --help` for command options. Incomplete analyses and request
+failures return a nonzero exit code; an explicitly requested report is written
+first so that failures remain inspectable.
-### Single Page Analysis
-```bash
-tfq0seo analyze https://example.com
+Crawling follows eligible HTTP(S) links in the starting site's hostname/port
+scope, including standard HTTP-to-HTTPS transitions. Redirect destinations are
+checked against that scope. Explicit `allowed_domains` can expand it.
+Robots rules and TLS verification are enabled by default. Queries are retained,
+fragments do not create separate crawl targets, and excluded patterns still
+apply. Page, depth, response-size, request, and site crawl-time limits bound work.
+Reaching a limit is reported; it is not proof that the entire site was analyzed.
+
+## Configuration
+
+CLI precedence is: built-in/profile defaults, configuration file, `TFQ0SEO_`
+environment variables, then explicitly supplied command options. An omitted
+CLI option does not overwrite a configuration-file value.
+
+```yaml
+profile: standard
+max_memory_mb: 1024
+crawler:
+ max_concurrent: 10
+ max_connections_per_host: 5
+ max_pages: 500
+ max_depth: 5
+ timeout: 30
+ connect_timeout: 10
+ read_timeout: 30
+ max_crawl_time: 3600
+ max_page_size: 10485760
+ respect_robots_txt: true
+ verify_ssl: true
+ delay_between_requests: 0.2
+ max_retries: 3
+ use_sitemap: true
+analysis:
+ analysis_mode: standard
+ enabled_analyzers: [seo, content, technical, performance, links]
+ max_analysis_threads: 4
+ check_broken_links: true
+ check_internal_links: true
+ check_external_links: false
+ check_content_uniqueness: true
+ target_keywords: []
+export:
+ primary_format: html
+ output_directory: ./reports
+ html_template: enhanced
+ filename_pattern: "{domain}_{timestamp}_{format}"
+```
+
+For example, `TFQ0SEO_CRAWLER_MAX_PAGES=100` overrides the page budget.
+`TFQ0SEO_ANALYSIS_ENABLED_ANALYZERS=seo,technical` selects those analyzers.
+Lists also accept JSON arrays; mappings use JSON objects. Booleans accept
+`true`/`false`, `yes`/`no`, and `1`/`0`. String settings remain strings.
+
+Profiles are `quick`, `standard`, `deep`, `enterprise`, `dev`, and `custom`.
+`quick` selects SEO and technical analysis with a smaller crawl budget. `deep`
+increases crawl limits and bypasses the analysis cache. `enterprise` changes
+concurrency and crawl budgets; it does not enable a separate service or browser.
+Explicit values override profile defaults.
+
+In Python, `apply_profile()` replaces values controlled by the selected preset.
+Use `merge({'profile': ...})` to change preset defaults while retaining explicit
+overrides. Applying `custom` only changes the label.
+
+Other implemented settings include crawler headers/user agent, redirects,
+rate limits, retry statuses/backoff, domain/scheme/exclusion filters, sitemap
+discovery, proxy, connection pooling, DNS/robots cache TTLs, and bounded analysis
+cache size/TTL. Analysis supports weighted category scores and bounded optional
+external link checks. `Config.SUPPORTED_FIELDS` lists the active component
+settings in [config.py](https://github.com/TFQ0/tfq0seo/blob/main/tfq0seo/core/config.py).
+
+`max_memory_mb` is a sampled process-RSS guard checked during page-analysis
+progress, not a hard allocation limit. Synchronous report assembly can exceed
+it; the recorded 2,000-page workload peaked above the default 1,024 MiB value.
+Budget memory for the complete report and use an external process limit when
+a hard bound is required. See the scale validation results below.
+
+Unknown keys, invalid types, conflicting aliases, and retired configuration
+fields fail validation. Active dataclasses and saved configurations expose
+supported settings only. JavaScript execution, HTTP/2 selection, background
+monitoring, webhooks, email delivery, PDF export, and `dry_run` remain
+unimplemented. Use the explicit `Config.migrate_dict()` migration for older
+configuration files; it removes only retired values matching their historical
+defaults and rejects unsupported requested behavior. See the
+[configuration migration guide](https://github.com/TFQ0/tfq0seo/blob/main/docs/configuration-migration.md) before upgrading.
+
+## Python API
+
+```python
+import asyncio
+
+from tfq0seo import SEOAnalyzer
+from tfq0seo.core.config import Config
+from tfq0seo.exporters.base import ExportManager
+
+
+async def main():
+ config = Config.from_dict({"crawler": {"max_pages": 100}})
+ analyzer = SEOAnalyzer(config)
+ pages = [page async for page in analyzer.crawl_site("https://example.com")]
+ report = analyzer.generate_site_report(pages)
+ ExportManager(config.export).export(report, "json", "report.json")
+
+
+asyncio.run(main())
+```
+
+`analyze_url(url)` returns one page result. `analyze_urls(urls)` is an async
+iterator for a batch. `analyze_sitemap(url)` returns a list after discovery and
+analysis. `generate_batch_report()` and `generate_site_report()` aggregate page
+records. Use the completed report for link health: streamed pages may precede
+observations of their linked targets. Reusing an analyzer starts a fresh run
+while retaining its bounded analysis cache.
+
+## Interpreting results
+
+Results carry `schema_version: "1.0"`; compatible dictionary contracts are
+defined in [models.py](https://github.com/TFQ0/tfq0seo/blob/main/tfq0seo/core/models.py).
+
+- Page `status` is `complete`, `partial`, `error`, or `skipped`. Fetch failures
+ retain their URL, status, and error. Analyzer failures have an error and a
+ `null` score. Truncated HTML produces partial coverage.
+- `coverage` identifies enabled/completed/failed analyzers and content
+ completeness. Site `summary` records page outcomes, crawl completeness,
+ limits, and discovery failures. Successful static analysis does not mean
+ every linked URL was checked.
+- Site `pages.detailed` retains every usable page; `pages.failed` and
+ `pages.skipped` retain other outcomes. HTML pagination does not truncate the
+ underlying report. CSV and XLSX include all page outcomes.
+- Scores are weighted static-rule heuristics, not search ranking predictions,
+ validated business KPIs, or an exhaustive accessibility audit. Informational
+ content heuristics do not lower scores.
+- `load_time` and `html_fetch_time` describe observed HTTP HTML retrieval.
+ Browser load time, Core Web Vitals, TTFB, asset download sizes, and other
+ unobserved measurements are `null`/not measured. JavaScript is not rendered.
+- Broken links require an observed HTTP error. Unvisited targets remain
+ unchecked. External checks are opt-in and bounded; connection failures are
+ retained separately from HTTP error evidence.
+- JSON-LD checks inspect local syntax/shape. Language/readability checks are
+ conservative and may be unavailable. They do not validate eligibility for
+ search-engine features or infer authority and link velocity.
+ Readability never downloads dictionaries at runtime. If the installed
+ textstat backend needs unavailable local NLTK `corpora/cmudict` data, estimates
+ remain `null`, with an explicit unavailable status and missing-resource reason.
+ Provision the `cmudict` corpus during environment setup if you need those
+ estimates; see [NLTK's data installation guide](https://www.nltk.org/data.html).
+
+HTML escapes page-supplied text and restricts clickable URLs to HTTP(S). CSV and
+XLSX neutralize formula-like text. The enhanced HTML report uses optional
+Chart.js from a CDN for charts; its page table remains usable without it.
+
+## Site-wide canonical and link analysis
+
+Completed site reports include `site_analysis`, derived from the supplied page
+inventory without additional network requests. Canonical observations include
+eligible HTML declarations and HTTP `Link` headers. HTML targets use the
+document base; header targets use the response URL. Declarations outside the
+HTML head, alternate qualifiers, and other header anchor contexts remain
+recorded as ineligible. Malformed headers, missing facts, and incomplete HTML
+retain uncertainty.
+
+The report identifies conflicting targets, canonical chains and cycles,
+observed redirects, HTTP errors at declared targets, and observed `noindex`
+directives at targets. A self-reference is not a cycle. Unfetched and
+unavailable destinations are unverified. Chain records store the immediate
+target, terminal, hop count, and cycle identifier; shared cycles are stored
+once, avoiding repeated full paths in large reports.
+
+The internal-link graph retains distinct source/target pairs, nofollow hints,
+incoming/outgoing counts, connected groups, and shortest observed link depth.
+Redirect aliases resolve to observed final URLs; query strings remain distinct.
+Depth starts at the crawl's entry URL, or observed homepages when aggregating a
+batch. Without an entry page, depth and reachability remain unavailable. A page
+with no observed incoming links is a candidate for investigation, not proof of
+an orphan page. Self links do not count as incoming links, and nofollow hints
+do not remove edges from this observational graph.
+
+Site findings have registered `site.*` rule IDs, evidence, references, and zero
+penalty. They appear in site issues and recommendations without changing page
+scores or rewriting historical page evidence. Page rule coverage remains
+separate from graph coverage. HTML includes the complete observations table;
+CSV/XLSX page rows include canonical and link metrics; JSON retains the graph
+and cycle records. These checks do not determine a search engine's selected
+canonical or a page's actual index status. The supporting guidance is
+[Google's canonical documentation](https://developers.google.com/search/docs/crawling-indexing/consolidate-duplicate-urls)
+and [link guidance](https://developers.google.com/search/docs/crawling-indexing/links-crawlable).
+
+## Shared facts and result contracts
+
+Each page analysis extracts one `PageFacts` snapshot before dispatching the five
+analyzers. They reuse its metadata, headings, robots directives, document base,
+images, scripts, links, and text. Specialized checks remain in their existing
+analyzer modules. The snapshot is immutable, and collection access returns
+independent values so concurrent analyzers cannot alter one another's evidence.
+
+The original analyzer call signatures remain supported. Standalone callers can
+also share extraction explicitly:
+
+```python
+from bs4 import BeautifulSoup
+from tfq0seo.page_facts import extract_page_facts
+from tfq0seo.analyzers.seo import analyze_seo
+from tfq0seo.analyzers.content import analyze_content
+
+soup = BeautifulSoup('
Example
Example
', 'html.parser')
+url = 'https://example.test/'
+facts = extract_page_facts(soup, url, headers=None)
+seo = analyze_seo(soup, url, facts=facts)
+content = analyze_content(soup, url, facts=facts)
```
-### Full Site Crawl
+Keep the source document unchanged while using its snapshot. A supplied
+snapshot must belong to the same document, URL, and explicit header/bot context.
+`headers=None` means unavailable; `{}` means an observed empty header mapping.
+Repeated response headers retain every value. Fetch timings can remain `null`
+and describe their existing network stages rather than browser measurements.
+
+Page results include an additive `page_facts` record with extraction version,
+provenance, hashes, counts, and shared observations. Its default export omits raw
+response-header values, full HTML/text, and script bodies. The extraction
+version also participates in cache identity.
+
+[models.py](https://github.com/TFQ0/tfq0seo/blob/main/tfq0seo/core/models.py) defines fetch, rule, analyzer, page, and site
+contracts and re-exports `PageFacts`. Malformed supplied fields raise
+`ContractError` with a field path before analysis or export. Invalid analyzer
+outputs become explicit analyzer errors with unavailable scores and are not
+cached. Rule validation checks evidence, provenance, applicability, and nested
+observations before merging or scoring.
+
+Report validation checks present fields without rewriting historical rule IDs,
+scores, or unknown extension fields. New producer envelopes receive stricter
+checks. Non-finite numbers and unsupported Python objects are rejected rather
+than silently converted to strings; invalid reports are rejected before opening
+an output file. JSON schema version `1.0` and existing report layouts remain
+supported. Validators are available in
+[report_contracts.py](https://github.com/TFQ0/tfq0seo/blob/main/tfq0seo/core/report_contracts.py).
+
+## Rules, applicability, and scoring
+
+The rule registry in [rules.py](https://github.com/TFQ0/tfq0seo/blob/main/tfq0seo/rules.py) contains immutable definitions
+registered by each analyzer. Every active rule has a stable ID, a category owner,
+severity, recommendation, applicability description, supporting reference URLs,
+and a review date. The reference supports the observation or guidance; numeric
+penalties are TFQ0SEO policy, not weights supplied by search engines.
+
+Each analyzer returns `rule_results` with structured evidence and explicit
+`pass`, `fail`, `informational`, `unknown`, `not_applicable`, or `error` outcomes.
+`issues` contains failed checks and informational observations. Unknown and
+inapplicable evaluations include a reason and remain visible in rule coverage;
+they are never silently counted as passes. Disabling an analyzer does not imply
+that its rules passed. A rule execution error makes the page partial and avoids
+caching that incomplete analysis.
+
+Scoring policy **2.0** deducts 15, 7, or 3 points for a failed, applicable,
+scored critical, warning, or notice rule. Each rule is deducted once per page,
+even when multiple analyzers observe it. Its registered owner receives the
+deduction; if that analyzer is unavailable, the first reporting analyzer in the
+fixed order `seo, content, technical, performance, links` receives it. Category
+scores start at 100 and floor at zero. The overall score uses the configured
+category weights, normalized across available categories. Zero weights are
+respected. Site scores average the available page scores.
+
+Page `scoring.deductions` records rule IDs, observers, category attribution, and
+penalties. Recommendations use the registry ID rather than matching message
+text. Duplicate findings retain all observations, and site issue groups retain
+evidence for every affected page. Diagnostic sub-scores inside analyzer data are
+not additive components of the overall score.
+
+Informational, unknown, inapplicable, and errored evaluations incur no penalty.
+For example, an observed `noindex` directive is reported without assuming it is
+unintentional. Optional social metadata, keyword-density targets, metadata
+length heuristics, and unmeasured browser effects are not universal failures.
+A high score therefore describes the scored observations and must be read
+alongside coverage; it does not establish that unavailable checks passed.
+
+JSON keeps schema version `1.0` with additive rule fields and records independent
+ruleset/scoring versions. Scores from policy 2.0 are not directly comparable to
+older reports. Cache identity includes both versions. Reference review dates
+record an actual review, not automatic proof that a document is still current.
+
+When extending an analyzer, register the definition, evaluate it with
+`RuleCollector.check`, supply the observed evidence and applicability, and derive
+findings/recommendations/scores through the shared helpers. Test positive,
+negative, unavailable, and inapplicable cases. Reuse shared IDs for the same
+underlying condition and increment the ruleset version when changing rule
+behavior; increment the scoring version when changing the deduction policy.
+
+## Development and verification
+
```bash
-tfq0seo crawl https://example.com --depth 5 --max-pages 500 --concurrent 20 --format html --output full-report.html
+python -m venv .venv
+# Activate .venv using your shell's command, then:
+python -m pip install -e ".[test,full]" "setuptools>=61" build wheel twine
+python -m pytest
+
+python -m build --no-isolation
+python -m twine check dist/*
+# Install the generated .whl with --no-deps --force-reinstall, then:
+python -I tests/wheel_smoke.py
+
+# Reproducible offline analysis/report workload; no HTTP requests:
+python -m tfq0seo.benchmark --pages 500 --output benchmark.json
+# Compare varied fixtures and retain repeated measurements and environment:
+python -m tfq0seo.benchmark --suite --pages 500 2000 --repetitions 3 --timeout-seconds 600 --output scale.json
```
-## Analysis Categories
+Tests cover analyzers, configuration precedence, crawl scope/robots/retries,
+timeouts and cancellation, report completeness, CLI failure handling, export
+safety, and a real 500-page crawl against a local HTTP fixture. Tests block
+non-loopback socket connections and do not depend on public websites.
+
+The benchmark measures fixture parsing, static analysis, and aggregation with
+the analysis cache disabled. It reports complete/partial/failed/skipped counts,
+successful-page throughput, elapsed time, and sampled process RSS. A sampled
+maximum can miss short memory peaks. Results depend on the machine and fixture;
+they are not browser-performance measurements or a production-site capacity
+guarantee. Basic, content-heavy, link-dense, and mixed scenarios retain every
+raw measurement, workload/source fingerprints, full effective configuration,
+dependency versions, and per-case summaries. See the
+[scale validation guide and recorded measurements](https://github.com/TFQ0/tfq0seo/blob/main/docs/scale-validation.md)
+for workload definitions, resource limits, and measured results. Network
+benchmark functions remain explicit opt-in Python APIs.
+
+GitHub Actions runs regression tests and distribution checks across Python 3.8,
+3.12, and 3.14, with Windows and Linux jobs and base/optional dependencies. The
+release workflow requires these checks and a release tag matching `v` plus the
+package version before publishing.
+
+## Publishing to PyPI
+
+Releases use [PyPI Trusted Publishing](https://docs.pypi.org/trusted-publishers/)
+through GitHub Actions. No PyPI API token or password is used by the workflow.
+Tests and the package build run without OIDC permission. The separate `deploy`
+job downloads the validated distributions and is the only job with
+`id-token: write`, which allows it to request a short-lived publishing identity.
+
+Complete this one-time setup before publishing a release:
+
+1. In the `TFQ0/tfq0seo` GitHub repository, open **Settings → Environments**
+ and create or verify the environment named `pypi`. Restrict its deployment
+ tags to `v*`; optionally require a reviewer if available for the repository.
+2. On PyPI, open **Your projects → tfq0seo → Manage → Publishing** and add a
+ GitHub publisher to the existing project with these exact values:
-1. **SEO Analysis**
+ | PyPI field | Value |
+ | --- | --- |
+ | Owner | `TFQ0` |
+ | Repository name | `tfq0seo` |
+ | Workflow name | `tfq0seo-publish.yml` |
+ | Environment name | `pypi` |
-2. **Content Quality**
+ The workflow field is the filename, without `.github/workflows/`, rather
+ than the display name `Publish to PyPI`. The environment must match the
+ workflow. See [PyPI's publisher setup guide](https://docs.pypi.org/trusted-publishers/adding-a-publisher/).
+3. Commit and push the release workflow and its reusable
+ `.github/workflows/tests.yml` together with the intended package changes.
+ Keep the registered workflow filename unchanged.
-3. **Technical SEO**
+For each release, update `tfq0seo/__init__.py` to a new, unused package version,
+commit it, then create and push a tag that is `v` followed by that version
+(for example, `v3.0.0`). Pushing a `v*` tag triggers the workflow; no package-name
+prefix or GitHub release is required. Branch pushes, other tag names, and tag
+deletions do not publish. The version check reads the built wheel's metadata
+without installing or hard-coding the package name. Approve the `pypi`
+deployment if a reviewer is required. Tests and distribution checks must pass
+before the upload starts.
-4. **Performance**
+After the first successful Trusted Publishing release, revoke the old PyPI
+upload token and remove its GitHub Actions secret if it is no longer used by
+another workflow. Do not add `username` or `password` inputs to the publishing
+action; they would select credential-based authentication instead of OIDC.
-5. **Link Analysis**
+Local tests cannot exercise GitHub's OIDC exchange with PyPI. The first release
+run verifies the registered publisher end to end. If PyPI reports an invalid
+publisher, compare the repository owner, repository name, workflow filename,
+and environment against the values above before retrying. PyPI does not allow
+an uploaded distribution filename to be reused, so retries after a successful
+upload require checking what was already published.
diff --git a/docs/benchmarks/2026-09-21-python312-2000-basic.benchmark b/docs/benchmarks/2026-09-21-python312-2000-basic.benchmark
new file mode 100644
index 0000000..09567f8
--- /dev/null
+++ b/docs/benchmarks/2026-09-21-python312-2000-basic.benchmark
@@ -0,0 +1,541 @@
+{
+ "benchmark_schema_version": 2,
+ "status": "complete",
+ "benchmarks": [
+ {
+ "type": "offline",
+ "fixture_version": 1,
+ "scenario": "basic",
+ "requested_pages": 2000,
+ "network_access": false,
+ "config": {
+ "crawler": {
+ "max_concurrent": 20,
+ "max_connections_per_host": 5,
+ "timeout": 30,
+ "connect_timeout": 10,
+ "read_timeout": 30,
+ "user_agent": "tfq0seo/3.0.0 (+https://github.com/TFQ0/tfq0seo)",
+ "custom_headers": {},
+ "follow_redirects": true,
+ "max_redirects": 10,
+ "max_pages": 2000,
+ "max_depth": 5,
+ "max_page_size": 10485760,
+ "max_crawl_time": 3600,
+ "delay_between_requests": 0.0,
+ "adaptive_delay": true,
+ "min_delay": 0.0,
+ "max_delay": 5.0,
+ "rate_limit_per_second": null,
+ "respect_robots_txt": true,
+ "robots_cache_ttl": 86400,
+ "crawl_delay_factor": 1.0,
+ "allowed_domains": [],
+ "allowed_schemes": [
+ "http",
+ "https"
+ ],
+ "excluded_patterns": [
+ "\\.pdf$",
+ "\\.zip$",
+ "\\.exe$",
+ "\\.dmg$",
+ "/wp-admin",
+ "/admin",
+ "/login",
+ "\\?.*session",
+ "\\?.*utm_"
+ ],
+ "store_html": false,
+ "max_retries": 3,
+ "retry_on_status": [
+ 429,
+ 500,
+ 502,
+ 503,
+ 504
+ ],
+ "retry_backoff_factor": 2.0,
+ "cache_enabled": false,
+ "cache_ttl": 3600,
+ "cache_size_mb": 100,
+ "use_sitemap": true,
+ "discover_sitemaps": true,
+ "use_connection_pooling": true,
+ "dns_cache_ttl": 300,
+ "verify_ssl": true,
+ "proxy": null
+ },
+ "analysis": {
+ "enabled_analyzers": [
+ "seo",
+ "content",
+ "technical",
+ "performance",
+ "links"
+ ],
+ "analysis_mode": "standard",
+ "parallel_analysis": true,
+ "max_analysis_threads": 4,
+ "check_external_links": false,
+ "check_internal_links": true,
+ "check_broken_links": true,
+ "max_external_links_per_page": 100,
+ "external_link_timeout": 10,
+ "target_keywords": [],
+ "check_content_uniqueness": true,
+ "score_weights": {
+ "seo": 0.3,
+ "content": 0.25,
+ "technical": 0.2,
+ "performance": 0.15,
+ "links": 0.1
+ }
+ },
+ "export": {
+ "formats": [
+ "html"
+ ],
+ "primary_format": "html",
+ "html_template": "optimized",
+ "output_directory": "./reports",
+ "filename_pattern": "{domain}_{timestamp}_{format}"
+ },
+ "profile": "standard",
+ "version": "3.0.0",
+ "debug": false,
+ "continue_on_error": true,
+ "max_memory_mb": 1024
+ },
+ "fixture": {
+ "version": 1,
+ "generated_pages": 2000,
+ "html_bytes": 842670,
+ "dom_elements": 20000,
+ "href_references": 2000,
+ "image_elements": 0,
+ "analyzed_word_count": 34000,
+ "pages_with_word_count": 2000,
+ "variants": {
+ "basic": 2000,
+ "content-heavy": 0,
+ "link-dense": 0
+ },
+ "sha256": "4a920316238e0083f5d2eae7ca894faa843a26de85d1524aa348900e09a22650"
+ },
+ "timeout_seconds": 360.0,
+ "timed_out": false,
+ "timeout_scope": "Cooperative checks between pages and after reporting; synchronous work can overrun the deadline.",
+ "report_completeness": {
+ "expected_pages": 2000,
+ "retained_rows": 2000,
+ "unique_urls": 2000,
+ "missing_urls": 0,
+ "unexpected_urls": 0,
+ "duplicate_rows": 0,
+ "complete": true
+ },
+ "readability": {
+ "status_counts": {
+ "not_requested": 2000
+ },
+ "missing_resources": []
+ },
+ "workload": "Fixture generation, HTML parsing, static analysis, site report aggregation and retained-URL verification; no HTTP, browser or export measurement",
+ "analysis_duration_seconds": 101.17349219997413,
+ "report_duration_seconds": 64.62061670003459,
+ "report_pages": 2000,
+ "report_status": "complete",
+ "report_summary": {
+ "total_pages": 2000,
+ "successful_pages": 2000,
+ "partial_pages": 0,
+ "failed_pages": 0,
+ "skipped_pages": 0,
+ "analysis_mode": "standard",
+ "analysis_timestamp": 1789963088.9000018,
+ "analysis_duration": 0,
+ "crawl_complete": false,
+ "limits_reached": [],
+ "discovery_errors": [],
+ "scope_note": "Results describe fetched pages; unvisited targets remain unchecked."
+ },
+ "rule_coverage": {
+ "counts": {
+ "pass": 72000,
+ "fail": 0,
+ "informational": 8000,
+ "unknown": 4000,
+ "not_applicable": 52000,
+ "error": 0
+ },
+ "assessed": 80000,
+ "total": 136000,
+ "ratio": 0.9523809523809523,
+ "scope": "Counts are unique rule evaluations per page, not a complete site inventory."
+ },
+ "site_analysis": {
+ "version": "1.0",
+ "coverage": {
+ "inventory_pages": 2000,
+ "pages_with_facts": 2000,
+ "complete_html_pages": 2000,
+ "crawl_complete": false,
+ "note": "A completed crawl still obeys its configured scope. Missing targets and paths remain unverified."
+ },
+ "node_count": 2000,
+ "edge_count": 2000,
+ "finding_count": 0
+ },
+ "status": "complete",
+ "successful_pages": 2000,
+ "partial_pages": 0,
+ "failed_pages": 0,
+ "skipped_pages": 0,
+ "observed_results": 2000,
+ "missing_results": 0,
+ "pages_analyzed": 2000,
+ "pages_per_second": 12.035083143516117,
+ "avg_time_per_page": 0.08309041060000891,
+ "duration_seconds": 166.18082120001782,
+ "clock": "perf_counter",
+ "memory_rss_start_mb": 76.672,
+ "memory_rss_end_mb": 882.762,
+ "memory_rss_delta_mb": 806.09,
+ "memory_sampled_peak_mb": 1496.578,
+ "memory_sample_count": 2221,
+ "memory_sampling_interval_seconds": 0.05,
+ "memory_measurement": "Sampled process RSS; allocations between samples may be missed.",
+ "memory_used_mb": 806.09,
+ "errors": [],
+ "timestamp": "2026-09-21T03:58:18.883772+00:00",
+ "repetition": 1,
+ "run_order": 1
+ },
+ {
+ "type": "offline",
+ "fixture_version": 1,
+ "scenario": "basic",
+ "requested_pages": 2000,
+ "network_access": false,
+ "config": {
+ "crawler": {
+ "max_concurrent": 20,
+ "max_connections_per_host": 5,
+ "timeout": 30,
+ "connect_timeout": 10,
+ "read_timeout": 30,
+ "user_agent": "tfq0seo/3.0.0 (+https://github.com/TFQ0/tfq0seo)",
+ "custom_headers": {},
+ "follow_redirects": true,
+ "max_redirects": 10,
+ "max_pages": 2000,
+ "max_depth": 5,
+ "max_page_size": 10485760,
+ "max_crawl_time": 3600,
+ "delay_between_requests": 0.0,
+ "adaptive_delay": true,
+ "min_delay": 0.0,
+ "max_delay": 5.0,
+ "rate_limit_per_second": null,
+ "respect_robots_txt": true,
+ "robots_cache_ttl": 86400,
+ "crawl_delay_factor": 1.0,
+ "allowed_domains": [],
+ "allowed_schemes": [
+ "http",
+ "https"
+ ],
+ "excluded_patterns": [
+ "\\.pdf$",
+ "\\.zip$",
+ "\\.exe$",
+ "\\.dmg$",
+ "/wp-admin",
+ "/admin",
+ "/login",
+ "\\?.*session",
+ "\\?.*utm_"
+ ],
+ "store_html": false,
+ "max_retries": 3,
+ "retry_on_status": [
+ 429,
+ 500,
+ 502,
+ 503,
+ 504
+ ],
+ "retry_backoff_factor": 2.0,
+ "cache_enabled": false,
+ "cache_ttl": 3600,
+ "cache_size_mb": 100,
+ "use_sitemap": true,
+ "discover_sitemaps": true,
+ "use_connection_pooling": true,
+ "dns_cache_ttl": 300,
+ "verify_ssl": true,
+ "proxy": null
+ },
+ "analysis": {
+ "enabled_analyzers": [
+ "seo",
+ "content",
+ "technical",
+ "performance",
+ "links"
+ ],
+ "analysis_mode": "standard",
+ "parallel_analysis": true,
+ "max_analysis_threads": 4,
+ "check_external_links": false,
+ "check_internal_links": true,
+ "check_broken_links": true,
+ "max_external_links_per_page": 100,
+ "external_link_timeout": 10,
+ "target_keywords": [],
+ "check_content_uniqueness": true,
+ "score_weights": {
+ "seo": 0.3,
+ "content": 0.25,
+ "technical": 0.2,
+ "performance": 0.15,
+ "links": 0.1
+ }
+ },
+ "export": {
+ "formats": [
+ "html"
+ ],
+ "primary_format": "html",
+ "html_template": "optimized",
+ "output_directory": "./reports",
+ "filename_pattern": "{domain}_{timestamp}_{format}"
+ },
+ "profile": "standard",
+ "version": "3.0.0",
+ "debug": false,
+ "continue_on_error": true,
+ "max_memory_mb": 1024
+ },
+ "fixture": {
+ "version": 1,
+ "generated_pages": 2000,
+ "html_bytes": 842670,
+ "dom_elements": 20000,
+ "href_references": 2000,
+ "image_elements": 0,
+ "analyzed_word_count": 34000,
+ "pages_with_word_count": 2000,
+ "variants": {
+ "basic": 2000,
+ "content-heavy": 0,
+ "link-dense": 0
+ },
+ "sha256": "4a920316238e0083f5d2eae7ca894faa843a26de85d1524aa348900e09a22650"
+ },
+ "timeout_seconds": 360.0,
+ "timed_out": false,
+ "timeout_scope": "Cooperative checks between pages and after reporting; synchronous work can overrun the deadline.",
+ "report_completeness": {
+ "expected_pages": 2000,
+ "retained_rows": 2000,
+ "unique_urls": 2000,
+ "missing_urls": 0,
+ "unexpected_urls": 0,
+ "duplicate_rows": 0,
+ "complete": true
+ },
+ "readability": {
+ "status_counts": {
+ "not_requested": 2000
+ },
+ "missing_resources": []
+ },
+ "workload": "Fixture generation, HTML parsing, static analysis, site report aggregation and retained-URL verification; no HTTP, browser or export measurement",
+ "analysis_duration_seconds": 100.86997210001573,
+ "report_duration_seconds": 63.24567219999153,
+ "report_pages": 2000,
+ "report_status": "complete",
+ "report_summary": {
+ "total_pages": 2000,
+ "successful_pages": 2000,
+ "partial_pages": 0,
+ "failed_pages": 0,
+ "skipped_pages": 0,
+ "analysis_mode": "standard",
+ "analysis_timestamp": 1789963253.6594498,
+ "analysis_duration": 0,
+ "crawl_complete": false,
+ "limits_reached": [],
+ "discovery_errors": [],
+ "scope_note": "Results describe fetched pages; unvisited targets remain unchecked."
+ },
+ "rule_coverage": {
+ "counts": {
+ "pass": 72000,
+ "fail": 0,
+ "informational": 8000,
+ "unknown": 4000,
+ "not_applicable": 52000,
+ "error": 0
+ },
+ "assessed": 80000,
+ "total": 136000,
+ "ratio": 0.9523809523809523,
+ "scope": "Counts are unique rule evaluations per page, not a complete site inventory."
+ },
+ "site_analysis": {
+ "version": "1.0",
+ "coverage": {
+ "inventory_pages": 2000,
+ "pages_with_facts": 2000,
+ "complete_html_pages": 2000,
+ "crawl_complete": false,
+ "note": "A completed crawl still obeys its configured scope. Missing targets and paths remain unverified."
+ },
+ "node_count": 2000,
+ "edge_count": 2000,
+ "finding_count": 0
+ },
+ "status": "complete",
+ "successful_pages": 2000,
+ "partial_pages": 0,
+ "failed_pages": 0,
+ "skipped_pages": 0,
+ "observed_results": 2000,
+ "missing_results": 0,
+ "pages_analyzed": 2000,
+ "pages_per_second": 12.158286938222352,
+ "avg_time_per_page": 0.0822484289999993,
+ "duration_seconds": 164.4968579999986,
+ "clock": "perf_counter",
+ "memory_rss_start_mb": 355.57,
+ "memory_rss_end_mb": 925.75,
+ "memory_rss_delta_mb": 570.18,
+ "memory_sampled_peak_mb": 1496.406,
+ "memory_sample_count": 2235,
+ "memory_sampling_interval_seconds": 0.05,
+ "memory_measurement": "Sampled process RSS; allocations between samples may be missed.",
+ "memory_used_mb": 570.18,
+ "errors": [],
+ "timestamp": "2026-09-21T04:01:03.765129+00:00",
+ "repetition": 2,
+ "run_order": 2
+ }
+ ],
+ "summaries": [
+ {
+ "scenario": "basic",
+ "requested_pages": 2000,
+ "runs": 2,
+ "complete_runs": 2,
+ "partial_runs": 0,
+ "failed_runs": 0,
+ "metrics_scope": "Only complete runs; inspect raw outcomes for excluded failed or partial runs.",
+ "metrics": {
+ "duration_seconds": {
+ "median": 165.3388396000082,
+ "min": 164.4968579999986,
+ "max": 166.18082120001782
+ },
+ "analysis_duration_seconds": {
+ "median": 101.02173214999493,
+ "min": 100.86997210001573,
+ "max": 101.17349219997413
+ },
+ "report_duration_seconds": {
+ "median": 63.93314445001306,
+ "min": 63.24567219999153,
+ "max": 64.62061670003459
+ },
+ "pages_per_second": {
+ "median": 12.096685040869234,
+ "min": 12.035083143516117,
+ "max": 12.158286938222352
+ },
+ "memory_rss_delta_mb": {
+ "median": 688.135,
+ "min": 570.18,
+ "max": 806.09
+ },
+ "memory_sampled_peak_mb": {
+ "median": 1496.492,
+ "min": 1496.406,
+ "max": 1496.578
+ }
+ }
+ }
+ ],
+ "system_info": {
+ "os": {
+ "system": "Windows",
+ "release": "11",
+ "version": "10.0.26200"
+ },
+ "architecture": "AMD64",
+ "cpu_model": "AMD Ryzen 7 7735HS with Radeon Graphics",
+ "cpu_count": 16,
+ "physical_cpu_count": 8,
+ "memory_total_gb": 63.21,
+ "python_version": "3.12.14 (main, Aug 25 2026, 14:01:42) [MSC v.1944 64 bit (AMD64)]",
+ "python_implementation": "CPython",
+ "package_version": "3.0.0",
+ "installed_distribution_version": "3.0.0",
+ "schema_version": "1.0",
+ "ruleset_version": "2026.09.21",
+ "scoring_version": "2.0",
+ "facts_version": "1.1",
+ "direct_dependencies": {
+ "aiohttp": "3.14.3",
+ "beautifulsoup4": "4.15.0",
+ "click": "8.5.0",
+ "jinja2": "3.1.6",
+ "rich": "15.0.0",
+ "textstat": "0.7.13",
+ "validators": "0.35.0",
+ "pyyaml": "6.0.3",
+ "python-dateutil": "2.9.0.post0",
+ "urllib3": "2.7.0",
+ "psutil": "7.2.2"
+ },
+ "optional_dependencies": {
+ "lxml": "6.1.3",
+ "openpyxl": "3.1.5",
+ "pandas": "3.0.5"
+ },
+ "readability_dependencies": {
+ "nltk": "3.10.3",
+ "pyphen": "0.18.1",
+ "cmudict": null
+ },
+ "source_fingerprint": {
+ "algorithm": "sha256",
+ "scope": "package Python source paths and bytes",
+ "file_count": 23,
+ "digest": "077a203b8b1c65de3022f4001a48cc6a1897e89624e9e7e8f967d20f525f4893"
+ },
+ "timestamp": "2026-09-21T03:55:32.697657+00:00"
+ },
+ "source_unchanged_during_suite": true,
+ "errors": [],
+ "suite": {
+ "scenarios": [
+ "basic"
+ ],
+ "page_counts": [
+ 2000
+ ],
+ "repetitions": 2,
+ "timeout_seconds": 360.0,
+ "order": "Page counts, then scenarios, then repetitions, in supplied order.",
+ "isolation": "Same process; fresh analyzer per run, disabled page cache; library caches and allocator state may remain warm."
+ },
+ "execution_guard": {
+ "dns_attempts": 0,
+ "external_connection_attempts": 0,
+ "network_policy": "DNS and non-loopback TCP connects blocked; loopback allowed for asyncio internals.",
+ "parent_hard_timeout_seconds": 1200
+ }
+}
diff --git a/docs/benchmarks/2026-09-21-python312-2000-mixed.benchmark b/docs/benchmarks/2026-09-21-python312-2000-mixed.benchmark
new file mode 100644
index 0000000..e4d81b9
--- /dev/null
+++ b/docs/benchmarks/2026-09-21-python312-2000-mixed.benchmark
@@ -0,0 +1,547 @@
+{
+ "benchmark_schema_version": 2,
+ "status": "complete",
+ "benchmarks": [
+ {
+ "type": "offline",
+ "fixture_version": 1,
+ "scenario": "mixed",
+ "requested_pages": 2000,
+ "network_access": false,
+ "config": {
+ "crawler": {
+ "max_concurrent": 20,
+ "max_connections_per_host": 5,
+ "timeout": 30,
+ "connect_timeout": 10,
+ "read_timeout": 30,
+ "user_agent": "tfq0seo/3.0.0 (+https://github.com/TFQ0/tfq0seo)",
+ "custom_headers": {},
+ "follow_redirects": true,
+ "max_redirects": 10,
+ "max_pages": 2000,
+ "max_depth": 5,
+ "max_page_size": 10485760,
+ "max_crawl_time": 3600,
+ "delay_between_requests": 0.0,
+ "adaptive_delay": true,
+ "min_delay": 0.0,
+ "max_delay": 5.0,
+ "rate_limit_per_second": null,
+ "respect_robots_txt": true,
+ "robots_cache_ttl": 86400,
+ "crawl_delay_factor": 1.0,
+ "allowed_domains": [],
+ "allowed_schemes": [
+ "http",
+ "https"
+ ],
+ "excluded_patterns": [
+ "\\.pdf$",
+ "\\.zip$",
+ "\\.exe$",
+ "\\.dmg$",
+ "/wp-admin",
+ "/admin",
+ "/login",
+ "\\?.*session",
+ "\\?.*utm_"
+ ],
+ "store_html": false,
+ "max_retries": 3,
+ "retry_on_status": [
+ 429,
+ 500,
+ 502,
+ 503,
+ 504
+ ],
+ "retry_backoff_factor": 2.0,
+ "cache_enabled": false,
+ "cache_ttl": 3600,
+ "cache_size_mb": 100,
+ "use_sitemap": true,
+ "discover_sitemaps": true,
+ "use_connection_pooling": true,
+ "dns_cache_ttl": 300,
+ "verify_ssl": true,
+ "proxy": null
+ },
+ "analysis": {
+ "enabled_analyzers": [
+ "seo",
+ "content",
+ "technical",
+ "performance",
+ "links"
+ ],
+ "analysis_mode": "standard",
+ "parallel_analysis": true,
+ "max_analysis_threads": 4,
+ "check_external_links": false,
+ "check_internal_links": true,
+ "check_broken_links": true,
+ "max_external_links_per_page": 100,
+ "external_link_timeout": 10,
+ "target_keywords": [],
+ "check_content_uniqueness": true,
+ "score_weights": {
+ "seo": 0.3,
+ "content": 0.25,
+ "technical": 0.2,
+ "performance": 0.15,
+ "links": 0.1
+ }
+ },
+ "export": {
+ "formats": [
+ "html"
+ ],
+ "primary_format": "html",
+ "html_template": "optimized",
+ "output_directory": "./reports",
+ "filename_pattern": "{domain}_{timestamp}_{format}"
+ },
+ "profile": "standard",
+ "version": "3.0.0",
+ "debug": false,
+ "continue_on_error": true,
+ "max_memory_mb": 1024
+ },
+ "fixture": {
+ "version": 1,
+ "generated_pages": 2000,
+ "html_bytes": 8158500,
+ "dom_elements": 143352,
+ "href_references": 27308,
+ "image_elements": 5336,
+ "analyzed_word_count": 898986,
+ "pages_with_word_count": 2000,
+ "variants": {
+ "basic": 667,
+ "content-heavy": 667,
+ "link-dense": 666
+ },
+ "sha256": "028909e0dea50dfb82979acf9129d3cdb5b1b46026423fdc7ce3867cbb88839f"
+ },
+ "timeout_seconds": 360.0,
+ "timed_out": false,
+ "timeout_scope": "Cooperative checks between pages and after reporting; synchronous work can overrun the deadline.",
+ "report_completeness": {
+ "expected_pages": 2000,
+ "retained_rows": 2000,
+ "unique_urls": 2000,
+ "missing_urls": 0,
+ "unexpected_urls": 0,
+ "duplicate_rows": 0,
+ "complete": true
+ },
+ "readability": {
+ "status_counts": {
+ "not_requested": 667,
+ "unavailable": 1333
+ },
+ "missing_resources": [
+ "nltk:corpora/cmudict"
+ ]
+ },
+ "workload": "Fixture generation, HTML parsing, static analysis, site report aggregation and retained-URL verification; no HTTP, browser or export measurement",
+ "analysis_duration_seconds": 132.48825890000444,
+ "report_duration_seconds": 70.79365659999894,
+ "report_pages": 2000,
+ "report_status": "complete",
+ "report_summary": {
+ "total_pages": 2000,
+ "successful_pages": 2000,
+ "partial_pages": 0,
+ "failed_pages": 0,
+ "skipped_pages": 0,
+ "analysis_mode": "standard",
+ "analysis_timestamp": 1789963457.3870037,
+ "analysis_duration": 0,
+ "crawl_complete": false,
+ "limits_reached": [],
+ "discovery_errors": [],
+ "scope_note": "Results describe fetched pages; unvisited targets remain unchecked."
+ },
+ "rule_coverage": {
+ "counts": {
+ "pass": 77294,
+ "fail": 0,
+ "informational": 9373,
+ "unknown": 5333,
+ "not_applicable": 44000,
+ "error": 0
+ },
+ "assessed": 86667,
+ "total": 136000,
+ "ratio": 0.9420326086956522,
+ "scope": "Counts are unique rule evaluations per page, not a complete site inventory."
+ },
+ "site_analysis": {
+ "version": "1.0",
+ "coverage": {
+ "inventory_pages": 2000,
+ "pages_with_facts": 2000,
+ "complete_html_pages": 2000,
+ "crawl_complete": false,
+ "note": "A completed crawl still obeys its configured scope. Missing targets and paths remain unverified."
+ },
+ "node_count": 2000,
+ "edge_count": 23312,
+ "finding_count": 0
+ },
+ "status": "complete",
+ "successful_pages": 2000,
+ "partial_pages": 0,
+ "failed_pages": 0,
+ "skipped_pages": 0,
+ "observed_results": 2000,
+ "missing_results": 0,
+ "pages_analyzed": 2000,
+ "pages_per_second": 9.816020526068504,
+ "avg_time_per_page": 0.10187427759999991,
+ "duration_seconds": 203.74855519999983,
+ "clock": "perf_counter",
+ "memory_rss_start_mb": 76.684,
+ "memory_rss_end_mb": 1060.215,
+ "memory_rss_delta_mb": 983.531,
+ "memory_sampled_peak_mb": 1702.445,
+ "memory_sample_count": 2798,
+ "memory_sampling_interval_seconds": 0.05,
+ "memory_measurement": "Sampled process RSS; allocations between samples may be missed.",
+ "memory_used_mb": 983.531,
+ "errors": [],
+ "timestamp": "2026-09-21T04:04:29.047144+00:00",
+ "repetition": 1,
+ "run_order": 1
+ },
+ {
+ "type": "offline",
+ "fixture_version": 1,
+ "scenario": "mixed",
+ "requested_pages": 2000,
+ "network_access": false,
+ "config": {
+ "crawler": {
+ "max_concurrent": 20,
+ "max_connections_per_host": 5,
+ "timeout": 30,
+ "connect_timeout": 10,
+ "read_timeout": 30,
+ "user_agent": "tfq0seo/3.0.0 (+https://github.com/TFQ0/tfq0seo)",
+ "custom_headers": {},
+ "follow_redirects": true,
+ "max_redirects": 10,
+ "max_pages": 2000,
+ "max_depth": 5,
+ "max_page_size": 10485760,
+ "max_crawl_time": 3600,
+ "delay_between_requests": 0.0,
+ "adaptive_delay": true,
+ "min_delay": 0.0,
+ "max_delay": 5.0,
+ "rate_limit_per_second": null,
+ "respect_robots_txt": true,
+ "robots_cache_ttl": 86400,
+ "crawl_delay_factor": 1.0,
+ "allowed_domains": [],
+ "allowed_schemes": [
+ "http",
+ "https"
+ ],
+ "excluded_patterns": [
+ "\\.pdf$",
+ "\\.zip$",
+ "\\.exe$",
+ "\\.dmg$",
+ "/wp-admin",
+ "/admin",
+ "/login",
+ "\\?.*session",
+ "\\?.*utm_"
+ ],
+ "store_html": false,
+ "max_retries": 3,
+ "retry_on_status": [
+ 429,
+ 500,
+ 502,
+ 503,
+ 504
+ ],
+ "retry_backoff_factor": 2.0,
+ "cache_enabled": false,
+ "cache_ttl": 3600,
+ "cache_size_mb": 100,
+ "use_sitemap": true,
+ "discover_sitemaps": true,
+ "use_connection_pooling": true,
+ "dns_cache_ttl": 300,
+ "verify_ssl": true,
+ "proxy": null
+ },
+ "analysis": {
+ "enabled_analyzers": [
+ "seo",
+ "content",
+ "technical",
+ "performance",
+ "links"
+ ],
+ "analysis_mode": "standard",
+ "parallel_analysis": true,
+ "max_analysis_threads": 4,
+ "check_external_links": false,
+ "check_internal_links": true,
+ "check_broken_links": true,
+ "max_external_links_per_page": 100,
+ "external_link_timeout": 10,
+ "target_keywords": [],
+ "check_content_uniqueness": true,
+ "score_weights": {
+ "seo": 0.3,
+ "content": 0.25,
+ "technical": 0.2,
+ "performance": 0.15,
+ "links": 0.1
+ }
+ },
+ "export": {
+ "formats": [
+ "html"
+ ],
+ "primary_format": "html",
+ "html_template": "optimized",
+ "output_directory": "./reports",
+ "filename_pattern": "{domain}_{timestamp}_{format}"
+ },
+ "profile": "standard",
+ "version": "3.0.0",
+ "debug": false,
+ "continue_on_error": true,
+ "max_memory_mb": 1024
+ },
+ "fixture": {
+ "version": 1,
+ "generated_pages": 2000,
+ "html_bytes": 8158500,
+ "dom_elements": 143352,
+ "href_references": 27308,
+ "image_elements": 5336,
+ "analyzed_word_count": 898986,
+ "pages_with_word_count": 2000,
+ "variants": {
+ "basic": 667,
+ "content-heavy": 667,
+ "link-dense": 666
+ },
+ "sha256": "028909e0dea50dfb82979acf9129d3cdb5b1b46026423fdc7ce3867cbb88839f"
+ },
+ "timeout_seconds": 360.0,
+ "timed_out": false,
+ "timeout_scope": "Cooperative checks between pages and after reporting; synchronous work can overrun the deadline.",
+ "report_completeness": {
+ "expected_pages": 2000,
+ "retained_rows": 2000,
+ "unique_urls": 2000,
+ "missing_urls": 0,
+ "unexpected_urls": 0,
+ "duplicate_rows": 0,
+ "complete": true
+ },
+ "readability": {
+ "status_counts": {
+ "not_requested": 667,
+ "unavailable": 1333
+ },
+ "missing_resources": [
+ "nltk:corpora/cmudict"
+ ]
+ },
+ "workload": "Fixture generation, HTML parsing, static analysis, site report aggregation and retained-URL verification; no HTTP, browser or export measurement",
+ "analysis_duration_seconds": 123.17364019999513,
+ "report_duration_seconds": 60.40574000001652,
+ "report_pages": 2000,
+ "report_status": "complete",
+ "report_summary": {
+ "total_pages": 2000,
+ "successful_pages": 2000,
+ "partial_pages": 0,
+ "failed_pages": 0,
+ "skipped_pages": 0,
+ "analysis_mode": "standard",
+ "analysis_timestamp": 1789963644.561493,
+ "analysis_duration": 0,
+ "crawl_complete": false,
+ "limits_reached": [],
+ "discovery_errors": [],
+ "scope_note": "Results describe fetched pages; unvisited targets remain unchecked."
+ },
+ "rule_coverage": {
+ "counts": {
+ "pass": 77294,
+ "fail": 0,
+ "informational": 9373,
+ "unknown": 5333,
+ "not_applicable": 44000,
+ "error": 0
+ },
+ "assessed": 86667,
+ "total": 136000,
+ "ratio": 0.9420326086956522,
+ "scope": "Counts are unique rule evaluations per page, not a complete site inventory."
+ },
+ "site_analysis": {
+ "version": "1.0",
+ "coverage": {
+ "inventory_pages": 2000,
+ "pages_with_facts": 2000,
+ "complete_html_pages": 2000,
+ "crawl_complete": false,
+ "note": "A completed crawl still obeys its configured scope. Missing targets and paths remain unverified."
+ },
+ "node_count": 2000,
+ "edge_count": 23312,
+ "finding_count": 0
+ },
+ "status": "complete",
+ "successful_pages": 2000,
+ "partial_pages": 0,
+ "failed_pages": 0,
+ "skipped_pages": 0,
+ "observed_results": 2000,
+ "missing_results": 0,
+ "pages_analyzed": 2000,
+ "pages_per_second": 10.867857227312523,
+ "avg_time_per_page": 0.09201445869999589,
+ "duration_seconds": 184.02891739999177,
+ "clock": "perf_counter",
+ "memory_rss_start_mb": 526.355,
+ "memory_rss_end_mb": 1005.086,
+ "memory_rss_delta_mb": 478.73,
+ "memory_sampled_peak_mb": 1704.723,
+ "memory_sample_count": 2495,
+ "memory_sampling_interval_seconds": 0.05,
+ "memory_measurement": "Sampled process RSS; allocations between samples may be missed.",
+ "memory_used_mb": 478.73,
+ "errors": [],
+ "timestamp": "2026-09-21T04:07:33.590864+00:00",
+ "repetition": 2,
+ "run_order": 2
+ }
+ ],
+ "summaries": [
+ {
+ "scenario": "mixed",
+ "requested_pages": 2000,
+ "runs": 2,
+ "complete_runs": 2,
+ "partial_runs": 0,
+ "failed_runs": 0,
+ "metrics_scope": "Only complete runs; inspect raw outcomes for excluded failed or partial runs.",
+ "metrics": {
+ "duration_seconds": {
+ "median": 193.8887362999958,
+ "min": 184.02891739999177,
+ "max": 203.74855519999983
+ },
+ "analysis_duration_seconds": {
+ "median": 127.83094954999979,
+ "min": 123.17364019999513,
+ "max": 132.48825890000444
+ },
+ "report_duration_seconds": {
+ "median": 65.59969830000773,
+ "min": 60.40574000001652,
+ "max": 70.79365659999894
+ },
+ "pages_per_second": {
+ "median": 10.341938876690513,
+ "min": 9.816020526068504,
+ "max": 10.867857227312523
+ },
+ "memory_rss_delta_mb": {
+ "median": 731.1305,
+ "min": 478.73,
+ "max": 983.531
+ },
+ "memory_sampled_peak_mb": {
+ "median": 1703.5839999999998,
+ "min": 1702.445,
+ "max": 1704.723
+ }
+ }
+ }
+ ],
+ "system_info": {
+ "os": {
+ "system": "Windows",
+ "release": "11",
+ "version": "10.0.26200"
+ },
+ "architecture": "AMD64",
+ "cpu_model": "AMD Ryzen 7 7735HS with Radeon Graphics",
+ "cpu_count": 16,
+ "physical_cpu_count": 8,
+ "memory_total_gb": 63.21,
+ "python_version": "3.12.14 (main, Aug 25 2026, 14:01:42) [MSC v.1944 64 bit (AMD64)]",
+ "python_implementation": "CPython",
+ "package_version": "3.0.0",
+ "installed_distribution_version": "3.0.0",
+ "schema_version": "1.0",
+ "ruleset_version": "2026.09.21",
+ "scoring_version": "2.0",
+ "facts_version": "1.1",
+ "direct_dependencies": {
+ "aiohttp": "3.14.3",
+ "beautifulsoup4": "4.15.0",
+ "click": "8.5.0",
+ "jinja2": "3.1.6",
+ "rich": "15.0.0",
+ "textstat": "0.7.13",
+ "validators": "0.35.0",
+ "pyyaml": "6.0.3",
+ "python-dateutil": "2.9.0.post0",
+ "urllib3": "2.7.0",
+ "psutil": "7.2.2"
+ },
+ "optional_dependencies": {
+ "lxml": "6.1.3",
+ "openpyxl": "3.1.5",
+ "pandas": "3.0.5"
+ },
+ "readability_dependencies": {
+ "nltk": "3.10.3",
+ "pyphen": "0.18.1",
+ "cmudict": null
+ },
+ "source_fingerprint": {
+ "algorithm": "sha256",
+ "scope": "package Python source paths and bytes",
+ "file_count": 23,
+ "digest": "077a203b8b1c65de3022f4001a48cc6a1897e89624e9e7e8f967d20f525f4893"
+ },
+ "timestamp": "2026-09-21T04:01:05.292881+00:00"
+ },
+ "source_unchanged_during_suite": true,
+ "errors": [],
+ "suite": {
+ "scenarios": [
+ "mixed"
+ ],
+ "page_counts": [
+ 2000
+ ],
+ "repetitions": 2,
+ "timeout_seconds": 360.0,
+ "order": "Page counts, then scenarios, then repetitions, in supplied order.",
+ "isolation": "Same process; fresh analyzer per run, disabled page cache; library caches and allocator state may remain warm."
+ },
+ "execution_guard": {
+ "dns_attempts": 0,
+ "external_connection_attempts": 0,
+ "network_policy": "DNS and non-loopback TCP connects blocked; loopback allowed for asyncio internals.",
+ "parent_hard_timeout_seconds": 1200
+ }
+}
diff --git a/docs/benchmarks/2026-09-21-python312-500-suite.benchmark b/docs/benchmarks/2026-09-21-python312-500-suite.benchmark
new file mode 100644
index 0000000..a27ca0a
--- /dev/null
+++ b/docs/benchmarks/2026-09-21-python312-500-suite.benchmark
@@ -0,0 +1,1947 @@
+{
+ "benchmark_schema_version": 2,
+ "status": "complete",
+ "benchmarks": [
+ {
+ "type": "offline",
+ "fixture_version": 1,
+ "scenario": "basic",
+ "requested_pages": 500,
+ "network_access": false,
+ "config": {
+ "crawler": {
+ "max_concurrent": 20,
+ "max_connections_per_host": 5,
+ "timeout": 30,
+ "connect_timeout": 10,
+ "read_timeout": 30,
+ "user_agent": "tfq0seo/3.0.0 (+https://github.com/TFQ0/tfq0seo)",
+ "custom_headers": {},
+ "follow_redirects": true,
+ "max_redirects": 10,
+ "max_pages": 500,
+ "max_depth": 5,
+ "max_page_size": 10485760,
+ "max_crawl_time": 3600,
+ "delay_between_requests": 0.0,
+ "adaptive_delay": true,
+ "min_delay": 0.0,
+ "max_delay": 5.0,
+ "rate_limit_per_second": null,
+ "respect_robots_txt": true,
+ "robots_cache_ttl": 86400,
+ "crawl_delay_factor": 1.0,
+ "allowed_domains": [],
+ "allowed_schemes": [
+ "http",
+ "https"
+ ],
+ "excluded_patterns": [
+ "\\.pdf$",
+ "\\.zip$",
+ "\\.exe$",
+ "\\.dmg$",
+ "/wp-admin",
+ "/admin",
+ "/login",
+ "\\?.*session",
+ "\\?.*utm_"
+ ],
+ "store_html": false,
+ "max_retries": 3,
+ "retry_on_status": [
+ 429,
+ 500,
+ 502,
+ 503,
+ 504
+ ],
+ "retry_backoff_factor": 2.0,
+ "cache_enabled": false,
+ "cache_ttl": 3600,
+ "cache_size_mb": 100,
+ "use_sitemap": true,
+ "discover_sitemaps": true,
+ "use_connection_pooling": true,
+ "dns_cache_ttl": 300,
+ "verify_ssl": true,
+ "proxy": null
+ },
+ "analysis": {
+ "enabled_analyzers": [
+ "seo",
+ "content",
+ "technical",
+ "performance",
+ "links"
+ ],
+ "analysis_mode": "standard",
+ "parallel_analysis": true,
+ "max_analysis_threads": 4,
+ "check_external_links": false,
+ "check_internal_links": true,
+ "check_broken_links": true,
+ "max_external_links_per_page": 100,
+ "external_link_timeout": 10,
+ "target_keywords": [],
+ "check_content_uniqueness": true,
+ "score_weights": {
+ "seo": 0.3,
+ "content": 0.25,
+ "technical": 0.2,
+ "performance": 0.15,
+ "links": 0.1
+ }
+ },
+ "export": {
+ "formats": [
+ "html"
+ ],
+ "primary_format": "html",
+ "html_template": "optimized",
+ "output_directory": "./reports",
+ "filename_pattern": "{domain}_{timestamp}_{format}"
+ },
+ "profile": "standard",
+ "version": "3.0.0",
+ "debug": false,
+ "continue_on_error": true,
+ "max_memory_mb": 1024
+ },
+ "fixture": {
+ "version": 1,
+ "generated_pages": 500,
+ "html_bytes": 209670,
+ "dom_elements": 5000,
+ "href_references": 500,
+ "image_elements": 0,
+ "analyzed_word_count": 8500,
+ "pages_with_word_count": 500,
+ "variants": {
+ "basic": 500,
+ "content-heavy": 0,
+ "link-dense": 0
+ },
+ "sha256": "6353532d2488bb21abd01d87b3a94c596b050d10e120e9ab48a79baf07d01884"
+ },
+ "timeout_seconds": 360.0,
+ "timed_out": false,
+ "timeout_scope": "Cooperative checks between pages and after reporting; synchronous work can overrun the deadline.",
+ "report_completeness": {
+ "expected_pages": 500,
+ "retained_rows": 500,
+ "unique_urls": 500,
+ "missing_urls": 0,
+ "unexpected_urls": 0,
+ "duplicate_rows": 0,
+ "complete": true
+ },
+ "readability": {
+ "status_counts": {
+ "not_requested": 500
+ },
+ "missing_resources": []
+ },
+ "workload": "Fixture generation, HTML parsing, static analysis, site report aggregation and retained-URL verification; no HTTP, browser or export measurement",
+ "analysis_duration_seconds": 24.186609499971382,
+ "report_duration_seconds": 16.15168629999971,
+ "report_pages": 500,
+ "report_status": "complete",
+ "report_summary": {
+ "total_pages": 500,
+ "successful_pages": 500,
+ "partial_pages": 0,
+ "failed_pages": 0,
+ "skipped_pages": 0,
+ "analysis_mode": "standard",
+ "analysis_timestamp": 1789962562.9254942,
+ "analysis_duration": 0,
+ "crawl_complete": false,
+ "limits_reached": [],
+ "discovery_errors": [],
+ "scope_note": "Results describe fetched pages; unvisited targets remain unchecked."
+ },
+ "rule_coverage": {
+ "counts": {
+ "pass": 18000,
+ "fail": 0,
+ "informational": 2000,
+ "unknown": 1000,
+ "not_applicable": 13000,
+ "error": 0
+ },
+ "assessed": 20000,
+ "total": 34000,
+ "ratio": 0.9523809523809523,
+ "scope": "Counts are unique rule evaluations per page, not a complete site inventory."
+ },
+ "site_analysis": {
+ "version": "1.0",
+ "coverage": {
+ "inventory_pages": 500,
+ "pages_with_facts": 500,
+ "complete_html_pages": 500,
+ "crawl_complete": false,
+ "note": "A completed crawl still obeys its configured scope. Missing targets and paths remain unverified."
+ },
+ "node_count": 500,
+ "edge_count": 500,
+ "finding_count": 0
+ },
+ "status": "complete",
+ "successful_pages": 500,
+ "partial_pages": 0,
+ "failed_pages": 0,
+ "skipped_pages": 0,
+ "observed_results": 500,
+ "missing_results": 0,
+ "pages_analyzed": 500,
+ "pages_per_second": 12.366761225640792,
+ "avg_time_per_page": 0.08086191540001891,
+ "duration_seconds": 40.43095770000946,
+ "clock": "perf_counter",
+ "memory_rss_start_mb": 76.902,
+ "memory_rss_end_mb": 321.105,
+ "memory_rss_delta_mb": 244.203,
+ "memory_sampled_peak_mb": 431.445,
+ "memory_sample_count": 553,
+ "memory_sampling_interval_seconds": 0.05,
+ "memory_measurement": "Sampled process RSS; allocations between samples may be missed.",
+ "memory_used_mb": 244.203,
+ "errors": [],
+ "timestamp": "2026-09-21T03:49:25.429868+00:00",
+ "repetition": 1,
+ "run_order": 1
+ },
+ {
+ "type": "offline",
+ "fixture_version": 1,
+ "scenario": "basic",
+ "requested_pages": 500,
+ "network_access": false,
+ "config": {
+ "crawler": {
+ "max_concurrent": 20,
+ "max_connections_per_host": 5,
+ "timeout": 30,
+ "connect_timeout": 10,
+ "read_timeout": 30,
+ "user_agent": "tfq0seo/3.0.0 (+https://github.com/TFQ0/tfq0seo)",
+ "custom_headers": {},
+ "follow_redirects": true,
+ "max_redirects": 10,
+ "max_pages": 500,
+ "max_depth": 5,
+ "max_page_size": 10485760,
+ "max_crawl_time": 3600,
+ "delay_between_requests": 0.0,
+ "adaptive_delay": true,
+ "min_delay": 0.0,
+ "max_delay": 5.0,
+ "rate_limit_per_second": null,
+ "respect_robots_txt": true,
+ "robots_cache_ttl": 86400,
+ "crawl_delay_factor": 1.0,
+ "allowed_domains": [],
+ "allowed_schemes": [
+ "http",
+ "https"
+ ],
+ "excluded_patterns": [
+ "\\.pdf$",
+ "\\.zip$",
+ "\\.exe$",
+ "\\.dmg$",
+ "/wp-admin",
+ "/admin",
+ "/login",
+ "\\?.*session",
+ "\\?.*utm_"
+ ],
+ "store_html": false,
+ "max_retries": 3,
+ "retry_on_status": [
+ 429,
+ 500,
+ 502,
+ 503,
+ 504
+ ],
+ "retry_backoff_factor": 2.0,
+ "cache_enabled": false,
+ "cache_ttl": 3600,
+ "cache_size_mb": 100,
+ "use_sitemap": true,
+ "discover_sitemaps": true,
+ "use_connection_pooling": true,
+ "dns_cache_ttl": 300,
+ "verify_ssl": true,
+ "proxy": null
+ },
+ "analysis": {
+ "enabled_analyzers": [
+ "seo",
+ "content",
+ "technical",
+ "performance",
+ "links"
+ ],
+ "analysis_mode": "standard",
+ "parallel_analysis": true,
+ "max_analysis_threads": 4,
+ "check_external_links": false,
+ "check_internal_links": true,
+ "check_broken_links": true,
+ "max_external_links_per_page": 100,
+ "external_link_timeout": 10,
+ "target_keywords": [],
+ "check_content_uniqueness": true,
+ "score_weights": {
+ "seo": 0.3,
+ "content": 0.25,
+ "technical": 0.2,
+ "performance": 0.15,
+ "links": 0.1
+ }
+ },
+ "export": {
+ "formats": [
+ "html"
+ ],
+ "primary_format": "html",
+ "html_template": "optimized",
+ "output_directory": "./reports",
+ "filename_pattern": "{domain}_{timestamp}_{format}"
+ },
+ "profile": "standard",
+ "version": "3.0.0",
+ "debug": false,
+ "continue_on_error": true,
+ "max_memory_mb": 1024
+ },
+ "fixture": {
+ "version": 1,
+ "generated_pages": 500,
+ "html_bytes": 209670,
+ "dom_elements": 5000,
+ "href_references": 500,
+ "image_elements": 0,
+ "analyzed_word_count": 8500,
+ "pages_with_word_count": 500,
+ "variants": {
+ "basic": 500,
+ "content-heavy": 0,
+ "link-dense": 0
+ },
+ "sha256": "6353532d2488bb21abd01d87b3a94c596b050d10e120e9ab48a79baf07d01884"
+ },
+ "timeout_seconds": 360.0,
+ "timed_out": false,
+ "timeout_scope": "Cooperative checks between pages and after reporting; synchronous work can overrun the deadline.",
+ "report_completeness": {
+ "expected_pages": 500,
+ "retained_rows": 500,
+ "unique_urls": 500,
+ "missing_urls": 0,
+ "unexpected_urls": 0,
+ "duplicate_rows": 0,
+ "complete": true
+ },
+ "readability": {
+ "status_counts": {
+ "not_requested": 500
+ },
+ "missing_resources": []
+ },
+ "workload": "Fixture generation, HTML parsing, static analysis, site report aggregation and retained-URL verification; no HTTP, browser or export measurement",
+ "analysis_duration_seconds": 26.558759699983057,
+ "report_duration_seconds": 15.826399100013077,
+ "report_pages": 500,
+ "report_status": "complete",
+ "report_summary": {
+ "total_pages": 500,
+ "successful_pages": 500,
+ "partial_pages": 0,
+ "failed_pages": 0,
+ "skipped_pages": 0,
+ "analysis_mode": "standard",
+ "analysis_timestamp": 1789962605.4694152,
+ "analysis_duration": 0,
+ "crawl_complete": false,
+ "limits_reached": [],
+ "discovery_errors": [],
+ "scope_note": "Results describe fetched pages; unvisited targets remain unchecked."
+ },
+ "rule_coverage": {
+ "counts": {
+ "pass": 18000,
+ "fail": 0,
+ "informational": 2000,
+ "unknown": 1000,
+ "not_applicable": 13000,
+ "error": 0
+ },
+ "assessed": 20000,
+ "total": 34000,
+ "ratio": 0.9523809523809523,
+ "scope": "Counts are unique rule evaluations per page, not a complete site inventory."
+ },
+ "site_analysis": {
+ "version": "1.0",
+ "coverage": {
+ "inventory_pages": 500,
+ "pages_with_facts": 500,
+ "complete_html_pages": 500,
+ "crawl_complete": false,
+ "note": "A completed crawl still obeys its configured scope. Missing targets and paths remain unverified."
+ },
+ "node_count": 500,
+ "edge_count": 500,
+ "finding_count": 0
+ },
+ "status": "complete",
+ "successful_pages": 500,
+ "partial_pages": 0,
+ "failed_pages": 0,
+ "skipped_pages": 0,
+ "observed_results": 500,
+ "missing_results": 0,
+ "pages_analyzed": 500,
+ "pages_per_second": 11.77114630579592,
+ "avg_time_per_page": 0.08495349340001121,
+ "duration_seconds": 42.476746700005606,
+ "clock": "perf_counter",
+ "memory_rss_start_mb": 245.605,
+ "memory_rss_end_mb": 322.59,
+ "memory_rss_delta_mb": 76.984,
+ "memory_sampled_peak_mb": 430.887,
+ "memory_sample_count": 583,
+ "memory_sampling_interval_seconds": 0.05,
+ "memory_measurement": "Sampled process RSS; allocations between samples may be missed.",
+ "memory_used_mb": 76.984,
+ "errors": [],
+ "timestamp": "2026-09-21T03:50:07.998789+00:00",
+ "repetition": 2,
+ "run_order": 2
+ },
+ {
+ "type": "offline",
+ "fixture_version": 1,
+ "scenario": "content-heavy",
+ "requested_pages": 500,
+ "network_access": false,
+ "config": {
+ "crawler": {
+ "max_concurrent": 20,
+ "max_connections_per_host": 5,
+ "timeout": 30,
+ "connect_timeout": 10,
+ "read_timeout": 30,
+ "user_agent": "tfq0seo/3.0.0 (+https://github.com/TFQ0/tfq0seo)",
+ "custom_headers": {},
+ "follow_redirects": true,
+ "max_redirects": 10,
+ "max_pages": 500,
+ "max_depth": 5,
+ "max_page_size": 10485760,
+ "max_crawl_time": 3600,
+ "delay_between_requests": 0.0,
+ "adaptive_delay": true,
+ "min_delay": 0.0,
+ "max_delay": 5.0,
+ "rate_limit_per_second": null,
+ "respect_robots_txt": true,
+ "robots_cache_ttl": 86400,
+ "crawl_delay_factor": 1.0,
+ "allowed_domains": [],
+ "allowed_schemes": [
+ "http",
+ "https"
+ ],
+ "excluded_patterns": [
+ "\\.pdf$",
+ "\\.zip$",
+ "\\.exe$",
+ "\\.dmg$",
+ "/wp-admin",
+ "/admin",
+ "/login",
+ "\\?.*session",
+ "\\?.*utm_"
+ ],
+ "store_html": false,
+ "max_retries": 3,
+ "retry_on_status": [
+ 429,
+ 500,
+ 502,
+ 503,
+ 504
+ ],
+ "retry_backoff_factor": 2.0,
+ "cache_enabled": false,
+ "cache_ttl": 3600,
+ "cache_size_mb": 100,
+ "use_sitemap": true,
+ "discover_sitemaps": true,
+ "use_connection_pooling": true,
+ "dns_cache_ttl": 300,
+ "verify_ssl": true,
+ "proxy": null
+ },
+ "analysis": {
+ "enabled_analyzers": [
+ "seo",
+ "content",
+ "technical",
+ "performance",
+ "links"
+ ],
+ "analysis_mode": "standard",
+ "parallel_analysis": true,
+ "max_analysis_threads": 4,
+ "check_external_links": false,
+ "check_internal_links": true,
+ "check_broken_links": true,
+ "max_external_links_per_page": 100,
+ "external_link_timeout": 10,
+ "target_keywords": [],
+ "check_content_uniqueness": true,
+ "score_weights": {
+ "seo": 0.3,
+ "content": 0.25,
+ "technical": 0.2,
+ "performance": 0.15,
+ "links": 0.1
+ }
+ },
+ "export": {
+ "formats": [
+ "html"
+ ],
+ "primary_format": "html",
+ "html_template": "optimized",
+ "output_directory": "./reports",
+ "filename_pattern": "{domain}_{timestamp}_{format}"
+ },
+ "profile": "standard",
+ "version": "3.0.0",
+ "debug": false,
+ "continue_on_error": true,
+ "max_memory_mb": 1024
+ },
+ "fixture": {
+ "version": 1,
+ "generated_pages": 500,
+ "html_bytes": 4739555,
+ "dom_elements": 76000,
+ "href_references": 500,
+ "image_elements": 4000,
+ "analyzed_word_count": 600500,
+ "pages_with_word_count": 500,
+ "variants": {
+ "basic": 0,
+ "content-heavy": 500,
+ "link-dense": 0
+ },
+ "sha256": "4fe8906021560317f0a1f36139b78b9f3ffd62d163f2d064b070b70746386946"
+ },
+ "timeout_seconds": 360.0,
+ "timed_out": false,
+ "timeout_scope": "Cooperative checks between pages and after reporting; synchronous work can overrun the deadline.",
+ "report_completeness": {
+ "expected_pages": 500,
+ "retained_rows": 500,
+ "unique_urls": 500,
+ "missing_urls": 0,
+ "unexpected_urls": 0,
+ "duplicate_rows": 0,
+ "complete": true
+ },
+ "readability": {
+ "status_counts": {
+ "unavailable": 500
+ },
+ "missing_resources": [
+ "nltk:corpora/cmudict"
+ ]
+ },
+ "workload": "Fixture generation, HTML parsing, static analysis, site report aggregation and retained-URL verification; no HTTP, browser or export measurement",
+ "analysis_duration_seconds": 38.38801830000011,
+ "report_duration_seconds": 18.198708300013095,
+ "report_pages": 500,
+ "report_status": "complete",
+ "report_summary": {
+ "total_pages": 500,
+ "successful_pages": 500,
+ "partial_pages": 0,
+ "failed_pages": 0,
+ "skipped_pages": 0,
+ "analysis_mode": "standard",
+ "analysis_timestamp": 1789962661.7445223,
+ "analysis_duration": 0,
+ "crawl_complete": false,
+ "limits_reached": [],
+ "discovery_errors": [],
+ "scope_note": "Results describe fetched pages; unvisited targets remain unchecked."
+ },
+ "rule_coverage": {
+ "counts": {
+ "pass": 20500,
+ "fail": 0,
+ "informational": 3000,
+ "unknown": 1500,
+ "not_applicable": 9000,
+ "error": 0
+ },
+ "assessed": 23500,
+ "total": 34000,
+ "ratio": 0.94,
+ "scope": "Counts are unique rule evaluations per page, not a complete site inventory."
+ },
+ "site_analysis": {
+ "version": "1.0",
+ "coverage": {
+ "inventory_pages": 500,
+ "pages_with_facts": 500,
+ "complete_html_pages": 500,
+ "crawl_complete": false,
+ "note": "A completed crawl still obeys its configured scope. Missing targets and paths remain unverified."
+ },
+ "node_count": 500,
+ "edge_count": 500,
+ "finding_count": 0
+ },
+ "status": "complete",
+ "successful_pages": 500,
+ "partial_pages": 0,
+ "failed_pages": 0,
+ "skipped_pages": 0,
+ "observed_results": 500,
+ "missing_results": 0,
+ "pages_analyzed": 500,
+ "pages_per_second": 8.816645281778309,
+ "avg_time_per_page": 0.11342182519997004,
+ "duration_seconds": 56.71091259998502,
+ "clock": "perf_counter",
+ "memory_rss_start_mb": 266.5,
+ "memory_rss_end_mb": 385.672,
+ "memory_rss_delta_mb": 119.172,
+ "memory_sampled_peak_mb": 503.48,
+ "memory_sample_count": 746,
+ "memory_sampling_interval_seconds": 0.05,
+ "memory_measurement": "Sampled process RSS; allocations between samples may be missed.",
+ "memory_used_mb": 119.172,
+ "errors": [],
+ "timestamp": "2026-09-21T03:51:04.801500+00:00",
+ "repetition": 1,
+ "run_order": 3
+ },
+ {
+ "type": "offline",
+ "fixture_version": 1,
+ "scenario": "content-heavy",
+ "requested_pages": 500,
+ "network_access": false,
+ "config": {
+ "crawler": {
+ "max_concurrent": 20,
+ "max_connections_per_host": 5,
+ "timeout": 30,
+ "connect_timeout": 10,
+ "read_timeout": 30,
+ "user_agent": "tfq0seo/3.0.0 (+https://github.com/TFQ0/tfq0seo)",
+ "custom_headers": {},
+ "follow_redirects": true,
+ "max_redirects": 10,
+ "max_pages": 500,
+ "max_depth": 5,
+ "max_page_size": 10485760,
+ "max_crawl_time": 3600,
+ "delay_between_requests": 0.0,
+ "adaptive_delay": true,
+ "min_delay": 0.0,
+ "max_delay": 5.0,
+ "rate_limit_per_second": null,
+ "respect_robots_txt": true,
+ "robots_cache_ttl": 86400,
+ "crawl_delay_factor": 1.0,
+ "allowed_domains": [],
+ "allowed_schemes": [
+ "http",
+ "https"
+ ],
+ "excluded_patterns": [
+ "\\.pdf$",
+ "\\.zip$",
+ "\\.exe$",
+ "\\.dmg$",
+ "/wp-admin",
+ "/admin",
+ "/login",
+ "\\?.*session",
+ "\\?.*utm_"
+ ],
+ "store_html": false,
+ "max_retries": 3,
+ "retry_on_status": [
+ 429,
+ 500,
+ 502,
+ 503,
+ 504
+ ],
+ "retry_backoff_factor": 2.0,
+ "cache_enabled": false,
+ "cache_ttl": 3600,
+ "cache_size_mb": 100,
+ "use_sitemap": true,
+ "discover_sitemaps": true,
+ "use_connection_pooling": true,
+ "dns_cache_ttl": 300,
+ "verify_ssl": true,
+ "proxy": null
+ },
+ "analysis": {
+ "enabled_analyzers": [
+ "seo",
+ "content",
+ "technical",
+ "performance",
+ "links"
+ ],
+ "analysis_mode": "standard",
+ "parallel_analysis": true,
+ "max_analysis_threads": 4,
+ "check_external_links": false,
+ "check_internal_links": true,
+ "check_broken_links": true,
+ "max_external_links_per_page": 100,
+ "external_link_timeout": 10,
+ "target_keywords": [],
+ "check_content_uniqueness": true,
+ "score_weights": {
+ "seo": 0.3,
+ "content": 0.25,
+ "technical": 0.2,
+ "performance": 0.15,
+ "links": 0.1
+ }
+ },
+ "export": {
+ "formats": [
+ "html"
+ ],
+ "primary_format": "html",
+ "html_template": "optimized",
+ "output_directory": "./reports",
+ "filename_pattern": "{domain}_{timestamp}_{format}"
+ },
+ "profile": "standard",
+ "version": "3.0.0",
+ "debug": false,
+ "continue_on_error": true,
+ "max_memory_mb": 1024
+ },
+ "fixture": {
+ "version": 1,
+ "generated_pages": 500,
+ "html_bytes": 4739555,
+ "dom_elements": 76000,
+ "href_references": 500,
+ "image_elements": 4000,
+ "analyzed_word_count": 600500,
+ "pages_with_word_count": 500,
+ "variants": {
+ "basic": 0,
+ "content-heavy": 500,
+ "link-dense": 0
+ },
+ "sha256": "4fe8906021560317f0a1f36139b78b9f3ffd62d163f2d064b070b70746386946"
+ },
+ "timeout_seconds": 360.0,
+ "timed_out": false,
+ "timeout_scope": "Cooperative checks between pages and after reporting; synchronous work can overrun the deadline.",
+ "report_completeness": {
+ "expected_pages": 500,
+ "retained_rows": 500,
+ "unique_urls": 500,
+ "missing_urls": 0,
+ "unexpected_urls": 0,
+ "duplicate_rows": 0,
+ "complete": true
+ },
+ "readability": {
+ "status_counts": {
+ "unavailable": 500
+ },
+ "missing_resources": [
+ "nltk:corpora/cmudict"
+ ]
+ },
+ "workload": "Fixture generation, HTML parsing, static analysis, site report aggregation and retained-URL verification; no HTTP, browser or export measurement",
+ "analysis_duration_seconds": 38.643274099973496,
+ "report_duration_seconds": 18.205546300043352,
+ "report_pages": 500,
+ "report_status": "complete",
+ "report_summary": {
+ "total_pages": 500,
+ "successful_pages": 500,
+ "partial_pages": 0,
+ "failed_pages": 0,
+ "skipped_pages": 0,
+ "analysis_mode": "standard",
+ "analysis_timestamp": 1789962719.008702,
+ "analysis_duration": 0,
+ "crawl_complete": false,
+ "limits_reached": [],
+ "discovery_errors": [],
+ "scope_note": "Results describe fetched pages; unvisited targets remain unchecked."
+ },
+ "rule_coverage": {
+ "counts": {
+ "pass": 20500,
+ "fail": 0,
+ "informational": 3000,
+ "unknown": 1500,
+ "not_applicable": 9000,
+ "error": 0
+ },
+ "assessed": 23500,
+ "total": 34000,
+ "ratio": 0.94,
+ "scope": "Counts are unique rule evaluations per page, not a complete site inventory."
+ },
+ "site_analysis": {
+ "version": "1.0",
+ "coverage": {
+ "inventory_pages": 500,
+ "pages_with_facts": 500,
+ "complete_html_pages": 500,
+ "crawl_complete": false,
+ "note": "A completed crawl still obeys its configured scope. Missing targets and paths remain unverified."
+ },
+ "node_count": 500,
+ "edge_count": 500,
+ "finding_count": 0
+ },
+ "status": "complete",
+ "successful_pages": 500,
+ "partial_pages": 0,
+ "failed_pages": 0,
+ "skipped_pages": 0,
+ "observed_results": 500,
+ "missing_results": 0,
+ "pages_analyzed": 500,
+ "pages_per_second": 8.777253043750113,
+ "avg_time_per_page": 0.11393086139997467,
+ "duration_seconds": 56.96543069998734,
+ "clock": "perf_counter",
+ "memory_rss_start_mb": 304.891,
+ "memory_rss_end_mb": 402.797,
+ "memory_rss_delta_mb": 97.906,
+ "memory_sampled_peak_mb": 503.594,
+ "memory_sample_count": 750,
+ "memory_sampling_interval_seconds": 0.05,
+ "memory_measurement": "Sampled process RSS; allocations between samples may be missed.",
+ "memory_used_mb": 97.906,
+ "errors": [],
+ "timestamp": "2026-09-21T03:52:01.905169+00:00",
+ "repetition": 2,
+ "run_order": 4
+ },
+ {
+ "type": "offline",
+ "fixture_version": 1,
+ "scenario": "link-dense",
+ "requested_pages": 500,
+ "network_access": false,
+ "config": {
+ "crawler": {
+ "max_concurrent": 20,
+ "max_connections_per_host": 5,
+ "timeout": 30,
+ "connect_timeout": 10,
+ "read_timeout": 30,
+ "user_agent": "tfq0seo/3.0.0 (+https://github.com/TFQ0/tfq0seo)",
+ "custom_headers": {},
+ "follow_redirects": true,
+ "max_redirects": 10,
+ "max_pages": 500,
+ "max_depth": 5,
+ "max_page_size": 10485760,
+ "max_crawl_time": 3600,
+ "delay_between_requests": 0.0,
+ "adaptive_delay": true,
+ "min_delay": 0.0,
+ "max_delay": 5.0,
+ "rate_limit_per_second": null,
+ "respect_robots_txt": true,
+ "robots_cache_ttl": 86400,
+ "crawl_delay_factor": 1.0,
+ "allowed_domains": [],
+ "allowed_schemes": [
+ "http",
+ "https"
+ ],
+ "excluded_patterns": [
+ "\\.pdf$",
+ "\\.zip$",
+ "\\.exe$",
+ "\\.dmg$",
+ "/wp-admin",
+ "/admin",
+ "/login",
+ "\\?.*session",
+ "\\?.*utm_"
+ ],
+ "store_html": false,
+ "max_retries": 3,
+ "retry_on_status": [
+ 429,
+ 500,
+ 502,
+ 503,
+ 504
+ ],
+ "retry_backoff_factor": 2.0,
+ "cache_enabled": false,
+ "cache_ttl": 3600,
+ "cache_size_mb": 100,
+ "use_sitemap": true,
+ "discover_sitemaps": true,
+ "use_connection_pooling": true,
+ "dns_cache_ttl": 300,
+ "verify_ssl": true,
+ "proxy": null
+ },
+ "analysis": {
+ "enabled_analyzers": [
+ "seo",
+ "content",
+ "technical",
+ "performance",
+ "links"
+ ],
+ "analysis_mode": "standard",
+ "parallel_analysis": true,
+ "max_analysis_threads": 4,
+ "check_external_links": false,
+ "check_internal_links": true,
+ "check_broken_links": true,
+ "max_external_links_per_page": 100,
+ "external_link_timeout": 10,
+ "target_keywords": [],
+ "check_content_uniqueness": true,
+ "score_weights": {
+ "seo": 0.3,
+ "content": 0.25,
+ "technical": 0.2,
+ "performance": 0.15,
+ "links": 0.1
+ }
+ },
+ "export": {
+ "formats": [
+ "html"
+ ],
+ "primary_format": "html",
+ "html_template": "optimized",
+ "output_directory": "./reports",
+ "filename_pattern": "{domain}_{timestamp}_{format}"
+ },
+ "profile": "standard",
+ "version": "3.0.0",
+ "debug": false,
+ "continue_on_error": true,
+ "max_memory_mb": 1024
+ },
+ "fixture": {
+ "version": 1,
+ "generated_pages": 500,
+ "html_bytes": 1139540,
+ "dom_elements": 26500,
+ "href_references": 19500,
+ "image_elements": 0,
+ "analyzed_word_count": 65000,
+ "pages_with_word_count": 500,
+ "variants": {
+ "basic": 0,
+ "content-heavy": 0,
+ "link-dense": 500
+ },
+ "sha256": "9de529c73969d8330328f2ddc650ceb4053feab22bde3d77f07efc648efd2dc2"
+ },
+ "timeout_seconds": 360.0,
+ "timed_out": false,
+ "timeout_scope": "Cooperative checks between pages and after reporting; synchronous work can overrun the deadline.",
+ "report_completeness": {
+ "expected_pages": 500,
+ "retained_rows": 500,
+ "unique_urls": 500,
+ "missing_urls": 0,
+ "unexpected_urls": 0,
+ "duplicate_rows": 0,
+ "complete": true
+ },
+ "readability": {
+ "status_counts": {
+ "unavailable": 500
+ },
+ "missing_resources": [
+ "nltk:corpora/cmudict"
+ ]
+ },
+ "workload": "Fixture generation, HTML parsing, static analysis, site report aggregation and retained-URL verification; no HTTP, browser or export measurement",
+ "analysis_duration_seconds": 33.71322609996423,
+ "report_duration_seconds": 19.14739220001502,
+ "report_pages": 500,
+ "report_status": "complete",
+ "report_summary": {
+ "total_pages": 500,
+ "successful_pages": 500,
+ "partial_pages": 0,
+ "failed_pages": 0,
+ "skipped_pages": 0,
+ "analysis_mode": "standard",
+ "analysis_timestamp": 1789962771.9639814,
+ "analysis_duration": 0,
+ "crawl_complete": false,
+ "limits_reached": [],
+ "discovery_errors": [],
+ "scope_note": "Results describe fetched pages; unvisited targets remain unchecked."
+ },
+ "rule_coverage": {
+ "counts": {
+ "pass": 19500,
+ "fail": 0,
+ "informational": 2000,
+ "unknown": 1500,
+ "not_applicable": 11000,
+ "error": 0
+ },
+ "assessed": 21500,
+ "total": 34000,
+ "ratio": 0.9347826086956522,
+ "scope": "Counts are unique rule evaluations per page, not a complete site inventory."
+ },
+ "site_analysis": {
+ "version": "1.0",
+ "coverage": {
+ "inventory_pages": 500,
+ "pages_with_facts": 500,
+ "complete_html_pages": 500,
+ "crawl_complete": false,
+ "note": "A completed crawl still obeys its configured scope. Missing targets and paths remain unverified."
+ },
+ "node_count": 500,
+ "edge_count": 16500,
+ "finding_count": 0
+ },
+ "status": "complete",
+ "successful_pages": 500,
+ "partial_pages": 0,
+ "failed_pages": 0,
+ "skipped_pages": 0,
+ "observed_results": 500,
+ "missing_results": 0,
+ "pages_analyzed": 500,
+ "pages_per_second": 9.438788530436288,
+ "avg_time_per_page": 0.10594579979998525,
+ "duration_seconds": 52.972899899992626,
+ "clock": "perf_counter",
+ "memory_rss_start_mb": 304.648,
+ "memory_rss_end_mb": 403.016,
+ "memory_rss_delta_mb": 98.367,
+ "memory_sampled_peak_mb": 514.043,
+ "memory_sample_count": 736,
+ "memory_sampling_interval_seconds": 0.05,
+ "memory_measurement": "Sampled process RSS; allocations between samples may be missed.",
+ "memory_used_mb": 98.367,
+ "errors": [],
+ "timestamp": "2026-09-21T03:52:55.004628+00:00",
+ "repetition": 1,
+ "run_order": 5
+ },
+ {
+ "type": "offline",
+ "fixture_version": 1,
+ "scenario": "link-dense",
+ "requested_pages": 500,
+ "network_access": false,
+ "config": {
+ "crawler": {
+ "max_concurrent": 20,
+ "max_connections_per_host": 5,
+ "timeout": 30,
+ "connect_timeout": 10,
+ "read_timeout": 30,
+ "user_agent": "tfq0seo/3.0.0 (+https://github.com/TFQ0/tfq0seo)",
+ "custom_headers": {},
+ "follow_redirects": true,
+ "max_redirects": 10,
+ "max_pages": 500,
+ "max_depth": 5,
+ "max_page_size": 10485760,
+ "max_crawl_time": 3600,
+ "delay_between_requests": 0.0,
+ "adaptive_delay": true,
+ "min_delay": 0.0,
+ "max_delay": 5.0,
+ "rate_limit_per_second": null,
+ "respect_robots_txt": true,
+ "robots_cache_ttl": 86400,
+ "crawl_delay_factor": 1.0,
+ "allowed_domains": [],
+ "allowed_schemes": [
+ "http",
+ "https"
+ ],
+ "excluded_patterns": [
+ "\\.pdf$",
+ "\\.zip$",
+ "\\.exe$",
+ "\\.dmg$",
+ "/wp-admin",
+ "/admin",
+ "/login",
+ "\\?.*session",
+ "\\?.*utm_"
+ ],
+ "store_html": false,
+ "max_retries": 3,
+ "retry_on_status": [
+ 429,
+ 500,
+ 502,
+ 503,
+ 504
+ ],
+ "retry_backoff_factor": 2.0,
+ "cache_enabled": false,
+ "cache_ttl": 3600,
+ "cache_size_mb": 100,
+ "use_sitemap": true,
+ "discover_sitemaps": true,
+ "use_connection_pooling": true,
+ "dns_cache_ttl": 300,
+ "verify_ssl": true,
+ "proxy": null
+ },
+ "analysis": {
+ "enabled_analyzers": [
+ "seo",
+ "content",
+ "technical",
+ "performance",
+ "links"
+ ],
+ "analysis_mode": "standard",
+ "parallel_analysis": true,
+ "max_analysis_threads": 4,
+ "check_external_links": false,
+ "check_internal_links": true,
+ "check_broken_links": true,
+ "max_external_links_per_page": 100,
+ "external_link_timeout": 10,
+ "target_keywords": [],
+ "check_content_uniqueness": true,
+ "score_weights": {
+ "seo": 0.3,
+ "content": 0.25,
+ "technical": 0.2,
+ "performance": 0.15,
+ "links": 0.1
+ }
+ },
+ "export": {
+ "formats": [
+ "html"
+ ],
+ "primary_format": "html",
+ "html_template": "optimized",
+ "output_directory": "./reports",
+ "filename_pattern": "{domain}_{timestamp}_{format}"
+ },
+ "profile": "standard",
+ "version": "3.0.0",
+ "debug": false,
+ "continue_on_error": true,
+ "max_memory_mb": 1024
+ },
+ "fixture": {
+ "version": 1,
+ "generated_pages": 500,
+ "html_bytes": 1139540,
+ "dom_elements": 26500,
+ "href_references": 19500,
+ "image_elements": 0,
+ "analyzed_word_count": 65000,
+ "pages_with_word_count": 500,
+ "variants": {
+ "basic": 0,
+ "content-heavy": 0,
+ "link-dense": 500
+ },
+ "sha256": "9de529c73969d8330328f2ddc650ceb4053feab22bde3d77f07efc648efd2dc2"
+ },
+ "timeout_seconds": 360.0,
+ "timed_out": false,
+ "timeout_scope": "Cooperative checks between pages and after reporting; synchronous work can overrun the deadline.",
+ "report_completeness": {
+ "expected_pages": 500,
+ "retained_rows": 500,
+ "unique_urls": 500,
+ "missing_urls": 0,
+ "unexpected_urls": 0,
+ "duplicate_rows": 0,
+ "complete": true
+ },
+ "readability": {
+ "status_counts": {
+ "unavailable": 500
+ },
+ "missing_resources": [
+ "nltk:corpora/cmudict"
+ ]
+ },
+ "workload": "Fixture generation, HTML parsing, static analysis, site report aggregation and retained-URL verification; no HTTP, browser or export measurement",
+ "analysis_duration_seconds": 34.6492362000281,
+ "report_duration_seconds": 19.69594499998493,
+ "report_pages": 500,
+ "report_status": "complete",
+ "report_summary": {
+ "total_pages": 500,
+ "successful_pages": 500,
+ "partial_pages": 0,
+ "failed_pages": 0,
+ "skipped_pages": 0,
+ "analysis_mode": "standard",
+ "analysis_timestamp": 1789962826.5033512,
+ "analysis_duration": 0,
+ "crawl_complete": false,
+ "limits_reached": [],
+ "discovery_errors": [],
+ "scope_note": "Results describe fetched pages; unvisited targets remain unchecked."
+ },
+ "rule_coverage": {
+ "counts": {
+ "pass": 19500,
+ "fail": 0,
+ "informational": 2000,
+ "unknown": 1500,
+ "not_applicable": 11000,
+ "error": 0
+ },
+ "assessed": 21500,
+ "total": 34000,
+ "ratio": 0.9347826086956522,
+ "scope": "Counts are unique rule evaluations per page, not a complete site inventory."
+ },
+ "site_analysis": {
+ "version": "1.0",
+ "coverage": {
+ "inventory_pages": 500,
+ "pages_with_facts": 500,
+ "complete_html_pages": 500,
+ "crawl_complete": false,
+ "note": "A completed crawl still obeys its configured scope. Missing targets and paths remain unverified."
+ },
+ "node_count": 500,
+ "edge_count": 16500,
+ "finding_count": 0
+ },
+ "status": "complete",
+ "successful_pages": 500,
+ "partial_pages": 0,
+ "failed_pages": 0,
+ "skipped_pages": 0,
+ "observed_results": 500,
+ "missing_results": 0,
+ "pages_analyzed": 500,
+ "pages_per_second": 9.181063967421467,
+ "avg_time_per_page": 0.10891983800008893,
+ "duration_seconds": 54.459919000044465,
+ "clock": "perf_counter",
+ "memory_rss_start_mb": 329.891,
+ "memory_rss_end_mb": 399.477,
+ "memory_rss_delta_mb": 69.586,
+ "memory_sampled_peak_mb": 511.332,
+ "memory_sample_count": 745,
+ "memory_sampling_interval_seconds": 0.05,
+ "memory_measurement": "Sampled process RSS; allocations between samples may be missed.",
+ "memory_used_mb": 69.586,
+ "errors": [],
+ "timestamp": "2026-09-21T03:53:49.585114+00:00",
+ "repetition": 2,
+ "run_order": 6
+ },
+ {
+ "type": "offline",
+ "fixture_version": 1,
+ "scenario": "mixed",
+ "requested_pages": 500,
+ "network_access": false,
+ "config": {
+ "crawler": {
+ "max_concurrent": 20,
+ "max_connections_per_host": 5,
+ "timeout": 30,
+ "connect_timeout": 10,
+ "read_timeout": 30,
+ "user_agent": "tfq0seo/3.0.0 (+https://github.com/TFQ0/tfq0seo)",
+ "custom_headers": {},
+ "follow_redirects": true,
+ "max_redirects": 10,
+ "max_pages": 500,
+ "max_depth": 5,
+ "max_page_size": 10485760,
+ "max_crawl_time": 3600,
+ "delay_between_requests": 0.0,
+ "adaptive_delay": true,
+ "min_delay": 0.0,
+ "max_delay": 5.0,
+ "rate_limit_per_second": null,
+ "respect_robots_txt": true,
+ "robots_cache_ttl": 86400,
+ "crawl_delay_factor": 1.0,
+ "allowed_domains": [],
+ "allowed_schemes": [
+ "http",
+ "https"
+ ],
+ "excluded_patterns": [
+ "\\.pdf$",
+ "\\.zip$",
+ "\\.exe$",
+ "\\.dmg$",
+ "/wp-admin",
+ "/admin",
+ "/login",
+ "\\?.*session",
+ "\\?.*utm_"
+ ],
+ "store_html": false,
+ "max_retries": 3,
+ "retry_on_status": [
+ 429,
+ 500,
+ 502,
+ 503,
+ 504
+ ],
+ "retry_backoff_factor": 2.0,
+ "cache_enabled": false,
+ "cache_ttl": 3600,
+ "cache_size_mb": 100,
+ "use_sitemap": true,
+ "discover_sitemaps": true,
+ "use_connection_pooling": true,
+ "dns_cache_ttl": 300,
+ "verify_ssl": true,
+ "proxy": null
+ },
+ "analysis": {
+ "enabled_analyzers": [
+ "seo",
+ "content",
+ "technical",
+ "performance",
+ "links"
+ ],
+ "analysis_mode": "standard",
+ "parallel_analysis": true,
+ "max_analysis_threads": 4,
+ "check_external_links": false,
+ "check_internal_links": true,
+ "check_broken_links": true,
+ "max_external_links_per_page": 100,
+ "external_link_timeout": 10,
+ "target_keywords": [],
+ "check_content_uniqueness": true,
+ "score_weights": {
+ "seo": 0.3,
+ "content": 0.25,
+ "technical": 0.2,
+ "performance": 0.15,
+ "links": 0.1
+ }
+ },
+ "export": {
+ "formats": [
+ "html"
+ ],
+ "primary_format": "html",
+ "html_template": "optimized",
+ "output_directory": "./reports",
+ "filename_pattern": "{domain}_{timestamp}_{format}"
+ },
+ "profile": "standard",
+ "version": "3.0.0",
+ "debug": false,
+ "continue_on_error": true,
+ "max_memory_mb": 1024
+ },
+ "fixture": {
+ "version": 1,
+ "generated_pages": 500,
+ "html_bytes": 2031413,
+ "dom_elements": 35852,
+ "href_references": 6808,
+ "image_elements": 1336,
+ "analyzed_word_count": 224986,
+ "pages_with_word_count": 500,
+ "variants": {
+ "basic": 167,
+ "content-heavy": 167,
+ "link-dense": 166
+ },
+ "sha256": "8159d57ed4cd52f09f9903ef580de5a7baabb8a4a5fe0403e15f95bbf1aa8e0b"
+ },
+ "timeout_seconds": 360.0,
+ "timed_out": false,
+ "timeout_scope": "Cooperative checks between pages and after reporting; synchronous work can overrun the deadline.",
+ "report_completeness": {
+ "expected_pages": 500,
+ "retained_rows": 500,
+ "unique_urls": 500,
+ "missing_urls": 0,
+ "unexpected_urls": 0,
+ "duplicate_rows": 0,
+ "complete": true
+ },
+ "readability": {
+ "status_counts": {
+ "not_requested": 167,
+ "unavailable": 333
+ },
+ "missing_resources": [
+ "nltk:corpora/cmudict"
+ ]
+ },
+ "workload": "Fixture generation, HTML parsing, static analysis, site report aggregation and retained-URL verification; no HTTP, browser or export measurement",
+ "analysis_duration_seconds": 32.74250110000139,
+ "report_duration_seconds": 18.548192699963693,
+ "report_pages": 500,
+ "report_status": "complete",
+ "report_summary": {
+ "total_pages": 500,
+ "successful_pages": 500,
+ "partial_pages": 0,
+ "failed_pages": 0,
+ "skipped_pages": 0,
+ "analysis_mode": "standard",
+ "analysis_timestamp": 1789962878.1674123,
+ "analysis_duration": 0,
+ "crawl_complete": false,
+ "limits_reached": [],
+ "discovery_errors": [],
+ "scope_note": "Results describe fetched pages; unvisited targets remain unchecked."
+ },
+ "rule_coverage": {
+ "counts": {
+ "pass": 19333,
+ "fail": 0,
+ "informational": 2334,
+ "unknown": 1333,
+ "not_applicable": 11000,
+ "error": 0
+ },
+ "assessed": 21667,
+ "total": 34000,
+ "ratio": 0.9420434782608695,
+ "scope": "Counts are unique rule evaluations per page, not a complete site inventory."
+ },
+ "site_analysis": {
+ "version": "1.0",
+ "coverage": {
+ "inventory_pages": 500,
+ "pages_with_facts": 500,
+ "complete_html_pages": 500,
+ "crawl_complete": false,
+ "note": "A completed crawl still obeys its configured scope. Missing targets and paths remain unverified."
+ },
+ "node_count": 500,
+ "edge_count": 5812,
+ "finding_count": 0
+ },
+ "status": "complete",
+ "successful_pages": 500,
+ "partial_pages": 0,
+ "failed_pages": 0,
+ "skipped_pages": 0,
+ "observed_results": 500,
+ "missing_results": 0,
+ "pages_analyzed": 500,
+ "pages_per_second": 9.724673639562882,
+ "avg_time_per_page": 0.10283121440000832,
+ "duration_seconds": 51.41560720000416,
+ "clock": "perf_counter",
+ "memory_rss_start_mb": 344.445,
+ "memory_rss_end_mb": 411.102,
+ "memory_rss_delta_mb": 66.656,
+ "memory_sampled_peak_mb": 484.855,
+ "memory_sample_count": 706,
+ "memory_sampling_interval_seconds": 0.05,
+ "memory_measurement": "Sampled process RSS; allocations between samples may be missed.",
+ "memory_used_mb": 66.656,
+ "errors": [],
+ "timestamp": "2026-09-21T03:54:41.123237+00:00",
+ "repetition": 1,
+ "run_order": 7
+ },
+ {
+ "type": "offline",
+ "fixture_version": 1,
+ "scenario": "mixed",
+ "requested_pages": 500,
+ "network_access": false,
+ "config": {
+ "crawler": {
+ "max_concurrent": 20,
+ "max_connections_per_host": 5,
+ "timeout": 30,
+ "connect_timeout": 10,
+ "read_timeout": 30,
+ "user_agent": "tfq0seo/3.0.0 (+https://github.com/TFQ0/tfq0seo)",
+ "custom_headers": {},
+ "follow_redirects": true,
+ "max_redirects": 10,
+ "max_pages": 500,
+ "max_depth": 5,
+ "max_page_size": 10485760,
+ "max_crawl_time": 3600,
+ "delay_between_requests": 0.0,
+ "adaptive_delay": true,
+ "min_delay": 0.0,
+ "max_delay": 5.0,
+ "rate_limit_per_second": null,
+ "respect_robots_txt": true,
+ "robots_cache_ttl": 86400,
+ "crawl_delay_factor": 1.0,
+ "allowed_domains": [],
+ "allowed_schemes": [
+ "http",
+ "https"
+ ],
+ "excluded_patterns": [
+ "\\.pdf$",
+ "\\.zip$",
+ "\\.exe$",
+ "\\.dmg$",
+ "/wp-admin",
+ "/admin",
+ "/login",
+ "\\?.*session",
+ "\\?.*utm_"
+ ],
+ "store_html": false,
+ "max_retries": 3,
+ "retry_on_status": [
+ 429,
+ 500,
+ 502,
+ 503,
+ 504
+ ],
+ "retry_backoff_factor": 2.0,
+ "cache_enabled": false,
+ "cache_ttl": 3600,
+ "cache_size_mb": 100,
+ "use_sitemap": true,
+ "discover_sitemaps": true,
+ "use_connection_pooling": true,
+ "dns_cache_ttl": 300,
+ "verify_ssl": true,
+ "proxy": null
+ },
+ "analysis": {
+ "enabled_analyzers": [
+ "seo",
+ "content",
+ "technical",
+ "performance",
+ "links"
+ ],
+ "analysis_mode": "standard",
+ "parallel_analysis": true,
+ "max_analysis_threads": 4,
+ "check_external_links": false,
+ "check_internal_links": true,
+ "check_broken_links": true,
+ "max_external_links_per_page": 100,
+ "external_link_timeout": 10,
+ "target_keywords": [],
+ "check_content_uniqueness": true,
+ "score_weights": {
+ "seo": 0.3,
+ "content": 0.25,
+ "technical": 0.2,
+ "performance": 0.15,
+ "links": 0.1
+ }
+ },
+ "export": {
+ "formats": [
+ "html"
+ ],
+ "primary_format": "html",
+ "html_template": "optimized",
+ "output_directory": "./reports",
+ "filename_pattern": "{domain}_{timestamp}_{format}"
+ },
+ "profile": "standard",
+ "version": "3.0.0",
+ "debug": false,
+ "continue_on_error": true,
+ "max_memory_mb": 1024
+ },
+ "fixture": {
+ "version": 1,
+ "generated_pages": 500,
+ "html_bytes": 2031413,
+ "dom_elements": 35852,
+ "href_references": 6808,
+ "image_elements": 1336,
+ "analyzed_word_count": 224986,
+ "pages_with_word_count": 500,
+ "variants": {
+ "basic": 167,
+ "content-heavy": 167,
+ "link-dense": 166
+ },
+ "sha256": "8159d57ed4cd52f09f9903ef580de5a7baabb8a4a5fe0403e15f95bbf1aa8e0b"
+ },
+ "timeout_seconds": 360.0,
+ "timed_out": false,
+ "timeout_scope": "Cooperative checks between pages and after reporting; synchronous work can overrun the deadline.",
+ "report_completeness": {
+ "expected_pages": 500,
+ "retained_rows": 500,
+ "unique_urls": 500,
+ "missing_urls": 0,
+ "unexpected_urls": 0,
+ "duplicate_rows": 0,
+ "complete": true
+ },
+ "readability": {
+ "status_counts": {
+ "not_requested": 167,
+ "unavailable": 333
+ },
+ "missing_resources": [
+ "nltk:corpora/cmudict"
+ ]
+ },
+ "workload": "Fixture generation, HTML parsing, static analysis, site report aggregation and retained-URL verification; no HTTP, browser or export measurement",
+ "analysis_duration_seconds": 32.458557199977804,
+ "report_duration_seconds": 17.584410300012678,
+ "report_pages": 500,
+ "report_status": "complete",
+ "report_summary": {
+ "total_pages": 500,
+ "successful_pages": 500,
+ "partial_pages": 0,
+ "failed_pages": 0,
+ "skipped_pages": 0,
+ "analysis_mode": "standard",
+ "analysis_timestamp": 1789962928.5882554,
+ "analysis_duration": 0,
+ "crawl_complete": false,
+ "limits_reached": [],
+ "discovery_errors": [],
+ "scope_note": "Results describe fetched pages; unvisited targets remain unchecked."
+ },
+ "rule_coverage": {
+ "counts": {
+ "pass": 19333,
+ "fail": 0,
+ "informational": 2334,
+ "unknown": 1333,
+ "not_applicable": 11000,
+ "error": 0
+ },
+ "assessed": 21667,
+ "total": 34000,
+ "ratio": 0.9420434782608695,
+ "scope": "Counts are unique rule evaluations per page, not a complete site inventory."
+ },
+ "site_analysis": {
+ "version": "1.0",
+ "coverage": {
+ "inventory_pages": 500,
+ "pages_with_facts": 500,
+ "complete_html_pages": 500,
+ "crawl_complete": false,
+ "note": "A completed crawl still obeys its configured scope. Missing targets and paths remain unverified."
+ },
+ "node_count": 500,
+ "edge_count": 5812,
+ "finding_count": 0
+ },
+ "status": "complete",
+ "successful_pages": 500,
+ "partial_pages": 0,
+ "failed_pages": 0,
+ "skipped_pages": 0,
+ "observed_results": 500,
+ "missing_results": 0,
+ "pages_analyzed": 500,
+ "pages_per_second": 9.970011402092945,
+ "avg_time_per_page": 0.10030078800010961,
+ "duration_seconds": 50.1503940000548,
+ "clock": "perf_counter",
+ "memory_rss_start_mb": 334.938,
+ "memory_rss_end_mb": 416.07,
+ "memory_rss_delta_mb": 81.133,
+ "memory_sampled_peak_mb": 483.355,
+ "memory_sample_count": 696,
+ "memory_sampling_interval_seconds": 0.05,
+ "memory_measurement": "Sampled process RSS; allocations between samples may be missed.",
+ "memory_used_mb": 81.133,
+ "errors": [],
+ "timestamp": "2026-09-21T03:55:31.409435+00:00",
+ "repetition": 2,
+ "run_order": 8
+ }
+ ],
+ "summaries": [
+ {
+ "scenario": "basic",
+ "requested_pages": 500,
+ "runs": 2,
+ "complete_runs": 2,
+ "partial_runs": 0,
+ "failed_runs": 0,
+ "metrics_scope": "Only complete runs; inspect raw outcomes for excluded failed or partial runs.",
+ "metrics": {
+ "duration_seconds": {
+ "median": 41.45385220000753,
+ "min": 40.43095770000946,
+ "max": 42.476746700005606
+ },
+ "analysis_duration_seconds": {
+ "median": 25.37268459997722,
+ "min": 24.186609499971382,
+ "max": 26.558759699983057
+ },
+ "report_duration_seconds": {
+ "median": 15.989042700006394,
+ "min": 15.826399100013077,
+ "max": 16.15168629999971
+ },
+ "pages_per_second": {
+ "median": 12.068953765718355,
+ "min": 11.77114630579592,
+ "max": 12.366761225640792
+ },
+ "memory_rss_delta_mb": {
+ "median": 160.5935,
+ "min": 76.984,
+ "max": 244.203
+ },
+ "memory_sampled_peak_mb": {
+ "median": 431.166,
+ "min": 430.887,
+ "max": 431.445
+ }
+ }
+ },
+ {
+ "scenario": "content-heavy",
+ "requested_pages": 500,
+ "runs": 2,
+ "complete_runs": 2,
+ "partial_runs": 0,
+ "failed_runs": 0,
+ "metrics_scope": "Only complete runs; inspect raw outcomes for excluded failed or partial runs.",
+ "metrics": {
+ "duration_seconds": {
+ "median": 56.83817164998618,
+ "min": 56.71091259998502,
+ "max": 56.96543069998734
+ },
+ "analysis_duration_seconds": {
+ "median": 38.515646199986804,
+ "min": 38.38801830000011,
+ "max": 38.643274099973496
+ },
+ "report_duration_seconds": {
+ "median": 18.202127300028224,
+ "min": 18.198708300013095,
+ "max": 18.205546300043352
+ },
+ "pages_per_second": {
+ "median": 8.79694916276421,
+ "min": 8.777253043750113,
+ "max": 8.816645281778309
+ },
+ "memory_rss_delta_mb": {
+ "median": 108.539,
+ "min": 97.906,
+ "max": 119.172
+ },
+ "memory_sampled_peak_mb": {
+ "median": 503.53700000000003,
+ "min": 503.48,
+ "max": 503.594
+ }
+ }
+ },
+ {
+ "scenario": "link-dense",
+ "requested_pages": 500,
+ "runs": 2,
+ "complete_runs": 2,
+ "partial_runs": 0,
+ "failed_runs": 0,
+ "metrics_scope": "Only complete runs; inspect raw outcomes for excluded failed or partial runs.",
+ "metrics": {
+ "duration_seconds": {
+ "median": 53.716409450018546,
+ "min": 52.972899899992626,
+ "max": 54.459919000044465
+ },
+ "analysis_duration_seconds": {
+ "median": 34.181231149996165,
+ "min": 33.71322609996423,
+ "max": 34.6492362000281
+ },
+ "report_duration_seconds": {
+ "median": 19.421668599999975,
+ "min": 19.14739220001502,
+ "max": 19.69594499998493
+ },
+ "pages_per_second": {
+ "median": 9.309926248928878,
+ "min": 9.181063967421467,
+ "max": 9.438788530436288
+ },
+ "memory_rss_delta_mb": {
+ "median": 83.9765,
+ "min": 69.586,
+ "max": 98.367
+ },
+ "memory_sampled_peak_mb": {
+ "median": 512.6875,
+ "min": 511.332,
+ "max": 514.043
+ }
+ }
+ },
+ {
+ "scenario": "mixed",
+ "requested_pages": 500,
+ "runs": 2,
+ "complete_runs": 2,
+ "partial_runs": 0,
+ "failed_runs": 0,
+ "metrics_scope": "Only complete runs; inspect raw outcomes for excluded failed or partial runs.",
+ "metrics": {
+ "duration_seconds": {
+ "median": 50.78300060002948,
+ "min": 50.1503940000548,
+ "max": 51.41560720000416
+ },
+ "analysis_duration_seconds": {
+ "median": 32.6005291499896,
+ "min": 32.458557199977804,
+ "max": 32.74250110000139
+ },
+ "report_duration_seconds": {
+ "median": 18.066301499988185,
+ "min": 17.584410300012678,
+ "max": 18.548192699963693
+ },
+ "pages_per_second": {
+ "median": 9.847342520827914,
+ "min": 9.724673639562882,
+ "max": 9.970011402092945
+ },
+ "memory_rss_delta_mb": {
+ "median": 73.8945,
+ "min": 66.656,
+ "max": 81.133
+ },
+ "memory_sampled_peak_mb": {
+ "median": 484.105,
+ "min": 483.355,
+ "max": 484.855
+ }
+ }
+ }
+ ],
+ "system_info": {
+ "os": {
+ "system": "Windows",
+ "release": "11",
+ "version": "10.0.26200"
+ },
+ "architecture": "AMD64",
+ "cpu_model": "AMD Ryzen 7 7735HS with Radeon Graphics",
+ "cpu_count": 16,
+ "physical_cpu_count": 8,
+ "memory_total_gb": 63.21,
+ "python_version": "3.12.14 (main, Aug 25 2026, 14:01:42) [MSC v.1944 64 bit (AMD64)]",
+ "python_implementation": "CPython",
+ "package_version": "3.0.0",
+ "installed_distribution_version": "3.0.0",
+ "schema_version": "1.0",
+ "ruleset_version": "2026.09.21",
+ "scoring_version": "2.0",
+ "facts_version": "1.1",
+ "direct_dependencies": {
+ "aiohttp": "3.14.3",
+ "beautifulsoup4": "4.15.0",
+ "click": "8.5.0",
+ "jinja2": "3.1.6",
+ "rich": "15.0.0",
+ "textstat": "0.7.13",
+ "validators": "0.35.0",
+ "pyyaml": "6.0.3",
+ "python-dateutil": "2.9.0.post0",
+ "urllib3": "2.7.0",
+ "psutil": "7.2.2"
+ },
+ "optional_dependencies": {
+ "lxml": "6.1.3",
+ "openpyxl": "3.1.5",
+ "pandas": "3.0.5"
+ },
+ "readability_dependencies": {
+ "nltk": "3.10.3",
+ "pyphen": "0.18.1",
+ "cmudict": null
+ },
+ "source_fingerprint": {
+ "algorithm": "sha256",
+ "scope": "package Python source paths and bytes",
+ "file_count": 23,
+ "digest": "077a203b8b1c65de3022f4001a48cc6a1897e89624e9e7e8f967d20f525f4893"
+ },
+ "timestamp": "2026-09-21T03:48:44.996515+00:00"
+ },
+ "source_unchanged_during_suite": true,
+ "errors": [],
+ "suite": {
+ "scenarios": [
+ "basic",
+ "content-heavy",
+ "link-dense",
+ "mixed"
+ ],
+ "page_counts": [
+ 500
+ ],
+ "repetitions": 2,
+ "timeout_seconds": 360.0,
+ "order": "Page counts, then scenarios, then repetitions, in supplied order.",
+ "isolation": "Same process; fresh analyzer per run, disabled page cache; library caches and allocator state may remain warm."
+ },
+ "execution_guard": {
+ "dns_attempts": 0,
+ "external_connection_attempts": 0,
+ "network_policy": "DNS and non-loopback TCP connects blocked; loopback allowed for asyncio internals.",
+ "parent_hard_timeout_seconds": 1200
+ }
+}
diff --git a/docs/configuration-migration.md b/docs/configuration-migration.md
new file mode 100644
index 0000000..f9350ef
--- /dev/null
+++ b/docs/configuration-migration.md
@@ -0,0 +1,249 @@
+# Configuration migration for 3.0.0
+
+The configuration schema now contains only settings used by the application.
+Previously, saved configurations included options for unimplemented features.
+Those fields have been removed from the dataclass constructors, validated input,
+and serialized configuration. The `MonitoringConfig` class and the entire
+`monitoring` section have also been removed.
+
+Normal loading does not silently discard these fields. `Config.from_dict()`,
+`Config.from_file()`, `Config.from_env()`, and `Config.merge()` reject retired keys,
+including keys set to their historical defaults. Errors identify the setting and
+point to explicit migration. Remove corresponding retired environment variables
+before running the CLI; the CLI does not migrate configuration automatically.
+
+## Explicit migration
+
+`Config.migrate_dict(data)` returns `(canonical_data, warnings)`:
+
+- `canonical_data` is a new dictionary containing validated, canonical overrides.
+ It preserves supplied active settings and profile selection without inserting
+ unspecified defaults. It can be passed to `Config.from_dict()` or serialized.
+- `warnings` is a list of strings identifying removed retired defaults and
+ canonicalized aliases. Messages do not include supplied values.
+- Retired fields are removed **only when their supplied value matches the
+ historical default below and has a valid historical type**. For example,
+ `false` is not accepted as an integer zero, and `0` is not accepted as `false`.
+ Float settings accept finite integer equivalents; integer settings reject
+ floats. Lists and dictionaries must match their complete historical contents.
+- Unknown keys, malformed sections, conflicting aliases, invalid active settings,
+ and nondefault retired values raise `ValueError`. No partial result is returned.
+- The input is not modified. Migration performs no file writes, network requests,
+ directory creation, or delivery actions.
+
+Read the warnings before using the migrated configuration. Write a separate file
+to keep the original available for review:
+
+```python
+import json
+from pathlib import Path
+from tfq0seo.core.config import Config
+
+legacy_path = Path("config.json")
+legacy = json.loads(legacy_path.read_text(encoding="utf-8"))
+canonical, warnings = Config.migrate_dict(legacy)
+for warning in warnings:
+ print(warning)
+
+# Exclusive creation prevents overwriting an existing configuration.
+with Path("config.v3.json").open("x", encoding="utf-8") as handle:
+ json.dump(canonical, handle, indent=2, allow_nan=False)
+
+config = Config.from_dict(canonical)
+```
+
+For YAML, use `yaml.safe_load()` to obtain the input dictionary and
+`yaml.safe_dump()` to serialize `canonical`. `Config.save()` remains available
+for saving a fully resolved configuration; serializing `canonical` instead keeps
+unspecified profile defaults unspecified for subsequent profile changes.
+
+Migration does not discard a nondefault retired field just because its parent
+feature is disabled. For example, an old `export.smtp_password` value causes an
+error even when `export.send_email` is `false`. Review the unsupported behavior,
+remove it explicitly from a copy of the input, and rerun migration. Credentials
+in active settings such as `crawler.custom_headers` and `crawler.proxy` remain in
+the returned data; value-free diagnostics do not redact the configuration itself.
+
+## Supported settings and aliases
+
+The active global settings are `crawler`, `analysis`, `export`, `profile`,
+`version`, `debug`, `continue_on_error`, and `max_memory_mb`. `debug` is preserved
+as profile metadata, including the development profile default. It does not
+configure Python logging. `version` is configuration/report metadata, not a
+package version override.
+
+Working crawler aliases remain accepted by dictionary, file, environment, and
+merge entry points. Serialized configurations use canonical keys:
+
+| Alias in `crawler` | Canonical key | Notes |
+| --- | --- | --- |
+| `concurrent_requests` | `max_concurrent` | `null` means no alias override; still accepted by `CrawlerConfig` directly. |
+| `max_content_length` | `max_page_size` | Maximum response bytes. |
+| `retry_attempts` | `max_retries` | Number of retries. |
+| `adaptive_throttle` | `adaptive_delay` | Boolean. |
+| `follow_sitemap` | `use_sitemap` | Boolean. |
+
+Supplying an alias and its canonical key with different values is an error.
+Migration reports alias normalization; ordinary loading continues to accept these
+aliases without requiring migration.
+
+Active analysis settings are `enabled_analyzers`, `analysis_mode`,
+`parallel_analysis`, `max_analysis_threads`, `check_external_links`,
+`check_internal_links`, `check_broken_links`, `max_external_links_per_page`,
+`external_link_timeout`, `target_keywords`, `check_content_uniqueness`, and
+`score_weights`. Analyzer selection and supported modes remain available;
+individual retired check flags do not control rule execution or thresholds.
+
+Active export settings are `formats`, `primary_format`, `html_template`,
+`output_directory`, and `filename_pattern`. Supported formats are `html`, `json`,
+`csv`, and `xlsx`; `OutputFormat.PDF`, `OutputFormat.MARKDOWN`, and
+`OutputFormat.XML` were removed. Unsupported format requests are rejected and
+are not rewritten by migration.
+
+`Config.SUPPORTED_FIELDS` lists the active fields for each component. The crawler
+entry includes the working `concurrent_requests` constructor alias; the
+serialized crawler configuration contains `max_concurrent` instead.
+
+## Retired crawler settings
+
+Every key in this table is under `crawler`. Values use JSON notation.
+
+| Removed key | Historical default |
+| --- | --- |
+| `semaphore_limit` | `30` |
+| `total_timeout` | `300` |
+| `rotate_user_agents` | `false` |
+| `user_agent_list` | `[]` |
+| `redirect_cache_ttl` | `3600` |
+| `include_query_strings`, `normalize_urls` | `true` |
+| `parse_javascript`, `execute_javascript` | `false` |
+| `wait_for_javascript` | `0.0` |
+| `compress_stored_html`, `prioritize_sitemap_urls` | `true` |
+| `use_http2` | `false` |
+
+Use the existing `max_concurrent` to control concurrency and `max_crawl_time` for
+the crawl deadline. These are not automatic renames of `semaphore_limit` or
+`total_timeout`: the retired options never controlled the crawler, and the active
+settings may already be present with different values. URL identity follows the
+shared URL resolver; there is no toggle to remove query strings. JavaScript
+execution, user-agent rotation, HTTP/2 selection, and the other removed behaviors
+have no configuration replacement.
+
+## Retired analysis settings
+
+Every key in this table is under `analysis`.
+
+| Removed key | Historical default |
+| --- | --- |
+| `validate_anchors` | `true` |
+| `check_images`, `check_image_optimization`, `check_alt_text`, `check_image_dimensions` | `true` |
+| `max_image_size_kb` | `500` |
+| `min_content_length` | `100` |
+| `max_content_length` | `100000` |
+| `optimal_content_length` | `1500` |
+| `check_readability` | `true` |
+| `target_reading_level` | `8` |
+| `check_keyword_density`, `keyword_variations` | `true` |
+| `min_unique_content_ratio` | `0.7` |
+| `check_meta_tags`, `check_structured_data`, `validate_structured_data` | `true` |
+| `check_open_graph`, `check_twitter_cards`, `check_canonical_urls`, `check_hreflang` | `true` |
+| `check_sitemaps`, `check_robots_txt` | `true` |
+| `check_https`, `check_security_headers`, `check_mixed_content` | `true` |
+| `check_mobile_friendly`, `check_page_speed`, `check_core_web_vitals` | `true` |
+| `check_compression`, `check_caching`, `check_minification`, `check_http2` | `true` |
+| `max_page_load_time` | `3.0` |
+| `max_ttfb` | `0.8` |
+| `max_fcp` | `1.8` |
+| `max_lcp` | `2.5` |
+| `max_fid` | `100.0` |
+| `max_cls` | `0.1` |
+| `max_page_size_mb` | `3.0` |
+| `check_accessibility` | `true` |
+| `wcag_level` | `"AA"` |
+
+Removing these inert settings does not turn checks on or off. Findings are
+controlled by the implemented analyzers and rule registry. In particular,
+declaring a Core Web Vitals threshold or WCAG level never provided browser
+measurements or a conformance assessment. `crawler.use_sitemap`,
+`crawler.discover_sitemaps`, and `crawler.respect_robots_txt` remain separate,
+implemented crawler controls.
+
+## Retired export settings
+
+Every key in this table is under `export`.
+
+| Removed key | Historical default |
+| --- | --- |
+| `include_inline_css`, `include_inline_js`, `minify_html` | `true` |
+| `html_theme` | `"light"` |
+| `include_charts` | `true` |
+| `charts_library` | `"chartjs"` |
+| `include_raw_data`, `include_page_content`, `include_screenshots`, `include_har_files` | `false` |
+| `data_sampling_rate` | `1.0` |
+| `max_issues_per_page` | `100` |
+| `max_pages_in_report` | `1000` |
+| `create_subdirectories` | `true` |
+| `compress_output` | `false` |
+| `compression_format` | `"zip"` |
+| `split_large_reports` | `true` |
+| `split_threshold_mb` | `50` |
+| `generate_summary`, `generate_executive_report` | `true` |
+| `send_email` | `false` |
+| `email_recipients` | `[]` |
+| `email_subject_template` | `"SEO Report for {domain}"` |
+| `smtp_server`, `smtp_username`, `smtp_password` | `null` |
+| `smtp_port` | `587` |
+| `upload_to_cloud` | `false` |
+| `cloud_provider`, `cloud_bucket`, `cloud_path_prefix` | `null` |
+| `send_to_api` | `false` |
+| `api_endpoint`, `api_key` | `null` |
+| `api_method` | `"POST"` |
+
+Select a supported template using `html_template` and a supported output format
+using `formats`. Report content comes from the report schema and template; the
+removed flags did not alter it. Email, cloud/API delivery, screenshots, HAR
+capture, compression, and report splitting have no built-in replacement.
+
+## Retired monitoring and global settings
+
+Every key in the next table is under the removed `monitoring` section.
+
+| Removed key | Historical default |
+| --- | --- |
+| `enabled` | `false` |
+| `collect_metrics` | `true` |
+| `metrics_interval` | `60` |
+| `metrics_retention_days` | `30` |
+| `enable_alerts` | `false` |
+| `alert_thresholds` | `{"error_rate": 0.05, "avg_response_time": 5.0, "memory_usage_mb": 500.0, "broken_links_ratio": 0.1}` |
+| `log_level` | `"info"` |
+| `log_to_file` | `true` |
+| `log_file_path` | `"./logs/tfq0seo.log"` |
+| `log_rotation` | `"daily"` |
+| `log_retention_days` | `7` |
+| `log_format` | `"json"` |
+| `show_progress` | `true` |
+| `progress_update_interval` | `1.0` |
+| `detailed_progress`, `webhook_enabled` | `false` |
+| `webhook_url` | `null` |
+| `webhook_events` | `["analysis_complete", "error", "threshold_exceeded"]` |
+
+An empty `monitoring` section, or a section containing only matching historical
+defaults, is removed during explicit migration. There is no background monitoring,
+alerting, webhook, or log-rotation service configured by the application. Configure
+Python logging in the calling program if needed; `debug` does not replace the
+retired logging settings.
+
+The following top-level settings were also removed:
+
+| Removed key | Historical default | Migration meaning |
+| --- | --- | --- |
+| `dry_run` | `false` | No dry-run mode exists. Review and remove a `true` request explicitly. |
+| `temp_directory` | `"./temp"` | No configurable application temporary directory exists. |
+| `features` | `{}` | No feature-flag mechanism consumes this mapping. |
+| `metadata` | `{}` | No custom metadata mapping is consumed; `version` remains available. |
+
+Retired attributes assigned dynamically to a configuration object are rejected by
+validation and serialization. Use the migration API on the old dictionary before
+constructing an active configuration, rather than attaching removed attributes
+to a dataclass instance.
diff --git a/docs/scale-validation.md b/docs/scale-validation.md
new file mode 100644
index 0000000..91212ea
--- /dev/null
+++ b/docs/scale-validation.md
@@ -0,0 +1,80 @@
+# Offline scale validation
+
+`python -m tfq0seo.benchmark` runs the original 500-page basic fixture without HTTP requests. It measures fixture generation, HTML parsing, the configured static analyzers, site report generation, and verification that every expected URL remains in the report. It does not measure crawling, remote latency, browser rendering, or HTML/CSV/XLSX export.
+
+```sh
+# Original default workload
+python -m tfq0seo.benchmark --output benchmark.json
+
+# Varied workloads at two sizes, with three measurements of each case
+python -m tfq0seo.benchmark --suite --pages 500 2000 --repetitions 3 --timeout-seconds 600 --output scale.json
+
+# One larger workload
+python -m tfq0seo.benchmark --scenario link-dense --pages 5000 --timeout-seconds 600 --output links-5000.json
+```
+
+`--scenario` selects one workload; `--suite` selects all four. They are mutually exclusive. Repetitions execute sequentially in the same process, ordered by page count, scenario, and repetition. Each measurement creates a fresh analyzer with the standard configuration, disables page caching, and sets `crawler.max_pages` to the fixture size. Full effective configuration is recorded. Library caches and Python allocator state can remain warm, so the raw run order and starting RSS matter when comparing repetitions. There is no discarded warm-up run.
+
+## Workloads
+
+Fixture version 1 generates deterministic `https://benchmark.test/page/{index}` documents. The `.test` references are parsed but never fetched. Each run records a SHA-256 over every generated URL and its UTF-8 HTML, byte and DOM totals, href references, image counts, analyzed word counts, and the number of documents of each variant.
+
+| Scenario | Documents |
+| --- | --- |
+| `basic` | Original compact English fixture: one heading, one paragraph, and a link to the next page in a ring. Its original markup is unchanged. |
+| `content-heavy` | English articles with 12 sections, 24 paragraphs (about 1,200 words), eight images, a 20-row table, stylesheet/script references, and a self canonical. |
+| `link-dense` | The basic page plus 32 internal hrefs, four external references, mail and fragment links, and a self canonical. Small fixtures can repeat internal targets; graph edges are deduplicated by the report implementation. |
+| `mixed` | Repeats basic, content-heavy, and link-dense documents in that order. |
+
+All supplied page fetch records have HTTP status 200 and complete local HTML. SEO findings are expected; an unfavorable rule result does not mean the analyzer failed. Browser measurements remain unavailable. Offline workload tests prohibit DNS and crawler fetches, including downloads attempted by indirect dependencies. Readability uses only installed resources; its status counts and missing resources are recorded because availability changes the work performed on longer English documents.
+
+## Recorded evidence
+
+The JSON output contains every raw run and per-case median/minimum/maximum summaries. Summary metrics include only complete runs; excluded partial and failed run counts remain explicit. Each run reports successful, partial, failed, skipped, and missing page results. Report verification checks both row count and the exact set of expected URLs, detecting duplicate rows that could conceal missing pages. Site graph node/edge counts, coverage, report summary, and rule coverage are retained.
+
+The environment record includes OS, CPU model and logical/physical counts, RAM, Python, package version, installed direct and optional dependency versions, readability dependency versions, schema/rules/scoring/facts versions, and a hash of package Python source paths and bytes. An absent installed distribution is recorded as `null`. The suite fails if package source changes during the run. Timestamps use UTC.
+
+Elapsed time uses `time.perf_counter()`. Separate analysis and report durations help locate work, while total duration also includes retained-URL verification and benchmark bookkeeping. Process RSS is sampled every 50 ms and at both ends. `memory_sampled_peak_mb` is the largest observed RSS, not a true allocation peak; short-lived allocations can be missed. Start, end, and delta RSS are included. Legacy `memory_used_mb` means RSS delta. Measurements describe the whole Python process, including loaded dependencies and retained library caches.
+
+`--timeout-seconds` is a cooperative per-run deadline. It cancels awaitable work and checks between pages and after reporting, but cannot interrupt synchronous analysis/report work or forcibly terminate worker threads. Use a process supervisor with a hard timeout for unattended runs. A timeout keeps already observed page counts and returns a failed run. Exit codes are 0 for an entirely complete suite, 1 for incomplete/failed runs (including changed source), 2 for invalid CLI arguments, and 130 for interruption.
+
+## Measurements
+
+Measured on 21 September 2026 using Python 3.12.14 on Windows 11 (10.0.26200), an AMD Ryzen 7 7735HS (8 physical / 16 logical CPUs), and 63.21 GiB RAM. Package 3.0.0 used ruleset `2026.09.21`, facts `1.1`, and site analysis `1.0`. Package Python source fingerprint: `077a203b8b1c65de3022f4001a48cc6a1897e89624e9e7e8f967d20f525f4893`.
+
+Each case has two repetitions. The 500-page cases share one process; larger case groups start fresh processes. Full tests and wheel checks finished before measurement. A supervisor set a 1,200-second hard timeout per command, alongside the 360-second cooperative deadline per run. DNS and non-loopback TCP connections were blocked and counted; loopback remained available for asyncio internals.
+
+The measured CLI workloads were:
+
+```sh
+python -m tfq0seo.benchmark --suite --pages 500 --repetitions 2 --timeout-seconds 360 --output docs/benchmarks/2026-09-21-python312-500-suite.benchmark
+python -m tfq0seo.benchmark --scenario basic --pages 2000 --repetitions 2 --timeout-seconds 360 --output docs/benchmarks/2026-09-21-python312-2000-basic.benchmark
+python -m tfq0seo.benchmark --scenario mixed --pages 2000 --repetitions 2 --timeout-seconds 360 --output docs/benchmarks/2026-09-21-python312-2000-mixed.benchmark
+```
+
+| Pages | Scenario | Median total seconds (range) | Median report seconds | Median complete pages/second | Highest sampled RSS (MiB) |
+| ---: | --- | ---: | ---: | ---: | ---: |
+| 500 | basic | 41.45 (40.43–42.48) | 15.99 | 12.07 | 431.44 |
+| 500 | content-heavy | 56.84 (56.71–56.97) | 18.20 | 8.80 | 503.59 |
+| 500 | link-dense | 53.72 (52.97–54.46) | 19.42 | 9.31 | 514.04 |
+| 500 | mixed | 50.78 (50.15–51.42) | 18.07 | 9.85 | 484.86 |
+| 2,000 | basic | 165.34 (164.50–166.18) | 63.93 | 12.10 | 1,496.58 |
+| 2,000 | mixed | 193.89 (184.03–203.75) | 65.60 | 10.34 | 1,704.72 |
+
+All 12 runs (12,000 page analyses across repetitions) completed with every expected URL retained exactly once, zero partial/failed/skipped/missing results, no timeouts, and zero blocked DNS or external connection attempts. The 500-page link-dense reports retained 16,500 observed graph edges; mixed reports retained 5,812 edges at 500 pages and 23,312 at 2,000 pages. All three artifacts matched the current package source fingerprint, and it remained unchanged during measurement. Fixture hashes and readability statuses also matched between repetitions of each case.
+
+The local NLTK `corpora/cmudict` resource was absent. Longer English documents recorded unavailable readability estimates with explicit missing-resource metadata; basic documents were below the readability word threshold. The measured workload therefore includes content analysis but excludes calculation of those unavailable readability formulas. It also excludes browser metrics, HTTP crawling, and export serialization. These results do not establish network-crawl capacity or maximum supported site size.
+
+Raw evidence uses the `.benchmark` extension with standard JSON content:
+
+- [500 pages, all four scenarios, two repetitions](benchmarks/2026-09-21-python312-500-suite.benchmark)
+- [2,000 basic pages, two repetitions](benchmarks/2026-09-21-python312-2000-basic.benchmark)
+- [2,000 mixed pages, two repetitions](benchmarks/2026-09-21-python312-2000-mixed.benchmark)
+
+At 2,000 pages, median time was 3.99 times the 500-page basic median and 3.82 times the 500-page mixed median, for four times as many pages. These fixture-specific ratios do not establish general time complexity. The larger mixed timings varied by 19.72 seconds across two repeats; keep repetition and process context when comparing future results.
+
+The 2,000-page reports reached about 1.46 GiB sampled RSS for basic and 1.66 GiB for mixed content. The recorded `max_memory_mb=1024` setting checks process memory during page-processing progress; it is not a hard memory bound on synchronous report assembly. Large reports can exceed it. This is a practical capacity limit to consider before increasing site size. Next, profile report generation and investigate reducing retained objects and copies. Validation stops at 2,000 pages; 5,000 pages were not measured.
+
+The 40 benchmark regression tests passed on Python 3.12 and 3.14, including deterministic real-analyzer fixtures, blocked DNS/fetch attempts, deadline behavior, outcome counting, retained-URL checks, CLI validation, and metadata. Final artifacts were parsed as strict JSON and checked against the current source and their recorded outcomes.
+
+Results are observations for the recorded machine and configuration, not throughput or capacity guarantees for arbitrary websites. Real sites can have larger DOMs, denser graphs, slow remote responses, or different analyzer workloads.
diff --git a/pyproject.toml b/pyproject.toml
index 77ec55d..e9f4bd0 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -4,8 +4,8 @@ build-backend = "setuptools.build_meta"
[project]
name = "tfq0seo"
-version = "2.3.2"
-description = "Fast SEO analysis tool with reports"
+dynamic = ["version"]
+description = "Static SEO analysis with evidence-based reports"
authors = [{name = "TFQ0 SEO Team"}]
readme = "README.md"
requires-python = ">=3.8"
@@ -32,6 +32,7 @@ dependencies = [
]
[project.optional-dependencies]
+test = ["pytest>=7.0", "openpyxl>=3.0.0"]
full = [
"lxml>=4.9.0",
"openpyxl>=3.0.0",
@@ -41,8 +42,18 @@ full = [
[project.scripts]
tfq0seo = "tfq0seo.cli:main"
+[project.urls]
+Repository = "https://github.com/TFQ0/tfq0seo"
+
+[tool.setuptools.dynamic]
+version = {attr = "tfq0seo.__version__"}
+
[tool.setuptools.packages.find]
include = ["tfq0seo*"]
[tool.setuptools.package-data]
tfq0seo = ["templates/*.html"]
+
+[tool.pytest.ini_options]
+testpaths = ["tests"]
+addopts = "-ra"
diff --git a/requirements.txt b/requirements.txt
index c673fec..27de60b 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -1,17 +1,3 @@
-# Core dependencies
-aiohttp>=3.8.0
-beautifulsoup4>=4.11.0
-click>=8.1.0
-jinja2>=3.1.0
-rich>=12.6.0
-textstat>=0.7.3
-validators>=0.20.0
-pyyaml>=6.0
-python-dateutil>=2.8.0
-urllib3>=1.26.0
-psutil>=5.9.0
-
-# Optional dependencies for full features
-lxml>=4.9.0
-openpyxl>=3.0.0
-pandas>=1.5.0
+# Install the project with its optional export/parser dependencies.
+# Run from the repository root; pyproject.toml is the dependency source.
+.[full]
diff --git a/setup.py b/setup.py
index d101a6c..18b7209 100644
--- a/setup.py
+++ b/setup.py
@@ -1,50 +1,4 @@
-"""Setup configuration for tfq0seo package."""
-from setuptools import setup, find_packages
+"""Compatibility entry point; package metadata lives in pyproject.toml."""
+from setuptools import setup
-with open("README.md", "r", encoding="utf-8") as fh:
- long_description = fh.read()
-
-setup(
- name="tfq0seo",
- version="2.3.2",
- author="TFQ0 SEO Team",
- description="Fast SEO analysis tool with reports",
- long_description=long_description,
- long_description_content_type="text/markdown",
- url="https://github.com/tfq0seo/tfq0seo",
- packages=find_packages(),
- package_data={
- "tfq0seo": ["templates/*.html"],
- },
- install_requires=[
- "aiohttp>=3.8.0",
- "beautifulsoup4>=4.11.0",
- "click>=8.1.0",
- "jinja2>=3.1.0",
- "rich>=12.6.0",
- "textstat>=0.7.3",
- "validators>=0.20.0",
- "pyyaml>=6.0",
- "python-dateutil>=2.8.0",
- "urllib3>=1.26.0",
- "psutil>=5.9.0",
- ],
- extras_require={
- "full": ["lxml>=4.9.0", "openpyxl>=3.0.0", "pandas>=1.5.0"],
- },
- entry_points={
- "console_scripts": ["tfq0seo=tfq0seo.cli:main"],
- },
- python_requires=">=3.8",
- classifiers=[
- "Development Status :: 4 - Beta",
- "Intended Audience :: Developers",
- "Topic :: Internet :: WWW/HTTP :: Site Management",
- "License :: OSI Approved :: MIT License",
- "Programming Language :: Python :: 3",
- "Programming Language :: Python :: 3.8",
- "Programming Language :: Python :: 3.9",
- "Programming Language :: Python :: 3.10",
- "Programming Language :: Python :: 3.11",
- ],
-)
+setup()
diff --git a/tests/conftest.py b/tests/conftest.py
new file mode 100644
index 0000000..bd817c5
--- /dev/null
+++ b/tests/conftest.py
@@ -0,0 +1,66 @@
+"""Deterministic HTTP fixtures. The suite must never contact public sites."""
+
+import ipaddress
+import os
+import socket
+import threading
+from http.server import BaseHTTPRequestHandler, ThreadingHTTPServer
+
+import pytest
+
+
+@pytest.fixture(autouse=True)
+def isolate_network_and_configuration(monkeypatch):
+ for name in os.environ:
+ if name.startswith('TFQ0SEO_'):
+ monkeypatch.delenv(name)
+ original = socket.socket.connect
+ original_ex = socket.socket.connect_ex
+
+ def check(address):
+ if isinstance(address, tuple):
+ host = address[0]
+ if host != 'localhost' and not ipaddress.ip_address(host).is_loopback:
+ raise AssertionError('Tests may connect only to loopback addresses')
+
+ def connect(sock, address):
+ check(address)
+ return original(sock, address)
+
+ def connect_ex(sock, address):
+ check(address)
+ return original_ex(sock, address)
+
+ monkeypatch.setattr(socket.socket, 'connect', connect)
+ monkeypatch.setattr(socket.socket, 'connect_ex', connect_ex)
+
+
+@pytest.fixture
+def http_site():
+ """Route map values are (status, headers, body); no implicit charset."""
+ routes, requests = {}, []
+
+ class Handler(BaseHTTPRequestHandler):
+ def do_GET(self):
+ requests.append(self.path)
+ status, headers, body = routes.get(self.path, (404, {}, 'Not found'))
+ body = body.encode('utf-8') if isinstance(body, str) else body
+ self.send_response(status)
+ for name, value in headers.items():
+ self.send_header(name, value)
+ self.send_header('Content-Length', str(len(body)))
+ self.end_headers()
+ self.wfile.write(body)
+
+ def log_message(self, *args):
+ pass
+
+ server = ThreadingHTTPServer(('127.0.0.1', 0), Handler)
+ thread = threading.Thread(target=server.serve_forever, daemon=True)
+ thread.start()
+ try:
+ yield 'http://127.0.0.1:' + str(server.server_port), routes, requests
+ finally:
+ server.shutdown()
+ server.server_close()
+ thread.join(timeout=5)
diff --git a/tests/test_analyzers.py b/tests/test_analyzers.py
new file mode 100644
index 0000000..c224c34
--- /dev/null
+++ b/tests/test_analyzers.py
@@ -0,0 +1,327 @@
+"""Regression fixtures for analyzer correctness and measurement provenance."""
+
+import json
+
+import pytest
+from bs4 import BeautifulSoup
+from multidict import CIMultiDict
+
+from tfq0seo.analyzers import (
+ analyze_content, analyze_links, analyze_performance, analyze_seo, analyze_technical,
+)
+from tfq0seo.analyzers.common import parse_robots
+from tfq0seo.analyzers.content import detect_language, extract_text_content
+from tfq0seo.analyzers.links import estimate_domain_authority, normalize_url
+from tfq0seo.analyzers.performance import analyze_javascript_optimization, is_third_party
+from tfq0seo.analyzers.seo import analyze_heading_structure, analyze_internal_linking_seo
+from tfq0seo.analyzers.technical import analyze_crawlability, analyze_performance_indicators
+from tfq0seo.urls import classify_url, resolve_url
+
+
+URL = 'https://example.com/articles/'
+
+
+def document(body='', head='', lang='en'):
+ return BeautifulSoup(
+ f'Example page title for testing'
+ f''
+ f'{head}{body}', 'html.parser')
+
+
+def rule_ids(result):
+ return {issue.get('rule_id') for issue in result['issues']}
+
+
+@pytest.mark.parametrize('body', [
+ '
Historical information
Records for 2001 2002 2003.
',
+ '
',
+ '
Hidden
Visible heading
',
+])
+def test_content_accepts_previously_crashing_markup(body):
+ result = analyze_content(document(body), URL)
+ assert 'error' not in result
+ assert 0 <= result['score'] <= 100
+ json.dumps(result, allow_nan=False)
+
+
+def test_content_extraction_preserves_original_and_does_not_hide_arbitrary_classes():
+ soup = document('
Visible words
Secret
')
+ before = str(soup)
+ content = extract_text_content(soup)
+ assert 'Visible words' in content
+ assert 'Secret' not in content
+ assert str(soup) == before
+
+
+def test_content_length_and_keyword_density_are_not_ranking_requirements():
+ short = document('
Informations sur le produit
Produit utile.
', lang='fr')
+ long = document('
Informations sur le produit
' + 'produit ' * 3500 + '
', lang='fr')
+ short_result = analyze_content(short, URL, ['produit'])
+ long_result = analyze_content(long, URL, ['produit'])
+ assert short_result['score'] == long_result['score']
+ assert not any('word count' in issue['message'].lower() or 'stuffing' in issue['message'].lower()
+ for result in (short_result, long_result) for issue in result['issues'])
+
+
+def test_empty_alt_is_valid_for_decorative_images():
+ soup = document('
Accessible page heading
')
+ assert 'images.missing_alt' not in rule_ids(analyze_content(soup, URL))
+ assert 'images.missing_alt' not in rule_ids(analyze_seo(soup, URL))
+
+
+def test_missing_alt_reports_a_stable_rule_and_evidence():
+ soup = document('
Accessible page heading
')
+ for analyzer in (analyze_content, analyze_seo):
+ issue = next(issue for issue in analyzer(soup, URL)['issues'] if issue.get('rule_id') == 'images.missing_alt')
+ assert issue['evidence']
+
+
+def test_language_prefers_declaration_and_does_not_assume_latin_text_is_english():
+ assert detect_language('Bonjour le monde, nous sommes ici.') == 'und'
+ assert detect_language('Bonjour le monde', 'fr-CA') == 'fr'
+ assert detect_language('私は日本語を話します') == 'ja'
+ result = analyze_content(document('