test-evidence-storage
БесплатноБез исполняемых скриптовНе проверенUse when changing test evidence collection, publication, paths, retention, or scratch-directory cleanup.
от kunchenguid★ 9 314 звёзд на GitHubОб этом скилле
Test Evidence Stays Out of the Code Branch
- The test step always collects evidence OUTSIDE the worktree, in the directory the executor resolved once as
StepContext.EvidenceDir; nothing stages or commits it into the pushed branch, so evidence can never reach the default branch's history. Withtest.evidence.store_in_repoand a derivable GitHub link base, the PR step callspublishRunEvidence(internal/pipeline/steps/evidence_publish.go), which copies the directory onto the push-target repo's orphan evidence branch throughinternal/evidenceand hands the PR body its links. A provider without derivable links does not push the branch. Independently,test.evidence.attach_media(independent ofstore_in_repo) gates media uploads: on GitHub.com/GHEC it uploads image/video artifacts that pass gh's attach rules to GitHub user-attachments at PR render time (internal/scm/github/attachments.go,attachRunEvidenceMediainevidence_attach.go), and on GitLab the same flag gates project image uploads (evidence_gitlab.go; provider defaults are owned bydocs/src/content/docs/reference/global-config.md,test.evidence). GitHub uploads fail closed: upload errors keep today's rendering. One render shares onegithub.UserAssetSession, which runsgh auth tokenat most once; a failed resolution isErrUserAssetTokenUnavailableand the step logs one line and skips the remaining uploads instead of asking the credential vault again per file (issue #1544;TestUserAssetSessionResolvesTheTokenOnce,TestUserAssetSessionTokenFailureNeverAsksAgain,TestPRStep_TokenRefusalAsksOnceAndSkipsTheRemainingFiles). Text artifacts stay inlined. internal/evidenceowns the orphan-branch mechanism and its fail-closed rules: plumbing only (scratchGIT_INDEX_FILE+hash-object/write-tree/commit-tree), so HEAD, the index, and the worktree are untouched and a detached or shallow clone works; the parent is the just-fetched remote tip so the push is a plain fast-forward and never a force; an existing branch without the.no-mistakes-evidencemarker at its tip is refused, which is what makes a wrong branch name (main) harmless. Valid UTF-8 text without NUL bytes passes throughsafepath.RedactWorktrees(the run worktree fromRequest.RunWorktree, then any run worktree underRequest.WorktreesRoot) and thensafepath.RedactTextbeforehash-object(hashEvidenceFile; the order matters, since home redaction would stop the worktree roots matching); binary artifacts and the local files stay as written. Every failure returns an error and the PR body omits links that would not resolve; an uploaded media attachment may still render, otherwise the artifact falls back to its local-path reference.- PR links are pinned to the evidence COMMIT, not the branch, so a later run overwriting the same paths cannot change what an old PR shows. Link bases come from
Repo.UpstreamURL/ForkURL, never the push URL, which can carry a credential. test.evidence.branchis trusted-only inEffectiveRepoConfig(it names a ref the daemon pushes to);local_root/retention/max_runs/link_base_urlare global-only (applyEvidenceStorageOverridesis called fromMergewithGlobalConfigalone); the rest oftest.evidence(store_in_repo,attach_media,dir) stays pushed-readable. Invalid branch names, relativelocal_root, unparseableretention, negativemax_runs, and alink_base_urlthat is not a bare absolute http(s) URL all fail the config at parse time (validateTestRaw). A global-only key is IGNORED from a repository config, never refused by name inparseRepoConfig: round provenance recordsyaml.Marshalof the effectiveRepoConfigand eval capture reads it back throughLoadRepoFromBytes, so a by-name refusal oflink_base_urlbroke capture for every run (TestRepoConfigProvenanceRoundTripAcceptsEvidenceLinkBaseURL).- Evidence-link rendering is owned by
evidence_links.go(renderEvidenceFileLink): Testing local references and transcript sources (renderLocalArtifactReference), scenario Evidence cells (renderScenarioEvidenceReferences), and GitLab Evidence entries (gitlabEvidenceSection) all use it; new surfaces must too. The setting's scope, precedence, and URL layout are owned by Evidence links indocs/src/content/docs/reference/global-config.md. Regressions:TestPRStep_EvidenceLinkBaseURL_MR1016Fixture(a real MR's Testing section, unset and set),TestGitlabEvidenceLinkBaseListsImagesAsLinksWithoutUploading,TestEvidenceLinkBaseURLIsGlobalOnly. - Evidence placement is owned by
paths.ResolveEvidenceRootandRunManager.pinRunEvidenceDir(including configured and recorded worktree overlap checks). The resolved<root>/<run-id>is pinned onruns.evidence_dironce (SetRunEvidenceDirignores later writes); a null pin keeps legacylocal_rootresolution. User-facing precedence and fallback rules live indocs/src/content/docs/reference/global-config.md(evidence_dir). G
Установить test-evidence-storage в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл test-evidence-storage?
Use when changing test evidence collection, publication, paths, retention, or scratch-directory cleanup.
Как установить скилл test-evidence-storage?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл test-evidence-storage запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic