feat(#831): pre-validate shim content before creating PRs - #859
Open
fullsend-ai-coder[bot] wants to merge 1 commit into
Open
feat(#831): pre-validate shim content before creating PRs#859fullsend-ai-coder[bot] wants to merge 1 commit into
fullsend-ai-coder[bot] wants to merge 1 commit into
Conversation
Add validate_shim_content() to reconcile-repos.sh that checks rendered shim templates against the TestShimLabeledEventFiltering alignment test contract before creating PRs. The function verifies three required patterns: the labeled-event if: guard, the ready- prefix filter, and the label-aware concurrency group structure. Validation runs in two places: 1. Pre-loop: validates the base template once before processing any repos, failing fast with non-zero exit on broken templates. 2. Stale-shim path: validates header-merged content per-repo to catch regressions introduced by user header injection. This prevents the reconciliation bot from opening PRs that would fail CI, as happened in PR fullsend-ai#5772 where the template lacked the ready- prefix guard and label-aware concurrency group. Test coverage includes four new cases: broken template (missing ready- prefix), broken template (missing concurrency group), valid template passes and proceeds, and stale shim path validates header-merged content correctly. Note: pre-commit could not run in the sandbox due to network restrictions (git fetch blocked). The post-script runs an authoritative pre-commit check. Closes #831
|
🤖 Finished Review · ✅ Success · Started 9:43 AM UTC · Completed 9:55 AM UTC |
|
Looks good to me |
Owner
|
/fs-fix |
Author
|
🤖 Finished Fix · ✅ Success · Started 10:31 AM UTC · Completed 10:36 AM UTC |
Author
🔧 Fix agent — iteration 1 (human-triggered)No changes made. The PR was approved by the review bot with no findings, and the human /fs-fix trigger included no specific instruction. All tests pass and code is clean. Disagreed (1):
Tests: passedNext steps:
|
|
This pull request has been automatically marked as stale because it has not had any activity in the last month. It will be closed in 2 weeks if no further activity occurs. Remove the |
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
Add pre-validation of rendered shim content against the
TestShimLabeledEventFilteringalignment test contract inreconcile-repos.sh. This prevents the reconciliation bot from opening PRs that would fail CI — as happened in PR fullsend-ai#5772 where the config repo template lacked theready-prefix guard and label-aware concurrency group.Related Issue
Fixes #831
Changes
validate_shim_content()function toreconcile-repos.shthat decodes base64 shim content and checks for three required patterns: thegithub.event.action != 'labeled'guard, thestartsWith(github.event.label.name, 'ready-')prefix filter, and theformat('label-{0}'concurrency group structureTesting
bash internal/scaffold/fullsend-repo/scripts/reconcile-repos-test.sh)Checklist
!for breaking changes)Closes #831
Post-script verification
agent/831-shim-pre-validation)c887fc47c59d8b87b5282ca44044d2933d30df41..HEAD)