Skip to content

[dev2-go] Port proxy lifecycle, management API, and CLI contracts from PR #16 #17

Description

@DingDingChae

Source work

Important

This issue records an intentional deferred native port. PR #16 is not GUI-only: it changes lifecycle, liveness, service ownership, management APIs, authentication boundaries, CLI resources, and updater behavior. The exact merged dev commit must be added here when the PR merges.

Why this is deferred

dev2-go is hundreds of commits divergent from dev and owns a separate native server, management API, lifecycle, proxy-liveness, and CLI implementation. There is no safe mechanical cherry-pick: the Go line needs a deliberate contract-by-contract port after the reviewed TypeScript source commit is final.

Required Go parity

Contract Native-port requirement
Start/stop/restart Explicit restart bypasses the autostart preference, uncertain stops fail closed, and teardown-only warnings do not strand a safely stopped proxy.
Port selection Automatic callers treat configured port as a preference and preserve it while recording the live fallback; explicit/current-endpoint pins remain strict.
Ownership/readiness Service success requires manager liveness plus PID/port/host-correlated stable health; direct children never claim supervisor ownership.
Concurrency Cross-process start coordination prevents duplicate fallback daemons and safely recovers only proven dead-owner lock artifacts.
Windows scheduler Installed/enabled/startable is distinct from actively running/viable; unknown scheduler state fails closed.
Management API Changelog, export, host/discovery/pairing/history/restore/exit, launch/install, terminal, and logs contracts match the authenticated TypeScript API.
Security Only bounded pairing claim bypasses management auth; local machine actions require a known loopback listener; exports carry no secret-derived fields.
Headless CLI Changelog, export, host, launch, and terminal resources remain available without the GUI and do not accept credentials in argv.
Updater Unresolved or malformed registry versions abort before lifecycle or package mutation and resolved installs are version-pinned.

Acceptance criteria

  • Rebase/port from the final merged dev source commit, recorded above.
  • Add focused Go tests for every lifecycle, port, ownership, auth, export, pairing, and updater contract.
  • Exercise the Windows native lifecycle path rather than skipping it.
  • Run the full Go and cross-runtime compatibility suites on Windows, Linux, and macOS.
  • Open a PR targeting dev2-go, naming this issue and the exact source commits.
  • Merge only after required CI and explicit security review are verified.

Evidence type

This is a runtime/API parity issue with no independent visible surface. Completion evidence should be exact failing-then-passing test names/counts, CI links, and endpoint/lifecycle transcripts—not an unrelated screenshot.

Metadata

Metadata

Assignees

No one assigned

    Labels

    needs-go-portMerged dev work that still requires an equivalent dev2-go native port

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions