[PR #1745] [MERGED] Add comprehensive tests for machine/process models, orchestrator, and search backends #4508

Closed
opened 2026-03-15 01:48:30 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ArchiveBox/ArchiveBox/pull/1745
Author: @pirate
Created: 12/31/2025
Status: Merged
Merged: 12/31/2025
Merged by: @pirate

Base: devHead: claude/analyze-test-coverage-mWgwv


📝 Commits (5)

  • 0cb5f07 Add comprehensive tests for machine/process models, orchestrator, and search backends
  • a063d8c Merge remote-tracking branch 'origin/dev' into claude/analyze-test-coverage-mWgwv
  • 9bf7a52 Update tests for new Process model-based architecture
  • 8a0acde Add SSL, redirects, SEO plugin tests and fix fake test issues
  • 08383c4 Fix tautological assertion in SEO test

📊 Changes

19 files changed (+2565 additions, -0 deletions)

View changed files

archivebox/machine/tests/__init__.py (+1 -0)
archivebox/machine/tests/test_machine_models.py (+563 -0)
archivebox/plugins/apt/tests/__init__.py (+1 -0)
archivebox/plugins/apt/tests/test_apt_provider.py (+154 -0)
archivebox/plugins/npm/tests/__init__.py (+1 -0)
archivebox/plugins/npm/tests/test_npm_provider.py (+144 -0)
archivebox/plugins/pip/tests/__init__.py (+1 -0)
archivebox/plugins/pip/tests/test_pip_provider.py (+175 -0)
archivebox/plugins/redirects/tests/__init__.py (+1 -0)
archivebox/plugins/redirects/tests/test_redirects.py (+134 -0)
archivebox/plugins/search_backend_ripgrep/tests/test_ripgrep_search.py (+308 -0)
archivebox/plugins/search_backend_sqlite/tests/__init__.py (+1 -0)
archivebox/plugins/search_backend_sqlite/tests/test_sqlite_search.py (+351 -0)
archivebox/plugins/seo/tests/__init__.py (+1 -0)
archivebox/plugins/seo/tests/test_seo.py (+135 -0)
archivebox/plugins/ssl/tests/__init__.py (+1 -0)
archivebox/plugins/ssl/tests/test_ssl.py (+139 -0)
archivebox/workers/tests/__init__.py (+1 -0)
archivebox/workers/tests/test_orchestrator.py (+453 -0)

📄 Description

This adds new test coverage for previously untested areas:

Machine module (archivebox/machine/tests/):

  • Machine, NetworkInterface, Binary, Process model tests
  • BinaryMachine and ProcessMachine state machine tests
  • JSONL serialization/deserialization tests
  • Manager method tests

Workers module (archivebox/workers/tests/):

  • PID file utility tests (write, read, cleanup)
  • Orchestrator lifecycle and queue management tests
  • Worker spawning logic tests
  • Idle detection and exit condition tests

Search backends:

  • SQLite FTS5 search tests with real indexed content
  • Phrase search, stemming, and unicode support
  • Ripgrep search tests with archive directory structure
  • Environment variable configuration tests

Binary provider plugins:

  • pip provider hook tests
  • npm provider hook tests with PATH updates
  • apt provider hook tests

Summary by cubic

Adds comprehensive tests for machine/process models, orchestrator lifecycle, search backends, and core plugins (SEO, SSL, redirects) to improve reliability under the new Process model architecture. Includes real-data checks for ripgrep and SQLite FTS5 and Chrome-based plugin integration, plus verification of pip, npm, and apt provider hooks.

  • New Features
    • Machine: tests for Machine/NetworkInterface/Binary/Process, managers, JSONL, and BinaryMachine/ProcessMachine state machines.
    • Workers: orchestrator startup/shutdown, queue and worker spawning, idle/exit logic, and Process-based tracking replacing pid_utils.
    • Search: SQLite FTS5 indexing and queries (phrase, stemming, unicode) and ripgrep search over archive structure with env config and timeouts.
    • Plugins: Chrome integration tests for redirects, SEO, and SSL hooks using real URLs.
    • Binary providers: pip, npm (LIB_DIR and npm prefix handling), and apt hook behavior with overrides JSON.

Written for commit 08383c4d83. Summary will update on new commits.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/ArchiveBox/ArchiveBox/pull/1745 **Author:** [@pirate](https://github.com/pirate) **Created:** 12/31/2025 **Status:** ✅ Merged **Merged:** 12/31/2025 **Merged by:** [@pirate](https://github.com/pirate) **Base:** `dev` ← **Head:** `claude/analyze-test-coverage-mWgwv` --- ### 📝 Commits (5) - [`0cb5f07`](https://github.com/ArchiveBox/ArchiveBox/commit/0cb5f0712da75d71137d1ac124c9e2884d18aeea) Add comprehensive tests for machine/process models, orchestrator, and search backends - [`a063d8c`](https://github.com/ArchiveBox/ArchiveBox/commit/a063d8cd4308b82626bfc7e5353ddf2cff3e4b2c) Merge remote-tracking branch 'origin/dev' into claude/analyze-test-coverage-mWgwv - [`9bf7a52`](https://github.com/ArchiveBox/ArchiveBox/commit/9bf7a520a01a8d2ff564404056e1cb1f758225ff) Update tests for new Process model-based architecture - [`8a0acde`](https://github.com/ArchiveBox/ArchiveBox/commit/8a0acdebcde9bce40a4065e01bb6b616d43db292) Add SSL, redirects, SEO plugin tests and fix fake test issues - [`08383c4`](https://github.com/ArchiveBox/ArchiveBox/commit/08383c4d8322abda1b1ff23b32769b3ed89261cc) Fix tautological assertion in SEO test ### 📊 Changes **19 files changed** (+2565 additions, -0 deletions) <details> <summary>View changed files</summary> ➕ `archivebox/machine/tests/__init__.py` (+1 -0) ➕ `archivebox/machine/tests/test_machine_models.py` (+563 -0) ➕ `archivebox/plugins/apt/tests/__init__.py` (+1 -0) ➕ `archivebox/plugins/apt/tests/test_apt_provider.py` (+154 -0) ➕ `archivebox/plugins/npm/tests/__init__.py` (+1 -0) ➕ `archivebox/plugins/npm/tests/test_npm_provider.py` (+144 -0) ➕ `archivebox/plugins/pip/tests/__init__.py` (+1 -0) ➕ `archivebox/plugins/pip/tests/test_pip_provider.py` (+175 -0) ➕ `archivebox/plugins/redirects/tests/__init__.py` (+1 -0) ➕ `archivebox/plugins/redirects/tests/test_redirects.py` (+134 -0) ➕ `archivebox/plugins/search_backend_ripgrep/tests/test_ripgrep_search.py` (+308 -0) ➕ `archivebox/plugins/search_backend_sqlite/tests/__init__.py` (+1 -0) ➕ `archivebox/plugins/search_backend_sqlite/tests/test_sqlite_search.py` (+351 -0) ➕ `archivebox/plugins/seo/tests/__init__.py` (+1 -0) ➕ `archivebox/plugins/seo/tests/test_seo.py` (+135 -0) ➕ `archivebox/plugins/ssl/tests/__init__.py` (+1 -0) ➕ `archivebox/plugins/ssl/tests/test_ssl.py` (+139 -0) ➕ `archivebox/workers/tests/__init__.py` (+1 -0) ➕ `archivebox/workers/tests/test_orchestrator.py` (+453 -0) </details> ### 📄 Description This adds new test coverage for previously untested areas: Machine module (archivebox/machine/tests/): - Machine, NetworkInterface, Binary, Process model tests - BinaryMachine and ProcessMachine state machine tests - JSONL serialization/deserialization tests - Manager method tests Workers module (archivebox/workers/tests/): - PID file utility tests (write, read, cleanup) - Orchestrator lifecycle and queue management tests - Worker spawning logic tests - Idle detection and exit condition tests Search backends: - SQLite FTS5 search tests with real indexed content - Phrase search, stemming, and unicode support - Ripgrep search tests with archive directory structure - Environment variable configuration tests Binary provider plugins: - pip provider hook tests - npm provider hook tests with PATH updates - apt provider hook tests <!-- This is an auto-generated description by cubic. --> --- ## Summary by cubic Adds comprehensive tests for machine/process models, orchestrator lifecycle, search backends, and core plugins (SEO, SSL, redirects) to improve reliability under the new Process model architecture. Includes real-data checks for ripgrep and SQLite FTS5 and Chrome-based plugin integration, plus verification of pip, npm, and apt provider hooks. - **New Features** - Machine: tests for Machine/NetworkInterface/Binary/Process, managers, JSONL, and BinaryMachine/ProcessMachine state machines. - Workers: orchestrator startup/shutdown, queue and worker spawning, idle/exit logic, and Process-based tracking replacing pid_utils. - Search: SQLite FTS5 indexing and queries (phrase, stemming, unicode) and ripgrep search over archive structure with env config and timeouts. - Plugins: Chrome integration tests for redirects, SEO, and SSL hooks using real URLs. - Binary providers: pip, npm (LIB_DIR and npm prefix handling), and apt hook behavior with overrides JSON. <sup>Written for commit 08383c4d8322abda1b1ff23b32769b3ed89261cc. Summary will update on new commits.</sup> <!-- End of auto-generated description by cubic. --> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-15 01:48:30 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/ArchiveBox#4508
No description provided.