From 9dcc05ca663ad30d9f6c70db87c8a931f7604b34 Mon Sep 17 00:00:00 2001 From: ZeroPoint95 <329227198+ZeroPoint95@users.noreply.github.com> Date: Tue, 13 Oct 2026 11:15:55 -0400 Subject: [PATCH 1/2] test: align updater acceptance with canonical paths and current settings --- internal/update/update_test.go | 13 +++++++++++-- scripts/update-drive.sh | 20 +++++++------------- 2 files changed, 18 insertions(+), 15 deletions(-) diff --git a/internal/update/update_test.go b/internal/update/update_test.go index c34e8b9e8c..525b9faeb3 100644 --- a/internal/update/update_test.go +++ b/internal/update/update_test.go @@ -516,6 +516,11 @@ func TestTimeoutContractC1SlowAssetOutlivesTheCheckClock(t *testing.T) { } client := releaseClient(server, "v0.1.0") client.HTTP.Timeout = CheckTimeout + // Install reports the resolved path; macOS temporary roots can be links. + wantPath, err := filepath.EvalSymlinks(target) + if err != nil { + t.Fatal(err) + } result, err := Install(context.Background(), InstallOptions{ Client: client, Release: Release{Tag: "v0.2.0", Repository: primaryRepository}, Target: target, }) @@ -530,7 +535,7 @@ func TestTimeoutContractC1SlowAssetOutlivesTheCheckClock(t *testing.T) { if err != nil { t.Fatal(err) } - if info.Mode().Perm() != 0o755 || result.Path != target { + if info.Mode().Perm() != 0o755 || result.Path != wantPath { t.Fatalf("result = %+v mode = %v", result, info.Mode().Perm()) } if matches, _ := filepath.Glob(filepath.Join(dir, ".codeaf.tmp.*")); len(matches) != 0 { @@ -734,6 +739,10 @@ func TestC7CheckedInstallReplacesAtomicallyAndMismatchPreservesTheOriginal(t *te if err := os.WriteFile(target, []byte("old codeaf"), 0o700); err != nil { t.Fatal(err) } + wantPath, err := filepath.EvalSymlinks(target) + if err != nil { + t.Fatal(err) + } result, err := Install(context.Background(), InstallOptions{ Client: releaseClient(server, "v0.1.1"), Release: Release{Tag: "v0.2.0", Repository: primaryRepository}, Target: target, }) @@ -748,7 +757,7 @@ func TestC7CheckedInstallReplacesAtomicallyAndMismatchPreservesTheOriginal(t *te if row.ok { want = asset info, _ := os.Stat(target) - if info.Mode().Perm() != 0o755 || result.Path != target || result.Release.Tag != "v0.2.0" { + if info.Mode().Perm() != 0o755 || result.Path != wantPath || result.Release.Tag != "v0.2.0" { t.Fatalf("result = %+v mode %o", result, info.Mode().Perm()) } } else if !strings.Contains(err.Error(), "checksum") { diff --git a/scripts/update-drive.sh b/scripts/update-drive.sh index 99447cc198..21c2b7ca01 100755 --- a/scripts/update-drive.sh +++ b/scripts/update-drive.sh @@ -122,9 +122,9 @@ capture() { } # capture_settings \u2014 the REAL /settings page with the real -# `auto update` row, reached the way a person reaches it: the command, the -# arrow keys that walk the tabs to Workspace, and the down key that walks the -# cursor onto the row. The row is confirmed selected by its OWN hint being on +# `automatic updates` row, reached the way a person reaches it: the command +# opens General, and the down key walks the cursor onto the row. +# The row is confirmed selected by its OWN hint being on # screen, not by the label merely existing somewhere in the frame. capture_settings() { local state="$1" cols="$2" @@ -136,14 +136,8 @@ capture_settings() { tmux -L "$SOCK" send-keys -t "$session" -l "/settings" tmux -L "$SOCK" send-keys -t "$session" Enter sleep 2 - # THE WORKSPACE TAB, BY THE PANEL'S OWN ARROW KEY: Session, Context, - # Workspace. The panel's type-to-search is deliberately NOT used here — it - # ranks fuzzy matches from every tab, so the row under the cursor is usually - # the wrong one and the sentence drawn under it explains somebody else's - # setting. - tmux -L "$SOCK" send-keys -t "$session" Right - tmux -L "$SOCK" send-keys -t "$session" Right - sleep 2 + # GENERAL IS THE INITIAL CATEGORY. Walking right would leave the category + # that owns automatic updates; walk its rows directly instead. local landed="" for _ in $(seq 1 24); do # THE ROW'S OWN HINT IS THE PROOF THE CURSOR IS ON IT: the sheet draws the @@ -171,12 +165,12 @@ capture_settings() { cat "$file" >&2 exit 1 } - grep -q "auto update" "$file" || { + grep -q "automatic updates" "$file" || { echo "the settings capture at ${cols}c did not draw the auto update row:" >&2 cat "$file" >&2 exit 1 } - grep -q "auto update.*$state" "$file" || { + grep -q "automatic updates.*$state" "$file" || { echo "the settings capture at ${cols}c did not read $state:" >&2 cat "$file" >&2 exit 1 From 3080d384eecc452335926b416cb7d53da8af92fd Mon Sep 17 00:00:00 2001 From: ZeroPoint95 <329227198+ZeroPoint95@users.noreply.github.com> Date: Tue, 13 Oct 2026 14:56:18 -0400 Subject: [PATCH 2/2] docs: record updater acceptance repair for #1814 --- docs/changes/unreleased/1814-updater-acceptance.md | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 docs/changes/unreleased/1814-updater-acceptance.md diff --git a/docs/changes/unreleased/1814-updater-acceptance.md b/docs/changes/unreleased/1814-updater-acceptance.md new file mode 100644 index 0000000000..5f056ec347 --- /dev/null +++ b/docs/changes/unreleased/1814-updater-acceptance.md @@ -0,0 +1,9 @@ +--- +kind: fixed +title: updater acceptance follows resolved install paths and current settings +pr: 1814 +surface: [build] +invalidates: + - "Updater tests compared the installer's resolved target with its unresolved input path, so successful installs through macOS temporary-directory links failed acceptance. They now compare against the independently resolved target while retaining the content, mode, checksum and timeout checks." + - "The updater terminal drive navigated old settings tabs and searched for the old row label. It now stays in General and selects automatic updates, retaining the row's own hint, on/off checks, widths and navigation bound." +---