Commit Graph

6794 Commits

Author SHA1 Message Date
ArchiveBox Release Bot
558a7c75e6 Bump release version to 0.9.35rc435 2026-09-07 08:50:04 +00:00
Nick Sweeting
f0d7947874
Explain why agent adapters reuse request configuration 2026-09-07 01:49:36 -07:00
ArchiveBox Release Bot
ae955386dc Bump release version to 0.9.35rc434 2026-09-07 08:42:22 +00:00
Nick Sweeting
6f8e3b75a3
Reuse request configuration in optional agent adapters 2026-09-07 01:39:34 -07:00
Nick Sweeting
974cb91a22
Assert OpenCode defaults do not pin a model that can leave the catalog 2026-09-07 01:18:02 -07:00
Nick Sweeting
434a78a02d
Test OpenCode private asset caching and honor isolated test package paths 2026-09-07 01:03:33 -07:00
ArchiveBox Release Bot
603bc01fa8 Bump release version to 0.9.35rc433
Some checks failed
CI / Linters (push) Has been cancelled
CI / Install and CLI platform compatibility (push) Has been cancelled
CI / Discovered test matrix (push) Has been cancelled
CI / Documentation and root tests (push) Has been cancelled
CI / CodeQL (push) Has been cancelled
CI / Tested Python artifacts (push) Has been cancelled
CI / Tested Docker images (push) Has been cancelled
Deploy Publicsite to GitHub Pages / deploy (push) Has been cancelled
Release candidate / prepare (push) Has been cancelled
CI / All required CI lanes (push) Has been cancelled
Release candidate / python-artifacts (push) Has been cancelled
Release candidate / docker-digests (push) Has been cancelled
CodeQL / Analyze (${{ matrix.language }}) (none, javascript-typescript) (push) Has been cancelled
CodeQL / Analyze (${{ matrix.language }}) (none, python) (push) Has been cancelled
2026-09-04 02:11:33 +00:00
Nick Sweeting
a59742940b
Test immediate OpenCode events and real terminal ticket handshakes (#1871)
* Stop initializing Git repositories for OpenCode sessions

* Isolate optional AI failures behind a lazy plugin adapter

* Keep explicit plugin enable flags boolean after config resolution

* Use Django login redirect encoding at the optional agent boundary

* Cover cold-start failures and real browser storage isolation

* Verify persisted dismissal and native storage denial variants

* Keep headless browser interaction independent of display timing

* Install optional OpenCode clients through the plugin extra

* Authenticate and route optional OpenCode WebSockets with real browser coverage

* Apply control-plane policy and proxy authentication to agent sockets

* Require immediate delivery of the first real OpenCode event

* Exercise browser same-origin headers in event regression

* Exercise OpenCode terminal tickets in proxy and browser regressions

* Preserve primary terminal failure while verifying cleanup
2026-09-03 19:09:25 -07:00
ArchiveBox Release Bot
5989ddfa41 Bump release version to 0.9.35rc432 2026-09-04 02:03:07 +00:00
ArchiveBox Release Bot
544f67f16c Bump for abx-dl 1.12.267 2026-09-04 02:02:29 +00:00
ArchiveBox Release Bot
7259c8cd06 Bump release version to 0.9.35rc431 2026-09-04 01:24:34 +00:00
ArchiveBox Release Bot
042f725ef2 Bump for abx-dl 1.12.266 2026-09-04 01:24:20 +00:00
ArchiveBox Release Bot
5b3bd229c8 Bump release version to 0.9.35rc430 2026-09-04 00:35:01 +00:00
Nick Sweeting
fb66ca15d6
Route authenticated OpenCode WebSockets and verify mounted browser navigation (#1870)
* Stop initializing Git repositories for OpenCode sessions

* Isolate optional AI failures behind a lazy plugin adapter

* Keep explicit plugin enable flags boolean after config resolution

* Use Django login redirect encoding at the optional agent boundary

* Cover cold-start failures and real browser storage isolation

* Verify persisted dismissal and native storage denial variants

* Keep headless browser interaction independent of display timing

* Install optional OpenCode clients through the plugin extra

* Authenticate and route optional OpenCode WebSockets with real browser coverage

* Apply control-plane policy and proxy authentication to agent sockets
2026-09-03 17:33:32 -07:00
ArchiveBox Release Bot
95441477cf Bump release version to 0.9.35rc429 2026-09-04 00:25:10 +00:00
ArchiveBox Release Bot
b142c2e62d Bump for abx-dl 1.12.265 2026-09-04 00:24:56 +00:00
ArchiveBox Release Bot
a85fe33f27 Bump release version to 0.9.35rc428 2026-09-03 23:07:41 +00:00
Nick Sweeting
d044f5ee0e
Isolate OpenCode in its plugin and stop forced Git initialization (#1869)
* Stop initializing Git repositories for OpenCode sessions

* Isolate optional AI failures behind a lazy plugin adapter

* Keep explicit plugin enable flags boolean after config resolution

* Use Django login redirect encoding at the optional agent boundary

* Cover cold-start failures and real browser storage isolation

* Verify persisted dismissal and native storage denial variants

* Keep headless browser interaction independent of display timing

* Install optional OpenCode clients through the plugin extra
2026-09-03 16:05:30 -07:00
ArchiveBox Release Bot
b960bfb93f Bump release version to 0.9.35rc427 2026-09-03 22:52:16 +00:00
ArchiveBox Release Bot
5b9c9f9b8a Bump for abx-dl 1.12.264 2026-09-03 22:51:54 +00:00
ArchiveBox Release Bot
775b7f4575 Bump release version to 0.9.35rc426 2026-09-03 20:07:29 +00:00
ArchiveBox Release Bot
cfd71387f0 Bump for abx-dl 1.12.263 2026-09-03 20:07:12 +00:00
ArchiveBox Release Bot
eb1822ea55 Bump release version to 0.9.35rc425 2026-09-03 19:29:04 +00:00
ArchiveBox Release Bot
968de79f60 Bump for abx-dl 1.12.262 2026-09-03 19:28:42 +00:00
ArchiveBox Release Bot
2ad4fb5eb4 Bump release version to 0.9.35rc424 2026-09-03 18:53:31 +00:00
Nick Sweeting
4ae076e0fb
Disable OpenCode filesystem snapshots (#1868)
OpenCode's own snapshot tracker should not `git add` an ArchiveBox
collection. On a real `/data` project it traversed archived nested
repositories, failed on their Git state, and left the agent request busy
after the model had replied.

Generate fresh ArchiveBox-owned OpenCode config with `snapshot: false`.
Existing OpenCode config remains entirely user-owned and untouched.

Verification:
- real config/server tests pass
- DigestBox `/data` smoke selected `opencode/big-pickle`, replied
correctly, exited cleanly in 79s, and logged no snapshot
traversal/failure.

<!-- This is an auto-generated description by cubic. -->
---
## Summary by cubic
OpenCode's snapshot tracker was `git add`-ing the ArchiveBox collection,
failing on nested archived repos and leaving agent requests busy after
the model replied. Disables filesystem snapshots for generated OpenCode
configs by setting `snapshot: false`, and updates tests to assert the
new config. Existing user-owned configs are left untouched.

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

<a
href="https://cubic.dev/pr/ArchiveBox/ArchiveBox/pull/1868?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-03 11:53:00 -07:00
Nick Sweeting
e7ff7cdad2
Disable OpenCode filesystem snapshots 2026-09-03 11:50:09 -07:00
ArchiveBox Release Bot
cde3542961 Bump release version to 0.9.35rc423
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-03 18:22:59 +00:00
Nick Sweeting
c28d470f9a
Handle existing OpenCode JSONC defaults (#1867)
Follow-up to #1866 addressing both Cubic findings before release:

- recognize schema-only OpenCode JSONC with comments and trailing commas
- exercise the intended preservation branch with valid JSON
- also verify administrator-selected JSONC remains byte-for-byte
unchanged

Verification: focused config tests pass (5 passed).

<!-- This is an auto-generated description by cubic. -->
---
## Summary by cubic
Fixes detection of schema-only OpenCode JSONC configs so comments,
trailing commas, and escaped keys no longer prevent the default model
from being added.

- Replaces strict JSON parsing with a JSONC-aware parser that strips
comments and trailing commas before checking whether a config only sets
`$schema`.
- Writes the default config as JSONC text instead of JSON.
- Expands tests to cover plain JSON, JSONC with comments and trailing
commas, and escaped schema keys.

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

<a
href="https://cubic.dev/pr/ArchiveBox/ArchiveBox/pull/1867?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-03 11:22:33 -07:00
Nick Sweeting
27c2a947b4
Handle existing OpenCode JSONC defaults 2026-09-03 11:22:07 -07:00
ArchiveBox Release Bot
955f30ae0d Bump release version to 0.9.35rc422 2026-09-03 18:09:11 +00:00
Nick Sweeting
0b08388e97
Fix OpenCode defaults and false health failures (#1866)
Fixes the DigestBox agent path end to end:

- use the ArchiveBox collection root as the default OpenCode workdir
- configure OpenCode's free `opencode/big-pickle` model for
fresh/schema-only state while preserving administrator config
- remove the redundant two-second version gate and three-second browser
health poll that falsely hid a working server and generated continuous
traffic
- retire the private health endpoint and its tests

Verification: `uv run pytest archivebox/tests/test_opencode_agent.py -q`
(20 passed)

<!-- This is an auto-generated description by cubic. -->
---
## Summary by cubic
Fixes OpenCode agent startup so fresh installs get working defaults and
a healthy server no longer appears unavailable.

- Uses the ArchiveBox collection root as the default OpenCode workdir
instead of an unused subdirectory.
- Writes the `opencode/big-pickle` default model only when
`opencode.jsonc` is missing or contains only `$schema`; existing admin
config is left untouched.
- Removes the two-second version gate and three-second browser health
poll that falsely marked healthy servers unavailable and generated
continuous traffic.
- Deletes the private `/_archivebox/health` endpoint and its tests.

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

<a
href="https://cubic.dev/pr/ArchiveBox/ArchiveBox/pull/1866?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-03 11:07:37 -07:00
Nick Sweeting
9a3f058f73
Fix OpenCode defaults and false health failures 2026-09-03 10:56:43 -07:00
ArchiveBox Release Bot
c2566e9b4a Bump release version to 0.9.35rc421 2026-09-03 16:36:51 +00:00
Nick Sweeting
9b1f155507
Remove duplicate issue detection workflow (#1865)
Removes the issue-opened duplicate detection workflow entirely. It is
not part of product CI and currently depends on separately funded
Anthropic API credits. No replacement, fallback, or failure-suppression
path is added.\n\nValidation: `git diff --check`; `uv run prek run
--all-files`.
2026-09-03 09:36:38 -07:00
Nick Sweeting
747f4a07ac
Remove duplicate issue detection workflow 2026-09-03 09:36:12 -07:00
ArchiveBox Release Bot
ca55f7f8d6 Bump release version to 0.9.35rc420
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-03 08:18:57 +00:00
Nick Sweeting
79fc5c34d2
Trust ready OpenCode processes (#1862)
The rc419 DigestBox test showed that health-based replacement still
killed OpenCode during legitimate initial UI load: health became
temporarily unavailable for more than five seconds while the child was
busy, causing repeated process replacement and 502s.

This removes the health-latency heuristic entirely. ArchiveBox now
distinguishes ready from merely running, trusts a ready live owned PID,
serializes cold starts until readiness, and only replaces children that
exited or never became ready. Stale tabs still recover after an
ArchiveBox/container restart because process state resets and the
detached health wake starts a new child.

This is also a net cleanup: 38 lines removed from the prior lifecycle
implementation.

Verification:
- `uv run pytest archivebox/tests/test_opencode_agent.py -q` (19 passed)
- focused real startup/readiness/proxy/shutdown tests (5 passed)
- `uv run prek run --all-files`
- independent gpt-5.6-medium lifecycle review clean

<!-- This is an auto-generated description by cubic. -->
---
## Summary by cubic
Removes the health-latency heuristic that replaced OpenCode processes
during legitimate initial UI loads, causing 502s. Ready owned processes
are now trusted without probing, and startup health checks are bounded
so they can't run past the startup deadline.

- Only replaces children that exited or never became ready.
- Cold starts are serialized until readiness; stale tabs still recover
after a restart.

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

<a
href="https://cubic.dev/pr/ArchiveBox/ArchiveBox/pull/1862?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-03 01:18:37 -07:00
Nick Sweeting
57e7820a0b
Bound OpenCode startup health probes 2026-09-03 01:13:40 -07:00
Nick Sweeting
57ee874d6e
Trust ready OpenCode processes 2026-09-03 00:59:38 -07:00
ArchiveBox Release Bot
f5234360d7 Bump release version to 0.9.35rc419 2026-09-03 07:24:54 +00:00
Nick Sweeting
e5ac2709f3
Avoid restarting OpenCode on transient health misses (#1861)
The rc418 live DigestBox restart test exposed OpenCode process flapping
under iframe load: a single 2-second health timeout caused
`_ensure_opencode` to kill an otherwise live owned process, after which
the reloading iframe repeated the cycle.

This gives an owned process a bounded 5-second health recovery window
before replacing it. A real SIGSTOP/SIGCONT test proves that a
transiently unavailable process keeps the same PID, while the existing
real unhealthy-process test still proves eventual replacement.

Verification:
- `uv run pytest archivebox/tests/test_opencode_agent.py -q` (18 passed)
- `uv run prek run --all-files`

<!-- This is an auto-generated description by cubic. -->
---
## Summary by cubic
Stops OpenCode from restarting on a single 2-second health timeout,
which caused process flapping under iframe load. An owned process now
gets a bounded 5-second health recovery window before being replaced, so
a transiently unavailable process keeps the same PID. Proxy and
event-stream requests no longer block on the recovery check when the
process is already running.

- Adds a SIGSTOP/SIGCONT test proving a transiently stopped process
keeps its PID, while the existing unhealthy-process test still verifies
eventual replacement.
- Adds tests proving proxy requests skip the recovery check while the
process is running and wait for readiness when it is not.

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

<a
href="https://cubic.dev/pr/ArchiveBox/ArchiveBox/pull/1861?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-03 00:23:27 -07:00
Nick Sweeting
650697f3c2
Make OpenCode readiness checks race-safe 2026-09-03 00:17:53 -07:00
Nick Sweeting
91aa70cc73
Track OpenCode readiness separately from liveness 2026-09-03 00:14:34 -07:00
Nick Sweeting
8a12e3399c
Honor the OpenCode recovery deadline 2026-09-02 23:57:59 -07:00
Nick Sweeting
944907bfee
Keep OpenCode proxy traffic out of recovery 2026-09-02 23:56:46 -07:00
Nick Sweeting
7f1767a2db
Avoid restarting OpenCode on transient health misses 2026-09-02 23:49:58 -07:00
ArchiveBox Release Bot
3327edba24 Bump release version to 0.9.35rc418 2026-09-03 06:24:45 +00:00
Nick Sweeting
a71ef00b79
Reload stale OpenCode frames after server recovery (#1860)
## Summary

- monitor the proxied OpenCode health endpoint from the stable
ArchiveBox parent page
- reload the iframe once after an unavailable -> healthy transition
- trigger an immediate check again when the browser comes online or the
tab becomes visible

## Why

A real RC416 -> RC417 DigestBox restart left the already-open OpenCode
1.17.14 SPA showing its fatal error page against the newly started
OpenCode 1.17.15 server. A full page reload recovered immediately. The
parent ArchiveBox document survives the container restart, so it can
perform that one iframe reload automatically after the server is healthy
again.

## Verification

- `test_opencode_agent_superuser_gets_admin_wrapper` passes with
assertions for the recovery monitor
- focused pre-commit hooks pass
- real stale-tab restart reproduction will be repeated on DigestBox
after release

<!-- This is an auto-generated description by cubic. -->
---
## Summary by cubic
Reloads stale OpenCode iframes after the ArchiveBox server recovers from
a restart, so the previously fatal error page is replaced automatically.
The parent page polls the OpenCode health endpoint every 3 seconds,
reloading the iframe once when the server transitions from unavailable
to healthy or when the server version changes, and also re-checks
immediately when the browser comes online or the tab becomes visible.

- Health monitoring uses a separate endpoint that reports status without
starting the server; recovery restarts a running but unhealthy OpenCode
process, and polling skips while hidden when the server is down.

**Verification**
- `test_opencode_agent_superuser_gets_admin_wrapper` passes with
assertions for the recovery monitor.
- Focused pre-commit hooks pass.

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

<a
href="https://cubic.dev/pr/ArchiveBox/ArchiveBox/pull/1860?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 23:23:56 -07:00
Nick Sweeting
a33b333b6a
Keep OpenCode recovery nonblocking 2026-09-02 23:19:30 -07:00