|
| 1 | +# TDD evidence — module-bundle-deps-auto-install |
| 2 | + |
| 3 | +## Tests |
| 4 | + |
| 5 | +- Added `tests/unit/test_registry_manifest_bundle_dependencies.py`: |
| 6 | + - `test_registry_bundle_dependencies_match_manifests` — every registry module with a local `module-package.yaml` must have matching `bundle_dependencies`. |
| 7 | + - `test_official_bundle_dependency_graph_is_acyclic` — no cycles among `nold-ai/*` edges in `registry/index.json`. |
| 8 | +- Ran: `.venv/bin/pytest tests/unit/test_registry_manifest_bundle_dependencies.py` — **pass** (2 tests). |
| 9 | +- Ran: `.venv/bin/pytest tests/unit/docs/test_bundle_overview_cli_examples.py` — **pass** (after overview doc update). |
| 10 | + |
| 11 | +## Implementation |
| 12 | + |
| 13 | +- `packages/specfact-code-review/module-package.yaml`: `bundle_dependencies` includes `nold-ai/specfact-codebase`; version **0.46.0** (minor bump per design). |
| 14 | +- `registry/index.json` + `registry/modules/specfact-code-review-0.46.0.tar.gz` (+ `.sha256`) aligned with publish workflow layout. |
| 15 | +- `docs/bundles/code-review/overview.md`: prerequisites note peer dependency / auto-install behavior. |
| 16 | + |
| 17 | +## Signing (required before CI merge) |
| 18 | + |
| 19 | +Manifest integrity was generated with **`hatch run sign-modules -- --allow-unsigned`** (checksum only) because the local signing key is encrypted and no passphrase was available in this environment. |
| 20 | + |
| 21 | +**Before opening the PR or merging**, sign with the org private key so CI passes `verify-modules-signature --require-signature`: |
| 22 | + |
| 23 | +```bash |
| 24 | +hatch run sign-modules -- \ |
| 25 | + --key-file "${SPECFACT_MODULE_PRIVATE_SIGN_KEY_FILE:-$HOME/.specfact/sign-keys/module-signing-private.pem}" \ |
| 26 | + packages/specfact-code-review/module-package.yaml \ |
| 27 | + --payload-from-filesystem |
| 28 | +``` |
| 29 | + |
| 30 | +Then re-run: |
| 31 | + |
| 32 | +```bash |
| 33 | +hatch run verify-modules-signature -- --require-signature --payload-from-filesystem |
| 34 | +``` |
| 35 | + |
| 36 | +If the manifest checksum changes after signing, rebuild the registry tarball and refresh `registry/index.json` checksum for `specfact-code-review-0.46.0.tar.gz` (same Python step as publish workflow) or re-run the publish automation. |
| 37 | + |
| 38 | +## Quality gates (2026-04-02, worktree) |
| 39 | + |
| 40 | +- `hatch run format` — pass |
| 41 | +- `hatch run yaml-lint` — pass |
| 42 | +- `hatch run type-check` (scoped + full lint path) — pass via `hatch run lint` |
| 43 | +- `hatch run lint` — pass |
| 44 | +- `python scripts/verify-modules-signature.py --payload-from-filesystem` — pass (all 6 manifests) |
| 45 | +- `python scripts/verify-modules-signature.py --require-signature --payload-from-filesystem` — **fails until manifest is signed** (expected until signing step above) |
| 46 | +- `hatch run contract-test` — pass |
| 47 | +- `hatch run smart-test` — pass |
| 48 | +- `hatch run test` — pass |
| 49 | +- `hatch run specfact code review run --json --out .specfact/code-review.json --scope changed` — not run (SpecFact CLI: `Command 'code' is not installed`); complete before PR per `tasks.md` 4.3. |
0 commit comments