Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

test-evidence-storage

БесплатноБез исполняемых скриптовНе проверен

Use when changing test evidence collection, publication, paths, retention, or scratch-directory cleanup.

kunchenguidот 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. With test.evidence.store_in_repo and a derivable GitHub link base, the PR step calls publishRunEvidence (internal/pipeline/steps/evidence_publish.go), which copies the directory onto the push-target repo's orphan evidence branch through internal/evidence and hands the PR body its links. A provider without derivable links does not push the branch. Independently, test.evidence.attach_media (independent of store_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, attachRunEvidenceMedia in evidence_attach.go), and on GitLab the same flag gates project image uploads (evidence_gitlab.go; provider defaults are owned by docs/src/content/docs/reference/global-config.md, test.evidence). GitHub uploads fail closed: upload errors keep today's rendering. One render shares one github.UserAssetSession, which runs gh auth token at most once; a failed resolution is ErrUserAssetTokenUnavailable and 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/evidence owns the orphan-branch mechanism and its fail-closed rules: plumbing only (scratch GIT_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-evidence marker at its tip is refused, which is what makes a wrong branch name (main) harmless. Valid UTF-8 text without NUL bytes passes through safepath.RedactWorktrees (the run worktree from Request.RunWorktree, then any run worktree under Request.WorktreesRoot) and then safepath.RedactText before hash-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.branch is trusted-only in EffectiveRepoConfig (it names a ref the daemon pushes to); local_root/retention/max_runs/link_base_url are global-only (applyEvidenceStorageOverrides is called from Merge with GlobalConfig alone); the rest of test.evidence (store_in_repo, attach_media, dir) stays pushed-readable. Invalid branch names, relative local_root, unparseable retention, negative max_runs, and a link_base_url that 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 in parseRepoConfig: round provenance records yaml.Marshal of the effective RepoConfig and eval capture reads it back through LoadRepoFromBytes, so a by-name refusal of link_base_url broke 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 in docs/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.ResolveEvidenceRoot and RunManager.pinRunEvidenceDir (including configured and recorded worktree overlap checks). The resolved <root>/<run-id> is pinned on runs.evidence_dir once (SetRunEvidenceDir ignores later writes); a null pin keeps legacy local_root resolution. User-facing precedence and fallback rules live in docs/src/content/docs/reference/global-config.md (evidence_dir). G
Полный SKILL.md на GitHub

Установить 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), без исполняемых скриптов.

Похожие скиллы

Сравнить test-evidence-storage с