refactor(backend): separate runtime artifacts from source tree#549
refactor(backend): separate runtime artifacts from source tree#549Benedict315 wants to merge 1 commit into
Conversation
- Create backend/reports/ directory for runtime artifacts - Update eventStore.ts and report.ts to output to backend/reports/ - Update .gitignore to exclude generated artifacts from source tree - Update README.md with new artifact locations No CI impact - coverage and build outputs remain unaffected.
|
@Benedict315 is attempting to deploy a commit to the olufunbiik's projects Team on Vercel. A member of the Team first needs to authorize it. |
📝 WalkthroughWalkthroughThe PR reorganizes audit trail runtime artifacts from the source tree into a dedicated Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related issues
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Review rate limit: 0/1 reviews remaining, refill in 60 minutes.Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@backend/src/audit-trail/eventStore.ts`:
- Around line 5-6: The retention logic is pointed at the old file path; update
enforceRetention() in retention.ts to use the same audit log location as
eventStore (either import LOG_PATH from eventStore.ts or compute path using
REPORTS_DIR: path.join(__dirname, '..', '..', 'reports', 'audit.log')) so the
function reads backend/reports/audit.log and correctly applies retention to real
audit data.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 8fa76123-d1ec-48bd-89b4-5136b1c31c10
📒 Files selected for processing (6)
.gitignorebackend/reports/.gitkeepbackend/src/audit-trail/README.mdbackend/src/audit-trail/audit-report.jsonbackend/src/audit-trail/eventStore.tsbackend/src/audit-trail/report.ts
💤 Files with no reviewable changes (1)
- backend/src/audit-trail/audit-report.json
Problem
Generated and runtime artifacts (audit logs, coverage reports) were being written directly into source directories, polluting the backend source tree with transient files.
Solution
Changes
Verification
coverage/anddist/remain intactCloses issue #477
Summary by CodeRabbit
Documentation
Chores