Skip to content

fix: unwrap app.call envelopes, clean up opencode diagnostics, and align test contracts#112

Closed
andrewwhitecdw wants to merge 1 commit into
Agent-Field:mainfrom
andrewwhitecdw:bugfix/runtime-envelope-unwrap-diagnostics
Closed

fix: unwrap app.call envelopes, clean up opencode diagnostics, and align test contracts#112
andrewwhitecdw wants to merge 1 commit into
Agent-Field:mainfrom
andrewwhitecdw:bugfix/runtime-envelope-unwrap-diagnostics

Conversation

@andrewwhitecdw

@andrewwhitecdw andrewwhitecdw commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

Summary

Fixes several runtime bugs where AgentField execution envelopes were not unwrapped before being used, cleans up noisy diagnostic logging in the OpenCode provider, and brings stale tests back in line with the current implementation.

Changes

  • Runtime envelope unwrapping
    • swe_af/fast/verifier.py: unwrap app.call() result before building FastVerificationResult.
    • swe_af/execution/dag_executor.py: unwrap replanner call_fn() result before constructing ReplanDecision.
    • swe_af/app.py: unwrap issue-writer results, external execute_fn_target returns, and resume_build output.
  • Fast planner robustness
    • swe_af/fast/planner.py: catch Exception (AgentField raises AgentFieldClientError) in _note() so detached-router runs don't crash.
  • OpenCode provider cleanup
    • swe_af/agent_ai/providers/opencode/client.py: move logger below imports, add empty-file guard, and downgrade routine diagnostics from warning to debug.
  • Config / dependencies
    • Re-comment placeholder ZHIPU_API_KEY in .env.example.
    • Keep ZHIPU_API_KEY env wiring in docker-compose.yml and revert control-plane port to default 8080.
    • Align requirements.txt agentfield pin with requirements-docker.txt (>=0.1.41).
    • Add pytest-asyncio to pyproject.toml dev dependencies.
  • Stale test updates
    • Update verifier forwarding tests to match the current fast_verify contract.
    • Fix node_id and docker-compose tests to use repo-relative paths and the correct default.
    • Allow intentional cross-cutting file changes in AC-14.

Verification

Tested with Python 3.12 and agentfield>=0.1.41:

408 passed, 1 skipped, 1 warning

Note: the workspace's existing .venv uses Python 3.14, which agentfield 0.1.41 does not yet support. Use Python 3.12/3.13 for CI/local dev.

@CLAassistant

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@andrewwhitecdw

Copy link
Copy Markdown
Contributor Author

Gah I didnt catch the conflicts, working on it.

@andrewwhitecdw
andrewwhitecdw force-pushed the bugfix/runtime-envelope-unwrap-diagnostics branch from 2a6fff4 to f44e10e Compare July 23, 2026 16:12
…ign test contracts

- Unwrap AgentField execution envelopes in fast_verify, dag_executor
  replanner, and app.py issue writers / execute_fn_target / resume_build.
- Fix fast planner _note() to catch AgentFieldClientError so tests and
  detached-router runs don't crash.
- Clean up opencode/client.py diagnostics: move logger below imports,
  guard empty schema files, and use debug-level logging for routine paths.
- Re-comment placeholder ZHIPU_API_KEY in .env.example; keep ZHIPU_API_KEY
  env wiring in docker-compose.yml and revert control-plane port to 8080.
- Align requirements.txt agentfield pin with requirements-docker.txt
  (>=0.1.41) and add pytest-asyncio to pyproject.toml dev deps.
- Update stale verifier/node_id/integration tests to match current
  implementation and environment.
@andrewwhitecdw
andrewwhitecdw force-pushed the bugfix/runtime-envelope-unwrap-diagnostics branch from f44e10e to 0af01a0 Compare July 23, 2026 16:17
@andrewwhitecdw

Copy link
Copy Markdown
Contributor Author

Closing this PR. The contributor is unable to sign the CLA, so these changes will remain in a private fork instead.

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.

2 participants