Skip to content

fix(swarm): ignore local evidence in default gate#105

Merged
boshu2 merged 1 commit intomainfrom
codex/swarm-evidence-default
Apr 12, 2026
Merged

fix(swarm): ignore local evidence in default gate#105
boshu2 merged 1 commit intomainfrom
codex/swarm-evidence-default

Conversation

@boshu2
Copy link
Copy Markdown
Owner

@boshu2 boshu2 commented Apr 12, 2026

Summary

  • Make no-arg swarm evidence validation scan tracked evidence in git worktrees, avoiding failures from ignored local .agents/ artifacts.
  • Keep explicit file/directory validation strict for all supplied evidence.
  • Add BATS coverage for ignored local evidence, explicit invalid directory validation, and tracked evidence validation.

Bead

  • na-uuy.4.1

Validation

  • bash -n scripts/validate-swarm-evidence.sh
  • shellcheck --severity=error scripts/validate-swarm-evidence.sh
  • bats tests/scripts/validate-swarm-evidence.bats
  • root default-mode probe with local ignored evidence
  • explicit invalid directory probe
  • git diff --check
  • env -u AGENTOPS_RPI_RUNTIME scripts/pre-push-gate.sh --fast

@github-actions github-actions bot added the tests label Apr 12, 2026
@boshu2 boshu2 marked this pull request as ready for review April 12, 2026 05:51
@boshu2 boshu2 merged commit 19d6a50 into main Apr 12, 2026
31 checks passed
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 4a0c091cd9

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

if git rev-parse --is-inside-work-tree >/dev/null 2>&1; then
while IFS= read -r -d '' f; do
[[ "$f" == *.json ]] && EVIDENCE_FILES+=("$f")
done < <(git ls-files -z -- "$EVIDENCE_DIR" 2>/dev/null || true)
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Limit tracked scan to top-level evidence files

In no-arg mode, git ls-files -z -- "$EVIDENCE_DIR" walks the directory recursively, so this path now validates *.json files in nested subdirectories (for example archived results) that were previously excluded by the find ... -maxdepth 1 behavior and are still excluded in explicit directory mode. In repos that keep historical/auxiliary JSON under .agents/swarm/results/**, this can cause unexpected gate failures unrelated to current evidence; filter to top-level files to preserve the prior contract.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant