Commit Graph

98 Commits

Author SHA1 Message Date
Nick Sweeting
3adb214b42
release: archivebox 0.9.35rc31 2026-06-14 01:39:23 -07:00
Nick Sweeting
1dbde4776f
release: archivebox 0.9.35rc27 2026-06-13 23:12:36 -07:00
Nick Sweeting
a48ce6871b
Make per-snapshot crawl seal idempotent against the run_snapshot race
run_snapshot calls load_snapshot_payload which replaces self.crawl with
a fresh Crawl model instance every time. When N snapshot tasks finish
near-simultaneously their independent self.crawl/SM pairs all see
'STARTED + no open snapshots' and race on sm.seal(). The first task
drives the SM to a final state (engine.running becomes False), but the
loser's current_state still reads STARTED off its stale model field,
so python-statemachine then raises 'Can't Seal when in Started.' and
fails the whole snapshot task even though the crawl is already sealed.

Refresh the row right before the call so the guard sees the committed
status, and treat TransitionNotAllowed as the expected idempotent
no-op when another task already drove the transition.
2026-06-13 20:17:30 -07:00
Nick Sweeting
e547abbf27
Align direct URL Crawl flow with historical depth=0 convention
archivebox add and other entry points now seed Crawl.urls as
CrawlSeed JSONL at depth=0 (the input layer) with max_depth=depth
for direct URLs and depth+1 only for stdin/import text where the
synthetic archivebox://internal root lives at depth=0. The runner
also accepts one plain URL per line for ORM/crawl-create/schedule
callers so every Crawl row goes through the same expansion path
without scattering CrawlSeed knowledge across the codebase.

Tests updated to match restored convention.
2026-06-13 18:04:45 -07:00
Nick Sweeting
c9e63ccffd
Centralize synthetic root snapshot creation in CrawlRunner
Direct URL inputs from CLI/UI/API now seed Crawl.urls as explicit
{type:CrawlSeed,url,depth} JSONL rows; raw stdin/UI/API import text
stays verbatim. The runner's create_initial_snapshots() is now the
single place that either expands seed rows or creates the synthetic
archivebox://internal root + staticfile/stdin.txt, so add paths no
longer perform DB/FS side effects and the parser hooks run through
the same Snapshot lifecycle as every other extractor.
2026-06-13 17:10:06 -07:00
Nick Sweeting
6a635d3cd6
Fix UI add direct URL runner flow
Some checks are pending
CodeQL / Analyze (${{ matrix.language }}) (none, python) (push) Waiting to run
Build Docker image / build ${{ matrix.platform }} (digest-linux-amd64, docker-amd64, linux/amd64, ubuntu-24.04) (push) Waiting to run
Build Docker image / build ${{ matrix.platform }} (digest-linux-arm64, docker-arm64, linux/arm64, ubuntu-24.04-arm) (push) Waiting to run
Build Docker image / publish multiarch tags (push) Blocked by required conditions
Run linters / lint (push) Waiting to run
Build Pip package / build (push) Waiting to run
Release State / release-state (push) Waiting to run
Parallel Tests / Discover test files (push) Waiting to run
Parallel Tests / ${{ matrix.test.name }} (push) Blocked by required conditions
Parallel Tests / ${{ matrix.plugin.name }} (push) Blocked by required conditions
Run tests / python_tests (ubuntu-22.04, 3.13) (push) Waiting to run
Run tests / docker_tests (push) Waiting to run
Update Homebrew tap / dispatch (push) Waiting to run
2026-06-11 09:28:28 -07:00
Nick Sweeting
7e4dd2ac2d
Preserve queued hook validation for maintenance
Some checks are pending
CodeQL / Analyze (${{ matrix.language }}) (none, python) (push) Waiting to run
Build Docker image / build ${{ matrix.platform }} (digest-linux-amd64, docker-amd64, linux/amd64, ubuntu-24.04) (push) Waiting to run
Build Docker image / build ${{ matrix.platform }} (digest-linux-arm64, docker-arm64, linux/arm64, ubuntu-24.04-arm) (push) Waiting to run
Build Docker image / publish multiarch tags (push) Blocked by required conditions
Run linters / lint (push) Waiting to run
Build Pip package / build (push) Waiting to run
Release State / release-state (push) Waiting to run
Parallel Tests / Discover test files (push) Waiting to run
Parallel Tests / ${{ matrix.test.name }} (push) Blocked by required conditions
Parallel Tests / ${{ matrix.plugin.name }} (push) Blocked by required conditions
Run tests / python_tests (ubuntu-22.04, 3.13) (push) Waiting to run
Run tests / docker_tests (push) Waiting to run
Update Homebrew tap / dispatch (push) Waiting to run
2026-06-11 08:45:57 -07:00
Nick Sweeting
29cf3fe4ee
Align limit tests with direct snapshot depth 2026-06-11 08:18:36 -07:00
Nick Sweeting
33436ae646
Run queued maintenance plugins explicitly 2026-06-11 07:26:00 -07:00
Nick Sweeting
6e0f2a41a3
Fix add input routing and plugin dependencies 2026-06-11 07:06:41 -07:00
Nick Sweeting
0920431b53
Fix discovered snapshot plugin selection 2026-06-10 21:34:44 -07:00
Nick Sweeting
2bda2abbf0
Fix tagged internal add crawl sealing 2026-06-10 21:04:48 -07:00
Nick Sweeting
9149ee12bf
Reopen crawls before queuing discovered snapshots 2026-06-10 10:43:52 -07:00
Nick Sweeting
2bfb3ad4eb
release: archivebox 0.9.35rc5 2026-06-09 22:09:28 -07:00
Nick Sweeting
5adec53b4c
Expand add flow runtime handling 2026-06-08 23:27:08 -07:00
Nick Sweeting
0642d085be
release: archivebox 0.9.35rc2 2026-06-08 05:03:19 -07:00
Nick Sweeting
1eadff04f1
root dir cleanup 2026-06-08 04:45:13 -07:00
Nick Sweeting
4fa90e484a
release: archivebox 0.9.34rc71 2026-06-07 20:51:28 -07:00
Nick Sweeting
2659f20dc4
fix runner takeover for scoped snapshot workers 2026-06-07 11:41:17 -07:00
Nick Sweeting
1ba5281343
release: archivebox 0.9.34rc68 2026-06-07 04:19:40 -07:00
Nick Sweeting
87b518314a
release: archivebox 0.9.34rc67 2026-06-07 04:06:45 -07:00
Nick Sweeting
88dc690bd3
Fix queued hook recovery tests 2026-06-05 11:44:36 -07:00
Nick Sweeting
1b19736b2f
Recover interrupted hook work by hook identity
Some checks are pending
CodeQL / Analyze (${{ matrix.language }}) (none, python) (push) Waiting to run
Build Docker image / build ${{ matrix.platform }} (digest-linux-amd64, docker-amd64, linux/amd64, ubuntu-24.04) (push) Waiting to run
Build Docker image / build ${{ matrix.platform }} (digest-linux-arm64, docker-arm64, linux/arm64, ubuntu-24.04-arm) (push) Waiting to run
Build Docker image / publish multiarch tags (push) Blocked by required conditions
Run linters / lint (push) Waiting to run
Build Pip package / build (push) Waiting to run
Release State / release-state (push) Waiting to run
Parallel Tests / Discover test files (push) Waiting to run
Parallel Tests / ${{ matrix.test.name }} (push) Blocked by required conditions
Parallel Tests / ${{ matrix.plugin.name }} (push) Blocked by required conditions
Run tests / python_tests (ubuntu-22.04, 3.13) (push) Waiting to run
Run tests / docker_tests (push) Waiting to run
Update Homebrew tap / dispatch (push) Waiting to run
2026-06-05 03:25:38 -07:00
Nick Sweeting
7f8af6357d
fix index and binary runner lifecycle 2026-06-04 21:40:58 -07:00
Nick Sweeting
c0fb8eb532
release: archivebox 0.9.34rc39 2026-06-03 17:19:48 -07:00
Nick Sweeting
96437e1ffd
Publish local ArchiveBox changes 2026-06-02 02:25:52 -07:00
Nick Sweeting
bcfb8c12a5
release: archivebox 0.9.34rc35 2026-06-01 19:35:35 -07:00
Nick Sweeting
e1c84e7d26
release: archivebox 0.9.34rc32 2026-06-01 18:10:44 -07:00
Nick Sweeting
42fd16b820
release: archivebox 0.9.34rc31 2026-06-01 17:52:19 -07:00
Nick Sweeting
62fb2c8659
release: archivebox 0.9.34rc30 2026-06-01 17:36:52 -07:00
Nick Sweeting
5c3161a5c1
release: archivebox 0.9.34rc29 2026-06-01 17:22:59 -07:00
Nick Sweeting
c075d654d8
Consolidate runtime config handling 2026-06-01 15:03:40 -07:00
Nick Sweeting
75441eb8d7
fix: restart supervised runner from add view 2026-06-01 10:37:44 -07:00
Nick Sweeting
a840b0c457
release: archivebox 0.9.34rc3 2026-06-01 03:42:51 -07:00
Nick Sweeting
96ffc765c0
release: archivebox 0.9.34rc2 2026-06-01 03:36:54 -07:00
Nick Sweeting
3871a4ac7e
release: archivebox 0.9.33rc68 2026-06-01 03:12:47 -07:00
Nick Sweeting
72a67bd511
Project abxpkg binary events 2026-06-01 02:02:42 -07:00
Nick Sweeting
cab05eb1c6
Refactor plugins search progress and config flows 2026-06-01 00:08:27 -07:00
Nick Sweeting
b2689266f7
release: archivebox 0.9.33rc79 2026-05-31 18:57:22 -07:00
Nick Sweeting
9bcba41b58
release: archivebox 0.9.33rc58 2026-05-31 04:38:45 -07:00
Nick Sweeting
b08f70e510
release: archivebox 0.9.33rc51 2026-05-30 22:37:06 -07:00
Nick Sweeting
5a38193f56
release: archivebox 0.9.33rc50 2026-05-30 22:27:28 -07:00
Nick Sweeting
6ce2555dfd
fix: rename utils.py → util.py across modules, fix add --index-only, misc cleanups
Renames (no functional change, just consistency with the rest of the codebase):
- cli/cli_utils.py → cli/cli_util.py
- core/host_utils.py → core/host_util.py
- core/tag_utils.py → core/tag_util.py
- crawls/schedule_utils.py → crawls/schedule_util.py
- machine/env_utils.py → machine/env_util.py

Functional fixes:
- archivebox add --index-only now materializes Snapshot rows synchronously
  via crawl.create_snapshots_from_urls() instead of just queueing the Crawl
  and leaving the index empty. The previous behavior broke every test that
  expected --index-only to populate the index, since the runner is never
  started in index-only mode.
- config/collection.py: add _coerce_from_str_dict as the inverse of
  _coerce_to_str_dict so JSON-encoded INI values are decoded back to native
  dict/list types when mirrored into Machine.config (a JSONField). Without
  this, downstream consumers like MachineEvent / abx-dl get raw JSON
  strings where they expect dicts.

Plus matching admin / middleware / model touch-ups, the registration
password_change_form template, and assorted small cleanups the user
worked through while validating the deploy path.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-30 14:30:33 -07:00
Nick Sweeting
b0a47e8bf5
wip: snapshot live progress, universal --init, runner perms, supervisord SIGINT
- Snapshot detail page: embed scoped live-progress monitor (same-origin
  /progress.json on whichever host the page is served from); hide admin
  action buttons when scoped; per-snapshot perms via can_view_snapshot.
- crawl_file API: respect crawl-level permissions; PUBLIC/UNLISTED served
  to guests, PRIVATE returns 404 for non-admin/non-owner.
- CrawlRunner: replace allow_paused_snapshot_maintenance with
  allow_maintenance_on_inactive_crawl so SEALED crawls don't short-circuit
  the cancellation guard for legitimate maintenance hooks (search backend
  backfill, fs migration, etc.). Fixes infinite STARTED loop on snapshots
  with queued search_backend results.
- Universal `--init` flag: works on any subcommand (server, update, add,
  shell, install, ...). Detected at module load, stripped from argv, and
  consumed in the dispatcher so subprocesses inherit a clean env.
- supervisord_util.run_runner_worker: route Ctrl+C through
  supervisor.signalProcess(name, "SIGINT") instead of raw os.kill on a
  cached pid, gated on statename=RUNNING. Prevents killing unrelated
  processes when the worker's pid has been reused by the OS.
- Login page: remove non-functional password-reset links; add
  has_real_admin_users template tag to gate the bootstrap hint.
- Add page: hide underline on the "Get the extension" link.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-30 04:45:15 -07:00
Nick Sweeting
e094c51d67
release: archivebox 0.9.33rc42 2026-05-29 04:28:08 -07:00
Nick Sweeting
2d2b8ff047
release: archivebox 0.9.33rc39 2026-05-29 03:53:41 -07:00
Nick Sweeting
eb0fed9327
release: archivebox 0.9.33rc38 2026-05-29 03:40:59 -07:00
Nick Sweeting
c750084c3c
release: archivebox 0.9.33rc37 2026-05-29 02:50:04 -07:00
Nick Sweeting
04f20447f8
Fix snapshot finalization race 2026-05-28 20:32:51 -07:00
Nick Sweeting
881a858383
release: archivebox 0.9.33rc35 2026-05-28 20:23:01 -07:00