feat: add codev trust gate integration (Spec 26)#37
Merged
timeleft-- merged 4 commits intomainfrom Mar 28, 2026
Merged
Conversation
Add codev-specific trust gate addendum and CLI command for composing quality gate prompts for codev artifacts (specs, plans, reviews). - Add trail_name to TG redacted metadata for scope-based artifact detection - Create integrations/codev/ with trust-gate-addendum.md and README.md - Add `fava-trails integrate codev` CLI with --check, --diff, --force flags - Print integration hint after bootstrap - Add tests for redaction, composition, staleness detection, idempotency Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Guard addendum resource read with try/except for broken installs - Make --check/--diff mutually exclusive in argparse; reject --force with non-write modes - Add 3 failure-path tests (missing addendum, --force+--check, --force+--diff) - Remove unused _PROVENANCE_RE regex - Fix provenance header: --upgrade → fava-trails integrate codev - Move hashlib import to module level Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- --check now compares content only (strips provenance header) so package version bumps don't cause false-positive staleness in CI - Add encoding="utf-8" to all read_text()/write_text() calls in cmd_integrate_codev for Windows locale safety - Add tests: version-in-header tolerance, _strip_provenance_header unit tests Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
_redact_metadata()so the trust gate reviewer can detect artifact type from/specs/,/plans/,/reviews/in the scope pathsrc/fava_trails/integrations/codev/trust-gate-addendum.mdwith semantic quality checks for specs (vague criteria), plans (no decomposition), and reviews (no retrospective)fava-trails integrate codevCLI: Composes generic TG prompt + codev addendum with provenance header, writes totrails/codev-artifacts/trust-gate-prompt.md. Supports--check(CI staleness),--diff(preview),--force(overwrite manual edits). Idempotent.fava-trails bootstrapcompletesDeliverables from Spec 26
_redact_metadata()trust-gate-addendum.mdintegrations/codev/README.mdfava-trails integrate codevCLIartifacts.tsTest plan
uv run pytest -v— 587 tests pass (13 new)uv run ruff check— cleanfava-trails integrate codevin a data repo produces correct composed promptfava-trails integrate codev --checkreturns 0 when up to date, 1 when stale🤖 Generated with Claude Code