Skip to content

Feature/strict context audit#3

Open
philipgreat wants to merge 12 commits into
mainfrom
feature/strict-context-audit
Open

Feature/strict context audit#3
philipgreat wants to merge 12 commits into
mainfrom
feature/strict-context-audit

Conversation

@philipgreat

Copy link
Copy Markdown
Contributor

No description provided.

Philip Z added 12 commits June 4, 2026 03:17
…PI from business layer

- logging.rs: mark as infrastructure layer (#![allow(clippy::disallowed_types)])
- logging.rs: remove public log_info(), add emit_ui_message() for UI events only
- logging.rs: replace chrono::Local with chrono::Utc for audit consistency
- service.rs: rename log_info -> emit_ui_message (18 call sites)
- commands.rs: replace log_info -> emit_ui_message (8 call sites)
- app.rs: replace log_info -> emit_ui_message (4 call sites)
- main.rs: replace log_info -> emit_ui_message (1 call site)
…pect Silent/Summary/Full

- Add teaql-tool-core dependency for AuditConfig
- Register AuditConfig::production() as UserContext resource
- AppAuditSink reads AuditConfig to decide output level:
  - Silent: skip all entity event output
  - Summary: compact one-liner to TUI only (no file I/O)
  - Full: field changes + app.log + audit.log (previous behavior)
- Bootstrap events bypass AuditConfig (always shown in TUI)
- Extract append_to_file() helper to reduce duplication
- Replace AuditConfig::production() with audit_config_from_env()
- Known tables list: task, task_status, task_execution_log
- Entity audit respects TEAQL_AUDIT env var
- Sink routing respects TEAQL_SINK env var (_stdout/_file/_both)
- All 18 tests pass
- Default: _verify (safest, no env var needed)
- _execute: auto-apply schema changes (dev/CI)
- _dryrun: preview SQL without executing (staging review)
- Tests require TEAQL_SCHEMA=_execute to create test databases
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