Task · TSO-0209

Guard tests against runtime.Caller repo-root discovery

Description

Commit 55c8d1d9 replaced runtime.Caller root discovery with internal/repotest.Root so tests pass under -trimpath. Nothing stops a new test reintroducing it. The gate recipes stay unchanged (Standing forbids gate edits).

Acceptance Criteria

Definition of Done

Implementation Plan

Loop33 rootguard lane: AST guard with planted negative, gate and review.

Implementation Notes

loop33 landed 3d9e40b0a70e8d9abd4933621858bf9fc33385d9 after composed remote gate run 20261101T210854Z-tailscale2otel-8528c5f7 exit0, including just check, generation idempotence and just formatting. Planted negative catches file/line; alias/dot imports covered. CodeRabbit complete0, final dsreview PASS. CI watched separately.

Final Summary

Added AST regression guard against trimpath-unsafe runtime.Caller use in repository tests; planted negative and clean trimpath suite passed, then exact composed gate and main push.

View the source file on GitHub