Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,5 @@
- [ ] Change is minimal and task-focused
- [ ] No unrelated refactors included
- [ ] No secrets or private tokens added
- [ ] Labels applied match risk level (`risk:low`, `risk:medium`, or `risk:high`)
- [ ] `agent:ready` label NOT applied until task packet is complete and authorized
2 changes: 1 addition & 1 deletion .github/agents/release-assistant.agent.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
name: release-assistant
description: Prepare release notes, artifact checks, and rollback-ready release packets.
tools: ['read', 'search', 'edit']
tools: ["read", "search", "edit"]
---

You are the Release Steward.
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/agent-label-sync.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ on:
push:
paths:
- '.github/workflows/agent-label-sync.yml'
- '.github/ISSUE_TEMPLATE/agent_task.yml'

permissions:
contents: read
Expand Down
34 changes: 28 additions & 6 deletions .github/workflows/agent-task-queue.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,28 @@ jobs:
c.body?.includes(`- #${issue_number}:`)
);

if (existingContract && hadInProgress) {
core.info("Idempotency guard: contract already posted and agent:in-progress already set; skipping duplicate enqueue.");
if (hadReady) {
try {
await github.rest.issues.removeLabel({
owner,
repo,
issue_number,
name: "agent:ready",
});
} catch (removeError) {
if (removeError.status === 404) {
core.info("agent:ready was already removed.");
} else {
core.error(`Idempotency cleanup failed to remove agent:ready: ${removeError.message}`);
throw removeError;
}
}
}
return;
Comment on lines +49 to +68

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Keep removing agent:ready on already-queued issues

This new early return skips all label cleanup when an issue already has both an execution contract and agent:in-progress, so if someone re-applies agent:ready later (or a duplicate label event arrives with that label present), the workflow now leaves agent:ready attached indefinitely instead of clearing it as before. That breaks the queue state invariant (ready vs in-progress) and can cause issues to appear queueable again even though work is already in progress.

Useful? React with 👍 / 👎.

}

let addedInProgress = false;
let removedReady = false;

Expand All @@ -69,11 +91,11 @@ jobs:
name: "agent:ready",
});
removedReady = true;
} catch (error) {
if (error.status === 404) {
} catch (removeError) {
if (removeError.status === 404) {
core.info("agent:ready was already removed.");
} else {
throw error;
throw removeError;
}
}
}
Expand Down Expand Up @@ -104,7 +126,7 @@ jobs:
body: lines.join("\n"),
});
} catch (error) {
core.warning(`Queue transition failed: ${error.message}`);
core.error(`Queue transition failed: ${error.message}`);

if (addedInProgress && !hadInProgress) {
try {
Expand All @@ -115,7 +137,7 @@ jobs:
name: "agent:in-progress",
});
} catch (rollbackError) {
core.warning(`Rollback remove agent:in-progress failed: ${rollbackError.message}`);
core.error(`Rollback remove agent:in-progress failed: ${rollbackError.message}`);
}
}

Expand All @@ -128,7 +150,7 @@ jobs:
labels: ["agent:ready"],
});
} catch (rollbackError) {
core.warning(`Rollback add agent:ready failed: ${rollbackError.message}`);
core.error(`Rollback add agent:ready failed: ${rollbackError.message}`);
}
}

Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,4 @@ build/

# IDE
.idea/
.coverage
4 changes: 3 additions & 1 deletion AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,6 @@ bash scripts/verify

## Queue Trigger Warning

Applying label `agent:ready` triggers the queue workflow immediately.
> **⚠ WARNING:** Applying label `agent:ready` triggers the queue workflow **immediately and irreversibly**.
> The workflow will transition the issue to `agent:in-progress` and post an execution contract comment.
> Only apply this label when the task packet is complete and implementation is authorized.
Binary file modified backend/.coverage
Binary file not shown.