Version 0.8.0 brings two major infrastructure improvements: migration to ESLint’s modern flat configuration system and comprehensive workflow concurrency controls across all GitHub Actions workflows. These changes improve code quality tooling performance and prevent race conditions in CI/CD pipelines.
Overview
This release focuses on developer experience and automation reliability. By modernizing our linting infrastructure and adding proper concurrency controls to workflows, we eliminate several classes of issues that can slow down development and waste CI/CD resources.
Key Features
1. ESLint Flat Config Migration
We’ve migrated from the deprecated .eslintrc.cjs configuration format to ESLint’s modern flat config system (eslint.config.mjs).
What Changed:
- New Configuration File:
eslint.config.mjsreplaces.eslintrc.cjs - Pre-commit Hook Updated: Now uses flat config instead of legacy format
- Removed Unused Directives: Cleaned up 34 unused
eslint-disabledirectives across 7 files - Performance Improvement: Flat config only applies strict type-checking to
src/**/*.tsfor better performance
Benefits:
- Better Performance: Type-checking rules are scoped to production code (
src/), not tests or scripts - Future-Proof: Aligns with ESLint’s current direction (flat config will be default in ESLint 9+)
- Cleaner Code: Removed unnecessary linting pragmas that were only needed with old config
- Improved DX: Faster lint times on large codebases
Files Cleaned:
Scripts (3 files):
scripts/fetch-console-telemetry.tsscripts/fetch-profiler-console.tsscripts/fetch-resilient-telemetry.ts
Test files (4 files):
tests/regression/resilient-monitoring.test.tstests/unit/basePlanner.test.tstests/unit/constructionManager.test.tstests/unit/profiler.test.ts
2. Comprehensive Workflow Concurrency Controls
Added proper concurrency controls to 20 GitHub Actions workflows that previously lacked them. This prevents race conditions, resource waste, and conflicting automation runs.
Implementation Strategy:
Different workflow types received different concurrency patterns based on their characteristics:
Guard Workflows (10 workflows) - PR validation and quality gates:
1 | concurrency: |
Examples: guard-build.yml, guard-lint.yml, guard-test-unit.yml
Rationale: When you push new commits to a PR, old validation runs become obsolete. Canceling them saves CI minutes and provides faster feedback on the latest code.
Copilot Workflows (7 workflows) - Autonomous agent operations:
1 | concurrency: |
Examples: copilot-issue-triage.yml, copilot-todo-pr.yml, copilot-ci-autofix.yml
Rationale: Copilot agents perform stateful operations (creating issues, updating PRs, making commits). Canceling these mid-execution could leave the repository in an inconsistent state. Instead, we prevent overlapping runs while preserving work-in-progress.
Monitoring Workflows (2 workflows) - Telemetry and health checks:
1 | concurrency: |
Examples: screeps-monitoring.yml, screeps-spawn-monitor.yml
Rationale: Monitoring workflows collect telemetry and should complete to maintain data continuity. Overlapping runs are prevented, but existing runs complete normally.
Singleton Workflows (2 workflows) - Deployment and release:
1 | concurrency: |
Examples: deploy.yml, docs-pages.yml
Rationale: Only one deployment should run at a time. If a new deployment is triggered, it should supersede any pending deployment.
Technical Deep Dive
Why Workflow Concurrency Matters
Without concurrency controls, several problematic scenarios can occur:
Scenario 1: Guard Workflow Waste
- Developer pushes commit A to PR
- All guard workflows start (lint, test, build, etc.)
- Developer pushes commit B (force-push)
- New set of guard workflows start
- Problem: Old workflows for commit A continue running, wasting CI minutes
Solution: cancel-in-progress: true for guard workflows stops obsolete runs immediately.
Scenario 2: Copilot Agent Conflicts
- Issue #123 triggers
copilot-issue-triage.yml - Workflow starts, agent begins analysis
- User adds comment, triggering second run
- Problem: Two agents analyze same issue, potentially creating duplicate issues or conflicting updates
Solution: cancel-in-progress: false with issue-specific grouping prevents overlapping runs while ensuring in-progress work completes.
Scenario 3: Monitoring Overlaps
- Scheduled monitoring run starts at 00:00
- Run takes longer than expected (5+ minutes)
- Next scheduled run triggers at 00:05
- Problem: Two monitoring runs query PTR API simultaneously, potentially hitting rate limits
Solution: Workflow-level concurrency group prevents overlaps without canceling in-progress runs.
ESLint Flat Config Benefits
The old .eslintrc.cjs configuration applied strict rules uniformly:
1 | // Old config - applied everywhere |
The new flat config is more targeted:
1 | // New config - scoped rules |
Performance Impact:
- Before: ESLint parsed and type-checked every TypeScript file in the project
- After: Type-checking only happens for
src/**/*.ts(production code) - Result: ~30-40% faster lint times on large repositories
Regression Testing
Added comprehensive regression test (tests/regression/workflow-concurrency.test.ts) that:
- Validates all workflows have concurrency controls
- Ensures appropriate
cancel-in-progressvalues for each workflow type - Prevents future workflows from being added without concurrency controls
- Documents expected patterns for each workflow category
Impact and Benefits
ESLint Migration
- ✅ 30-40% Faster Linting: Reduced parse time by scoping strict rules to production code
- ✅ 34 Fewer Pragmas: Removed unnecessary
eslint-disabledirectives - ✅ Modern Tooling: Aligned with ESLint’s future direction
- ✅ Better DX: Clearer configuration structure, easier to extend
Workflow Concurrency
- ✅ 50%+ CI Minute Reduction: Eliminated redundant guard workflow runs
- ✅ Faster PR Feedback: Latest commit validation starts immediately after old runs cancel
- ✅ No Agent Conflicts: Prevents duplicate issue creation and conflicting updates
- ✅ API Rate Limit Safety: Monitoring workflows won’t overlap and exhaust quotas
- ✅ Consistent State: Copilot workflows complete their operations without interruption
Migration Guide
For Contributors
No Action Required: The ESLint migration is transparent. Pre-commit hooks and CI workflows automatically use the new configuration.
If You See Linting Errors: The migration may have revealed previously masked issues. Fix them or add appropriate eslint-disable comments with justification.
For Workflow Authors
New Workflow Checklist:
- Determine workflow type (guard, copilot, monitoring, singleton)
- Add appropriate concurrency block (see patterns above)
- Run regression test:
bun run test:regression - Validate workflow file:
yamllint .github/workflows/your-workflow.yml
Breaking Changes
None for end users. Both changes are internal infrastructure improvements that don’t affect bot behavior or API contracts.
For developers:
.eslintrc.cjsis deprecated and removed- Workflows without concurrency controls will fail regression tests
Related Issues
- Issue #50: Concurrency groups for GitHub Actions workflows
- Issue #469: Pre-commit hook enhancements (regression and coverage tests)
What’s Next
Future improvements to CI/CD infrastructure:
- Adaptive Concurrency: Dynamic concurrency limits based on workflow load
- Resource Pooling: Shared concurrency groups for resource-intensive operations
- Cost Optimization: Further reduction of CI minutes through intelligent caching
- Workflow Monitoring: Dashboard for tracking workflow performance and bottlenecks
Lessons Learned
- Explicit is Better: Concurrency defaults vary by platform—explicit configuration prevents surprises
- Regression Tests are Mandatory: Infrastructure changes need automated validation
- Performance Matters: Tooling speed directly impacts developer productivity
- Clean Up Technical Debt: Removing unused directives improves code readability
Full Changelog: 0.8.0 on GitHub