Assert the install command the pages actually offer

f2b06d1dfbb9 · AtlantisPleb · · parent 47995e62ff5e

Assert the install command the pages actually offer

Withdrawing the binary release removed the curl command from the landing page,
the repositories index, and the /coder splash, and left three tests asserting
it was still there. Main has been red on them since that change — mine to fix.

They now assert `npm i -g @openagentsinc/cli`, which is what the pages offer,
and each additionally refutes `install.sh`. That refusal is the part worth
keeping: the release's artifacts and every channel pointer were deleted, so the
curl command can only fail, and the build it installed printed fabricated data
as though it were real. A page that offers it again should fail a test rather
than reach a reader.

Deploy story

What this commit did to the running system — joined from the forge receipt chain, the part a commit page elsewhere cannot show.

Not deployed through the forge lane

No push, promotion, build, or deploy receipt references this commit (receipts are scanned over a bounded recent window). Changes shipped by full node replacement carry their proof in the release gate receipt instead.

Changed files

  • modified test/openagents_web/controllers/page_controller_test.exs
  • modified test/openagents_web/live/coder_live_test.exs
  • modified test/openagents_web/live/repository_live_test.exs

Diff

3 files changed, +14 -3

test/openagents_web/controllers/page_controller_test.exs modified +7 -1

@@ -10,6 +10,12 @@ defmodule OpenAgentsWeb.PageControllerTest do

10 10
    html = conn |> get(~p"/") |> html_response(200)
11 11
12 12
    assert html =~ ~s(id="home-install-command")
13
    assert html =~ "curl -fsSL https://openagents.com/install.sh | bash"
13
    assert html =~ "npm i -g @openagentsinc/cli"
14
15
    # The binary release was withdrawn: its artifacts and every channel pointer
16
    # were deleted, so this command can only fail now, and it shipped commands
17
    # that printed fabricated data. A page that still offers it is worse than a
18
    # page with no install command at all.
19
    refute html =~ "install.sh"
14 20
  end
15 21
end
test/openagents_web/live/coder_live_test.exs modified +6 -1

@@ -10,7 +10,12 @@ defmodule OpenAgentsWeb.CoderLiveTest do

10 10
  test "the page offers the published install command", %{conn: conn} do
11 11
    {:ok, _view, html} = live(conn, ~p"/coder")
12 12
13
    assert html =~ "curl -fsSL https://openagents.com/install.sh | bash"
13
    assert html =~ "npm i -g @openagentsinc/cli"
14
15
    # The binary release was withdrawn — artifacts and every channel pointer
16
    # deleted — so the curl command can only fail, and the build it installed
17
    # printed fabricated data. Offering it is worse than offering nothing.
18
    refute html =~ "install.sh"
14 19
  end
15 20
16 21
  test "the page adds no stylesheet of its own", %{conn: conn} do
test/openagents_web/live/repository_live_test.exs modified +1 -1

@@ -213,8 +213,8 @@ defmodule OpenAgentsWeb.RepositoryLiveTest do

213 213
    assert has_element?(view, "#repository-cli")
214 214
    assert has_element?(view, "#repository-cli-copy-0")
215 215
    assert has_element?(view, ~s(a[href="/docs/openagents-cli"]))
216
    assert html =~ "curl -fsSL https://openagents.com/install.sh | bash"
217 216
    assert html =~ "npm i -g @openagentsinc/cli"
217
    refute html =~ "install.sh"
218 218
    assert html =~ "openagents auth login"
219 219
    assert html =~ "openagents auth setup-git --local"
220 220
    assert html =~ "/<owner>/<name>.git"

This page updates live while a promote is in flight · changelog