agent-exec transport 1b906777fd42e2a559bb9a8c7fa10e93/696f1cfe2efd

This commit is contained in:
agent-exec-transport
2026-10-17 08:55:54 +00:00
parent 110337ee2e
commit b57c1a0e0d
2 changed files with 17 additions and 7 deletions
+16 -6
View File
@@ -13,12 +13,17 @@ jobs:
TOKEN: ${{ secrets.GITHUB_TOKEN }} TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: | run: |
set -euo pipefail 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 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" url="${GITHUB_SERVER_URL%/}/${GITHUB_REPOSITORY}.git"
git init -q . 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_CONFIG_COUNT=3 \
git checkout -q --detach FETCH_HEAD 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 unset TOKEN
- run: go vet ./... && go test -count=1 ./... - run: go vet ./... && go test -count=1 ./...
docker-checkout-hostgateway: docker-checkout-hostgateway:
@@ -32,11 +37,16 @@ jobs:
TOKEN: ${{ secrets.GITHUB_TOKEN }} TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: | run: |
set -euo pipefail 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 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" url="${GITHUB_SERVER_URL%/}/${GITHUB_REPOSITORY}.git"
git init -q . 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_CONFIG_COUNT=3 \
git checkout -q --detach FETCH_HEAD 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 unset TOKEN
- run: test -f go.mod && echo "docker-mode checkout via host-gateway OK" - run: test -f go.mod && echo "docker-mode checkout via host-gateway OK"
+1 -1
View File
@@ -41,4 +41,4 @@
- 子模块固定:`deps/development-guidelines` @ `2688fd2be6a52c0bf110e7e6366b6f291ab5e4eb`;`deps/development-manager` @ `bd3a7de57a3a9e1a4495b94c5fa5c08d71e7be8c`。 - 子模块固定:`deps/development-guidelines` @ `2688fd2be6a52c0bf110e7e6366b6f291ab5e4eb`;`deps/development-manager` @ `bd3a7de57a3a9e1a4495b94c5fa5c08d71e7be8c`。
- `examples/trace` 仍使用自己的 `go.mod` replace,不改为依赖 `deps/` 下的错误码副本。 - `examples/trace` 仍使用自己的 `go.mod` replace,不改为依赖 `deps/` 下的错误码副本。
- 入口与门禁:`AGENTS.md`「Agent 执行与新项目准入(强制)」、`AGENT-EXECUTION.md`(候选 `cursor-agent-stable`)、`.gitea/workflows/governance.yml`;正负例与结果记录在 `.task/feature-governance-adoption.md`。 - 入口与门禁:`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`。