fix: make clean-room tests environment-independent - #35
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fix deterministic clean-room certification failures that occurred in interactive Codespaces and filesystems with inherited permission behavior.
The change makes tests independent of ambient terminal color settings and explicitly normalizes generated SSH fixture-key permissions.
Change type
Motivation
The V1.1 test suite passed in CI but reproduced six failures in a fresh interactive GitHub Codespace:
After disabling ambient color, the output failures disappeared. Explicitly normalizing fixture-key permissions resolved the remaining failures.
This repair ensures clean-room certification behaves consistently across CI, interactive terminals, Codespaces, and filesystems with inherited ACL or permission behavior.
Related issue: None.
Implementation details
0600.0644.No runtime implementation, authorization policy, remote execution path, or key-validation rule was weakened.
Security impact
Does this change affect any of the following?
If yes, explain:
No production security behavior changed. The strict private-key permission validation remains unchanged. Only generated test fixtures are normalized to the permissions already required by production code.
Validation performed
Commands/tests executed:
npm testnpm run release:checknpm run securityAdditional validation:
219/219tests passed.npm audit --omit=dev --audit-level=highreported0 vulnerabilities.git diff --checkpassed.Security considerations
What security assumptions changed?
None.
What prevents abuse or regression?
Production private-key validation still rejects symlinks, non-regular files, and private keys with group or other permission bits.
The test fixtures now explicitly reproduce the required secure permission state instead of depending on ambient filesystem defaults.
Doctor-output tests explicitly select plain output, preventing terminal environment variables or TTY detection from changing assertion behavior.
Were existing protections preserved?
Yes. Authorization, capability enforcement, SSH host verification, remote confinement, audit integrity, rollback behavior, and strict key handling remain unchanged.
Compatibility
Does this change affect:
Documentation
Final checklist