fix(ci): close verification gaps in code-simplifier agentic workflow#225
Merged
YousefHadder merged 5 commits intomainfrom Mar 7, 2026
Merged
fix(ci): close verification gaps in code-simplifier agentic workflow#225YousefHadder merged 5 commits intomainfrom
YousefHadder merged 5 commits intomainfrom
Conversation
Address 6 issues found in PR #223 generated by the code-simplifier: 1. Add ci-bot.yml to run CI on bot-created PRs (workflow_run trigger) - GitHub blocks pull_request triggers for PRs from github-actions[bot] - Runs stylua, luacheck, and plenary tests on the PR branch - Reports combined status back to the PR commit 2. Add tool installation instructions to code-simplifier prompt (Phase 3.0) - Neovim, plenary.nvim, luacheck, stylua install commands - Blocks PR creation if any tool fails to install 3. Add type annotation verification step (Phase 2.3, step 4) - Requires reading type definition files before writing annotations - Prevents inferring types from runtime behavior alone 4. Add post-refactor standards audit (Phase 3.4) - Checks nesting depth, function length, file size, immutability - Reverts changes that violate project coding standards 5. Add human reviewer alongside copilot - Changed reviewers from [copilot] to [copilot, YousefHadder] 6. Add minimum impact threshold (Principle 5) - Skips low-value changes like local variable renames in small scopes - Requires measurable improvement: DRY, complexity, or standard fix Also adds network.allowed (github + lua ecosystems) for tool downloads.
Contributor
There was a problem hiding this comment.
Pull request overview
Closes validation gaps in the agentic Code Simplifier workflow by tightening workflow configuration, improving agent validation instructions, and adding CI coverage for bot-created PRs (where pull_request triggers don’t run).
Changes:
- Extend the
code-simplifieragent prompt with tooling install steps, type-annotation verification, standards audit checks, and a minimum-impact threshold. - Update
code-simplifierworkflow configuration (network allowlist + reviewers) and regenerate the compiled lockfile. - Add
ci-bot.ymlto run Stylua, Luacheck, and tests for PRs created by agentic workflows viaworkflow_run.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| .github/workflows/code-simplifier.md | Updates agentic workflow frontmatter and strengthens the agent prompt’s validation/quality gates. |
| .github/workflows/code-simplifier.lock.yml | Regenerated compiled workflow reflecting the updated prompt + allowlist + reviewers. |
| .github/workflows/ci-bot.yml | New workflow to run CI on bot PRs using workflow_run and report a consolidated commit status. |
- Fix plenary install: set PLENARY_DIR default before testing directory existence to make the check idempotent - Fix stylua install: use $HOME/.local/bin and .tar.gz instead of /usr/local/bin and .zip to avoid sudo and unzip dependencies - Fix ci-bot PR detection: correlate PR to triggering workflow via title prefix map instead of a blind 2-hour window scan - Recompile agentic workflows (gh-aw v0.53.6 → v0.54.0)
- Remove checks:write and statuses:write from top-level permissions so test/lint jobs run with read-only access (report-status already has its own statuses:write block) - Expand stylua check to lua/ spec/ plugin/ to match make format-check
This was referenced Mar 7, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
PR #223 (generated by the code-simplifier agentic workflow) revealed 6 gaps in the automated workflow. This PR addresses all of them:
ci-bot.yml— new workflow that triggers CI (stylua, luacheck, plenary tests) on PRs created by agentic workflows. GitHub blockspull_requesttriggers for PRs fromgithub-actions[bot], so this usesworkflow_runto detect new bot PRs and run checks against their branch.boolean|nilfor astring|nilfield because it inferred the type from usage instead of readingtypes.lua. Now it must read type definition files before writing annotations.[copilot]to[copilot, YousefHadder].Test plan
make checkpasses (170/170 tests, luacheck clean, stylua clean)gh aw compilesucceeds with 0 errors, 0 warningsci-bot.ymltriggers on next code-simplifier runmake checkin next run🤖 Generated with Claude Code