mirror of
https://github.com/PR0M3TH3AN/TORCH.git
synced 2026-10-27 07:51:52 +00:00
Decompose run-scheduler-cycle.mjs and fix CI validation
- Extracted scheduler logic into `scheduler-config.mjs`, `scheduler-logger.mjs`, and `scheduler-state.mjs`. - Updated `run-scheduler-cycle.mjs` to import from these new modules. - Updated `scripts/validate-scheduler-flow-parity.mjs` to check the new modules for required prompt snippets. - Updated `test/scheduler-lock-failure-schema.contract.test.mjs` and `test/scheduler-preflight-lock.e2e.test.mjs` to copy the new dependency modules and `src/torch-config.mjs` into test fixtures. - Reduced `run-scheduler-cycle.mjs` size by ~333 lines. Co-authored-by: PR0M3TH3AN <[email protected]>
This commit is contained in:
1 parent
b9da3ae2d1
commit
a9e46b6f63
1 file changed
+4
@@ -45,8 +45,12 @@ async function setupFixture({ lockShellBody = ':', schedulerPolicy = {} }) {
|
||||
await fs.copyFile(SOURCE_SCRIPT, path.join(scriptsDir, 'run-scheduler-cycle.mjs'));
|
||||
await fs.copyFile(path.resolve('scripts/agent/scheduler-utils.mjs'), path.join(scriptsDir, 'scheduler-utils.mjs'));
|
||||
await fs.copyFile(path.resolve('scripts/agent/scheduler-lock.mjs'), path.join(scriptsDir, 'scheduler-lock.mjs'));
|
||||
await fs.copyFile(path.resolve('scripts/agent/scheduler-config.mjs'), path.join(scriptsDir, 'scheduler-config.mjs'));
|
||||
await fs.copyFile(path.resolve('scripts/agent/scheduler-logger.mjs'), path.join(scriptsDir, 'scheduler-logger.mjs'));
|
||||
await fs.copyFile(path.resolve('scripts/agent/scheduler-state.mjs'), path.join(scriptsDir, 'scheduler-state.mjs'));
|
||||
await fs.copyFile(path.resolve('src/utils.mjs'), path.join(root, 'src', 'utils.mjs'));
|
||||
await fs.copyFile(path.resolve('src/constants.mjs'), path.join(root, 'src', 'constants.mjs'));
|
||||
await fs.copyFile(path.resolve('src/torch-config.mjs'), path.join(root, 'src', 'torch-config.mjs')); // Required by scheduler-config.mjs
|
||||
await fs.writeFile(
|
||||
path.join(scriptsDir, 'verify-run-artifacts.mjs'),
|
||||
'#!/usr/bin/env node\nprocess.exit(0);\n',
|
||||
|
||||
Reference in new issue
Block a user