MCPcopy Create free account
hub / github.com/ByBrawe/opencode-loop / statusGoal

Function statusGoal

src/index.js:1438–1450  ·  view source on GitHub ↗
(directory, client, sessionID)

Source from the content-addressed store, hash-verified

1436 lastVerifyCode: Number.isFinite(Number(job?.lastVerifyCode)) ? Number(job.lastVerifyCode) : undefined
1437 };
1438}
1439function goalMadeMeaningfulProgress(beforeJob, afterJob) {
1440 const before = goalProgressSnapshot(beforeJob || {});
1441 const after = goalProgressSnapshot(afterJob || {});
1442 if (["completed", "blocked"].includes(after.status) && after.status !== before.status)
1443 return true;
1444 if (after.progressCount > before.progressCount)
1445 return true;
1446 if (after.evidence !== before.evidence && hasConcreteGoalEvidence(after.evidence))
1447 return true;
1448 if (after.checksPassedAt > before.checksPassedAt || goalChecksPassed(afterJob) && after.lastGoalCheckAt > before.lastGoalCheckAt)
1449 return true;
1450 if (after.lastVerifyAt > before.lastVerifyAt && after.lastVerifyCode === 0)
1451 return true;
1452 return false;
1453}

Callers 2

addGoalFunction · 0.85
handleCommandFunction · 0.85

Calls 4

readStateFunction · 0.85
goalStatusTextFunction · 0.85
toastFunction · 0.85
sayFunction · 0.85

Tested by

no test coverage detected