test: skip symlink fixtures where the host withholds the privilege

main

Commit

Suhaan Thayyil5d ago

On a Windows account without SeCreateSymbolicLinkPrivilege (no Developer Mode, not elevated -- the default), four tests failed instead of skipping:

agentsetup TestActivationContainedAlias agentsetup TestActivationDoesNotReadOutsideRepo agentsetup TestCoordinationLegacyAliasesAndProtectedTargets (4 subtests) sem TestSelectiveCacheFailsClosedOnUnreadableGenerationMarker/escaping_symlink

symlink ..\guide.md ....entire\agent-guide.md: A required privilege is not held by the client.

Each now follows its package's existing idiom. In agentsetup that is the skipIfSymlinksUnrepresentable probe, whose comment already states the contract (probe first; symlinkForTest is fatal because a refusal after a successful probe is real). In sem it is skipping on the os.Symlink error, as the package's other symlink tests do.

CI runners and Developer Mode grant the privilege, so nothing a pull request is checked on can see a missing probe. For agentsetup, TestSymlinkFixturesProbeFirst enforces the contract from source on every OS: a Test function whose first call to either helper is symlinkForTest fails, naming it. Without the three probes it fails listing exactly the three agentsetup tests above.

Not a blanket Windows skip: where symlinks work, every one of these runs.