Commit Graph

5 Commits

Author SHA1 Message Date
freemo f0a40afecc refactor(audit): implement async audit recording to unblock event pipeline (#1279)
CI / build (push) Successful in 22s
CI / lint (push) Failing after 24s
CI / helm (push) Successful in 24s
CI / quality (push) Successful in 3m41s
CI / typecheck (push) Successful in 3m55s
CI / coverage (push) Has been skipped
CI / benchmark-regression (push) Has been skipped
CI / security (push) Successful in 4m4s
CI / unit_tests (push) Failing after 5m43s
CI / docker (push) Has been skipped
CI / benchmark-publish (push) Has been cancelled
CI / integration_tests (push) Has been cancelled
CI / e2e_tests (push) Has been cancelled
CI / status-check (push) Has been cancelled
Implements a write-behind queue with a background daemon thread in AuditService so that record() returns immediately without blocking the calling domain operation on a synchronous SQLite INSERT + COMMIT.

Changes:
- AuditService: add _writer_loop(), _write_payload(), flush() methods and a write-behind queue with a background thread
- record() enqueues the payload and returns a placeholder entry with id=-1 in async mode
- close() calls flush() to drain the queue before closing the session
- Settings: add audit_async (default True) and audit_queue_maxsize (default 10000) fields
- 20 BDD scenarios covering non-blocking record(), flush/close lifecycle, ordering, sync fallback, and settings

Closes #718

Co-authored-by: Jeffrey Phillips Freeman <the@jeffreyfreeman.me>
Co-committed-by: Jeffrey Phillips Freeman <the@jeffreyfreeman.me>
2026-04-02 17:00:53 +00:00
brent.edwards 0397a00eb6 test(e2e): add M1 source-code plan lifecycle suite
CI / lint (pull_request) Successful in 24s
CI / security (pull_request) Successful in 48s
CI / quality (pull_request) Successful in 30s
CI / benchmark-publish (pull_request) Has been skipped
CI / typecheck (pull_request) Successful in 1m8s
CI / build (pull_request) Successful in 26s
CI / integration_tests (pull_request) Successful in 5m6s
CI / unit_tests (pull_request) Successful in 22m40s
CI / docker (pull_request) Successful in 15s
CI / benchmark-regression (pull_request) Successful in 23m12s
CI / coverage (pull_request) Successful in 31m33s
2026-02-25 04:50:43 +00:00
khyari hamza eeb0d49377 test(security): add coverage for audit CLI, logging, and redaction edge cases
CI / benchmark-publish (pull_request) Has been skipped
CI / lint (pull_request) Successful in 15s
CI / build (pull_request) Successful in 17s
CI / quality (pull_request) Successful in 17s
CI / typecheck (pull_request) Successful in 29s
CI / security (pull_request) Successful in 38s
CI / integration_tests (pull_request) Successful in 2m22s
CI / unit_tests (pull_request) Successful in 4m0s
CI / docker (pull_request) Successful in 37s
CI / benchmark-regression (pull_request) Successful in 10m6s
CI / coverage (pull_request) Successful in 11m21s
Add 22 new Behave scenarios covering:
- audit CLI commands (list, show, prune, count)
- audit service context manager and owned-session paths
- corrupt JSON details fallback in _row_to_entry
- configure_structlog dev/prod/invalid and get_logger
- redaction edge cases (empty key, empty URL, empty pattern,
  show_secrets bypass, nested dict processor)
2026-02-19 20:10:56 +00:00
khyari hamza 201be39632 fix(security): address review findings for audit logging
CI / benchmark-publish (pull_request) Has been skipped
CI / lint (pull_request) Successful in 19s
CI / build (pull_request) Successful in 16s
CI / quality (pull_request) Successful in 22s
CI / security (pull_request) Successful in 29s
CI / typecheck (pull_request) Successful in 52s
CI / integration_tests (pull_request) Successful in 2m19s
CI / unit_tests (pull_request) Successful in 6m55s
CI / docker (pull_request) Successful in 37s
CI / benchmark-regression (pull_request) Successful in 11m13s
CI / coverage (pull_request) Failing after 13m40s
2026-02-19 19:23:30 +00:00
khyari hamza ae41167a1d feat(security): add audit logging for apply 2026-02-19 19:23:30 +00:00