Skip to content

Let the browser try a CAPTCHA with Jev before stopping for a person - #250

Merged
senamakel merged 29 commits into
mainfrom
captcha-fighter
Nov 15, 2026
Merged

senamakel merged 29 commits into
mainfrom
captcha-fighter

Conversation

@senamakel

@senamakel senamakel commented Nov 14, 2026 •

Copy link
Copy Markdown
Contributor

What

This PR turns on TinyComputer's new captcha solver for Teeny and updates Teeny's rules to match. A browser task that hits a checkbox CAPTCHA or a picture-grid CAPTCHA (reCAPTCHA v2, hCaptcha, Cloudflare Turnstile) now gets a few tries with Jev's image questions on TypeSafe (jev-preview). It stops for a person only when the CAPTCHA still stands, and the needs_human reason then says what was tried. Typed-text CAPTCHAs, ID, age and phone checks, and payment pages still stop at once.

  • bin/lib/core_sections/automation.py: writes captcha_solver = true, captcha_model = "jev-preview" and max_captcha_attempts = 3 as single keys in [computer], so the core's own decision and rescue keys are left alone. In the spine's environment, TEENY_CAPTCHA_SOLVER=0 turns the solver off and TEENY_CAPTCHA_MODEL names another image model.
  • bin/spine: stores TYPESAFE_API_KEY from secrets/spine.env as the core's provider:typesafe credential, the same way it handles the model and memory keys. Without a key the solver never runs. The key is documented in deploy/spine.env.example and deploy/README.md.
  • Policy, reworded to "the browser tries it first; one it cannot pass is where you stop":
    • brain/DRIVE.md (the operator's change to a frozen path)
    • brain/agents/operator.toml: do the step as a browser task, and never click a CAPTCHA by hand
    • the hands/tasks RULES and docstring
    • docs/hands.md, docs/architecture.md §6a, deploy/README.md
  • vendor/openhuman: points at the host branch (feat(computer): captcha solver settings for TinyComputer browser tasks tinyhumansai/openhuman#8711), which carries TinyComputer with the solver. Cargo.lock gains the engine's image dependency.

Why draft

The three dependencies have merged, so this is no longer a draft:

  1. feat(decisions): image assets and Box questions for Jev tinyhumansai/tinyinference#155 (merged as cf829339): image assets and Box questions in the Jev client
  2. Try captchas with Jev's image questions before asking a person tinyhumansai/tinycomputer#174 (released as v0.17.0): the solver
  3. feat(computer): captcha solver settings for TinyComputer browser tasks tinyhumansai/openhuman#8711 (merged as 5926e190): the host settings

vendor/openhuman is pinned to openhuman main at eae632d4, which contains #8711 and main's previous pin 589b5e67. Its tinyagents pin carries tinyinference cf829339, the copy tinycomputer 0.17.0 needs. The earlier pin (33fe6faf) carried the pre-#155 tinyinference, which is why the spine check failed with E0432/E0599 on BoxQuestion/BoxAnswer. The root [patch] is unchanged, since openhuman's own table did not change between 589b5e67 and eae632d4. Cargo.lock gains tinycomputer 0.17.0 and the base64 entry for tinyinference-decisions. cargo build --release -p teeny-spine --locked passes.

Still to do after merge, on the box: add TYPESAFE_API_KEY to secrets/spine.env and redeploy.

Tests

  • hands/tests/test_core_config.py: the solver keys are written, the core's own [computer] keys are kept, and the environment can turn the solver off or change the model.
  • hands/tests/test_watchers.py: TYPESAFE_API_KEY is added to the environment allowlist, read only by bin/spine from spine.env in a subshell.
  • python3 -m unittest discover -s hands/tests -t hands/tests: everything new passes. Three wallet.test_setup tests error only in the full run and pass on their own here and on main, so that is test-order interference I did not touch.
  • bin/spine: bash -n is clean. The boot step is not covered by spine_live_test.sh. I'll verify it manually on the box after the deploy by checking for the captcha: boot log line and an operator task on a CAPTCHA demo page.

senamakel and others added 27 commits November 14, 2026 12:17
Update the vendored openhuman submodule to a newer revision. The new commit is checked out with local modifications, so the recorded pointer is marked dirty.

Auto-committed-on: cuttlefish
Co-authored-by: Medulla <medulla@tinyhumans.ai>
Browser tasks now try a captcha or human-verification check with the Jev image model a few times before stopping for a person. The solver can be disabled with TEENY_CAPTCHA_SOLVER or pointed at another model with TEENY_CAPTCHA_MODEL, and its keys merge into the existing [computer] table without disturbing the core's own entries.

Auto-committed-on: cuttlefish
Co-authored-by: Medulla <medulla@tinyhumans.ai>
The test setup now unsets TEENY_CAPTCHA_SOLVER and TEENY_CAPTCHA_MODEL alongside the other environment variables, so ambient captcha settings can't leak into the config tests.

Auto-committed-on: cuttlefish
Co-authored-by: Medulla <medulla@tinyhumans.ai>
Updates the vendored openhuman submodule to the latest commit.

Auto-committed-on: cuttlefish
Co-authored-by: Medulla <medulla@tinyhumans.ai>
Browser tasks now try checkbox and picture CAPTCHAs a few times via the TypeSafe solver before giving up, so the operator only escalates to needs_human when its own attempts fail. The agent rules, drive, and deploy docs were updated to match, and the solver is configured through new TYPESAFE_API_KEY and TEENY_CAPTCHA_* environment variables.

Auto-committed-on: cuttlefish
Co-authored-by: Medulla <medulla@tinyhumans.ai>
The spine now reads TYPESAFE_API_KEY from its environment and stores it as the core's typesafe credential, so browser tasks can attempt CAPTCHAs before stopping for a person. The key and its solver settings moved from teeny.env.example to spine.env.example to match where they are now consumed.

Auto-committed-on: cuttlefish
Co-authored-by: Medulla <medulla@tinyhumans.ai>
The captcha solver's documentation now says TYPESAFE_API_KEY is read from secrets/spine.env, which bin/spine stores in the core, and that TEENY_CAPTCHA_SOLVER and TEENY_CAPTCHA_MODEL are read from the spine's environment. The commented-out toggle lines were dropped from the env example and the deploy README now lists TYPESAFE_API_KEY as an optional key to set.

Auto-committed-on: cuttlefish
Co-authored-by: Medulla <medulla@tinyhumans.ai>
Added the TYPESAFE_API_KEY entry to the test environment fixture so the watcher tests cover the captcha solver's key as read from secrets/spine.env in a subshell.

Auto-committed-on: cuttlefish
Co-authored-by: Medulla <medulla@tinyhumans.ai>
Update the vendored openhuman submodule to the latest commit.

Auto-committed-on: cuttlefish
Co-authored-by: Medulla <medulla@tinyhumans.ai>
Record the new image dependency in the lockfile for tinycomputer-engine.

Auto-committed-on: cuttlefish
Co-authored-by: Medulla <medulla@tinyhumans.ai>
Update the vendored openhuman submodule to a newer commit.

Auto-committed-on: cuttlefish
Co-authored-by: Medulla <medulla@tinyhumans.ai>
Update the vendored openhuman submodule to the latest upstream commit.

Auto-committed-on: cuttlefish
Co-authored-by: Medulla <medulla@tinyhumans.ai>
Update the vendored openhuman submodule to a newer revision.

Auto-committed-on: cuttlefish
Co-authored-by: Medulla <medulla@tinyhumans.ai>
Update the vendored openhuman submodule to the latest upstream commit.

Auto-committed-on: cuttlefish
Co-authored-by: Medulla <medulla@tinyhumans.ai>
Update the vendored openhuman submodule to the latest commit.

Auto-committed-on: cuttlefish
Co-authored-by: Medulla <medulla@tinyhumans.ai>
Update the vendored openhuman submodule to the latest upstream commit.

Auto-committed-on: cuttlefish
Co-authored-by: Medulla <medulla@tinyhumans.ai>
Remove the base64 entry from the tinyinference-decisions package in the lockfile since the crate no longer depends on it.

Auto-committed-on: cuttlefish
Co-authored-by: Medulla <medulla@tinyhumans.ai>
Update the vendored openhuman submodule to the latest upstream commit.

Auto-committed-on: cuttlefish
Co-authored-by: Medulla <medulla@tinyhumans.ai>
Record the new base64 0.23.1 dependency for the tinyinference-decisions crate in the lockfile.

Auto-committed-on: cuttlefish
Co-authored-by: Medulla <medulla@tinyhumans.ai>
Update the vendored openhuman submodule to the latest upstream commit.

Auto-committed-on: cuttlefish
Co-authored-by: Medulla <medulla@tinyhumans.ai>
The base64 crate is no longer referenced by the tinyinference-decisions package, so it has been removed from its dependency list in the lockfile.

Auto-committed-on: cuttlefish
Co-authored-by: Medulla <medulla@tinyhumans.ai>
The tinyinference crate patches now resolve under the tinycomputer vendor directory instead of tinyagents, keeping the workspace patches aligned with where the vendored sources actually live.

Auto-committed-on: cuttlefish
Co-authored-by: Medulla <medulla@tinyhumans.ai>
Added a comment explaining that the patch section must resolve tinyinference to the copy tinycomputer pins, since pointing at the older tinyagents copy fails the spine build with E0432/E0599 on BoxQuestion and BoxAnswer. Also removed a stray space in the tinyinference-decisions entry.

Auto-committed-on: cuttlefish
Co-authored-by: Medulla <medulla@tinyhumans.ai>
Repoint the tinyinference patch entries in both the git and crates-io patch sections to the copy vendored under tinyagents, and bump the openhuman submodule. The previous tinycomputer copy is no longer the one to resolve against, so the patches now follow the tinyagents vendor tree.

Auto-committed-on: cuttlefish
Co-authored-by: Medulla <medulla@tinyhumans.ai>
Record the new base64 0.23.1 dependency for the tinyinference-decisions crate in the lockfile.

Auto-committed-on: cuttlefish
Co-authored-by: Medulla <medulla@tinyhumans.ai>
@senamakel
senamakel marked this pull request as ready for review November 15, 2026 02:52
senamakel and others added 2 commits November 15, 2026 03:09
The hands' suite now takes about 15 minutes on the runner, putting the job close to 20 minutes, so the cap is raised to 30 to stay well above normal runtime while still failing a real hang long before GitHub's six-hour default.

Auto-committed-on: cuttlefish
Co-authored-by: Medulla <medulla@tinyhumans.ai>
@senamakel
senamakel merged commit 93e39c3 into main Nov 15, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant