Skip to content

feat: persistent audit trail of GenAI gate decisions#12

Merged
ancongui merged 1 commit into
mainfrom
feat/genai-audit-trail
Jun 25, 2026
Merged

feat: persistent audit trail of GenAI gate decisions#12
ancongui merged 1 commit into
mainfrom
feat/genai-audit-trail

Conversation

@ancongui

Copy link
Copy Markdown
Contributor

Increment 4 (final integrity gap). The docs claim every GenAI decision is logged and auditable β€” but the trail was only in-memory (EngineeringResult). Now it can be persisted.

Change

  • New AuditLogPort + JsonlAuditLog adapter (features/audit.py).
  • GenAIFeatureEngineer gains an opt-in audit_log=; it records every decision β€” accepted or rejected β€” with feature name, code, score, baseline, metric and reason, one JSON line per proposal. No-op when unwired (non-breaking).

Tests (real data, LLM-free)

  • Two proposals (one useful, one constant) β†’ exactly two durable JSONL records, each with a valid decision + score/baseline/code/dataset.
  • Optional: no audit log wired β†’ engineer still works, nothing written.

Local gates green: ruff/format/pyright(0)/14 features tests + strict docs. Docs: an Auditing the decisions section added to genai-features.md. Rebased on the post-#11 main (disjoint files).

The docs claim 'every GenAI decision is logged and auditable' β€” until now that
was only in-memory (EngineeringResult). Add an AuditLogPort + JsonlAuditLog
adapter; GenAIFeatureEngineer records every decision (accepted OR rejected, with
feature name, code, score, baseline, metric, reason) durably, one JSON line per
proposal. Opt-in (audit_log=...); no-op when unwired. TDD on real data; docs +
'Auditing the decisions' section added.
@ancongui ancongui merged commit a1a5d1a into main Jun 25, 2026
4 checks passed
@ancongui ancongui deleted the feat/genai-audit-trail branch June 25, 2026 18:51
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