Commit Graph
3 Commits
Author SHA1 Message Date
Jake WriterandClaude Opus 5 b1fe7227fa fix(python): key the browser floor on Playwright instead of a flat minimum
The incompatibility is two-dimensional -- it needs both a Playwright >= 1.61
and a browser < beta.30 -- but MIN_VERSION only knows about the browser. To
stay safe a flat floor has to assume the worst Playwright, which means:

  * every 0.5.6 user re-downloads the browser, including the majority on
    <1.61 who are in no danger;
  * installs pinned to an older build lose the pin, and prerelease/alpha users
    are moved off their channel, since every alpha sorts below beta.30;
  * the library cannot run at all until the matching browser release is
    published, making the PyPI-after-release ordering load-bearing.

Key it on the resolved Playwright instead. Measured: 1.60 works on beta.29 and
beta.30; 1.61 and 1.62 fail on beta.29 and pass on beta.30.

  playwright <1.61  -> floor alpha.1  -> every install kept
  playwright >=1.61 -> floor beta.30  -> below-beta.30 installs upgraded
  version unreadable -> floor alpha.1 -> kept; a spurious forced re-download is
                                        worse than leaving a working install

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-31 15:08:26 -06:00
Jake WriterandClaude Opus 5 ce87cf7dab fix(python): report an unsatisfiable version floor instead of recursing
camoufox_path() ended in `return camoufox_path()` after a fetch. When the
newest published build is still below CONSTRAINTS.MIN_VERSION, install() is a
no-op ("already installed") and that tail recursed ~1000 times -- each
iteration firing another GitHub API call, which exhausts the unauthenticated
rate limit (60/hr) long before the RecursionError lands.

That is precisely the state a library published ahead of its browser release
puts every user in, and it is reachable now that the floor is raised. It also
hits permanently for anyone using a repos.yml source that does not carry the
required build.

Re-check after the fetch instead, and raise UnsupportedVersion naming the
required minimum.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-31 15:06:48 -06:00
Jake WriterandClaude Opus 5 da67775257 fix(python): reach the fetch path when the installed build is below the floor
Raising CONSTRAINTS.MIN_VERSION is how this library has always forced a browser
upgrade (beta.12 -> beta.15 -> beta.17 -> beta.18 -> beta.19); the floor only
became 'alpha.1' incidentally, in an unrelated PR. That left the branch dead,
and it had rotted: camoufox_path() probed INSTALL_DIR/version.json, which only
the pre-multiversion flat layout ever wrote. With a versioned install below the
floor it raised FileNotFoundError instead of falling through to a fetch, so
raising the floor would have crashed every existing user rather than upgrading
them.

Treat a missing root version.json as "no legacy install here" so the caller
falls through to CamoufoxFetcher().install() as intended.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-31 15:06:48 -06:00