Skip to content

Commit 98996a3

Browse files
committed
fix: remove test mode, use nohup for long runs
1 parent 48c86fc commit 98996a3

3 files changed

Lines changed: 24 additions & 32 deletions

File tree

.opencode/hook-metrics.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -285,5 +285,12 @@
285285
"duration": 0,
286286
"exitCode": 127,
287287
"success": false
288+
},
289+
{
290+
"timestamp": 1768584754091,
291+
"hookType": "post-commit",
292+
"duration": 0,
293+
"exitCode": 127,
294+
"success": false
288295
}
289296
]

.opencode/state

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -200,8 +200,8 @@
200200
"cleanup:session_metadata": {
201201
"default": {
202202
"sessionId": "default",
203-
"createdAt": 1768584739800,
204-
"lastActivity": 1768584739800,
203+
"createdAt": 1768584858706,
204+
"lastActivity": 1768584858706,
205205
"ttlMs": 86400000,
206206
"isActive": true,
207207
"agentCount": 0,
@@ -379,7 +379,7 @@
379379
},
380380
"session:default:coordinator": {
381381
"sessionId": "default",
382-
"startTime": 1768584739800,
382+
"startTime": 1768584858706,
383383
"activeDelegations": {},
384384
"agentInteractions": {},
385385
"conflictHistory": [],
@@ -400,12 +400,12 @@
400400
},
401401
"delegation:default_session": {
402402
"sessionId": "default",
403-
"createdAt": "2026-01-16T17:32:19.800Z",
403+
"createdAt": "2026-01-16T17:34:18.706Z",
404404
"active": true,
405405
"agentCount": 8
406406
},
407407
"session:active": true,
408-
"session:boot_time": 1768584739800,
408+
"session:boot_time": 1768584858706,
409409
"session:agents": [],
410410
"session:state_manager": {
411411
"stateManager": {
@@ -874,7 +874,7 @@
874874
"enforcementLevel": "blocking"
875875
}
876876
],
877-
"enforcement:enabled_at": 1768584739801,
877+
"enforcement:enabled_at": 1768584858706,
878878
"session:validator-test-session:coordinator": {
879879
"sessionId": "validator-test-session",
880880
"startTime": 1768335491257,

scripts/ci-cd-full-cycle.cjs

Lines changed: 11 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -164,15 +164,8 @@ class CICDFullCycleManager {
164164
* Wait for pipeline completion and apply auto-fixes if needed
165165
*/
166166
async monitorAndFixPipeline() {
167-
const isTestMode = process.argv.includes('--test') || process.argv.includes('--quick');
168-
169167
this.log('🔍 Monitoring pipeline and applying auto-fixes if needed...');
170168

171-
if (isTestMode) {
172-
this.log('🧪 TEST MODE: Skipping long pipeline wait - checking status once');
173-
return { success: true, status: 'test_mode_skip' };
174-
}
175-
176169
// Wait a bit for the pipeline to start
177170
await this.sleep(5000);
178171

@@ -262,9 +255,6 @@ class CICDFullCycleManager {
262255
const startTime = new Date();
263256
this.log('🚀 Starting StrRay CI/CD Full Cycle Manager');
264257

265-
// Check for test mode (quick completion for development)
266-
const isTestMode = process.argv.includes('--test') || process.argv.includes('--quick');
267-
268258
try {
269259
// Step 1: Check for changes
270260
if (!this.hasChanges()) {
@@ -300,16 +290,7 @@ class CICDFullCycleManager {
300290
}
301291

302292
// Step 6: Monitor and auto-fix
303-
let result;
304-
if (isTestMode) {
305-
this.log('🧪 TEST MODE: Simulating pipeline monitoring (quick completion)');
306-
// In test mode, just check pipeline status once and return success
307-
const status = await this.monitorAndFixPipeline();
308-
result = { success: true, status: 'test_mode_completed' };
309-
this.log('✅ Test mode completed successfully');
310-
} else {
311-
result = await this.monitorAndFixPipeline();
312-
}
293+
const result = await this.monitorAndFixPipeline();
313294

314295
const endTime = new Date();
315296
const duration = Math.round((endTime - startTime) / 1000);
@@ -357,26 +338,30 @@ class CICDFullCycleManager {
357338
// CLI interface
358339
if (require.main === module) {
359340
const args = process.argv.slice(2);
360-
const hasTestFlag = args.includes('--test') || args.includes('--quick');
361341
const commitMessage = args.find(arg => !arg.startsWith('--')); // First non-flag argument
362342

363343
if (args.includes('--help') || args.includes('-h')) {
364344
console.log(`
365345
🚀 StrRay CI/CD Full Cycle Manager
366346
367-
Usage: node scripts/ci-cd-full-cycle.cjs [commit-message] [options]
347+
Usage: node scripts/ci-cd-full-cycle.cjs [commit-message]
368348
369349
Arguments:
370350
commit-message Optional commit message (auto-generated if not provided)
371351
372-
Options:
373-
--test, --quick Test mode: Skip long pipeline monitoring for quick completion
374-
--help, -h Show this help message
352+
Description:
353+
Runs the complete CI/CD cycle: validate → commit → push → monitor → auto-fix
354+
355+
⚠️ NOTE: This script waits for pipelines to complete (up to 20 minutes).
356+
Use in GitHub Actions or run with 'nohup' to avoid bash timeouts:
357+
358+
nohup node scripts/ci-cd-full-cycle.cjs "commit message" &
359+
tail -f nohup.out
375360
376361
Examples:
377362
node scripts/ci-cd-full-cycle.cjs
378363
node scripts/ci-cd-full-cycle.cjs "feat: add new feature"
379-
node scripts/ci-cd-full-cycle.cjs --test "quick test commit"
364+
nohup node scripts/ci-cd-full-cycle.cjs "long running commit" &
380365
`);
381366
process.exit(0);
382367
}

0 commit comments

Comments
 (0)