-
-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(autofix): Tie code changes to the step #1687
base: main
Are you sure you want to change the base?
Conversation
b19fba2
to
ad4ab89
Compare
@@ -204,6 +200,45 @@ def ask_user_question(self, question: str): | |||
|
|||
cur.status = AutofixStatus.WAITING_FOR_USER_RESPONSE | |||
|
|||
def add_user_message(self, message: str, memory_index: int): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tacked this change on for cleanliness
@@ -38,18 +38,6 @@ | |||
RepoIdentifiers = tuple[RepoExternalId, RepoInternalId] | |||
|
|||
|
|||
class AutofixCodebaseStateManager(CodebaseStateManager): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
unused
self.event_manager = event_manager | ||
self.state = state | ||
|
||
# TODO: Remove this when we no longer need the backwards compatibility. | ||
self.event_manager.migrate_step_keys() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no longer need
with state.update() as cur: | ||
for repo in request.repos: | ||
if repo.external_id not in cur.codebases: | ||
cur.codebases[repo.external_id] = CodebaseState( | ||
file_changes=[], | ||
repo_external_id=repo.external_id, | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is no longer needed as the new codebase states are initialized inside event_manager.send_coding_start
4b72e9a
to
a8ca349
Compare
Instead of storing the
file_changes
in the root of the state, it stores it inside thechanges
step. Doing so now entirely contains the plan+code workflow inside thechanges
step. This includes moving the insights from the default step to thechanges
step. This now makes us entirely consolidate things related to a workflow to a single step. Will follow up with moving root cause into a single step as well, and entirely remove the notion of having a "default" step for insights and another step for the result.Method of migration
So we'll be migrating all existing Autofix runs to this new model, we have a migration that migrates all run states over by copying over the file changes and codebase state to this new more organized format. However, we won't be deleting the existing fields to allow for current frontends to still render fine and also allow for ease of rolling back in case something goes wrong.