StackGuardian / StackGuardian/tirith

feat(cli): `tirith test` — a policy test harness (skeleton)

Open
#301 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
Python
Stars
165
Forks
42
Avg merge
1d 3h
Merged PRs (30d)
11

Description

There is no way to assert that a policy does what its author thinks; verifying the examples means
hand-running one invocation per fixture and reading exit codes. Add a fixture convention —
<policy>.fails.json, <policy>.passes.json, <policy>.skips.json next to the policy — and a
runner: tirith test examples/ prints one ✓/✗ per (policy, fixture) with expected vs actual exit.
Land the skeleton in R1 so the R1 fixes ship with fixtures; the full version (CI wiring, docs) is
the R2 issue "complete the policy test harness". Nothing else on the roadmap compounds like this:
without it, community rules cannot be reviewed.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the CLI entry point for the tirith test command and inspect how policies and examples are currently invoked. Implement the R1 skeleton around the <policy>.fails.json, <policy>.passes.json, and <policy>.skips.json fixtures in examples/, printing one result per policy and fixture with expected versus actual exit codes.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
cli, testing-qa
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.