Recover Mineflayer socket errors and pending requests, activate connection guards, bound startup, and recover stalled Naldo runs. Start a new normal world and fresh Naldo checkpoint while retaining old worlds, checkpoints and Xbox authentication. Verified 15 Node connection tests and 57 targeted Python tests; old flat-generator expectation mismatch remains unchanged.
Keep server-only mode and saved worlds. Restore the missing engine deadline helper, clean isolated runner process groups, and route both bots to the separate Mine endpoint. Preserve checkpoints and existing Creative mode.
fix: bound the waits that could freeze the learn loop (voyager_runner.py)
The test I wrote for the exit report asserted that certain strings appeared in the file. That is the same weakness that let the previous NameError through, so the test now runs the code: it raises a real exception carrying a fake API key, calls record_exit, reads the file back and checks the content, the traceback and the redaction.
To make that possible, record_exit moved from voyager_runner.py into voyager_runtime_contract.py. voyager_runner imports the pinned upstream package at module level, which a unit test should not need to satisfy. The runner keeps a one-line wrapper.
Moving it immediately exposed the same class of bug again: the new code in the contract used time.time() without importing time, and pyflakes -- added in the previous commit for exactly this -- reported 'undefined name time' on the first run. Fixed, and the unused 'import re' the move left behind in the runner was removed with it.
Also covered now: each bot writes its own report file, and a write failure retur…
Fix the NameError that made the leave/rejoin loop worse, and record why a runner dies
I introduced a bug in the previous commit and this fixes it.
The retry loop added to voyager_runner.py called time.sleep() without importing time. The except block therefore raised NameError on its first use, so a retryable provider error became a hard crash: the runner exited with rc=1, the watchdog restarted it, and the bot left and rejoined the game again. Gemini_Bot's restart count climbed 1 -> 4 -> 8 -> 9. The fix I wrote to stop the leave/rejoin loop made it worse, and the only reason it was visible at all is the restart counter.
import re and import time added.
Why the tests missed it: they asserted that certain strings appeared in the file. A file can contain a retry loop and still raise NameError the first time it runs. tests/test_python_names_resolve.py now runs pyflakes over the maintained modules and fails on 'undefined name', which is that exact class. Verified by removing import time again: two tests fail.
Second change, so the next failure is not invisible:
The on…
Quarantine skills named after the prompt's own placeholder
Measured after the brain switch: Naldo_Bot's skill count went 8 -> 9 and the ninth skill was named `yourMainFunctionName`. That is not a learned behaviour, it is the placeholder in the upstream example at voyager/prompts/action_response_format.txt:12:
async function yourMainFunctionName(bot) {
The model copied the example literally, so the SkillManager stored the placeholder as if the agent had learned something. Retrieving it later injects the template straight back into the Action prompt.
quarantine_placeholder_skills() archives any skill whose name or code is a literal prompt placeholder, next to the existing bypass-template and known-invalid quarantines, and runs before the learning loop starts. The files stay on disk in checkpoint/quarantine/, as with the other two.
This is the failure mode the original instruction called out as 'armazenamento de templates como se fossem habilidades aprendidas'; the existing quarantine only matched three literal code signatures, so a placehold…
Stop the leave/rejoin loop, and give Voyager the strongest CPU-viable brain
1. Why Gemini_Bot left and rejoined the server
Measured from the run logs: three leave/rejoin cycles in 3.5 minutes, at 07:06:23, 07:07:55 and 07:09:46. Each one is
openai.error.ServiceUnavailableError: The server is overloaded or not ready yet.
raised out of curriculum.run_qa -> qa_llm -> the Gemini proxy returning 503. Upstream lets it propagate, so main() unwinds, the finally block kills the Mineflayer child, and the watchdog restarts the runner -- the bot leaves the game and comes back. restart_count was 4.
voyager_runner now retries the learning loop in place with bounded backoff (VOYAGER_LEARN_BACKOFF_SECONDS, doubling to VOYAGER_LEARN_BACKOFF_CAP_SECONDS) instead of exiting, so a provider blip no longer costs the Minecraft connection. learn(reset_env=False) is safe to re-enter: upstream sets self.resume = True after the first call, so a retry takes the soft-reset branch and keeps the inventory.
2. The brain
granite-4.0-h-tiny (7B total / 1B active) could not ge…
Declare and enforce the full divergence from the pinned upstream
checkout_verified attested five decision methods. Those are not the whole difference between this tree and MineDojo/Voyager@55e45a88: the boot patcher rewrites sixteen upstream files and adds four, and nothing said so. A reader of the status could take checkout_verified to mean the tree is pristine.
voyager_runtime_contract.py
ADAPTED_UPSTREAM_FILES and ADDED_UPSTREAM_FILES declare every upstream path the boot rewrites, each with a reason. The sets were measured by running the real patcher against a clean checkout and hashing the tree before and after. write_upstream_manifest() hashes the pristine tree at checkout time; verify_divergence() re-measures and refuses to attest a tree that differs from the declaration in either direction -- an undeclared edit, an undeclared addition, a deletion, or a declared patch that silently stopped applying. node_modules, __pycache__, egg-info, .git and npm lock files are excluded.
voyager_stack.py
Writes the manifest right after the checkout, an…
Enforce the official Voyager documentation as a checked contract
Make the documented upstream behaviour verifiable instead of asserted.
voyager_runner.py
skill_manager_retrieval_top_k now follows the upstream FAQ, which says it is 'essential' to set it <= 2 for a non-GPT-4 model to reduce prompt length. This deployment runs granite-4.0-h-tiny with an 8192-token window and the action prompt was measured at 6909 tokens. Overridable with VOYAGER_SKILL_TOP_K.
voyager_verification.py
task_spec() no longer swallows the purpose clause into the item name. It was feeding the official Critic a false world statement, e.g. 'Live Inventory has 0/1 diamond_pickaxe_to_upgrade_your_mining_capabilities...'.
tests/test_voyager_constructor_defaults.py (rewritten)
Was three substring checks on a hardcoded Windows path. Now parses the upstream Voyager.__init__ signature and the local Voyager(...) call with ast and compares every passed parameter against the upstream default, with an explicit reviewed departure list. Portable via VOYAGER_UPSTREAM_REF.
tests/tes…
Attest the live Critic wrapper instead of the object it replaces
voyager_runner.py attested the upstream CriticAgent and then replaced it with VerifiedCreativeCritic, so the report named a decision method that was no longer the one being called. The wrapper is now declared in DECLARED_WRAPPERS, installed before the attestation, and the attestation resolves its upstream delegate and attests that object. An undeclared wrapper, or one with no reachable delegate, fails the boot. Adds 4 regression tests; suite 51 passed, 0 failed.
Show the Action agent its full previous program and restore upstream defaults
naldo
008c4fa
The previous-code bound truncated the model's last program to 3200 characters. A
~1000-token program is ~4000 characters, so the model read its own function cut
off mid-body and redeclared it on the next round. That is exactly the
'Identifier has already been declared' SyntaxError upstream's Babel rejects, and
it was happening on a third of all attempts. Upstream sends the whole program;
restore that.
Also restore the three constructor values that had been narrowed without cause:
action_agent_task_max_retries 3 -> 4, action_agent_show_chat_log False -> True,
skill_manager_retrieval_top_k 1 -> 5. With one retrieved skill the Action agent
could not reuse what it had learned, which pushed it to redeclare skills inline.
max_iterations, learn(reset_env=False), the Creative evidence layer, the
exploreUntil bounds, the creative toolkit and the neutralised /pause are left
exactly as they were: they define how this Space operates, not how it matches
upstream, and changing them would disturb b…
Restore official Voyager decision agents and attest the runtime
naldo
5ddf32a
Remove the local curriculum/action/critic/skill overrides, the
deterministic action parser, the affordance catalog, and the build
blueprints, so Curriculum, Action, Critic and SkillManager are the
upstream implementations at the pinned commit.
The single declared adaptation is the curriculum parse-failure retry
feedback, applied through voyager_runtime_contract and recorded in
.upstream-expected/ for the AST attestation. Skill templates are
quarantined before the learning loop, and template skills can no longer
drive a build catalog.
Persist Voyager learning state in bucket
naldo
33dab44
Fix shared-world pauses and verified placement for both Voyagers
Require live postconditions for bounded Creative tasks; place materials through verified primitives; archive known invalid skills without resetting progress; keep Mineflayer connected between tasks and time out stalled pause calls. Preserve CPU-only Granite, world, checkpoint, Xbox auth and watchdog. Add a non-destructive player-storage probe to diagnose observed save failures. Offline regression checks pass against pinned upstream.
Fix Creative exploration and deterministic curriculum recovery