Skip to content

docs(testing): isolate autoload paths from other checkouts - #579

Merged
ss-o merged 1 commit into
mainfrom
code/fpath-test-isolation
Aug 30, 2026
Merged

docs(testing): isolate autoload paths from other checkouts#579
ss-o merged 1 commit into
mainfrom
code/fpath-test-isolation

Conversation

@ss-o

@ss-o ss-o commented Aug 30, 2026

Copy link
Copy Markdown
Member

Summary

  • Require Zsh tests to control FPATH and fpath from the checkout under test.
  • Prevent another worktree or installation from silently supplying a same-named autoload.

Evidence

While validating z-shell/F-Sy-H#77 in z-shell/F-Sy-H#134, ZUnit initially executed _fsh_make_targets from a stale primary checkout inherited through FPATH. Clearing FPATH made the regression exercise the intended worktree and pass.

Instruction impact review

  1. Classification: scoped testing guidance.
  2. Consumers: Codex, Claude Code, Copilot, Gemini CLI, and humans in repositories testing Zsh autoloads.
  3. Canonical owner: .github/instructions/testing.instructions.md remains the correct owner.
  4. Duplication and contradiction: none found. Existing Zsh guidance controls trusted paths but does not prevent cross-checkout test selection.
  5. Routing: no manifest change. instruction-testing already routes this file for testing tasks.
  6. Runtime delivery: all supported runtimes receive the required scoped instruction through the manifest, with no optional hook or skill dependency.
  7. Generated output: no adapter or generated composite changes. AGENTS.md and its size limit are unaffected.

Verification

  • python3 scripts/validate-agent-policy.py
  • python3 -m unittest scripts/test_validate_agent_policy.py -v (84 tests)
  • python3 scripts/validate-zsh-standard-policy.py
  • trunk check --no-progress --no-fix .github/instructions/testing.instructions.md
  • git diff --check

Agent handoff

No handoff needed.

Require Zsh tests to rebuild FPATH and fpath from the subject checkout.
This prevents same-named autoloads in another worktree from hiding
stale-code execution.
@ss-o
ss-o requested a review from a team as a code owner August 30, 2026 15:23
@ss-o
ss-o merged commit ef53e97 into main Aug 30, 2026
6 of 7 checks passed
@ss-o
ss-o deleted the code/fpath-test-isolation branch August 30, 2026 15:26
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