Skip to content

chore: sync workflow templates - #127

Merged
stranske merged 2 commits into
mainfrom
sync/workflows-41168ff7e352
Jan 8, 2026
Merged

chore: sync workflow templates#127
stranske merged 2 commits into
mainfrom
sync/workflows-41168ff7e352

Conversation

@stranske

@stranske stranske commented Jan 7, 2026

Copy link
Copy Markdown
Owner

Sync Summary

Files Updated

  • fix_merge_conflicts.md: Conflict resolution prompt - instructs Codex to resolve merge conflicts
  • conflict_detector.js: Conflict detector - identifies merge conflicts for targeted resolution
  • issue_formatter.py: Issue formatter - converts raw text to AGENT_ISSUE_TEMPLATE format
  • llm_provider.py: LLM provider configuration - GitHub Models and OpenAI client setup
  • LABELS.md: Label definitions and usage

Files Skipped

  • pr-00-gate.yml: File exists and sync_mode is create_only
  • ci.yml: File exists and sync_mode is create_only
  • dependabot.yml: File exists and sync_mode is create_only

Review Checklist

  • CI passes with updated workflows
  • No repo-specific customizations were overwritten

Source: stranske/Workflows
Manifest: .github/sync-manifest.yml

Automated sync from stranske/Workflows
Template hash: 41168ff7e352

Changes synced from sync-manifest.yml
Copilot AI review requested due to automatic review settings January 7, 2026 22:04
@stranske stranske added sync Automated sync from Workflows automated Automated sync from Workflows labels Jan 7, 2026
@github-actions

github-actions Bot commented Jan 7, 2026

Copy link
Copy Markdown
Contributor

⚠️ Action Required: Unable to determine source issue for PR #127. The PR title, branch name, or body must contain the issue number (e.g. #123, branch: issue-123, or the hidden marker ).

@github-actions

github-actions Bot commented Jan 7, 2026

Copy link
Copy Markdown
Contributor

🤖 Keepalive Loop Status

PR #127 | Agent: Codex | Iteration 0/5

Current State

Metric Value
Iteration progress [----------] 0/5
Action wait (missing-agent-label)
Disposition skipped (transient)
Gate success
Tasks 0/8 complete
Keepalive ❌ disabled
Autofix ❌ disabled

🔍 Failure Classification

| Error type | infrastructure |
| Error category | resource |
| Suggested recovery | Confirm the referenced resource exists (repo, PR, branch, workflow, or file). |

@github-actions github-actions Bot added the autofix Let bots format/lint automatically label Jan 7, 2026
@github-actions github-actions Bot added the autofix:patch Autofix patch available label Jan 7, 2026
@github-actions

github-actions Bot commented Jan 7, 2026

Copy link
Copy Markdown
Contributor

Status | ✅ no new diagnostics
History points | 0
Timestamp | 2026-01-07 22:05:54 UTC
Report artifact | autofix-report-pr-127
Remaining | ∅
New | ∅
No additional artifacts

@github-actions

github-actions Bot commented Jan 7, 2026

Copy link
Copy Markdown
Contributor

Autofix updated these files:

  • scripts/langchain/issue_formatter.py

@github-actions github-actions Bot removed the autofix:patch Autofix patch available label Jan 7, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR synchronizes workflow templates from the stranske/Workflows repository, adding merge conflict resolution capabilities and updating LangChain issue formatting documentation. The sync introduces new tooling for automated conflict detection and adds LangSmith tracing support for LLM operations.

Key Changes

  • Added LangSmith tracing integration to the LLM provider with optional observability features
  • Introduced conflict detection system with multi-source validation (GitHub API, CI logs, PR comments)
  • Updated label documentation to reflect streamlined issue formatting workflow with clearer descriptions

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 12 comments.

File Description
tools/llm_provider.py Adds LangSmith tracing setup with environment configuration for optional observability
docs/LABELS.md Updates agent label documentation, removes deprecated labels, clarifies issue formatting workflow
.github/scripts/conflict_detector.js New conflict detection module with GitHub API integration and multi-source conflict validation
.github/codex/prompts/fix_merge_conflicts.md New Codex prompt template providing step-by-step merge conflict resolution instructions

Comment on lines +157 to +162
console.debug(`Could not download logs for job ${job.id}: ${logError.message}`);
continue;
}
}
} catch (jobError) {
console.debug(`Could not list jobs for run ${run.id}: ${jobError.message}`);

Copilot AI Jan 7, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The comment states "debug" but uses console.debug() which may not be visible in GitHub Actions logs by default (depends on log level configuration). Consider using console.log() or console.warn() for better visibility in CI environments, or document the required log level settings.

Suggested change
console.debug(`Could not download logs for job ${job.id}: ${logError.message}`);
continue;
}
}
} catch (jobError) {
console.debug(`Could not list jobs for run ${run.id}: ${jobError.message}`);
console.warn(`Could not download logs for job ${job.id}: ${logError.message}`);
continue;
}
}
} catch (jobError) {
console.warn(`Could not list jobs for run ${run.id}: ${jobError.message}`);

Copilot uses AI. Check for mistakes.
/fix conflicts and then commit/i,
/Merge branch .* into .* failed/i,
/<<<<<<< HEAD/,
/=======\n/,

Copilot AI Jan 7, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The regex pattern /=======\n/ specifically requires a newline character after the conflict marker, but conflict markers may appear with different whitespace (e.g., ======= followed by spaces, different line endings like \r\n on Windows, or no trailing whitespace). Consider using /=======\s*$/m with multiline flag to match the conflict marker more reliably across different environments.

Suggested change
/=======\n/,
/=======\s*$/m,

Copilot uses AI. Check for mistakes.
Comment thread docs/LABELS.md
Comment on lines +14 to +15
| `agents:format` | Issue labeled | Formats raw issue into AGENT_ISSUE_TEMPLATE |
| `agents:formatted` | Auto-applied | Issue has been formatted by LangChain |

Copilot AI Jan 7, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The table rows on lines 14-15 are being inserted between row 13 and row 16, but the formatting creates a visual break. The agents:format and agents:formatted labels should maintain consistent table alignment with the other rows. Ensure proper markdown table continuation without the mid-table insertion causing rendering issues.

Copilot uses AI. Check for mistakes.
Comment thread docs/LABELS.md
**Workflow:** `agents-70-orchestrator.yml` (Agents 70 Orchestrator)
**Prerequisites:**
- Issue must have non-empty body text
- Repository must have `OPENAI_API_KEY` secret for LLM mode (optional)

Copilot AI Jan 7, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The line "- Repository must have OPENAI_API_KEY secret for LLM mode (optional)" is contradictory. If it's optional, rephrase to clarify: "- Repository should have OPENAI_API_KEY secret for LLM-powered formatting (falls back to regex if not available)" or similar wording that makes the optionality clear.

Suggested change
- Repository must have `OPENAI_API_KEY` secret for LLM mode (optional)
- Repository should have `OPENAI_API_KEY` secret for LLM-powered formatting (falls back to regex if not available)

Copilot uses AI. Check for mistakes.
```bash
git fetch origin {{base_branch}}
```
> Note: Replace `{{base_branch}}` with the actual base branch name (e.g., `main` or `master`)

Copilot AI Jan 7, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The template variable {{base_branch}} is used but may not be replaced in all contexts. On line 26, the note says "Replace {{base_branch}} with the actual base branch name" which suggests manual replacement is expected. However, this contradicts the templating syntax which typically expects automatic substitution. Clarify whether this is a Handlebars/Mustache template that will be processed, or if users should manually replace these placeholders.

Suggested change
> Note: Replace `{{base_branch}}` with the actual base branch name (e.g., `main` or `master`)
> Note: `{{base_branch}}` will be automatically set to the PR's base branch (e.g., `main` or `master`).

Copilot uses AI. Check for mistakes.
Comment on lines +157 to +162
console.debug(`Could not download logs for job ${job.id}: ${logError.message}`);
continue;
}
}
} catch (jobError) {
console.debug(`Could not list jobs for run ${run.id}: ${jobError.message}`);

Copilot AI Jan 7, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The comment states "debug" but uses console.debug() which may not be visible in GitHub Actions logs by default (depends on log level configuration). Consider using console.log() or console.warn() for better visibility in CI environments, or document the required log level settings.

Suggested change
console.debug(`Could not download logs for job ${job.id}: ${logError.message}`);
continue;
}
}
} catch (jobError) {
console.debug(`Could not list jobs for run ${run.id}: ${jobError.message}`);
console.warn(`Could not download logs for job ${job.id}: ${logError.message}`);
continue;
}
}
} catch (jobError) {
console.warn(`Could not list jobs for run ${run.id}: ${jobError.message}`);

Copilot uses AI. Check for mistakes.
from module import foo, bar
=======
from module import foo, baz
>>>>>>> origin/{{base_branch}}

Copilot AI Jan 7, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The template placeholder {{base_branch}} appears in the code comment within the example conflict marker. If this template is processed by a templating engine, this will be replaced even within the example code block, which could confuse the example. Consider escaping the placeholder or using a literal example like "origin/main" instead to ensure the example remains clear and unmodified.

Suggested change
>>>>>>> origin/{{base_branch}}
>>>>>>> origin/main

Copilot uses AI. Check for mistakes.
Comment thread tools/llm_provider.py
Comment on lines +14 to 21

LangSmith Tracing:
Set these environment variables to enable LangSmith tracing:
- LANGSMITH_API_KEY: Your LangSmith API key
- LANGCHAIN_TRACING_V2: Set to "true" to enable tracing
- LANGCHAIN_PROJECT: Project name (default: "workflows-agents")
"""

Copilot AI Jan 7, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The docstring has inconsistent formatting. The main module docstring ends at line 13, but then lines 15-19 add a new "LangSmith Tracing:" section after a blank line, which appears to be part of the docstring but breaks the typical docstring structure. This section should either be integrated into the main docstring above line 13, or moved to a separate comment block or documentation file. The current placement makes it unclear whether this is part of the module docstring or a separate comment.

Suggested change
LangSmith Tracing:
Set these environment variables to enable LangSmith tracing:
- LANGSMITH_API_KEY: Your LangSmith API key
- LANGCHAIN_TRACING_V2: Set to "true" to enable tracing
- LANGCHAIN_PROJECT: Project name (default: "workflows-agents")
"""
"""
# LangSmith Tracing:
# Set these environment variables to enable LangSmith tracing:
# - LANGSMITH_API_KEY: Your LangSmith API key
# - LANGCHAIN_TRACING_V2: Set to "true" to enable tracing
# - LANGCHAIN_PROJECT: Project name (default: "workflows-agents")

Copilot uses AI. Check for mistakes.

const existingComment = comments.find(
(c) =>
c.body.includes('### ⚠️ Merge Conflict Detected') && c.user.type === 'Bot'

Copilot AI Jan 7, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The conflict detection logic relies on checking c.user.type === 'Bot' (line 336) to find existing comments. However, GitHub Apps have user.type === 'Bot' while GitHub Actions using GITHUB_TOKEN have user.type === 'User'. This condition may fail to find existing comments posted by GitHub Actions workflows, leading to duplicate conflict comments. Consider also checking for the bot's specific login name or using a unique marker in the comment body to identify it reliably.

Suggested change
c.body.includes('### ⚠️ Merge Conflict Detected') && c.user.type === 'Bot'
c.body &&
c.body.includes('### ⚠️ Merge Conflict Detected') &&
c.body.includes('*Auto-detected by conflict detector*')

Copilot uses AI. Check for mistakes.
Comment on lines +300 to +305
const files = conflictResult.files.slice(0, 10); // Limit to 10 files
const fileList =
files.length > 0
? `\n\n**Potentially affected files:**\n${files.map((f) => `- \`${f}\``).join('\n')}`
: '';

Copilot AI Jan 7, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The comment states "Limit to 10 files" but the user receives no indication when files are truncated. If a PR has more than 10 conflicting files, the remaining files are silently omitted. Consider adding a note to the comment body when files are truncated, such as "...and X more files" to inform users that the list is incomplete.

Suggested change
const files = conflictResult.files.slice(0, 10); // Limit to 10 files
const fileList =
files.length > 0
? `\n\n**Potentially affected files:**\n${files.map((f) => `- \`${f}\``).join('\n')}`
: '';
const maxFilesToShow = 10;
const totalFiles = conflictResult.files.length;
const files = conflictResult.files.slice(0, maxFilesToShow); // Limit to 10 files
let fileList =
files.length > 0
? `\n\n**Potentially affected files:**\n${files.map((f) => `- \`${f}\``).join('\n')}`
: '';
if (totalFiles > maxFilesToShow) {
const remainingCount = totalFiles - maxFilesToShow;
fileList += `\n- _...and ${remainingCount} more file${remainingCount === 1 ? '' : 's'}_`;
}

Copilot uses AI. Check for mistakes.
@stranske
stranske merged commit f135377 into main Jan 8, 2026
27 checks passed
@stranske
stranske deleted the sync/workflows-41168ff7e352 branch January 8, 2026 01:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

autofix Let bots format/lint automatically automated Automated sync from Workflows sync Automated sync from Workflows

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants