Skip to content

chore: tighten agent environment and test suite - #65

Merged
locus313 merged 2 commits into
mainfrom
chore/retro-agent-environment
Oct 14, 2026
Merged

locus313 merged 2 commits into
mainfrom
chore/retro-agent-environment

Conversation

@locus313

Copy link
Copy Markdown
Owner

Description

Retro follow-ups that make the test suite faster and keep agent guidance lean and enforced. No script behavior changes.

Changes

  • New script
  • Modified: lib/github-common.sh
  • Other:
    • tests/test_script_validation.bats, tests/test_common.bats: stub sleep in setup(); suite drops from ~44 s to ~14 s.
    • New tests/test_repo_structure.bats: every domain script must be executable, have action.yml, validation tests, a README mention and an Available Actions row (github-organize-stars exempt from the last two).
    • New .github/hooks/block-file-writes-via-bash.{json,sh} with tests/test_hooks.bats: a preToolUse hook that denies heredoc/tee file writes via bash.
    • New docs/script-behaviors.md: per-script behaviors moved out of .github/copilot-instructions.md; AGENTS.md slimmed to pointers.
    • .github/copilot-instructions.md: "Adding New Scripts" now starts with mkdir -p; Maintenance Matrix updated.
    • Removed instruction files irrelevant to a bash repo: Docker, Makefile, OWASP, QA, DevOps principles, context-engineering.

How to test

bats tests/
find . -name "*.sh" -not -path "./.git/*" | xargs shellcheck --severity=warning --exclude=SC2034,SC1091 --shell=bash

Result: all bats tests pass (0 failures); shellcheck clean.

Checklist

  • shellcheck passes
  • README/docs updated where structure changed
  • Script-specific items: N/A (no script changes)

Patrick Lewis and others added 2 commits October 14, 2026 13:29
- stub sleep in bats tests (suite ~44s -> ~14s)
- add tests/test_repo_structure.bats enforcing the new-script checklist
- add preToolUse hook blocking heredoc file writes (with bats tests)
- move per-script behaviors to docs/script-behaviors.md; slim AGENTS.md
- prune instruction files irrelevant to a bash-only repo
- document mkdir-before-create step for new scripts

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@locus313
locus313 merged commit 01891ec into main Oct 14, 2026
2 checks passed
@locus313
locus313 deleted the chore/retro-agent-environment branch October 14, 2026 20:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant