Repository navigation
feat(mecatui): enforce API compatibility before startup - #2269
Conversation
Co-authored-by: Mecatl <[email protected]>
Implementation plan archive — remote compatibility preflight
The preflight slice is implemented and locally verified. The operator approved a Remote compatibility preflight and PR extraction sequenceSlug: 2117-remote-compatibility Implementation authorized by Joe on 2026-10-10 and completed. Verification and Goal and boundariesDeliver an independently useful first PR: mecatui checks the existing remote No identity migration, hook envelope/recovery, TUI hook presentation, persistence Approved compatibility-policy amendmentJoe approved adding contributor context and updating this PR's description: Frozen reference and delivery sequenceLeave branch impl/2117-tool-hook-correlation and PR #2239 untouched at The new work consists of four useful PRs, each with its own tests/docs:
Plan each later PR in its own ignored plan after the preceding contracts settle. Create the first branch from main only during approved plan-implement execution. Open/push/commit actions require explicit authority; planning grants none. Later Current behavior
Material contractsCompatibility: support major 1 exactly in this PR. Keep client support independent Mismatch diagnostics: a positive higher server major identifies an outdated Ordering: after successful Dial, compatibility completes before startup resume Networking/lifetime: use a bounded startup RPC (10-second maximum, earlier At the preflight error boundary, if its bounded context is canceled/expired, /connect's outer restartFromConnectIntentWith currently replaces all errors with Types: use a small named client-side API-major type and typed safe compatibility Versions: Go API source versions, remote wire major/features, and persisted Observable acceptance
Bite-sized implementation tasksTasks are serial/direct-write by default; independent read-only checks may fan out.
Each delegation gets the settled contract excerpt and only its relevant task/files. Verification and reviewUse isolated offline fixtures and test-owned HOME/XDG/UserModelDir paths. No live Focused Go commands: go test ./cmd/mecatui/client and go test ./cmd/mecatui with Initial implementation panel-review uses the actual recorded branch-start OID, Decisions and review statusOperator approved: deliberate Go breaks without stored-data loss; opaque durable No open behavioral choice blocks this first PR. Later identity wire-major policy |
Co-authored-by: Mecatl <[email protected]>
Scope
First standalone PR in the extraction of #2239. Check the existing API-major descriptor before mecatui accesses a session or starts the normal UI, including resume and reconnect.
Most added lines are offline regression tests; the production changes stay at client/startup boundaries.
API compatibility
Backward-compatible: API major remains 1. The existing compatibility descriptor, feature identifiers, and capability advertisements keep their meaning; this PR enforces the declared major rather than changing the protocol. No required-feature floor, schema change, stored-data migration, or tool-call identity change is introduced. No server upgrade is required for existing API-major-1 servers with compatibility discovery; servers below that discovery floor are refused with update advice.
Contributor guidance uses feature identifiers rather than a negotiated minor version. Root and path-scoped instructions require agents to surface proposed breaking changes and upgrade implications to the operator for explicit approval before implementation. Wire-affecting PR descriptions must record the compatibility assessment; plans record it when used, but are optional.
PR sequence
ToolCallIDand provider replay separation, preserving stored data.#2239 remains frozen/draft at
cac37575e8cd3b09c0a3893abf53aa47bd208003, retained as the extraction reference.Verification
task testtask test:racetask linttask docstask sdk:lint,task sdk:typecheck,task sdk:testgo run ./cmd/mecademo: actual tool call, permission ask/approval, and resultAll passed locally. Tests are offline and isolated; host UNIX-socket tests used short system temporary paths because managed lease paths exceed the socket address limit. Full-suite verification caught and fixed a gRPC deadline/local-context observability race, with deterministic regression coverage.
Draft for human review. Later identity/hook/TUI slices are not implemented here.
Archived implementation plan and PR sequence.