Commit Graph
7 Commits
Author SHA1 Message Date
google-labs-jules[bot]andPR0M3TH3AN 57f6675c64 Weekly fuzz-agent run: fixes and execution
Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-18 15:22:04 +00:00
thePR0M3TH3AN 1d30b2f28d Merge branch 'main' into jules-test-roster-improvement-7422741331242836925 2026-02-18 09:50:23 -05:00
google-labs-jules[bot]andPR0M3TH3AN a31332457d test: add unit tests for roster loading logic
- Implemented dependency injection in `src/roster.mjs` to allow mocking `fs` and `loadTorchConfig`.
- Added `test/roster.test.mjs` with comprehensive test cases:
    - Fallback behavior when no files/config exist.
    - Priority of `torch/roster.json` (User Roster) over `roster.json` (CWD).
    - Internal module roster fallback.
    - Environment variable overrides.
    - Configuration overrides.
    - Error handling for malformed JSON or missing fields.
- Exported `_resetRosterCache`, `_setRosterDependencies`, and `_restoreRosterDependencies` for testing purposes.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-18 03:31:12 +00:00
google-labs-jules[bot]andPR0M3TH3AN e12c415f28 feat(test): add unit tests for roster loading logic with dependency injection
- Refactor `src/roster.mjs` to support dependency injection for `fs` and `loadTorchConfig`.
- Add `test/roster.test.mjs` to test roster loading scenarios including file precedence, caching, fallback, and configuration overrides.
- Export `_resetRosterCache` in `src/roster.mjs` for testing purposes.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-18 03:29:09 +00:00
google-labs-jules[bot]andPR0M3TH3AN 50b0cf5a07 perf: Refactor config loading to be non-blocking async
Replaces synchronous `fs.readFileSync` with `fs.promises.readFile` in `loadTorchConfig` to prevent event loop blocking.
Updates all dependent configuration getters and consumers to use async/await.
Includes benchmark proving non-blocking behavior.
Fixes dashboard tests to properly await server listening.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-17 19:02:46 +00:00
google-labs-jules[bot]andPR0M3TH3AN 3f3f45b13f feat: ensure torch init installs full application package
- Modify `src/ops.mjs` to copy all critical application directories (`src`, `bin`, `dashboard`, `scripts`, etc.) and files (`package.json`, `build.mjs`) to the `torch/` directory during `init` and `update`.
- Update `src/ops.mjs` to generate `torch-config.json` inside the `torch/` directory (if missing) instead of only in the project root, supporting self-contained execution.
- Update `src/roster.mjs` to fallback to checking for `roster.json` in the current working directory, enabling `npm run` commands to work correctly when executed from within the `torch/` directory.
- This allows `torch/` to function as a standalone sub-package within a project, where users can `cd torch`, `npm install`, and `npm run build` as expected.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-16 00:00:28 +00:00
google-labs-jules[bot]andPR0M3TH3AN 581dc3484e [decompose] extract modules from src/lib.mjs
Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-14 13:18:07 +00:00