Skip to content

patch: Fix coverage gaps in template categories (step 1 of #42)#43

Merged
rdwj merged 1 commit into
mainfrom
fix/42-patch-coverage-step-1
May 7, 2026
Merged

patch: Fix coverage gaps in template categories (step 1 of #42)#43
rdwj merged 1 commit into
mainfrom
fix/42-patch-coverage-step-1

Conversation

@rdwj
Copy link
Copy Markdown
Collaborator

@rdwj rdwj commented May 6, 2026

First of three follow-up PRs for #42 — the lowest-risk slice that fixes a real typo and fills the patterns that have drifted behind what the templates actually ship.

What

  • Typo fix: src/*/__ init__.py had a literal space, so MCP package __init__.py files were unreachable via patch.
  • MCP gains a claude category: the MCP template ships .claude/commands/*.md but no category covered them.
  • Pattern fill-ins: MCP core adds src/main.py; MCP docs adds AGENTS.md, CONTRIBUTING.md, DEVELOPMENT_PROCESS.md, OPENSHIFT_DEPLOYMENT.md; MCP build adds .dockerignore, .gitignore, .gitleaks.toml. Agent claude adds .claude/rules/**/*.
  • Defense-in-depth in AGENT_NEVER_PATCH: tools/**, examples/**, prompts/**, rules/**, skills/**, .memoryhub.yaml — paths fips-agents add writes into and that users customize.

Out of scope

  • New evals category for agent / workflow (step 2 — separate issue / PR).
  • Per-template .fips-template.yaml manifests (step 3 — separate design issue).

Test plan

  • 11 new unit tests in tests/test_patch.py covering the typo regression and every added pattern.
  • Full suite passes: pytest -x -q --no-cov → 286 passed.
  • black src tests clean.
  • ruff check src tests clean.
  • After merge: e2e validation by scaffolding a real agent + MCP project and running patch check against the live templates.

`fips-agents patch check` had drifted behind what the template repos
actually ship. Closes part 1 of #42.

Fixed bugs:
- `src/*/__ init__.py` had a literal space, so the pattern matched
  nothing — MCP package `__init__.py` files were unreachable via
  patch despite being shipped by the template.
- The MCP server template ships `.claude/commands/*.md` but no
  `claude` category existed for `mcp-server`. Slash command updates
  were unreachable.

Filled gaps the audit surfaced:
- MCP `core` now lists `src/main.py` (the entry point).
- MCP `docs` now covers `AGENTS.md`, `CONTRIBUTING.md`,
  `DEVELOPMENT_PROCESS.md`, `OPENSHIFT_DEPLOYMENT.md`.
- MCP `build` now covers `.dockerignore`, `.gitignore`,
  `.gitleaks.toml`.
- Agent `claude` category now also globs `.claude/rules/**/*` so
  `agent-development.md` (and the workflow template's
  `workflow-development.md`) are patchable.

Defense-in-depth additions to `AGENT_NEVER_PATCH`: `tools/**`,
`examples/**`, `prompts/**`, `rules/**`, `skills/**`, `.memoryhub.yaml`.
These are paths `fips-agents add` writes into and that users
customize, so a future pattern broadening cannot clobber them.

Steps 2 (evals category) and 3 (per-template manifests) from the
audit are tracked separately.

Assisted-by: Claude Code (Opus 4.7)
@rdwj rdwj merged commit fc3a342 into main May 7, 2026
5 checks passed
rdwj added a commit that referenced this pull request May 7, 2026
Closes #44.

The agent and workflow templates ship a full eval harness under
`evals/` (assertions, discovery, mock_factory, runner, package
init, README). None of those files were covered by any patch
category, so updates were invisible to `fips-agents patch check`.

This adds an `evals` category to AGENT_FILE_CATEGORIES covering
just the harness machinery and registers a `patch evals`
subcommand. Set ask_before_patch=True since users may have
customized the harness.

User-authored eval inputs (`evals/evals.yaml` and `evals/fixtures/`)
go to AGENT_NEVER_PATCH so the test plan and data fixtures stay
under the user's control.

Stacks on top of #43.

Assisted-by: Claude Code (Opus 4.7)
rdwj added a commit that referenced this pull request May 7, 2026
Closes #44.

The agent and workflow templates ship a full eval harness under
`evals/` (assertions, discovery, mock_factory, runner, package
init, README). None of those files were covered by any patch
category, so updates were invisible to `fips-agents patch check`.

This adds an `evals` category to AGENT_FILE_CATEGORIES covering
just the harness machinery and registers a `patch evals`
subcommand. Set ask_before_patch=True since users may have
customized the harness.

User-authored eval inputs (`evals/evals.yaml` and `evals/fixtures/`)
go to AGENT_NEVER_PATCH so the test plan and data fixtures stay
under the user's control.

Stacks on top of #43.

Assisted-by: Claude Code (Opus 4.7)
rdwj added a commit that referenced this pull request May 7, 2026
- Add v0.12.0 changelog entry (manifest loader, evals category, MCP
  claude category, never-patch matcher fix, pattern gap fills).
- Update Patch Commands section: list .fips-template.yaml manifest
  support, add Gateway/UI category table, refresh per-type tables to
  match the actual category surface after #43, #46, #48, #49.
- Expand the user-customized-files paragraph to cover the new
  AGENT_NEVER_PATCH entries and the gateway/UI never-patch list.

Assisted-by: Claude Code (Opus 4.7)
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