Skip to content

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

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

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

Conversation

@andrewwhitecdw

Copy link
Copy Markdown
Owner

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

Note: run tests under Python 3.12/3.13 with "agentfield>=0.1.41". The workspace's existing ".venv" uses Python 3.14, which agentfield 0.1.41 does not yet support.

…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

Copy link
Copy Markdown
Owner Author

Closing in favor of the upstream PR Agent-Field#112.

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