You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
uv run --python 3.12 pytest agents/restricted/tests/test_sandbox.py -q (16 passed)
uv run --python 3.12 pytest agents/external/tests/test_external.py -q (2 passed)
git diff --check
Stack
Follow-up to merged foundation PR #139. This internal branch contains only the hardening delta against current main and is tree-identical to the previously reviewed fork branch at 3cc6b605e793591647c788304c1bdbf742ecb75d.
Internal replacement for kortiene#2 after foundation PR #139 merged. The replacement is a single hardening commit on current main; its tree is identical to fork hardening head 3cc6b605e793591647c788304c1bdbf742ecb75d.
Restricted-agent backward-compatibility concern: remote child-agent callbacks can no longer return arbitrary Pydantic models.
PythonAgent.handle_queue_item() returns the result of a published child function directly (agents/restricted/src/hyperforge_restricted/agent.py:736-741). On main, the sandbox serializer accepts any BaseModel, so those callback results can cross the remote sandbox boundary as dictionaries. This PR changes serialize() / the protocol encoder to an exact model allowlist (hyperforge/src/hyperforge/codemode/model.py:144-163 and :291-310), causing application-defined Pydantic models, including subclasses of allowed models, to fail serialization. The local process-pool path remains pickle-compatible, so this specifically regresses remote restricted-agent deployments.
Please preserve the previous callback result behavior for the generic restricted agent, for example by converting arbitrary callback BaseModel results to their prior serialized dictionary representation before transport, while retaining the strict allowlist for scoped Code Mode where it is required.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
0.0.0.0:8091, and server-owned limits remain unset unless configured.Testing
uv run --python 3.12 pytest hyperforge/tests/codemode/test_model.py hyperforge/tests/codemode/test_protocol.py hyperforge/tests/harness_sdk -q(253 passed, 1 skipped)make -C hyperforge lintmake -C agents/restricted lintuv run --python 3.12 pytest agents/restricted/tests/test_sandbox.py -q(16 passed)uv run --python 3.12 pytest agents/external/tests/test_external.py -q(2 passed)git diff --checkStack
Follow-up to merged foundation PR #139. This internal branch contains only the hardening delta against current
mainand is tree-identical to the previously reviewed fork branch at3cc6b605e793591647c788304c1bdbf742ecb75d.