Skip to content

install: codex refresh-on-present + compatible-but-behind upgrade hint#351

Merged
clkao merged 4 commits into
mainfrom
spacedock-ensign/install-refresh-and-upgrade-hint
Jun 13, 2026
Merged

install: codex refresh-on-present + compatible-but-behind upgrade hint#351
clkao merged 4 commits into
mainfrom
spacedock-ensign/install-refresh-and-upgrade-hint

Conversation

@clkao

@clkao clkao commented Jun 13, 2026

Copy link
Copy Markdown
Collaborator

A tag-fresh binary running spacedock install --host codex now actually refreshes a present plugin, and a contract-compatible-but-behind plugin surfaces an opt-in upgrade hint.

What changed

  • runInit's codex arm reinstalls an already-present plugin (was a doctor-only no-op that left it stale).
  • Doctor and the front-door gate surface an opt-in upgrade hint when the plugin is contract-compatible but a newer one exists.
  • The hint is additive — verdict stays Compatible, exit 0, launch proceeds — and never fires on equal or dev versions.
  • The hint uses a contract-local integer semver compare, pinned by boundary + pre-release test cases.

Evidence

  • internal/cli + internal/contract 352/352 (whole package, on the merge result); full repo green.
  • Live codex smoke confirms the on-disk plugin advances 0.0.1→0.0.2; a detached front-door audit + a re-validation closed a semver-compare coverage gap.

Review guidance

Front-door change (gateHost + runInit): the hint never blocks or changes the exit/launch path.


te

clkao and others added 4 commits June 13, 2026 08:38
runInit's codex arm short-circuited to doctor on a resolved manifest and
never reached an install call, so `spacedock install --host codex` on a
present-but-behind plugin was a doctor-only no-op (the 0.19.8 field
report). Drive the install seam before doctor on a present plugin,
mirroring the claude arm; --check keeps its no-install report.

Replaces TestInitCodexInstallReadiness/compatible-installed (which
codified the no-op) with a seam-recorded install assertion (AC-1), and
adds a live codex smoke that the resolved on-disk manifest advances
0.0.1->0.0.2 on the wired path (AC-2).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
When the binary display semver is strictly newer than the plugin's while
the contract stays compatible, append an opt-in upgrade hint to the
Compatible message naming the host-specific `spacedock install --host
{host}` refresh. The verdict stays Compatible and the OK line is
preserved (additive). A contract-local dotted-int semver compare gates
it: an unstamped `dev` binary, a non-semver, or an equal/older binary
emits nothing — no false 'you must upgrade'. (AC-3)

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
gateHost was silent on Compatible, so a launching user with a
contract-compatible-but-behind plugin saw nothing. Expose the hint as a
Result.Hint field (doctor still folds it into Message); gateHost prints
Hint alone to stderr on Compatible — never the bare OK line — then the
caller proceeds to launch unchanged. Silent on equal versions / dev
binary via the same contract gate. (AC-4)

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…ffix

The hint tests all used versions that agree lexically and numerically
(0.20.0 vs 0.19.8/0.12.1/0.19.4), so a lexical-compare swap of
semverCompare stayed green — the integer comparison was unpinned. Add
boundary cases that cross the single-vs-double-digit threshold:
binary 0.10.0 vs plugin 0.9.0 MUST hint (lexical wrongly suppresses) and
binary 0.9.0 vs plugin 0.10.0 MUST NOT hint (lexical wrongly fires);
together they RED any lexical regression. Add a pre-release case
(0.20.0-rc1 → no hint) pinning that parseDottedInts rejects rather than
strips a suffix. Discrimination proven by temporarily swapping
semverCompare to lexical (both boundary cases RED) and stripping the
-rc1 suffix (pre-release case RED), then reverting — zero production
change.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
clkao added a commit that referenced this pull request Jun 13, 2026
@clkao clkao merged commit c597c99 into main Jun 13, 2026
6 of 9 checks passed
@clkao clkao deleted the spacedock-ensign/install-refresh-and-upgrade-hint branch June 13, 2026 15:40
clkao added a commit that referenced this pull request Jun 13, 2026
…w] (#355)

* docs: slim README to front door + drop banned prose-grep test [yw]

Wave 1 structural cleanup for the site-is-canonical doc architecture:

- Remove internal/release/install_doc_test.go — a banned prose-grep that
  os.ReadFile'd docs/site/get-started/install.md and asserted author
  substrings. readInstallJourney was file-local; executableShellCommands
  stays (defined in workflow_exec_guard_test.go, 9 other call sites).
- Slim README.md to the front-door skeleton: keep title + Why hook,
  What's different, Install, License, Contributing. Drop Quick start,
  How it works, Usage (now on the canonical site).
- Install now links the published site https://spacedock.md/docs/
  (site_url in mkdocs.yml), keeping the in-repo install.md as secondary.

go test ./... green; install-journey grep-clean over live docs/code.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* docs: land the five 0.20.1 behaviors on canonical site pages [yw]

Wave 2 behavior-doc pass — yw is the sole doc-owner; the five members
shipped zero .md. Each behavior documented on its reverified anchor:

- gj (#350): new `## --version` section in command-reference.md showing
  the version+contract line, the Sandbox: posture, and the per-runtime
  install/enablement block (wording exercised from `spacedock --version`).
- te (#351): command-reference `## Setup` names the contract-compatible-
  but-behind opt-in upgrade hint (doctor + front-door print it; never blocks).
- zrc (#349): command-reference `## Launch` names the unsandboxed posture —
  claude `--permission-mode auto`, codex `--ask-for-approval on-request`,
  vs the sandboxed skip/bypass. Scoped to claude/codex; pi injects none.
- gp (#352): releasing.md made decouple-accurate — marketplace manifest
  moved to the standalone spacedock-dev/marketplace repo, no plugin-branch
  manifest, marketplace.json dropped from the release steps; build-from-
  source.md adds a spacedock-edge edge-channel user pointer.
- 8p (#347): install.md Homebrew tab notes brew also installs agentsview;
  safehouse is installed separately.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* docs: rewrite --version section to match version-forward output (#354) [yw]

#354 (da) replaced the enablement-jargon per-runtime block with a
version-forward one. Rewrite the `## --version` section to match:

- `<host>: spacedock <version>` when a plugin is installed
- ` (disabled)` appended only when the host reports it disabled
- `pi: spacedock ready` (pi launches from skills, no versioned plugin)
- `<host>: spacedock not installed` when host present but no plugin
- `<host>: not installed` when the host binary is absent

Drops the obsolete "installed, spacedock enabled" / "enablement unknown"
phrasing. Wording read from runtimeLine in internal/cli/host_runtime.go;
example output built and exercised via `go build && ./spacedock --version`.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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