Skip to content

fix: build system reliability fixes and docs corrections#371

Closed
Sireeshreddy01 wants to merge 1276 commits intobrowseros-ai:mainfrom
Sireeshreddy01:fix/build-system-reliability-and-docs
Closed

fix: build system reliability fixes and docs corrections#371
Sireeshreddy01 wants to merge 1276 commits intobrowseros-ai:mainfrom
Sireeshreddy01:fix/build-system-reliability-and-docs

Conversation

@Sireeshreddy01
Copy link
Copy Markdown

  • Remove temp file leak in CompileModule._create_version_file: write VERSION directly via Path.write_text() instead of tempfile+shutil.copy2
  • Always close build log: add finally: close_log_file() in execute_pipeline() so logs are flushed on success, failure, and KeyboardInterrupt
  • Fix fragile series patch comment stripping: change ' #' to ' # ' (GNU Quilt convention) so patch filenames containing ' #' are preserved
  • Move IS_MACOS to module-level import in git.py, remove redundant inner-function re-import in SparkleSetupModule.validate()
  • Validate build_type in ConfigureModule.validate(): reject values other than 'debug' or 'release' with a clear error message
  • Fix CONTRIBUTING.md build commands: correct binary name to 'browseros build', fix non-existent config filenames (debug.macos.yaml -> debug.yaml), remove --chromium-src which conflicts with --config mode
  • Remove stale 'Coming soon' from Graph Mode card in docs/index.mdx and add href to the existing /features/workflows page

Nikhil (shadowfax92) and others added 30 commits December 12, 2025 17:53
* chore: udpate appcast.xml

* fix: patch to fix JSON config and cli args for browsero-server

* chore: new browseros-server binaries
* fix: handle extract deleted file in commit properly

* fix: handle commit delete
* patch: new mac sparkle updater

* chore: bump PATCH and OFFSET
* fix: handle rename during extract properly with deleting old patch

* patch: refactor broweros patches to be in chrome/browser/browseros

* patch: rename browseros_actions_config

* fix: features.yaml update to include new browseros folder

* patch: revalidate ports on restart

* patch: disable cdp notifications

* chore: new browseros-server binaries
* chore: new browseros-server binaries

* chore: bump PATCH and OFFSET
* patch: fix sparkle build

* fix: update browseros_server binary path after refactor

* fix: sparkle + browseros server build patch

* fix: build.py --prep dont apply series patches

* fix: build cli -- in prep configure too

* fix: cli annotate -- only add description

* fix: features.yaml update for new paths

* fix: more patch fixes

* fix: sparkle pointer exclusion

* fix: remove su-updater

* fix: sparkle update notification
* fix: windows guids

* fix: generate new windows icons

* fix: bump patch

* feat: new icon generation script

* fix: new generated icons

* fix: new generated icons

* fix: new generated icons
@Sireeshreddy01
Copy link
Copy Markdown
Author

have read the CLA Document and I hereby sign the CLA

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Feb 19, 2026

CLA Assistant Lite bot ✅ All contributors have signed the CLA. Thank you for helping make BrowserOS better!
Posted by the CLA Assistant Lite bot.

@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented Feb 19, 2026

Greptile Summary

This PR enhances build system reliability through multiple focused fixes:

  • Resource management: Eliminated temp file leak in VERSION file creation by replacing tempfile+shutil.copy2 with direct Path.write_text(), and ensured build logs are always closed via finally block regardless of success, failure, or interrupts
  • Patch system robustness: Fixed fragile comment stripping logic from ' #' to ' # ' (GNU Quilt convention) to correctly handle patch filenames containing ' #'
  • Code organization: Moved IS_MACOS import to module-level in git.py, removing redundant inner-function import
  • Input validation: Added build_type validation in ConfigureModule to reject invalid values with clear error messages
  • Documentation accuracy: Corrected CONTRIBUTING.md build commands (binary name, config filenames, removed conflicting --chromium-src flag) and updated docs/index.mdx to remove stale "Coming soon" text from Graph Mode card

All changes are non-breaking improvements that fix edge cases and improve developer experience.

Confidence Score: 5/5

  • Safe to merge with no identified risks
  • All changes are defensive improvements that fix resource leaks, improve error handling, and correct documentation. The changes are well-scoped, follow Python best practices, and address real edge cases (temp file cleanup, log file closure, patch filename parsing). No breaking changes or logic errors detected.
  • No files require special attention

Important Files Changed

Filename Overview
packages/browseros/build/cli/build.py Added finally block to ensure log file closes on success, failure, and interrupts
packages/browseros/build/modules/compile/standard.py Replaced tempfile+shutil.copy2 with direct Path.write_text(), removing temp file leak
packages/browseros/build/modules/patches/series_patches.py Fixed comment stripping from ' #' to ' # ' to preserve patch filenames with ' #'
packages/browseros/build/modules/setup/git.py Moved IS_MACOS import to module-level, removing redundant inner-function import
packages/browseros/build/modules/setup/configure.py Added validation to reject invalid build_type values (only accepts debug or release)
CONTRIBUTING.md Fixed build commands: corrected binary name, config filenames, and removed conflicting flags
docs/index.mdx Removed 'Coming soon' text and added href to Graph Mode card

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[execute_pipeline] -->|try block| B[Execute modules sequentially]
    B -->|success| C[Log success & notify_pipeline_end]
    B -->|KeyboardInterrupt| D[Log error & notify_pipeline_error]
    B -->|ValidationError| E[Log validation failure & notify_pipeline_error]
    B -->|Exception| F[Log pipeline failure & notify_pipeline_error]
    C -->|finally| G[close_log_file]
    D -->|finally| G
    E -->|finally| G
    F -->|finally| G
    G --> H[Ensure log file flushed & closed]
    
    I[CompileModule._create_version_file] -->|old approach| J[tempfile.NamedTemporaryFile]
    J --> K[shutil.copy2]
    K --> L[Path.unlink temp file]
    
    I -->|new approach| M[Path.write_text directly]
    M --> N[No temp file leak]
Loading

Last reviewed commit: 2ce58bb

@Sireeshreddy01
Copy link
Copy Markdown
Author

I have read the CLA Document and I hereby sign the CLA

@Sireeshreddy01
Copy link
Copy Markdown
Author

recheck

- Remove temp file leak in CompileModule._create_version_file: write
  VERSION directly via Path.write_text() instead of tempfile+shutil.copy2
- Always close build log: add finally: close_log_file() in execute_pipeline()
  so logs are flushed on success, failure, and KeyboardInterrupt
- Fix fragile series patch comment stripping: change ' #' to ' # ' (GNU
  Quilt convention) so patch filenames containing ' #' are preserved
- Move IS_MACOS to module-level import in git.py, remove redundant
  inner-function re-import in SparkleSetupModule.validate()
- Validate build_type in ConfigureModule.validate(): reject values other
  than 'debug' or 'release' with a clear error message
- Fix CONTRIBUTING.md build commands: correct binary name to 'browseros build',
  fix non-existent config filenames (debug.macos.yaml -> debug.yaml),
  remove --chromium-src which conflicts with --config mode
- Remove stale 'Coming soon' from Graph Mode card in docs/index.mdx and
  add href to the existing /features/workflows page
@Sireeshreddy01 Sireeshreddy01 force-pushed the fix/build-system-reliability-and-docs branch from 2ce58bb to 0baad8e Compare February 19, 2026 21:43
@Sireeshreddy01
Copy link
Copy Markdown
Author

recheck

@github-actions github-actions Bot locked and limited conversation to collaborators Mar 13, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants