Phase 1 establishes the stable search contract shared by:
packages/api/pkg/sikulipackages/api/internal/grpcv1This phase does not change the underlying architecture described in Areas Where the Go Port Exposes Different or Additional Behavior.
The stable parity contract for the Go port is explicit Go return semantics, not runtime-configurable throw/null mode.
Retained compatibility flags:
Region.ThrowExceptionRuntimeSettings.FindFailedThrowsPhase 1 replacement contract:
ErrFindFailedErrTimeout| Operation | Image-backed pkg/sikuli behavior |
Screen-backed gRPC behavior |
|---|---|---|
find |
returns Match, nil on hit; returns ErrFindFailed on miss |
returns FindResponse on hit; maps miss to codes.NotFound |
exists |
returns (Match{}, false, nil) on miss; returns (Match, true, nil) on hit |
returns ExistsOnScreenResponse{exists:false} on miss; returns exists:true with match on hit |
has |
returns bool, error; miss is false, nil |
composed from exists semantics |
wait |
polls until hit; returns ErrTimeout when the wait budget is exhausted |
polls until hit; maps timeout to codes.DeadlineExceeded |
waitVanish |
returns true, nil once absent; returns false, nil on timeout |
not yet exposed as a dedicated RPC in Phase 1 |
Phase 1 moves the search source of truth into:
packages/api/pkg/sikuli/search_semantics.goShared helpers:
SearchExistsSearchWaitSearchWaitVanishThese helpers define:
ErrFindFailed means “miss”<= 0 means “probe once” for exists and waitVanish<= 0 for wait means one probe and ErrTimeout on missImage-backed coverage:
packages/api/pkg/sikuli/search_semantics_test.gopackages/api/pkg/sikuli/scaffolding_test.goScreen-backed coverage:
packages/api/internal/grpcv1/server_test.goPhase 1 intentionally does not do the following:
Screen capture/search APIs to pkg/sikuliRegion a live server-backed objectwaitVanish as a screen RPCThose changes belong to later phases in:
docs/reference/parity/api-parity-phased-plan.md