Repository navigation
Exclude contract state from SDLC PRs - #302
Closed
james-in-a-box[bot] wants to merge 1 commit into
Closed
james-in-a-box[bot] wants to merge 1 commit into
james-in-a-box[bot] wants to merge 1 commit into
Conversation
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.
Remove .egg-state/ contract files from PR branches before PR creation
What happened (PR #300)
PR #300 was opened for issue #262 containing only the SDLC contract
state file (
.egg-state/contracts/262.json) with no implementationcode. Here's the full chain of events:
egg/issue-262branch, committing thecontract file to track pipeline state across workflow runs
contract updates to the branch via
sdlc-hitl.yml("exit code: unknown") before writing any implementation code
contract commits — no implementation code at all
Root cause: The
.egg-state/contracts/*.jsonfile is committed toissue branches as the pipeline's state persistence mechanism. Since
this file doesn't exist on
main, it appears in every PR diff. Therewas no step to clean it up before PR creation, and no guard to prevent
PR creation when there's no implementation code.
Changes
sdlc-pipeline.yml— Added aRemove contract state from branchstep in the
create-prjob that runsgit rm -r .egg-state/beforethe agent creates the PR. This ensures contract state never appears
in the PR diff.
build-sdlc-prompt.sh— Two changes:the branch contains actual implementation code (not just contract
state) before creating the PR. If
.egg-state/wasn't alreadycleaned up by the workflow step, the agent is instructed to remove
it. If there's no implementation code, the agent should report the
problem instead of creating an empty PR.
restriction with an explanation of why — PRs are created in a
separate phase after implementation is verified complete, and
creating one prematurely results in incomplete PRs with only
contract state.
Issue: #262
Test plan:
create-prjob removes.egg-state/before the agent runsAuthored-by: egg