Skip to content

Add example config and test harness - #125

Open
sbugalski wants to merge 3 commits into
ldayton:mainfrom
sbugalski:examples/config-and-test-harness
Open

Add example config and test harness#125
sbugalski wants to merge 3 commits into
ldayton:mainfrom
sbugalski:examples/config-and-test-harness

Conversation

@sbugalski

@sbugalski sbugalski commented Mar 24, 2026

Copy link
Copy Markdown

Closes #124

Summary

  • examples/config — Annotated starter config with rules for Git, Docker, npm, MCP tools, shell redirects, and home directory protection. Includes warnings about the last-match-wins ordering footgun.
  • examples/test-config.sh — 45-test harness across 6 categories (MCP tools, redirects, system paths, home dir, commands, pipelines). Auto-detects dippy/dippy.exe, CI-friendly exit code.

Usage

cp examples/config ~/.dippy/config
bash examples/test-config.sh

Test plan

  • Copy examples/config to ~/.dippy/config
  • Run bash examples/test-config.sh — all 45 tests should pass
  • Verify test harness works on Linux/macOS (dippy) and Windows (dippy.exe)

sbugalski and others added 3 commits March 24, 2026 11:35
Adds two files to help new users get started with Dippy configuration:

- examples/config: Annotated example with rules for Git, Docker, npm,
  MCP tools, shell redirects, and home directory protection. Includes
  prominent warnings about the last-match-wins ordering footgun.

- examples/test-config.sh: 45-test harness covering MCP tools, shell
  redirects, system paths, home directory protection, commands, and
  compound pipelines. Auto-detects dippy/dippy.exe, CI-friendly exit.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add `cd Dippy && uv pip install -e .` to manual installation
- Add Getting Started section describing examples/config and
  examples/test-config.sh

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Based on Dippy's own .dippy project config:
- Add rm -rf __pycache__, uv run pytest, uv run python -c, deny uv run ruff
- Add Just section (allow check/fmt/lint/test, deny -C)
- Add 9 new tests (54 total across 7 categories)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@ldayton

ldayton commented Jun 8, 2026

Copy link
Copy Markdown
Owner

Thanks for this — and the inline comments are exactly what make an example config readable, so I don't want to lose them. The catch is they don't currently work, and that's our bug, not yours: Dippy doesn't strip mid-line # comments from rule lines, so allow uv run pytest # test runner keeps the comment in the pattern and never matches uv run pytest. I checked and it's every directive type (commands, redirects, mcp, alias, even set), and it fails silently. Configuration.md documents allow git status # Inline comment as supported, so you followed the docs and Dippy let you down. I've written it up as #153.

So this PR is blocked on #153 rather than on anything you need to change — once the parser honors inline comments, your config works as written. Two smaller things to flag for when it's unblocked:

  • Ordering: allow rm -rf /**/__pycache__ near the top gets overridden by ask rm -rf lower down (last-match-wins), so that one asks rather than allows. Your own header warns about exactly this footgun — just needs reordering.
  • The test harness: it would've caught the dead rules, which is a good argument for running the example's expectations in CI (a small pytest that loads examples/config and asserts a few decisions) rather than a standalone script that has to be run by hand.

Genuinely useful PR — it turned up a real bug on our end. Holding it until #153 lands.

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.

Add example config and test harness

2 participants