# Wetech Managed Tool Read Effect Contract

<!-- auto-oncall-optimization-record
{
  "schemaVersion": "auto-oncall-optimization-record-v1",
  "optimizationId": "wetech-read-effect-contract-2026-09-01",
  "problems": [
    {
      "problemId": "wetech-read-tool-failure-obscured-as-unknown-result",
      "summary": "The read-only Wetech Managed Tool omitted its read effect metadata, so an ordinary Tool execution failure was persisted as unknown_result and its actionable Provider failure code was obscured.",
      "status": "optimized_verified",
      "applicability": "Agent9-backed Wetech OP evidence acquisition after the Tool command starts and then returns an error or loses its result.",
      "issueKeys": ["APID-29338"],
      "sourceRefs": ["https://tidb.atlassian.net/browse/APID-29338#problem:wetech-read-tool-failure-obscured-as-unknown-result"],
      "signalTextIncludesAny": [
        "managed_tool_result_unknown",
        "unknown_result",
        "provider_tool_call_failed",
        "APID-29338"
      ],
      "observedThrough": "2026-09-01",
      "effectiveAt": "2026-09-01T18:51:00+08:00",
      "verifiedAt": "2026-09-01T18:59:00+08:00",
      "attemptedAction": "Publish Wetech Managed Tool v5 with effect=read so Agent9 applies read-only retry and failure semantics and preserves the Tool's structured Provider result.",
      "evidenceUrl": "https://internal.us-west-2.agent.mem9.ai/api/sessions/sess_69e45a232ad84e9890e8cfc3629ffd88"
    }
  ]
}
-->

- Owner: Wetech Managed Tool package manifest
- Source: APID-29338 read replay `51acde86-2307-4773-aa45-822c510cdd7c`
- Implementation status: deployed in AOS `1b15aba0f8c0d69cda8816e3e2a244a59c564ea7` with Agent9 Managed Wetech v5
- Effective status: `optimized_verified`

## Bounded problem

Wetech is a read-only evidence Provider, but its package manifest did not declare
the `read` effect. Agent9 therefore treated an execution failure after command
submission as a potentially side-effecting operation with an unknown result.
The replay lost the Tool's structured failure classification and correctly
refused an unsafe same-Turn retry, even though this Tool cannot write.

## Intended change

Publish the next immutable Wetech package with `effect: read`. This makes the
runtime use its read-only retry and terminal-error path without changing the
Tool's network allowlist, credential boundary, query limits, or serial evidence
execution contract.

## Verification

The immutable v5 bundle loaded with Agent9's image unchanged, loader exit 0,
and the Pod Ready. Both the Evidence and Primary Agent installations and actual
Agent config snapshots referenced v5 with the existing Auth configured.

APID-29338 `mode=read` replay `c2fb85c8-fdfd-45ac-bda3-b3fcfb4bbaa6`
completed with HTTP 200. Its Wetech calls were persisted as ordinary failed
read Operations with the exact `runtime_error` code and were retried by the
read-only contract; none was `unknown_result`. This verifies the effect
contract only. The newly visible protected-output collision is a separate
Wetech result-projection problem.

## Next validation action

Publish and verify the separate Wetech target-output redaction optimization;
do not reopen this effect contract unless a later read-only Wetech failure is
again persisted as `unknown_result`.
