Skip to content

fix: reuse installed agent when update check fails - #91

Open
nexicturbo wants to merge 1 commit into
monk-io:mainfrom
nexicturbo:fix/offline-local-agent-fallback
Open

fix: reuse installed agent when update check fails#91
nexicturbo wants to merge 1 commit into
monk-io:mainfrom
nexicturbo:fix/offline-local-agent-fallback

Conversation

@nexicturbo

Copy link
Copy Markdown

Summary

  • fall back to a non-empty, previously checksummed local monk-agent when update discovery is temporarily unavailable
  • keep first installs fail-closed when no valid local installation exists
  • apply the behavior consistently to the root, packaged, and Antigravity PowerShell/POSIX scripts
  • exercise the offline fallback on Windows, macOS, and Linux in the existing install E2E workflow

Why

The ensure scripts currently fetch the remote archive checksum before consulting the installed binary and checksum sidecar. A cold start therefore aborts during any transient DNS, TLS, captive-portal, network, or get.monk.io failure, even after a successful prior installation.

The fallback only applies when the target is non-empty and the existing sidecar contains a valid 64-character SHA-256 value. An unavailable update endpoint still causes a hard failure when no previously checksummed local installation exists.

Validation

  • reproduced the original Windows failure with an installed v0.1.45 agent and an unreachable update endpoint
  • verified the updated PowerShell bootstrap returns the installed agent with the endpoint unavailable
  • verified an empty install directory still exits non-zero under the same outage
  • verified the normal online checksum/update path still returns the installed agent
  • verified all three distributed PowerShell copies and all three POSIX copies are byte-identical
  • parsed .github/workflows/install-e2e.yml and ran git diff --check

Fixes #90

@nexicturbo
nexicturbo force-pushed the fix/offline-local-agent-fallback branch from 314aeb8 to 6852e9d Compare July 22, 2026 02:18
@nexicturbo

Copy link
Copy Markdown
Author

Rebased onto v0.1.46 (a4c9972). The three POSIX copies and three PowerShell copies remain byte-identical by platform; shell syntax, PowerShell AST parsing, and git diff --check pass. Ready for maintainer workflow approval/review.

@nexicturbo
nexicturbo force-pushed the fix/offline-local-agent-fallback branch from 6852e9d to 64e8a0f Compare July 27, 2026 12:16
@nexicturbo

Copy link
Copy Markdown
Author

Rebased onto current v0.1.49 (64e8a0f) and revalidated the updated branch. PowerShell AST parsing, POSIX shell syntax, workflow YAML parsing, distributed-script identity checks, and git diff --check all pass. The PR remains mergeable and is ready for maintainer review.

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.

[Bug bounty] cold start fails offline despite a verified local agent

1 participant