Repository navigation
Genkit Guard v0.3.0
This release improves Redis retention, configuration validation, and PII restoration across multi-turn conversations.
Fixes
- Prevent expired Redis fallback values from reappearing after subsequent writes.
- Protect existing PII placeholders from being masked again, fixing corrupted tokens and incomplete restoration in follow-up turns.
- Apply each Redis hash write and its TTL within one server-side script, preventing interruption between those operations.
- Reject invalid configuration before loading guard models or executing downstream work.
Validation and packaging
- Added Redis tests for expiry, concurrent writes, partial failures, and recovery.
- Added clean-consumer tests for packed-package installation, public imports, TypeScript declarations, and Genkit integration.
- Added independent integration tests using real MiniLM and privacy-filter models with live Redis.
- Verified masking at a controlled provider boundary, tool-input restoration, response restoration, reused conversation history, and preservation of thought signatures.
- Removed development test scripts from the published package.
Migration notes
- Redis TTL requires Redis 7+ and an
eval(script, { keys, arguments })client adapter. Node-redis provides this signature; custom clients may require a wrapper. - Invalid configurations now fail earlier. Semantic thresholds must be finite and within
[-1, 1]; model identifiers must be nonempty; callbacks and adapter methods must be callable. - Restart conversations containing previously corrupted placeholders. This release prevents new corruption but does not repair historical strings.
- The public decision schema and infrastructure error codes remain unchanged.
Operational limits
Scope and token-index writes remain separate; failures do not imply rollback. Memory fallback is process-local and does not replay writes after Redis recovery. TTL refreshes on writes and is not a per-entry retention deadline.
Automated real-model integration tests use a controlled provider model; they do not establish live-provider compatibility or constitute a production soak.
Dependency review
The production-only audit reports zero findings for the library’s installed runtime graph. Genkit is a required peer dependency as well as a development dependency; consuming applications should audit their complete dependency graph. Keep Genkit within the supported 1.x range.