tractatus/public/js
TheFlow d854ac85e2 feat(research): add cross-environment audit log sync infrastructure
Implements privacy-preserving synchronization of production audit logs
to development for comprehensive governance research analysis.

Backend Components:
- SyncMetadata.model.js: Track sync state and statistics
- audit-sanitizer.util.js: Privacy sanitization utility
  - Redacts credentials, API keys, user identities
  - Sanitizes file paths and violation content
  - Preserves statistical patterns for research
- sync-prod-audit-logs.js: CLI sync script
  - Incremental sync with deduplication
  - Dry-run mode for testing
  - Configurable date range
- AuditLog.model.js: Enhanced schema with environment tracking
  - environment field (development/production/staging)
  - sync_metadata tracking (original_id, synced_from, etc.)
  - New indexes for cross-environment queries
- audit.controller.js: New /api/admin/audit-export endpoint
  - Privacy-sanitized export for cross-environment sync
  - Environment filter support in getAuditLogs
- MemoryProxy.service.js: Environment tagging in auditDecision()
  - Tags new logs with NODE_ENV or override
  - Sets is_local flag for tracking

Frontend Components:
- audit-analytics.html: Environment filter dropdown
- audit-analytics.js: Environment filter query parameter handling

Research Benefits:
- Combine dev and prod governance statistics
- Longitudinal analysis across environments
- Validate framework consistency
- Privacy-preserving data sharing

Security:
- API-based export (not direct DB access)
- Admin-only endpoints with JWT authentication
- Comprehensive credential redaction
- One-way sync (production → development)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-27 12:11:16 +13:00
..
admin feat(research): add cross-environment audit log sync infrastructure 2025-10-27 12:11:16 +13:00
components fix(i18n): ensure contact modal displays in correct language when opened 2025-10-26 18:37:40 +13:00
demos fix(submissions): restructure Economist package and fix article display 2025-10-24 08:47:42 +13:00
utils fix(submissions): restructure Economist package and fix article display 2025-10-24 08:47:42 +13:00
blog-post.js docs: complete research documentation publication (Phases 1-6) 2025-10-25 20:10:04 +13:00
blog.js fix(newsletter): resolve CSRF token issue for static HTML pages 2025-10-25 09:37:16 +13:00
case-submission.js feat(i18n): add multilingual support to case-submission and media-inquiry pages 2025-10-26 16:41:54 +13:00
check-version.js fix(submissions): restructure Economist package and fix article display 2025-10-24 08:47:42 +13:00
docs-app.js fix(docs): card overflow, sequencing, colour legend, and category fixes 2025-10-26 11:03:23 +13:00
docs-search-enhanced.js fix(submissions): restructure Economist package and fix article display 2025-10-24 08:47:42 +13:00
docs-viewer-app.js fix(submissions): restructure Economist package and fix article display 2025-10-24 08:47:42 +13:00
faq.js feat(i18n): add German and French translations for all FAQ Q&As 2025-10-26 14:43:25 +13:00
i18n-simple.js fix(i18n): add cache-busting to translation fetches 2025-10-26 16:18:34 +13:00
koha-donation.js fix(submissions): restructure Economist package and fix article display 2025-10-24 08:47:42 +13:00
koha-success.js fix(submissions): restructure Economist package and fix article display 2025-10-24 08:47:42 +13:00
koha-transparency.js fix(submissions): restructure Economist package and fix article display 2025-10-24 08:47:42 +13:00
leader-page.js feat(leader): WCAG accessibility with 9 accordions, keyboard navigation 2025-10-23 00:19:23 +13:00
media-inquiry.js feat(i18n): add multilingual support to case-submission and media-inquiry pages 2025-10-26 16:41:54 +13:00
media-triage-transparency.js fix(submissions): restructure Economist package and fix article display 2025-10-24 08:47:42 +13:00
page-transitions.js fix(submissions): restructure Economist package and fix article display 2025-10-24 08:47:42 +13:00
researcher-page.js feat(researcher): WCAG compliance, Berlin/Weil foundations, fixed footer i18n 2025-10-22 23:56:37 +13:00
scroll-animations.js fix(submissions): restructure Economist package and fix article display 2025-10-24 08:47:42 +13:00
version-manager.js fix(submissions): restructure Economist package and fix article display 2025-10-24 08:47:42 +13:00