Skip to content

new features for 0.1.2 - #3

Merged
BKJN1 merged 1 commit into
mainfrom
feat/beta-0.1.2
Aug 3, 2026
Merged

new features for 0.1.2#3
BKJN1 merged 1 commit into
mainfrom
feat/beta-0.1.2

Conversation

@BKJN1

@BKJN1 BKJN1 commented Aug 3, 2026

Copy link
Copy Markdown
Collaborator

What

  • Default public port changed from 8080 to 2821 (bootstrap, doctor).
  • bootstrap now opens the admin console in the default browser once the
    stack is ready (--no-browser to opt out).
  • bootstrap gives a clear error when the requested Versola version was
    never published, instead of surfacing Docker's raw "manifest unknown".
  • doctor offers to open an install page when Docker isn't found at all
    (Docker Desktop/Colima choice on macOS, Docker Desktop on Windows,
    install docs on Linux) — never installs anything itself, just opens
    a browser tab.
  • Fixed uninstall: when the Docker daemon isn't running, it no longer
    hard-fails on docker compose down — it skips that step and still
    clears ~/.versola.
  • Added ci.yml: go vet/build/test on every push and PR, separate from
    release.yml which only runs on tag push.

Why

Requested for the next versola-cli release (see team lead's notes on
port collisions, uninstall, and browser convenience). The bootstrap
error message and CI workflow are follow-up hardening on top of that.

Testing

Manually tested on Windows: doctor (Docker down and up), bootstrap
(browser opens, unknown-version error), uninstall (Docker down, Docker
up, second-run no-op). ci.yml not yet exercised on a real PR run.

@augmentcode

augmentcode Bot commented Aug 3, 2026

Copy link
Copy Markdown
🤖 Augment PR Summary

Summary: Prepares versola-cli for the 0.1.2 release by improving bootstrap/doctor UX, adding a full uninstall command, and introducing CI coverage.

Changes:

  • Adds a new CI workflow (.github/workflows/ci.yml) to run go vet, cross-compile all release targets, and run go test on every push/PR.
  • Updates gateway/public port checks and messaging from 8080 to 2821 (bootstrap + doctor + docs).
  • Introduces internal/browser to open URLs cross-platform; bootstrap opens the admin console automatically (opt-out via --no-browser).
  • Improves bootstrap error reporting when a requested Versola version/tag was never published (detects Docker “manifest unknown” and prints a clearer hint).
  • Enhances doctor to differentiate “Docker not installed” vs “installed but daemon unreachable”, optionally opening install pages with user confirmation.
  • Adds versola uninstall to stop the stack (when possible), remove Versola images, and clean local state while preserving cleanup state when Docker is unreachable.

Technical Notes: state.ComposeFile() now surfaces non-IsNotExist stat errors instead of silently treating them as “not deployed”, preventing false negatives in commands that depend on deployment state.

🤖 Was this summary useful? React with 👍 or 👎

@augmentcode augmentcode Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review completed. 4 suggestions posted.

Fix All in Augment

Comment augment review to trigger a new review at any time.

Comment thread internal/cmd/doctor.go
}

if !dockerDaemon.OK {
offerDockerHelp()

@augmentcode augmentcode Bot Aug 3, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

internal/cmd/doctor.go:48-50 — Calling offerDockerHelp() can make versola doctor block waiting on stdin when Docker isn’t installed (e.g., non-interactive/scripted runs), even though doctor otherwise looks like a pure diagnostic command.

Severity: medium

Fix This in Augment

🤖 Was this useful? React with 👍 or 👎, or 🚀 if it prevented an incident/outage.

Comment thread internal/browser/browser.go Outdated
// title, so a URL passed there directly gets misinterpreted
// instead of opened, especially one containing "&" or other
// characters cmd treats specially.
c = exec.Command("cmd", "/c", "start", "", url)

@augmentcode augmentcode Bot Aug 3, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

internal/browser/browser.go:26 — On Windows, cmd /c start ... url can still misinterpret URLs containing shell metacharacters like & unless the URL is quoted, so Open() may fail to open some valid URLs despite the comment suggesting otherwise.

Severity: medium

Fix This in Augment

🤖 Was this useful? React with 👍 or 👎, or 🚀 if it prevented an incident/outage.

Comment thread internal/cmd/uninstall.go
// else is meant to live there.
versolaDir := filepath.Dir(stateDir)
_, statErr := os.Stat(versolaDir)
dirExists := statErr == nil

@augmentcode augmentcode Bot Aug 3, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

internal/cmd/uninstall.go:62-63dirExists := statErr == nil treats any os.Stat error (including permission/IO errors) as “doesn’t exist”, which can cause uninstall to skip removing local state or incorrectly report “Nothing to remove.”

Severity: medium

Fix This in Augment

🤖 Was this useful? React with 👍 or 👎, or 🚀 if it prevented an incident/outage.

Comment thread internal/cmd/uninstall.go Outdated
// on the Docker side this command could remove anyway, and
// `versola doctor` already covers diagnosing an unreachable
// daemon.
return nil, nil

@augmentcode augmentcode Bot Aug 3, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

internal/cmd/uninstall.go:129-134versolaImages() returns (nil, nil) for any docker images error, so non-reachability failures (e.g., permissions/misconfigured context) will be silently ignored and may leave Versola images behind while uninstall reports success.

Severity: medium

Fix This in Augment

🤖 Was this useful? React with 👍 or 👎, or 🚀 if it prevented an incident/outage.

@BKJN1
BKJN1 force-pushed the feat/beta-0.1.2 branch from 8b7f112 to ed543ab Compare August 3, 2026 17:43
@BKJN1

BKJN1 commented Aug 3, 2026

Copy link
Copy Markdown
Collaborator Author

augment review

@augmentcode augmentcode Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review completed. 2 suggestions posted.

Fix All in Augment

Comment augment review to trigger a new review at any time.

Comment thread internal/cmd/uninstall.go Outdated
dirExists := statErr == nil

if !deployed && len(images) == 0 && !dirExists {
fmt.Println("Nothing to remove — no deployed stack, no versola images, no local state.")

@augmentcode augmentcode Bot Aug 3, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

internal/cmd/uninstall.go:83 — When dockerUp is false, images is never checked, so this message can incorrectly assert “no versola images” and return early even if Versola images exist but can’t be queried while Docker is down. Consider distinguishing “couldn’t check images because Docker isn’t running” from “no images found” to avoid misleading output.

Severity: medium

Fix This in Augment

🤖 Was this useful? React with 👍 or 👎, or 🚀 if it prevented an incident/outage.

Comment thread internal/cmd/doctor.go Outdated
// only reading state, never changing it.
func offerDockerHelp() {
if _, err := exec.LookPath("docker"); err == nil {
fmt.Println("\nDocker is installed but the daemon isn't responding — start Docker Desktop (or Colima, if that's what you use) and try again.")

@augmentcode augmentcode Bot Aug 3, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

internal/cmd/doctor.go:77 — checks.DockerDaemon() can fail for reasons other than “daemon not running” (e.g., permission denied to /var/run/docker.sock on Linux), so this advice may be misleading in a common setup. Consider tailoring the hint based on the underlying error so users don’t get sent to “start Docker” when it’s actually an access/permissions issue.

Severity: low

Fix This in Augment

🤖 Was this useful? React with 👍 or 👎, or 🚀 if it prevented an incident/outage.

@BKJN1
BKJN1 force-pushed the feat/beta-0.1.2 branch from ed543ab to dc6d356 Compare August 3, 2026 17:51
@BKJN1

BKJN1 commented Aug 3, 2026

Copy link
Copy Markdown
Collaborator Author

augment review

@augmentcode augmentcode Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review completed. 4 suggestions posted.

Fix All in Augment

Comment augment review to trigger a new review at any time.

Comment thread internal/cmd/doctor.go Outdated
// "permission denied" in docker's own output, which is what this checks
// for before falling back to the generic "it's not running" hint.
func daemonUnreachableHint(dockerPath string) string {
out, _ := exec.Command(dockerPath, "version", "--format", "{{.Server.Version}}").CombinedOutput()

@augmentcode augmentcode Bot Aug 3, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

internal/cmd/doctor.go:110 — daemonUnreachableHint() runs docker version without any timeout/cancellation (unlike checks.DockerDaemon(), which is time-bounded). If the docker client blocks while trying to contact an unhealthy/remote daemon, versola doctor could hang here even though the initial check already failed fast.

Severity: medium

Fix This in Augment

🤖 Was this useful? React with 👍 or 👎, or 🚀 if it prevented an incident/outage.

Comment thread internal/cmd/uninstall.go
}

func runUninstall(cmd *cobra.Command, args []string) error {
composePath, deployed, err := state.ComposeFile()

@augmentcode augmentcode Bot Aug 3, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

internal/cmd/uninstall.go:37 — state.ComposeFile() currently treats any os.Stat error as “compose.yml doesn’t exist”, so deployed can be false even on permission/IO errors. In that case uninstall may skip docker compose down even though a deployment exists.

Severity: medium

Fix This in Augment

🤖 Was this useful? React with 👍 or 👎, or 🚀 if it prevented an incident/outage.

Comment thread internal/cmd/uninstall.go Outdated
return fmt.Errorf("docker compose down failed: %w", err)
}
} else if deployed {
fmt.Println("Docker isn't running — skipping docker compose down, clearing recorded state only.")

@augmentcode augmentcode Bot Aug 3, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

internal/cmd/uninstall.go:124 — This message assumes checks.DockerDaemon().OK == false means “Docker isn't running”, but that check can also fail for other common reasons (e.g., permission denied to the daemon socket). The output here may send users toward “start Docker” when the real issue is access/configuration.

Severity: low

Other Locations
  • internal/cmd/uninstall.go:86
  • internal/cmd/uninstall.go:100
  • internal/cmd/uninstall.go:103

Fix This in Augment

🤖 Was this useful? React with 👍 or 👎, or 🚀 if it prevented an incident/outage.

Comment thread internal/cmd/doctor.go
}

if !dockerDaemon.OK {
offerDockerHelp()

@augmentcode augmentcode Bot Aug 3, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

internal/cmd/doctor.go:49 — offerDockerHelp() may open a browser tab as part of doctor, which is a side effect that can surprise scripted usage. The command description above says it “only reads state” and “never … changes anything”, which may be a bit misleading now.

Severity: low

Fix This in Augment

🤖 Was this useful? React with 👍 or 👎, or 🚀 if it prevented an incident/outage.

@BKJN1
BKJN1 force-pushed the feat/beta-0.1.2 branch from dc6d356 to 87a2773 Compare August 3, 2026 18:04
@BKJN1

BKJN1 commented Aug 3, 2026

Copy link
Copy Markdown
Collaborator Author

augment review

@augmentcode augmentcode Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review completed. 2 suggestions posted.

Fix All in Augment

Comment augment review to trigger a new review at any time.

Comment thread internal/browser/browser.go Outdated
default:
return fmt.Errorf("don't know how to open a browser on %s", runtime.GOOS)
}
return c.Start()

@augmentcode augmentcode Bot Aug 3, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

internal/browser/browser.go:36 — exec.Cmd.Start() is used without a corresponding Wait() or Process.Release(), which can leave an unreaped child process on Unix if the CLI stays alive after launching the browser. Consider ensuring the process resources are released while still keeping the call non-blocking.

Severity: low

Fix This in Augment

🤖 Was this useful? React with 👍 or 👎, or 🚀 if it prevented an incident/outage.

Comment thread internal/cmd/uninstall.go

if dirExists {
fmt.Printf("Removing %s...\n", versolaDir)
if err := os.RemoveAll(versolaDir); err != nil {

@augmentcode augmentcode Bot Aug 3, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

internal/cmd/uninstall.go:137-142 — When dockerUp is false but a deployment is recorded, uninstall still deletes ~/.versola (including compose.yml), which can make it harder to later stop/remove a stack that was actually running but unreachable due to permissions/context. Consider whether preserving the compose state (or warning more strongly) is safer in that scenario.

Severity: medium

Fix This in Augment

🤖 Was this useful? React with 👍 or 👎, or 🚀 if it prevented an incident/outage.

@BKJN1
BKJN1 force-pushed the feat/beta-0.1.2 branch from 87a2773 to 0c44dad Compare August 3, 2026 18:16
@BKJN1

BKJN1 commented Aug 3, 2026

Copy link
Copy Markdown
Collaborator Author

augment review

@augmentcode augmentcode Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review completed. 1 suggestion posted.

Fix All in Augment

Comment augment review to trigger a new review at any time.

Comment thread internal/cmd/uninstall.go Outdated
if stopStack {
fmt.Println(" - the running Versola stack and its Postgres data volume")
} else if deployed {
fmt.Println(" - recorded deployment state (Docker isn't reachable, so nothing is actually up to stop)")

@augmentcode augmentcode Bot Aug 3, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

internal/cmd/uninstall.go:111 — The preview line "recorded deployment state (Docker isn't reachable, so nothing is actually up to stop)" looks misleading when keepDirForLaterCleanup is true, since the directory/state is explicitly kept later. It may also be inaccurate if Docker is unreachable due to permissions/context while the stack could still be running.

Severity: low

Fix This in Augment

🤖 Was this useful? React with 👍 or 👎, or 🚀 if it prevented an incident/outage.

@BKJN1
BKJN1 force-pushed the feat/beta-0.1.2 branch from 0c44dad to abad3c3 Compare August 3, 2026 18:24
@BKJN1

BKJN1 commented Aug 3, 2026

Copy link
Copy Markdown
Collaborator Author

augment review

@augmentcode augmentcode Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review completed. 2 suggestions posted.

Fix All in Augment

Comment augment review to trigger a new review at any time.

Comment thread internal/cmd/bootstrap.go Outdated
// runDocker call site (compose up/down, uninstall's rmi, etc.) that has no
// need for this.
func pullAndRunTools(dir, image string) error {
var stderrBuf bytes.Buffer

@augmentcode augmentcode Bot Aug 3, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

internal/cmd/bootstrap.go:170-172stderrBuf buffers all Docker stderr (including pull progress output) in memory; on a first run this can get fairly large/unbounded and may bloat the CLI’s memory usage unexpectedly.

Severity: low

Fix This in Augment

🤖 Was this useful? React with 👍 or 👎, or 🚀 if it prevented an incident/outage.

Comment thread internal/cmd/uninstall.go
// error `docker images` could return.
func versolaImages() ([]string, error) {
out, err := exec.Command("docker", "images", "--format", "{{.Repository}}:{{.Tag}}",
"--filter", "reference=ghcr.io/versolauth/versola-*").Output()

@augmentcode augmentcode Bot Aug 3, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

internal/cmd/uninstall.go:178-181 — If docker images fails here, the user-visible error will typically be only exit status 1 (wrapped), so Docker’s stderr explaining the failure may be hidden, making uninstall failures harder to diagnose.

Severity: low

Fix This in Augment

🤖 Was this useful? React with 👍 or 👎, or 🚀 if it prevented an incident/outage.

@BKJN1
BKJN1 force-pushed the feat/beta-0.1.2 branch from abad3c3 to 79991da Compare August 3, 2026 18:33
@BKJN1

BKJN1 commented Aug 3, 2026

Copy link
Copy Markdown
Collaborator Author

augment review

@augmentcode augmentcode Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review completed. 1 suggestion posted.

Fix All in Augment

Comment augment review to trigger a new review at any time.

Comment thread internal/cmd/uninstall.go
Short: "Remove everything versola deployed locally",
Long: `uninstall stops the locally deployed Versola stack (including its
Postgres data volume), removes the Docker images versola pulled, and
clears ~/.versola.

@augmentcode augmentcode Bot Aug 3, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

internal/cmd/uninstall.go:21-23 says uninstall "clears ~/.versola", but runUninstall can intentionally keep the directory when keepDirForLaterCleanup is true (recorded deployment + Docker unreachable) to preserve a future cleanup handle. Consider aligning the user-facing help/docs with that conditional behavior so users aren’t misled about what will actually be removed.

Severity: medium

Other Locations
  • README.md:169

Fix This in Augment

🤖 Was this useful? React with 👍 or 👎, or 🚀 if it prevented an incident/outage.

@BKJN1
BKJN1 force-pushed the feat/beta-0.1.2 branch from 79991da to beba426 Compare August 3, 2026 18:40
@BKJN1

BKJN1 commented Aug 3, 2026

Copy link
Copy Markdown
Collaborator Author

augment review

@augmentcode augmentcode Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review completed. No suggestions at this time.

Comment augment review to trigger a new review at any time.

@BKJN1
BKJN1 merged commit 976b486 into main Aug 3, 2026
1 check passed
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