-
Notifications
You must be signed in to change notification settings - Fork 0
chore: sync workflow templates #142
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -822,15 +822,44 @@ async function evaluateKeepaliveLoop({ github, context, core, payload: overrideP | |||||
| const maxIterations = toNumber(config.max_iterations ?? state.max_iterations, 5); | ||||||
| const failureThreshold = toNumber(config.failure_threshold ?? state.failure_threshold, 3); | ||||||
|
|
||||||
| // Productivity tracking: determine if recent iterations have been productive | ||||||
| // An iteration is productive if it made file changes or completed tasks | ||||||
| // Evidence-based productivity tracking | ||||||
| // Uses multiple signals to determine if work is being done: | ||||||
| // 1. File changes (primary signal) | ||||||
| // 2. Task completion progress | ||||||
| // 3. Historical productivity trend | ||||||
| const lastFilesChanged = toNumber(state.last_files_changed, 0); | ||||||
| const prevFilesChanged = toNumber(state.prev_files_changed, 0); | ||||||
| const hasRecentFailures = Boolean(state.failure?.count > 0); | ||||||
| const isProductive = lastFilesChanged > 0 && !hasRecentFailures; | ||||||
|
|
||||||
| // Track task completion trend | ||||||
| const previousTasks = state.tasks || {}; | ||||||
| const prevUnchecked = toNumber(previousTasks.unchecked, checkboxCounts.unchecked); | ||||||
| const tasksCompletedSinceLastRound = prevUnchecked - checkboxCounts.unchecked; | ||||||
|
|
||||||
| // Calculate productivity score (0-100) | ||||||
| // This is evidence-based: higher score = more confidence work is happening | ||||||
| let productivityScore = 0; | ||||||
| if (lastFilesChanged > 0) productivityScore += Math.min(40, lastFilesChanged * 10); | ||||||
| if (tasksCompletedSinceLastRound > 0) productivityScore += Math.min(40, tasksCompletedSinceLastRound * 20); | ||||||
| if (prevFilesChanged > 0 && iteration > 1) productivityScore += 10; // Recent historical activity | ||||||
| if (!hasRecentFailures) productivityScore += 10; // No failures is a positive signal | ||||||
|
|
||||||
| // An iteration is productive if it has a reasonable productivity score | ||||||
| const isProductive = productivityScore >= 20 && !hasRecentFailures; | ||||||
|
|
||||||
| // Early detection: Check for diminishing returns pattern | ||||||
| // If we had activity before but now have none, might be naturally completing | ||||||
| const diminishingReturns = | ||||||
| iteration >= 2 && | ||||||
| prevFilesChanged > 0 && | ||||||
| lastFilesChanged === 0 && | ||||||
| tasksCompletedSinceLastRound === 0; | ||||||
|
||||||
| tasksCompletedSinceLastRound === 0; | |
| tasksCompletedSinceLastRound <= 0; |
Copilot
AI
Jan 3, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The parameter name llm_confidence_adjusted is referenced in the JavaScript code but is never passed from the YAML workflow file. This will cause llmConfidenceAdjusted to always be false, making the confidence adjustment warning on lines 1289-1295 never display even when confidence has been adjusted. Either add the missing input parameter to the YAML file or remove the unused logic if this feature is not yet implemented.
| const llmConfidenceAdjusted = toBool(inputs.llm_confidence_adjusted ?? inputs.llmConfidenceAdjusted, false); | |
| const llmConfidenceAdjusted = llmRawConfidence !== llmConfidence; |
Copilot
AI
Jan 3, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The markdown table structure is broken when additional rows are conditionally added. Lines 1273-1274 start a table without a header row or separator, then lines 1282 and 1285 add rows to this table. Markdown tables require a header row followed by a separator row (e.g., | --- | --- |) before data rows. This will render incorrectly. Consider either using a definition list format or adding proper table headers and separators.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The
tasksCompletedSinceLastRoundcalculation can result in a negative value if tasks are added between iterations (prevUnchecked < checkboxCounts.unchecked). This negative value is then used in productivity scoring (line 843) where only positive values are expected, potentially skewing the productivity score. Consider adding a check to ensure the value is non-negative:const tasksCompletedSinceLastRound = Math.max(0, prevUnchecked - checkboxCounts.unchecked);