From 356c4810cae800abbd9b07bc80e6c623c463ebf6 Mon Sep 17 00:00:00 2001 From: MrSphay Date: Sun, 3 May 2026 02:16:02 +0200 Subject: [PATCH] Require polling Gitea workflows to completion --- README.md | 2 +- agent-quickstart.md | 2 +- existing-project.md | 4 ++-- files/AGENTS.md | 2 +- new-repository.md | 4 ++-- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 767a4a3..a612020 100644 --- a/README.md +++ b/README.md @@ -93,7 +93,7 @@ Authorization: token GITEA_TOKEN ## Gitea Workflow Loop -After pushing commits that add or change a Gitea workflow, Codex agents must check the resulting workflow run before finishing. If the run is still pending or in progress, report that status and keep checking when the user expects the agent loop to continue. If the run fails, inspect the failing job/logs, fix the issue when it is in scope, commit, push, and check the next run. +After pushing commits that trigger a Gitea workflow, Codex agents must keep checking the resulting workflow run before finishing. Poll the run until it reaches a terminal state. If it succeeds, report the successful run. If it fails or is cancelled, inspect the failing job/logs, fix the issue when it is in scope, commit, push, and repeat the check loop for the next run. Do not stop after a single in-progress status when the user asked the agent to continue the loop. ## Agent Prompt For A New Repo diff --git a/agent-quickstart.md b/agent-quickstart.md index 9c4de35..b490d25 100644 --- a/agent-quickstart.md +++ b/agent-quickstart.md @@ -55,7 +55,7 @@ Is this a private Gitea repo with Actions? no -> use public web/API checks when available Did you push a commit that should trigger a workflow? - yes -> check the workflow run; if it fails, inspect logs, fix in scope, push again, and re-check + yes -> poll the workflow run until success; if it fails, inspect logs, fix in scope, push again, and repeat the loop no -> finish with local verification status ``` diff --git a/existing-project.md b/existing-project.md index 3116645..5fb8091 100644 --- a/existing-project.md +++ b/existing-project.md @@ -145,8 +145,8 @@ Before final response: - run `git diff --check`, - run the smallest reliable verification command, -- if using Gitea Actions, check the pushed workflow run; for private `git.wilkensxl.de` repositories, use a locally set `GITEA_TOKEN` for read-only API status checks when available, -- if the pushed workflow fails, inspect the failing job/logs, fix in scope, push again, and re-check the next run, +- if using Gitea Actions, poll the pushed workflow run until it reaches a terminal state; for private `git.wilkensxl.de` repositories, use a locally set `GITEA_TOKEN` for read-only API status checks when available, +- if the pushed workflow fails or is cancelled, inspect the failing job/logs, fix in scope, push again, and repeat the workflow check loop, - list files changed, - mention any skipped checks, - do not create a release unless explicitly requested. diff --git a/files/AGENTS.md b/files/AGENTS.md index 55dca53..25a80e0 100644 --- a/files/AGENTS.md +++ b/files/AGENTS.md @@ -12,7 +12,7 @@ PROJECT_NAME: PROJECT_DESCRIPTION - Do not rewrite history or run destructive git commands unless explicitly requested. - Do not create a release unless explicitly requested. - If `GITEA_TOKEN` is available locally, use it only for read-only Gitea API checks such as private repository metadata, package-read visibility, and Actions run status. Never print, commit, or store the token. -- After pushing commits that trigger a Gitea workflow, check the workflow run before finishing. If it fails, inspect the failing job/logs, fix the issue when in scope, push again, and continue the check loop. +- After pushing commits that trigger a Gitea workflow, poll the workflow run until it succeeds or fails. If it fails or is cancelled, inspect the failing job/logs, fix the issue when in scope, push again, and repeat the workflow check loop. ## Commands diff --git a/new-repository.md b/new-repository.md index 9430ba7..6d4abf6 100644 --- a/new-repository.md +++ b/new-repository.md @@ -154,8 +154,8 @@ Before final response: - run formatting or validation if available, - run the cheapest reliable verification command, - check `git diff --check`, -- if using Gitea Actions, check the pushed workflow run; for private `git.wilkensxl.de` repositories, use a locally set `GITEA_TOKEN` for read-only API status checks when available, -- if the pushed workflow fails, inspect the failing job/logs, fix in scope, push again, and re-check the next run, +- if using Gitea Actions, poll the pushed workflow run until it reaches a terminal state; for private `git.wilkensxl.de` repositories, use a locally set `GITEA_TOKEN` for read-only API status checks when available, +- if the pushed workflow fails or is cancelled, inspect the failing job/logs, fix in scope, push again, and repeat the workflow check loop, - summarize changed files, - do not create a release unless explicitly requested.