Skip to content

fix(reset): address review and self-runner test failures#432

Merged
genedna merged 3 commits into
codex/reset-bare-path-git-compatfrom
codex/reset-review-ci-fixes
Jul 6, 2026
Merged

fix(reset): address review and self-runner test failures#432
genedna merged 3 commits into
codex/reset-bare-path-git-compatfrom
codex/reset-review-ci-fixes

Conversation

@genedna

@genedna genedna commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

What

  • Fix the self-hosted compat-offline-core failure by giving the cloud object-restore unit tests an isolated Libra repo/current-directory context before they call restore logic that checks obliteration tombstones.
  • Address the fix(reset): support git-style bare path reset #431 review comment by preserving the user-provided -- separator when rewriting libra reset -- <pathspec> args, so dash-prefixed filenames like -h and --help remain pathspecs instead of flags/help.

Why

The cloud tests were assuming the process cwd was already a Libra repository. That is false in GitHub Actions self-hosted runner checkouts, which are ordinary Git worktrees. The reset rewrite also dropped clap's positional separator, changing parsing for dash-prefixed pathspecs.

Checks

  • cargo +nightly fmt --all --check
  • LIBRA_SKIP_WEB_BUILD=1 cargo test --test command_test command::reset_test::reset_ -- --nocapture
  • LIBRA_SKIP_WEB_BUILD=1 cargo test --lib cloud_restore_indexed_objects -- --nocapture
  • cargo clippy --all-targets --all-features -- -D warnings

Note: this PR is stacked on #431 (codex/reset-bare-path-git-compat) so it only contains the two follow-up fixes.

genedna added 2 commits July 6, 2026 17:20
Signed-off-by: Quanyi Ma <eli@patch.sh>
Signed-off-by: Quanyi Ma <eli@patch.sh>
Copilot AI review requested due to automatic review settings July 6, 2026 09:25

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes two regressions impacting reliability and Git-compat CLI behavior: (1) unit tests for cloud object restore now run inside an isolated Libra repo/CWD so they don’t depend on the runner’s checkout context, and (2) libra reset -- <pathspec> rewrites now preserve the user-provided -- separator so dash-prefixed filenames remain pathspecs (not flags/help).

Changes:

  • Preserve -- when rewriting libra reset -- <pathspec> argv so -h / --help can be treated as filenames after the separator.
  • Add an integration regression test covering dash-prefixed pathspecs passed after --.
  • Stabilize cloud restore unit tests by entering an isolated repo + HOME/LIBRA_TEST_HOME context and running these env/CWD-mutating tests under #[serial].

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
tests/command/reset_test.rs Adds regression coverage ensuring reset -- <dash-prefixed> is treated as a pathspec and unstages correctly.
src/command/cloud.rs Adds a test helper to enter an isolated Libra repo/CWD + HOME context; marks affected async tests #[serial] to avoid cross-test interference.
src/cli.rs Fixes reset argv rewriting to re-insert -- before forwarding the original post-separator pathspecs.

Signed-off-by: Quanyi Ma <eli@patch.sh>
@genedna genedna merged commit 7b6660a into codex/reset-bare-path-git-compat Jul 6, 2026
5 of 6 checks passed
genedna added a commit that referenced this pull request Jul 6, 2026
* fix(reset): support git-style bare path reset

Signed-off-by: Quanyi Ma <eli@patch.sh>

* fix(reset): address review and self-runner test failures (#432)

* test(cloud): isolate restore object tests from cwd

Signed-off-by: Quanyi Ma <eli@patch.sh>

* fix(reset): preserve separator for dash-prefixed paths

Signed-off-by: Quanyi Ma <eli@patch.sh>

* test(file): avoid sqlite3 binary in obliterate recovery

Signed-off-by: Quanyi Ma <eli@patch.sh>

---------

Signed-off-by: Quanyi Ma <eli@patch.sh>

* fix(reset): tighten reset target disambiguation

Signed-off-by: Quanyi Ma <eli@patch.sh>

* test(network): refresh public GitHub fixture

---------

Signed-off-by: Quanyi Ma <eli@patch.sh>
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.

2 participants