Commit Graph

6662 Commits

Author SHA1 Message Date
Nick Sweeting
07975eccc7
Merge remote-tracking branch 'origin/dev' into dev 2026-09-02 04:59:27 -07:00
ArchiveBox Release Bot
d6b1b269ca Bump for abx-dl 1.12.240 2026-09-02 11:59:08 +00:00
Nick Sweeting
e7b3f1c485
Adopt canonical abx-dl execution plan API 2026-09-02 04:44:55 -07:00
Nick Sweeting
23b91d6840
Merge remote-tracking branch 'origin/dev' into dev 2026-09-02 04:34:29 -07:00
Nick Sweeting
95a7e64dd7
Centralize queued plugin execution 2026-09-02 04:34:22 -07:00
ArchiveBox Release Bot
071bc0cce6 Bump release version to 0.9.35rc385 2026-09-02 11:14:34 +00:00
Nick Sweeting
3e58261cd5
Expose yt-dlp media metadata for snapshot cards (#1819)
Supersedes #1818.

This keeps yt-dlp-specific player rendering out of ArchiveBox core. Core
now:

- exposes media type metadata to plugin card templates: `is_video`,
`is_audio`, `is_browser_playable`
- sorts yt-dlp media with browser-playable video/audio first
- prefers browser-playable yt-dlp outputs before thumbnails and
non-browser containers when choosing the primary card output
- avoids pinning resumed snapshots to stale selected hook maps, fixing a
pause/resume runner regression surfaced by CI
- makes `update --index-only` discover the configured search backend
even when `PLUGINS` is restricted for test/runtime isolation
- stabilizes CI-only recursive/takeover/public-UI tests that were
failing due external/heavy plugin coverage, hard-kill recovery races,
and transient full-server `/add/` startup responses

The actual click-to-load player UI lives in the companion plugin PR:
ArchiveBox/abx-plugins#34.

Verification:
```text
pytest archivebox/tests/test_ui_admin_snapshot.py -q
48 passed

pytest archivebox/tests/test_cli_update_reindex_snapshots.py -q
9 passed

pytest -xvs archivebox/tests/test_api_v1_crawls_crawl_crawl_id.py --basetemp=tests/out --ignore=archivebox/pkgs
7 passed

pytest -xvs archivebox/tests/test_takeover_util.py --basetemp=tests/out --ignore=archivebox/pkgs
19 passed

pytest -xvs archivebox/tests/test_takeover_util.py::test_live_add_update_jobs_survive_server_and_cli_owner_exits --basetemp=tests/out --ignore=archivebox/pkgs
1 passed

pytest -xvs archivebox/tests/test_ui_public_snapshot.py --basetemp=tests/out --ignore=archivebox/pkgs
6 passed

pytest -q archivebox/tests/test_recursive_crawl.py::test_recursive_crawl_depth_two_all_plugins_runs_snapshots_in_parallel --basetemp=tests/out --ignore=archivebox/pkgs
1 passed
```
2026-09-02 04:14:15 -07:00
ArchiveBox Release Bot
0f1a402940 Bump release version to 0.9.35rc384 2026-09-02 11:05:26 +00:00
Nick Sweeting
5bead960b3
Merge remote-tracking branch 'origin/dev' into dev 2026-09-02 04:04:59 -07:00
Nick Sweeting
d5ff47b7e6
Refresh documentation snippet inventory 2026-09-02 04:04:45 -07:00
ArchiveBox Release Bot
457e616d1d Bump release version to 0.9.35rc383 2026-09-02 11:03:09 +00:00
Nick Sweeting
7f9d9ca2c1
Remove transient ArchiveResult migration blip 2026-09-02 04:02:47 -07:00
ArchiveBox Release Bot
dbb9f45f53 Bump release version to 0.9.35rc382 2026-09-02 10:50:22 +00:00
Nick Sweeting
ef7d590655
Eliminate request-side SQLite write transactions (#1846)
## Summary

- replace request-side `get_or_create()` / M2M transaction boundaries
with autocommit insert-conflict resolution and guarded CAS updates
- remove the ArchiveResult upload `transaction.atomic()` /
`select_for_update()` path while preserving exact `(snapshot, plugin,
hook_name)` identity and parent output-size accounting
- keep intermediate chunk uploads filesystem-only; persist ArchiveResult
metadata once the file is complete
- reuse the same insert-conflict helpers in pending-result creation,
event projection, recovery, tag projection, and admin tag editing

## Why

Browser screenshot/MHTML uploads were colliding with the runner on
SQLite. Django helper methods opened hidden read-then-write
transactions, and every chunk rewrote ArchiveResult/Snapshot rows. A 50+
MiB upload therefore repeatedly entered the SQLite writer path and could
hit an immediate WAL read-to-write upgrade failure.

The new path uses short autocommit statements. Unique constraints
resolve create races, `modified_at` guards ArchiveResult/Snapshot
updates, and a losing writer re-reads and re-merges before retrying the
CAS. Runner lifecycle locks and event serialization remain unchanged.

## Validation

- `uv run pytest archivebox/tests/test_api_v1_core_*.py -q` (38 passed)
- focused runner/service suite (27 passed)
- `uv run pytest archivebox/tests/test_ui_admin_snapshot.py -q` (57
passed)
- tag/list/admin suites (44 passed)
- `uv run prek run --all-files`

No migrations.

<!-- This is an auto-generated description by cubic. -->
---
## Summary by cubic
Eliminates request-side SQLite write transactions so large browser
uploads no longer hit WAL read-to-write upgrade failures while the
runner holds the writer lock.

- Request-side create/update paths now use autocommit statements with
unique-constraint insert-conflict resolution and `modified_at`-guarded
compare-and-swap updates.
- ArchiveResult identity is now `(snapshot, plugin, hook_name)`;
migration `0054` drops the previously published plugin-unique constraint
so a plugin can keep several sibling hooks.
- A losing CAS writer re-reads and re-merges current state before
retrying; after three attempts the request fails with HTTP 409.
- Intermediate chunk uploads write to the filesystem only; the
`ArchiveResult` row is persisted once the upload completes, keeping the
parent snapshot's output-size accounting in sync.
- `create_snapshot` no longer blocks on the crawl lifecycle lock, and
`archivebox run` recreates exact hook requests rather than re-queueing a
plugin.
- Reused the insert-conflict helpers in pending-result creation, event
projection, recovery, tag projection, and admin tag editing; admin tag
edits now attribute new tags to the acting user.

<sup>Written for commit fbff88fb0e.
Summary will update on new commits.</sup>

<a
href="https://cubic.dev/pr/ArchiveBox/ArchiveBox/pull/1846?utm_source=github"
target="_blank" rel="noopener noreferrer"
data-no-image-dialog="true"><picture><source
media="(prefers-color-scheme: dark)"
srcset="https://www.cubic.dev/buttons/review-in-cubic-dark.svg"><source
media="(prefers-color-scheme: light)"
srcset="https://www.cubic.dev/buttons/review-in-cubic-light.svg"><img
alt="Review in cubic"
src="https://www.cubic.dev/buttons/review-in-cubic-dark.svg"></picture></a>

<!-- End of auto-generated description by cubic. -->
2026-09-02 03:50:03 -07:00
Nick Sweeting
0c6f017f0a
Preserve ArchiveResult hook history through migrations 2026-09-02 03:49:53 -07:00
Nick Sweeting
fbff88fb0e
Merge remote-tracking branch 'origin/dev' into audit-pr1846
# Conflicts:
#	archivebox/cli/archivebox_extract.py
#	archivebox/core/recovery_util.py
#	archivebox/services/archive_result_service.py
#	archivebox/services/runner.py
2026-09-01 15:43:48 -07:00
ArchiveBox Release Bot
07df9c76a8 Bump release version to 0.9.35rc381
Some checks are pending
CI / Linters (push) Waiting to run
CI / Install and CLI platform compatibility (push) Waiting to run
CI / Discovered test matrix (push) Waiting to run
CI / Documentation and root tests (push) Waiting to run
CI / CodeQL (push) Waiting to run
CI / Tested Python artifacts (push) Waiting to run
CI / Tested Docker images (push) Waiting to run
CI / All required CI lanes (push) Blocked by required conditions
Deploy Publicsite to GitHub Pages / deploy (push) Waiting to run
Release candidate / prepare (push) Waiting to run
Release candidate / python-artifacts (push) Blocked by required conditions
Release candidate / docker-digests (push) Blocked by required conditions
2026-09-01 22:08:21 +00:00
Nick Sweeting
97136703f6
docs: state the collection concurrency contract 2026-09-01 15:07:58 -07:00
ArchiveBox Release Bot
2f761615f0 Bump release version to 0.9.35rc380 2026-09-01 22:07:50 +00:00
ArchiveBox Release Bot
8dc91f90be Bump for abx-dl 1.12.233 2026-09-01 22:07:20 +00:00
ArchiveBox Release Bot
2af88da0d4 Bump release version to 0.9.35rc379 2026-09-01 22:07:14 +00:00
Nick Sweeting
032c20bdf5
cleanup: delete obsolete model lifecycle helpers 2026-09-01 15:06:48 -07:00
ArchiveBox Release Bot
d42b530caf Bump release version to 0.9.35rc378 2026-09-01 22:04:10 +00:00
Nick Sweeting
53c300a387
cleanup: remove active crawl heartbeat plumbing 2026-09-01 15:03:29 -07:00
ArchiveBox Release Bot
0498a87884 Bump release version to 0.9.35rc377 2026-09-01 21:57:03 +00:00
ArchiveBox Release Bot
e53c9cca7a Bump for abx-dl 1.12.231 2026-09-01 21:56:45 +00:00
ArchiveBox Release Bot
743ca335ad Bump release version to 0.9.35rc376 2026-09-01 21:48:47 +00:00
Nick Sweeting
2d8de8931b
fix: keep transformed previews readable at full width 2026-09-01 14:46:18 -07:00
Nick Sweeting
c0e09fa22a
test: require readable transformed HTML previews 2026-09-01 14:46:18 -07:00
ArchiveBox Release Bot
89bb245fac Bump release version to 0.9.35rc375 2026-09-01 21:24:57 +00:00
ArchiveBox Release Bot
f94230e750 Bump for abx-dl 1.12.229 2026-09-01 21:24:35 +00:00
ArchiveBox Release Bot
c5353401ea Bump release version to 0.9.35rc374 2026-09-01 20:55:59 +00:00
ArchiveBox Release Bot
dfa2d84bef Bump for abx-dl 1.12.228 2026-09-01 20:55:44 +00:00
ArchiveBox Release Bot
3a55240f79 Bump release version to 0.9.35rc373 2026-09-01 20:39:34 +00:00
Nick Sweeting
b0acf27b5f
Validate selected snapshot preview captures 2026-09-01 13:39:11 -07:00
ArchiveBox Release Bot
9720dbe711 Bump release version to 0.9.35rc372 2026-09-01 20:11:09 +00:00
ArchiveBox Release Bot
c67f0c8ec5 Bump for abx-dl 1.12.227 2026-09-01 20:10:51 +00:00
ArchiveBox Release Bot
048f09a31d Bump release version to 0.9.35rc371 2026-09-01 19:58:30 +00:00
Nick Sweeting
dda6bfdfb5
Revert "Make transformed HTML previews full-width"
This reverts commit c09070c2f3.
2026-09-01 12:57:51 -07:00
ArchiveBox Release Bot
e1425c0a54 Bump release version to 0.9.35rc370 2026-09-01 19:52:18 +00:00
Nick Sweeting
c09070c2f3
Make transformed HTML previews full-width 2026-09-01 12:51:38 -07:00
Nick Sweeting
9c8bea8fdf
Unify plugin runtime and queue lifecycle boundaries (#1850)
## Summary

This is the ArchiveBox side of a coordinated three-repository boundary
cleanup.

- delete the second python-statemachine lifecycle engine and replace it
with explicit model-owned queue transitions
- reduce workers/models.py to durable queue fields, leases, claims,
pause, resume, and guarded updates
- delete the legacy Crawl direct-hook lifecycle and duplicate
hook-record projector
- make abx-dl the sole hook subprocess runtime through PluginCatalog,
ExecutionPlan, execute_hook, and generic event services
- make the shared catalog the single source for packaged and
data-directory plugins, including admin plugin/config presentation
- make PluginConfigResolver the shared schema, alias, precedence, and
enabled-plugin resolver
- make OutputManifest the single output-files, mimetype, and size
implementation across models, APIs, recovery, template helpers, and
services
- remove python-statemachine plus the pydot and pyparsing diagram-only
dependency closure

Net ArchiveBox change: 585 insertions and 2,625 deletions.

## User impact

Existing CLI, REST, Django admin, custom plugin, queued-work,
pause/resume/cancel, and ArchiveResult surfaces are preserved. The
plugin catalog and configuration remain visible in admin; presentation
metadata now comes from plugin manifests rather than ArchiveBox
hardcoded lists.

## Layer boundary

ArchiveBox retains Django/database persistence, scheduling, projectors,
and product policy. abx-dl owns discovery, selection, execution, phase
setup, and output metadata without knowing about Django or ArchiveBox.
abx-plugins remains standalone and knows neither host.

## Coordinated dependencies and promotion order

- ArchiveBox/abx-plugins#59
- ArchiveBox/abx-dl#20

Promotion is intentionally serial because all three products use exact
release pins:

1. Merge and release abx-plugins#59.
2. Advance the abx-plugins pin on abx-dl#20, rerun CI, merge, and
release it.
3. Advance both exact pins and the lockfile on this branch, rerun native
ArchiveBox CI, then rerun native ArchiveBox CI before merging this PR.

This PR is ready for architectural review; merging remains gated on the
release and exact-pin sequence above.

This avoids temporary shims, git dependencies, and an unsatisfiable pair
of exact package requirements. The current native ArchiveBox install
matrix is expected to fail while it installs the older released abx-dl
API; local integration verification used editable sibling worktrees.

## Validation

- prek run --all-files
- django-admin makemigrations --check --dry-run: no changes detected
- 104 lifecycle, runner, output, and binary tests passed in the final
focused run
- 91 catalog, admin, config, runner, and output tests passed
- 31 direct-hook adapter tests passed
- real custom data-directory plugin extraction plus admin plugin/config
rendering: 3 passed
- additional binary, process, config, API, and lifecycle checks: 21
passed
2026-09-01 12:50:44 -07:00
Nick Sweeting
92585fe9b5
Remove obsolete background marker reference 2026-09-01 12:48:20 -07:00
Nick Sweeting
376273270a
Remove obsolete background hook convention 2026-09-01 12:47:46 -07:00
Nick Sweeting
a6eb9b240e
Merge remote-tracking branch 'origin/dev' into audit-pr1850 2026-09-01 12:40:04 -07:00
Nick Sweeting
aaea35f9fd
Preserve lifecycle compatibility after runtime unification 2026-09-01 12:39:58 -07:00
ArchiveBox Release Bot
64e36a1d57 Bump release version to 0.9.35rc369 2026-09-01 19:27:53 +00:00
Nick Sweeting
89b6a9c612
Fix screenshot gallery login sequencing 2026-09-01 12:27:18 -07:00
ArchiveBox Release Bot
fa84f2facb Bump release version to 0.9.35rc368 2026-09-01 19:20:47 +00:00
Nick Sweeting
0302c4a31c
Add first-run setup wizard screenshots 2026-09-01 12:17:18 -07:00