From b57c1a0e0d6857432bca2bfeef63b38b5fe136b6 Mon Sep 17 00:00:00 2001 From: agent-exec-transport Date: Sat, 17 Oct 2026 08:55:54 +0000 Subject: [PATCH] agent-exec transport 1b906777fd42e2a559bb9a8c7fa10e93/696f1cfe2efd --- .gitea/workflows/ci.yml | 22 ++++++++++++++++------ policy/guidelines-adoption.md | 2 +- 2 files changed, 17 insertions(+), 7 deletions(-) diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index 6ebd9c9..3ba55bb 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -13,12 +13,17 @@ jobs: TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | set -euo pipefail - # 自包含检出(runner 无法访问 github.com 上的 actions/checkout):固定 SHA 浅取回,凭据只以 URL 限定的 extraheader 存在于单个 git 进程。 + # 自包含检出(runner 无法访问 github.com 上的 actions/checkout):固定 SHA 浅取回;凭据只经 GIT_CONFIG_* 环境变量以 URL 限定的 extraheader 传给单个 git 进程(不进命令行、不持久化);强制检出并清理遗留文件,等价 actions/checkout 的 clean。 case "$GITHUB_SHA" in *[!0-9a-fA-F]*|"") echo "Checkout requires a fixed commit SHA" >&2; exit 1;; esac url="${GITHUB_SERVER_URL%/}/${GITHUB_REPOSITORY}.git" git init -q . - git -c "http.${url}.extraheader=AUTHORIZATION: token ${TOKEN}" -c credential.helper= -c core.hooksPath=/dev/null fetch -q --depth=1 "$url" "$GITHUB_SHA" - git checkout -q --detach FETCH_HEAD + GIT_CONFIG_COUNT=3 \ + GIT_CONFIG_KEY_0="http.${url}.extraheader" GIT_CONFIG_VALUE_0="AUTHORIZATION: token ${TOKEN}" \ + GIT_CONFIG_KEY_1=credential.helper GIT_CONFIG_VALUE_1= \ + GIT_CONFIG_KEY_2=core.hooksPath GIT_CONFIG_VALUE_2=/dev/null \ + git fetch -q --depth=1 "$url" "$GITHUB_SHA" + git checkout -q -f --detach FETCH_HEAD + git clean -ffdxq unset TOKEN - run: go vet ./... && go test -count=1 ./... docker-checkout-hostgateway: @@ -32,11 +37,16 @@ jobs: TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | set -euo pipefail - # 自包含检出(runner 无法访问 github.com 上的 actions/checkout):固定 SHA 浅取回,凭据只以 URL 限定的 extraheader 存在于单个 git 进程。 + # 自包含检出(runner 无法访问 github.com 上的 actions/checkout):固定 SHA 浅取回;凭据只经 GIT_CONFIG_* 环境变量以 URL 限定的 extraheader 传给单个 git 进程(不进命令行、不持久化);强制检出并清理遗留文件,等价 actions/checkout 的 clean。 case "$GITHUB_SHA" in *[!0-9a-fA-F]*|"") echo "Checkout requires a fixed commit SHA" >&2; exit 1;; esac url="${GITHUB_SERVER_URL%/}/${GITHUB_REPOSITORY}.git" git init -q . - git -c "http.${url}.extraheader=AUTHORIZATION: token ${TOKEN}" -c credential.helper= -c core.hooksPath=/dev/null fetch -q --depth=1 "$url" "$GITHUB_SHA" - git checkout -q --detach FETCH_HEAD + GIT_CONFIG_COUNT=3 \ + GIT_CONFIG_KEY_0="http.${url}.extraheader" GIT_CONFIG_VALUE_0="AUTHORIZATION: token ${TOKEN}" \ + GIT_CONFIG_KEY_1=credential.helper GIT_CONFIG_VALUE_1= \ + GIT_CONFIG_KEY_2=core.hooksPath GIT_CONFIG_VALUE_2=/dev/null \ + git fetch -q --depth=1 "$url" "$GITHUB_SHA" + git checkout -q -f --detach FETCH_HEAD + git clean -ffdxq unset TOKEN - run: test -f go.mod && echo "docker-mode checkout via host-gateway OK" diff --git a/policy/guidelines-adoption.md b/policy/guidelines-adoption.md index 40c6487..28f063a 100644 --- a/policy/guidelines-adoption.md +++ b/policy/guidelines-adoption.md @@ -41,4 +41,4 @@ - 子模块固定:`deps/development-guidelines` @ `2688fd2be6a52c0bf110e7e6366b6f291ab5e4eb`;`deps/development-manager` @ `bd3a7de57a3a9e1a4495b94c5fa5c08d71e7be8c`。 - `examples/trace` 仍使用自己的 `go.mod` replace,不改为依赖 `deps/` 下的错误码副本。 - 入口与门禁:`AGENTS.md`「Agent 执行与新项目准入(强制)」、`AGENT-EXECUTION.md`(候选 `cursor-agent-stable`)、`.gitea/workflows/governance.yml`;正负例与结果记录在 `.task/feature-governance-adoption.md`。 -- 回退:通过普通 PR 恢复上一 gitlink(`26b562d2e34f`)、`.gitmodules`,并移除治理入口(`scripts/`、`.task/templates/task-card.md`、`.gitea/workflows/governance.yml`)。`AGENT-EXECUTION.md` 作为项目执行配置保留,回退时由 PR 另行处理。 +- 回退:通过普通 PR 恢复 `deps/development-guidelines` 上一 gitlink(`26b562d2e34f`)及其 `.gitmodules` 条目,移除 `deps/development-manager` gitlink 及其 `.gitmodules` 条目,并移除治理入口(`scripts/dm`、`scripts/agent-exec`、`scripts/task`、`scripts/hooks/pre-commit`、`.gitea/workflows/governance.yml`、`.task/templates/task-card.md`、`AGENT-EXECUTION.md`),还原 AGENTS.md / PROJECT.md 中追加的治理章节,并将 `.gitea/workflows/ci.yml` 两个 job 的检出步骤恢复为 `uses: actions/checkout@v4`。