Ratchet manifest + manifest_agent coverage to >=90% (ADR 0004) #299

Open
didericis-claude wants to merge 1 commits from ratchet-manifest-90 into ratchet-git-gate-90
Collaborator

Stacked on #298 (base = ratchet-git-gate-90). Fifth per-module ratchet under ADR 0004 — the manifest validation pair.

Summary

Drives the validation rejection / edge paths across both manifest modules:

  • ManifestBottle.from_dict — unknown key, non-string env value, non-bool supervise, removed runtime field.
  • ManifestAgentProvider.from_dict — unknown key, empty template, non-string dockerfile, auth_token / forward_host_credentials template constraints.
  • _parse_provider_settings — pass-through for non-built-in templates, startup_args shape, and the pi-specific string/int/bool/models/max_tokens_field/api-key-conflict checks.
  • ManifestAgent.from_dict — bottle empty/undefined, skills shape, prompt type, agent-level git-gate.repos rejection, empty git-gate allowed.
  • Eager ManifestIndex — empty bottles section, unknown-agent load, has_agent / require_agent, git_identity_summary (set and empty).

Coverage

Module Before After
manifest_agent.py 84% 99%
manifest.py 86% 94%

Remaining manifest.py misses are the lazy on-disk loader paths (exercised by the integration suite). 36 new tests; full suite (1478) passes; pyright clean; pylint 10.00.

Stacked on #298 (base = `ratchet-git-gate-90`). Fifth per-module ratchet under ADR 0004 — the manifest validation pair. ## Summary Drives the validation rejection / edge paths across both manifest modules: - **`ManifestBottle.from_dict`** — unknown key, non-string env value, non-bool supervise, removed `runtime` field. - **`ManifestAgentProvider.from_dict`** — unknown key, empty template, non-string dockerfile, `auth_token` / `forward_host_credentials` template constraints. - **`_parse_provider_settings`** — pass-through for non-built-in templates, `startup_args` shape, and the pi-specific string/int/bool/`models`/`max_tokens_field`/api-key-conflict checks. - **`ManifestAgent.from_dict`** — bottle empty/undefined, skills shape, prompt type, agent-level `git-gate.repos` rejection, empty `git-gate` allowed. - **Eager `ManifestIndex`** — empty bottles section, unknown-agent load, `has_agent` / `require_agent`, `git_identity_summary` (set and empty). ## Coverage | Module | Before | After | |---|---|---| | `manifest_agent.py` | 84% | **99%** | | `manifest.py` | 86% | **94%** | Remaining `manifest.py` misses are the lazy on-disk loader paths (exercised by the integration suite). 36 new tests; full suite (1478) passes; pyright clean; pylint 10.00.
didericis-claude added 1 commit 2026-06-25 22:15:10 -04:00
test(manifest): ratchet manifest + manifest_agent to >=90%
test / unit (pull_request) Successful in 46s
test / integration (pull_request) Successful in 17s
test / coverage (pull_request) Successful in 56s
lint / lint (push) Successful in 1m54s
74060192e0
Fifth per-module ratchet under ADR 0004. Drive the validation
rejection and edge paths:

- ManifestBottle.from_dict: unknown key, non-string env value,
  non-bool supervise, removed `runtime` field.
- ManifestAgentProvider.from_dict: unknown key, empty template,
  non-string dockerfile, auth_token / forward_host_credentials
  template constraints.
- _parse_provider_settings: pass-through for non-built-in templates,
  startup_args shape, and the pi-specific string/int/bool/models/
  max_tokens_field/api-key-conflict checks.
- ManifestAgent.from_dict: bottle empty/undefined, skills shape, prompt
  type, agent-level git-gate.repos rejection, empty git-gate allowed.
- Eager ManifestIndex: empty bottles section, unknown-agent load,
  has_agent / require_agent, git_identity_summary (set and empty).

manifest_agent.py: 84% -> 99%; manifest.py: 86% -> 94%. Remaining
manifest.py misses are the lazy on-disk loader paths exercised by the
integration suite.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NkwFXLFff9PYPy4wgVBJp9
Some checks are pending
test / unit (pull_request) Successful in 46s
test / integration (pull_request) Successful in 17s
test / coverage (pull_request) Successful in 56s
lint / lint (push) Successful in 1m54s
This pull request can be merged automatically.
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin ratchet-manifest-90:ratchet-manifest-90
git checkout ratchet-manifest-90
Sign in to join this conversation.