Skip to content

fix(tests): align the remaining suite with fork behavior - #4

Merged
ImStillBlue merged 8 commits into
mainfrom
fix/remaining-tests
Nov 18, 2026
Merged

ImStillBlue merged 8 commits into
mainfrom
fix/remaining-tests

Conversation

@ImStillBlue

Copy link
Copy Markdown
Member

What and why

Bring the complete test suite into line with the intentional fork changes, without changing production behavior. This builds on PR #3 and includes its two commits, b75d01a and 10302d4. Six new commits address six root causes, rather than grouping fixes by filename.

Cargo tests exercise the Rust code; the .ice scenarios click the real application without opening a window. The inventory found 11 stale failures (3 Rust tests and 8 UI scenarios) and 41 environment-only failures. No application bug remained after reproducing the documented environment.

Baseline before edits: cargo test --locked --workspace --lib --bins --no-fail-fast and cargo test --locked --workspace --no-fail-fast each failed on the same three Rust tests. Full Cargo inventory: 2,988 passed, 3 failed, 52 already ignored. All 113 .ice files were copied into separate case directories and run with separate fresh HOME directories, across the complete 38/38/37 shard membership. Native environment: 65 passed, 48 failed. Bash-only discovery control: 104 passed, 9 failed (8 stale tests and one long-path environmental failure). No repository files changed until both inventories were complete.

Failure inventory

E1 means the local shell environment, not a fork regression: this workstation defaults to fish and exposes bash, fish and zsh. The shell scanner discovers common shells through PATH and opens a picker when there is more than one. The scripts assume bash opens directly. git blame attributes that behavior to upstream 8e4e81e (picker arm ad26460); there is no responsible fork commit. The unchanged 40 scripts passed with SHELL=/bin/bash and a temporary PATH containing executable symlinks from /usr/bin except fish, zsh and nu. This is a local control matching CI shell discovery, not a claim that Ubuntu CI ran.

E2 means the local sandbox path: the long evidence-directory HOME wrapped the file breadcrumb and shifted the fixed-coordinate parent row. Keeping evidence in its long directory but using a separate short fresh /tmp/ossh.XXXXXX HOME made the unchanged script pass. The row-coordinate assumption came from upstream 777e1d3, not a fork change.

Test Category Root cause and responsible commit Action
wire_golden::every_golden_frame_decodes_back_to_its_message Stale befae99a: old golden messages still contained removed CloudProfile tag 7 (InvalidTagEncoding(7)). Removed only cloud records from 3 saved frames; retained the bytes of every surviving record.
wire_golden::every_message_encodes_to_its_golden_bytes Stale befae99a: the golden corpus had 11 entity kinds; the app now has 10, and fixture indices shifted later values. Preserved original fixture identities, times and payloads using original tag positions.
store::tests::portable_hardening::export_blob_contains_no_plaintext_secrets Stale befae99a: cloud-marker removal moved the AI key to slot 6; the assertion still read slot 7 and panicked. Corrected the index; retained ciphertext leak and decrypted round-trip checks.
font-weight.ice Stale 3c61c673: Macro confirmation shifted the font picker by 52 px; the old clicks left Regular selected. Fixed test: picker y 1516 and SemiBold option y 1434.
theme-gallery-tags.ice Stale 3c61c673: The added Behavior row pushed the active-theme card below the 2000 px viewport. Fixed test: scroll the real card into view.
privacy-v2.ice Stale 7f1c36d0: Removing vault-password and lock cards moved Privacy from y 450 to y 118. Fixed test: measured switch position; masking assertions unchanged.
snippet-bar.ice Stale 7f1c36d0: The Personal vault chip was removed; it was still the route back home. Fixed test: click the icon-only Home control.
tab-double-click.ice Stale 7f1c36d0: The Personal vault chip was removed; the settings flow still clicked it. Fixed test: click Home; keep rename, duplicate, ordering and persistence checks.
tab-bar-drag-handle.ice Stale 7f1c36d0: An incorrect 74 px test adjustment moved the pointer from the fixed trailing handle onto a tab. Fixed test: measured handle at x 861; retain harmless-menu assertions.
tab-drag-slide.ice Stale 7f1c36d0: Overflow targets were incorrectly shifted left with the leading Home tab; the tail stays anchored to trailing chrome. Fixed test: restore measured overflow rename and drag targets; keep order assertions.
tab-drag-slide-rtl.ice Stale 7f1c36d0: The narrower Home tab moved RTL chips right by 74 px; the script dragged gamma instead of beta. Fixed test: measure beta and gamma bounds and move targets right.
clipboard-paths.ice Environment-only E1; first failure: clipboard is "HELLO_CLIP". Unchanged test passes with bash-only discovery.
history-suggest.ice Environment-only E1; first failure: expect "From this host's history". Unchanged test passes with bash-only discovery.
hosts-connect-new-window-chord.ice Environment-only E1; first failure: expect "bash (default)". Unchanged test passes with bash-only discovery.
mcp-sudo-dialog.ice Environment-only E1; first failure: expect "Allow sudo with the stored password?". Unchanged test passes with bash-only discovery.
mcp-sudo-dialog-queue.ice Environment-only E1; first failure: expect "Allow sudo with the stored password?". Unchanged test passes with bash-only discovery.
new-window-menu-entries.ice Environment-only E1; first failure: click right "bash (default)". Unchanged test passes with bash-only discovery.
osc8-hyperlinks.ice Environment-only E1; first failure: expect "https://example.com". Unchanged test passes with bash-only discovery.
pane-drag.ice Environment-only E1; first failure: expect "bash (default) (exited)". Unchanged test passes with bash-only discovery.
pane-end-card.ice Environment-only E1; first failure: expect "Session ended". Unchanged test passes with bash-only discovery.
pane-header.ice Environment-only E1; first failure: expect "bash (default) (exited)". Unchanged test passes with bash-only discovery.
pane-out-of-grid.ice Environment-only E1; first failure: expect "bash (default) (exited)". Unchanged test passes with bash-only discovery.
password-suggest.ice Environment-only E1; first failure: expect "Stored passwords". Unchanged test passes with bash-only discovery.
privacy-version-strings.ice Environment-only E1; first failure: expect "● bash (default)". Unchanged test passes with bash-only discovery.
reopen-closed-tab.ice Environment-only E1; first failure: expect "bash (default)". Unchanged test passes with bash-only discovery.
restore-tabs-connect.ice Environment-only E1; first failure: expect "bash (default)". Unchanged test passes with bash-only discovery.
restore-tabs-on-launch.ice Environment-only E1; first failure: expect "bash (default)". Unchanged test passes with bash-only discovery.
sftp-tab-move-windows.ice Environment-only E1; first failure: click "Move to New Window". Unchanged test passes with bash-only discovery.
shortcuts-unbound-verbs.ice Environment-only E1; first failure: expect "bash (default)". Unchanged test passes with bash-only discovery.
snippet-actions.ice Environment-only E1; first failure: expect "bash (default)". Unchanged test passes with bash-only discovery.
snippet-paste-clipboard.ice Environment-only E1; first failure: expect "bash (default)". Unchanged test passes with bash-only discovery.
tab-bar-menu.ice Environment-only E1; first failure: expect "bash (default)". Unchanged test passes with bash-only discovery.
tab-drag-dock.ice Environment-only E1; first failure: click right "bash (default)". Unchanged test passes with bash-only discovery.
tab-drag-slide-side.ice Environment-only E1; first failure: click right "bash (default)". Unchanged test passes with bash-only discovery.
tab-drag-split.ice Environment-only E1; first failure: expect "Close this group?". Unchanged test passes with bash-only discovery.
tab-drag-whole-window.ice Environment-only E1; first failure: click right "bash (default)". Unchanged test passes with bash-only discovery.
tab-duplicate-hotkey.ice Environment-only E1; first failure: absent "Create host". Unchanged test passes with bash-only discovery.
tab-group-close-confirm.ice Environment-only E1; first failure: expect "Split side by side". Unchanged test passes with bash-only discovery.
tab-move-windows.ice Environment-only E1; first failure: click right "bash (default)". Unchanged test passes with bash-only discovery.
tab-switch-order.ice Environment-only E1; first failure: absent "Terminal Settings". Unchanged test passes with bash-only discovery.
tab-tear-off.ice Environment-only E1; first failure: click right "bash (default)". Unchanged test passes with bash-only discovery.
tag-bubbles.ice Environment-only E1; first failure: expect "bash (default)". Unchanged test passes with bash-only discovery.
terminal-broadcast.ice Environment-only E1; first failure: expect "Split side by side". Unchanged test passes with bash-only discovery.
terminal-context-menu-key.ice Environment-only E1; first failure: expect "bash (default)". Unchanged test passes with bash-only discovery.
terminal-copy-last-command.ice Environment-only E1; first failure: expect "bash (default)". Unchanged test passes with bash-only discovery.
terminal-copy-screen.ice Environment-only E1; first failure: expect "bash (default)". Unchanged test passes with bash-only discovery.
terminal-pinch-zoom.ice Environment-only E1; first failure: expect "Zoomed to 17 for this session". Unchanged test passes with bash-only discovery.
terminal-save-output.ice Environment-only E1; first failure: expect "bash (default)". Unchanged test passes with bash-only discovery.
terminal-search.ice Environment-only E1; first failure: expect "Find in buffer". Unchanged test passes with bash-only discovery.
window-close-first.ice Environment-only E1; first failure: click right "bash (default)". Unchanged test passes with bash-only discovery.
window-home-and-close.ice Environment-only E1; first failure: click right "bash (default)". Unchanged test passes with bash-only discovery.
files-double-click.ice Environment-only E2 (777e1d38, upstream): long sandbox paths wrap the breadcrumb and move the fixed-coordinate parent row. Unchanged script passes with a short fresh HOME.

Verification

Exact command Final result
cargo check --locked --workspace PASS, exit 0
cargo clippy --locked --workspace --all-targets -- -D warnings PASS, exit 0, no warnings
cargo test --locked --workspace --no-fail-fast PASS, 2,991 passed, 0 failed, 52 pre-existing ignored; integration and doc tests included
cargo build --locked -p obsidianssh-app --features harness PASS, exit 0
Every original .ice file individually, using the invocation below PASS, 113 passed, 0 failed; shard membership 1/3: 38/38, 2/3: 38/38, 3/3: 37/37
GIT_MASTER=1 git diff main...HEAD --check PASS

Actual final all-case driver command:

SHELL=/bin/bash PATH=/tmp/obsidianssh-remaining-evidence/bash-only-bin \
  /bin/bash /tmp/obsidianssh-run-individual.sh \
  /tmp/obsidianssh-remaining-evidence/final-e2e

That driver runs four independent processes at a time; each receives an unchanged copy of one original scenario and its own short fresh HOME. It records every exit code and returns failure if any scenario fails. The equivalent serial reproduction below does not stop at the first failure.

cargo build --locked -p obsidianssh-app --features harness
# On this multi-shell workstation, prepare CI-like shell discovery.
ci_bin=$(mktemp -d /tmp/ossh-bin.XXXXXX)
for p in /usr/bin/*; do
  name=${p##*/}
  case "$name" in fish|zsh|nu) continue ;; esac
  if test -f "$p" && test -x "$p"; then ln -s "$p" "$ci_bin/$name"; fi
done
# One independent invocation per original script, fresh short HOME each time.
failures=0
for source in crates/obsidianssh-app/tests/e2e/*.ice; do
  case_dir=$(mktemp -d /tmp/ossh-case.XXXXXX)
  home=$(mktemp -d /tmp/ossh.XXXXXX)
  cp "$source" "$case_dir/"
  SHELL=/bin/bash PATH="$ci_bin" target/debug/obsidianssh \
    --harness-run "$case_dir" --home "$home" || failures=$((failures + 1))
done
test "$failures" -eq 0

The 52 ignored Rust tests were already ignored on the baseline. This PR adds no ignore/skip flags, removes no test functions, and changes none of the 68 assertions in the eight repaired .ice files. The only retired cases are CloudProfile records in the saved wire examples, removed deliberately in befae99.

Mutation controls: changing the retained PortForwardRule wire tag from 8 to 7 made both golden tests fail (including InvalidTagEncoding(8)); deliberately corrupting the AI key during export made the repaired secrecy test fail on the exact imported value. Both production mutations were restored before final checks. Screenshots were inspected for the selected font and warning, masked terminal content, and RTL drag order.

Review: the two Rust files remain test owners (wire-format examples and export secrecy). No production interfaces, trust boundaries, enum dispatch, escape hatches, defensive checks, one-use helpers, parameter lists, negative names, or logging were introduced. The corrected tests reject mutated protocol tags and corrupted exported keys. All 68 assertions in the eight edited UI scenarios are byte-for-byte unchanged. wire_golden.rs has 137 nonblank/noncomment lines. portable_hardening.rs already has 613; its single-line index correction adds no lines, and splitting that unrelated test module is outside this repair.

Independent reviewer spawning is unavailable in this nested session; the implementation review and QA above were performed directly. Editor LSP requests timed out; the compiler and strict Clippy checks both completed successfully.

Local logs and individual results: /tmp/obsidianssh-remaining-evidence/. Each final-e2e case has run.log, result.tsv, and home-path pointing to its screenshots. No logs, screenshots, temporary scripts, secrets, tokens or personal data were added to the repository. The complete final diff, including inherited PR #3 changes, was reviewed before pushing.

Checklist

  • cargo check --workspace, cargo test --workspace --lib --bins and cargo clippy --workspace --all-targets -- -D warnings pass locally (locked full workspace tests include all unit and binary tests).
  • cargo test --locked --workspace passes if a Cargo.toml or Cargo.lock changed (not applicable; neither changed; the command passed anyway).
  • New user-facing strings go through i18n::t("key"), with the key added to all 23 language modules (not applicable; no new strings).
  • New interactive surfaces are wired into keynav (not applicable; no new surfaces).
  • New settings rows have an entry in settings_index.rs (not applicable; no new settings).
  • Tests land in this PR where they apply; no TODO gaps or placeholder UI.
  • Only touched lines changed; no cargo fmt --all or broad formatting was run.
  • Code comments are in English.

No run-ci label or workflow dispatch is requested. Each new commit includes [skip ci], including HEAD, so opening this PR also suppresses the otherwise automatic pull_request CodeQL workflow. Verification was local; no GitHub Actions runners were used.

Cloud removal in befae99 retired entity tag 7. Remove only those records from the pinned frames and preserve surviving fixture values and wire tags.

[skip ci]
befae99 removed the cloud marker and moved the AI key to index 6. Keep the ciphertext leak assertions and decrypted round-trip control intact.

[skip ci]
3c61c67 added a Behavior row above Appearance. Measure the font weight picker at label_y + 45 and scroll the theme gallery card into view, retaining all assertions.

[skip ci]
7f1c36d removed the vault-password and lock cards. Click the measured Privacy switch at y 118 while retaining all masking and session override checks.

[skip ci]
7f1c36d replaced the Personal vault chip with the icon-only Home tab. Exercise macro bar membership and tab double-click settings through that current control.

[skip ci]
7f1c36d narrowed the leading Home tab. RTL targets move right, while the overflow tail and reserved drag handle stay anchored to the trailing chrome. Keep every order and menu assertion.

[skip ci]
@ImStillBlue
ImStillBlue merged commit a371437 into main Nov 18, 2026
2 checks 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