Skip to content

test: cover string receiver contracts#64

Merged
hyfdev merged 1 commit into
mainfrom
agent/test-string-receiver-contexts
Jul 15, 2026
Merged

test: cover string receiver contracts#64
hyfdev merged 1 commit into
mainfrom
agent/test-string-receiver-contexts

Conversation

@hyfdev

@hyfdev hyfdev commented Jul 15, 2026

Copy link
Copy Markdown
Owner

Summary

  • cover clean-trailing and dirty str/String normalization values and Cow variants
  • verify string receivers forward explicit, ambient, cached, and unavailable cwd behavior
  • prove cwd-independent absolute string calls do not read ambient cwd
  • cover the Path receiver identity contract for as_path

Why

The existing path semantics were well covered through Path, but several one-line string receiver forwarding contracts were not crossed with the cases where spelling or cwd state actually changes behavior.

Eleven controlled mutations survived the existing full suite, including stripping a clean trailing separator, returning a borrowed result for dirty normalization, bypassing cached cwd, reading cwd for an absolute input, ignoring an explicit relative base, and swallowing strict cwd failures. Each new assertion in this test-only change kills at least one of those mutations.

Validation

  • cargo test --locked --workspace
  • cargo test --locked --workspace --features cached_current_dir
  • cargo test --locked --workspace --all-features
  • cargo clippy --locked --workspace --all-targets --all-features -- -D warnings
  • targeted deleted-cwd, cached-cwd, string receiver, and as_path tests
  • adversarial review passed; Windows literals and expected results were checked independently, with native execution delegated to the existing Windows CI job

@hyfdev
hyfdev force-pushed the agent/test-string-receiver-contexts branch 2 times, most recently from ba530b9 to 3a9f140 Compare July 15, 2026 09:06
@hyfdev
hyfdev force-pushed the agent/test-string-receiver-contexts branch from 3a9f140 to 0e3406e Compare July 15, 2026 09:14
@hyfdev
hyfdev marked this pull request as ready for review July 15, 2026 09:16
Copilot AI review requested due to automatic review settings July 15, 2026 09:16
@hyfdev
hyfdev merged commit 0d55c9a into main Jul 15, 2026
7 checks passed

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@github-actions github-actions Bot mentioned this pull request Jul 15, 2026
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