Feed rework evidence into task retries

This commit is contained in:
Daniel Maddern 2026-08-15 13:53:39 +07:00
parent ecd0bdfdff
commit b60f14215a
2 changed files with 8 additions and 3 deletions

View file

@ -62,9 +62,9 @@ class Command(BaseCommand):
milestone=milestone,
task_type="implementation",
status=TaskStatus.READY,
goal="Add a V2 self-bootstrap status management command that prints recent self-bootstrap artifacts and tests.",
acceptance_criteria=["management command exists", "tests pass", "accepted commit is recorded"],
max_retries=1,
goal="Add a V2 self-bootstrap status management command that prints recent self-bootstrap artifacts and tests. Tests must be deterministic and must not depend on database insertion order unless the command explicitly orders results.",
acceptance_criteria=["management command exists", "deterministic tests pass", "accepted commit is recorded"],
max_retries=2,
)
qwen_resource = Resource.objects.filter(provider="local_inference", is_active=True).first()
if qwen_resource is None:

View file

@ -67,6 +67,11 @@ class AutonomousTaskLoop:
status="RUNNING",
)
context = self.context_builder.build_for_task(task, Path(worktree.worktree_path))
context["previous_attempts"] = list(
task.attempts.exclude(id=attempt.id).order_by("attempt_number").values(
"attempt_number", "status", "coder_result", "review_findings", "judge_findings"
)
)
attempt.context_snapshot = self._scrub_context(context)
attempt.save(update_fields=["context_snapshot", "updated_at"])