Repository navigation
ci: simplify SAI activation and use job-scoped API credentials - #12
Merged
userchba merged 3 commits intoNov 18, 2026
Merged
Conversation
userchba
added a commit
that referenced
this pull request
Nov 21, 2026
ci: simplify SAI activation and use job-scoped API credentials
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
SAI validation currently skips pushes unless branch protection is enabled, and its publisher needs a separately provisioned token to read repository variables. Trust pushes to the upstream
mainanddevelopbranches using the repository's existing write permissions, and let each job supply its automatically issued read-onlyGITHUB_TOKENto the site publisher. PR and manual runs still require a trusted Environment approval; exact SHA and run-attempt checks remain in place.The runner writes the short-lived token to a private request mailbox, separate from published artifacts, and removes it during cleanup. The publisher uses it only to query GitHub and rejects links and special files. No personal PAT or Variables API permission is needed. Site administrators must mount the mailbox and set
SAI_REQUESTSas documented.Owner setup: configure
sai-libddlareviewers withmain,develop, andrefs/pull/*/mergeallowed; configuresai-libddla-pushfor the two upstream branches without per-push approval; setSAI_CI_ENABLED=trueafter site acceptance. Branch protection remains optional. Keep the check informational while deployment acceptance and the known CUDA failures remain outstanding.Validation: actionlint, four admission/cancellation/mailbox tests, and whitespace checks passed. Site acceptance submitted and cancelled a real Slurm job and collected its failure evidence. The runner is online; the first enabled GitHub GPU run remains to be verified.
目前 SAI 验证把分支保护作为推送测试的硬条件,站点服务还需要额外凭据读取仓库变量。本改动直接信任已有写权限者对上游
main、develop的推送,并让任务把 GitHub 自动签发的只读、短期GITHUB_TOKEN交给站点核对运行信息。PR 和手动运行仍需可信维护者审批;完整 SHA、当前 PR 提交和运行编号的检查保留。短期 token 放在独立的私有请求目录中,不上传为测试产物,结束时清理;站点拒绝符号链接和特殊文件。无需另配个人 PAT 或 Variables API 权限。SAI 管理员需挂载请求目录并设置
SAI_REQUESTS,具体见部署说明。Owner 需要:给
sai-libddla配维护者审批并允许main、develop、refs/pull/*/merge;给sai-libddla-push配两个上游分支且不要求逐次审批;站点验收后设置SAI_CI_ENABLED=true。分支保护由仓库自行决定。部署与已知 CUDA 失败项验收前,继续保持为非必过检查。验证:actionlint、四项授权/取消/请求目录测试及空白检查通过。站点验收已实际提交、取消 Slurm 作业并回收失败证据;runner 已上线,首次启用后的 GitHub GPU 测试仍待验收。