Skip to content

Add environment variable abstraction and harden build service tests#2585

Open
Mpdreamz wants to merge 5 commits intomainfrom
fix/build-test
Open

Add environment variable abstraction and harden build service tests#2585
Mpdreamz wants to merge 5 commits intomainfrom
fix/build-test

Conversation

@Mpdreamz
Copy link
Member

@Mpdreamz Mpdreamz commented Jan 29, 2026

  • Add IEnvironmentVariables interface and SystemEnvironmentVariables implementation
    for testable environment variable access

  • Update IsolatedBuildService and AssemblerBuildService to use IEnvironmentVariables

  • Add validation that --assume-build flag throws error on CI to prevent stale builds

  • Create comprehensive unit tests with truth tables documenting:

    • CI behavior (always forces full rebuild, always clears output)
    • Force parameter behavior and CI override logic
    • assumeBuild validation on CI

- Add IEnvironmentVariables interface and SystemEnvironmentVariables implementation
  for testable environment variable access
- Add SymlinkValidator to prevent path traversal attacks via symlinked control files
  (docset.yml, toc.yml, redirects.yml)
- Update IsolatedBuildService and AssemblerBuildService to use IEnvironmentVariables
- Add validation that --assume-build flag throws error on CI to prevent stale builds
- Create comprehensive unit tests with truth tables documenting:
  - CI behavior (always forces full rebuild, always clears output)
  - Force parameter behavior and CI override logic
  - assumeBuild validation on CI
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant