chore: sync workflow templates - #127
Conversation
Automated sync from stranske/Workflows Template hash: 41168ff7e352 Changes synced from sync-manifest.yml
🤖 Keepalive Loop StatusPR #127 | Agent: Codex | Iteration 0/5 Current State
🔍 Failure Classification| Error type | infrastructure | |
|
Status | ✅ no new diagnostics |
|
Autofix updated these files:
|
There was a problem hiding this comment.
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 |
| 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}`); |
There was a problem hiding this comment.
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.
| 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}`); |
| /fix conflicts and then commit/i, | ||
| /Merge branch .* into .* failed/i, | ||
| /<<<<<<< HEAD/, | ||
| /=======\n/, |
There was a problem hiding this comment.
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.
| /=======\n/, | |
| /=======\s*$/m, |
| | `agents:format` | Issue labeled | Formats raw issue into AGENT_ISSUE_TEMPLATE | | ||
| | `agents:formatted` | Auto-applied | Issue has been formatted by LangChain | |
There was a problem hiding this comment.
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.
| **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) |
There was a problem hiding this comment.
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.
| - 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) |
| ```bash | ||
| git fetch origin {{base_branch}} | ||
| ``` | ||
| > Note: Replace `{{base_branch}}` with the actual base branch name (e.g., `main` or `master`) |
There was a problem hiding this comment.
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.
| > 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`). |
| 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}`); |
There was a problem hiding this comment.
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.
| 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}`); |
| from module import foo, bar | ||
| ======= | ||
| from module import foo, baz | ||
| >>>>>>> origin/{{base_branch}} |
There was a problem hiding this comment.
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.
| >>>>>>> origin/{{base_branch}} | |
| >>>>>>> origin/main |
|
|
||
| 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") | ||
| """ | ||
|
|
There was a problem hiding this comment.
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.
| 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") |
|
|
||
| const existingComment = comments.find( | ||
| (c) => | ||
| c.body.includes('### ⚠️ Merge Conflict Detected') && c.user.type === 'Bot' |
There was a problem hiding this comment.
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.
| 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*') |
| 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')}` | ||
| : ''; | ||
|
|
There was a problem hiding this comment.
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.
| 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'}_`; | |
| } |
Sync Summary
Files Updated
Files Skipped
Review Checklist
Source: stranske/Workflows
Manifest:
.github/sync-manifest.yml