Skip to content

test: add hermetic-tests guard and CONTRIBUTING secret-hygiene rule (#35) - #153

Merged
OBenner merged 2 commits into
mainfrom
feat/35-test-hermeticity
Nov 19, 2026
Merged

OBenner merged 2 commits into
mainfrom
feat/35-test-hermeticity

Conversation

@OBenner

@OBenner OBenner commented Nov 19, 2026

Copy link
Copy Markdown
Owner

Summary

  • Add a CONTRIBUTING secret-hygiene rule: tests must not read real user configs, credentials, or state without injected paths/fixtures.
  • Add a zero-dependency guard for test sources covering home-directory and credential-state access patterns, with an explicit escape hatch.
  • Wire the guard into pnpm verify and add five probe tests.

Validation

  • Guard is clean on the current tree.
  • Five guard probe tests are included.
  • Full CI verification, including build, runs on this PR.

Review

  • dev APPROVE: b32059dc.

Closes #35

)

Tests must never read real user configs/credentials/state without
injected paths or fixtures: a failing test prints its values into logs,
and logs travel. Adds the CONTRIBUTING rule (evidence hygiene section)
and a zero-dependency grep guard over test/ wired into pnpm verify,
covering os.homedir(), tilde home state paths, Windows account
variables, and direct home-related env reads, with an inline
allow-real-home escape hatch. Guard is clean on the current tree;
5 probe tests included.
@OBenner
OBenner merged commit 5e326bd into main Nov 19, 2026
5 checks passed
@OBenner
OBenner deleted the feat/35-test-hermeticity branch November 19, 2026 09:02
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.

[P3] Test hermeticity as secret-hygiene control: CONTRIBUTING rule + optional CI guard

1 participant