Skip to content

Anchor audit agent paths to project root#19

Merged
groupthinking merged 3 commits intojules-audit-agent-16337681246389421261from
copilot/sub-pr-2-again
Jan 29, 2026
Merged

Anchor audit agent paths to project root#19
groupthinking merged 3 commits intojules-audit-agent-16337681246389421261from
copilot/sub-pr-2-again

Conversation

Copy link
Contributor

Copilot AI commented Jan 29, 2026

The nightly audit agent used relative paths for log_dir and report_dir, causing failures when executed from cron or outside the repository root.

Changes:

  • Anchor log_dir and report_dir to project root using Path(__file__).resolve().parent.parent
  • Matches existing pattern in scripts/scheduled_cleanup.py:221

Before:

self.log_dir = Path("logs")
self.report_dir = Path("audit_reports")

After:

project_root = Path(__file__).resolve().parent.parent
self.log_dir = project_root / "logs"
self.report_dir = project_root / "audit_reports"

This ensures paths resolve consistently regardless of execution context (cron, manual invocation, different working directories).


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

@vercel
Copy link

vercel bot commented Jan 29, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (UTC)
event-relay-web Error Error Jan 29, 2026 6:04pm
v0-uvai Error Error Jan 29, 2026 6:04pm

…t root

Co-authored-by: groupthinking <154503486+groupthinking@users.noreply.github.com>
Copilot AI changed the title [WIP] WIP Address feedback on Nightly Audit Agent implementation Anchor audit agent paths to project root Jan 29, 2026
Copilot AI requested a review from groupthinking January 29, 2026 17:32
@groupthinking groupthinking marked this pull request as ready for review January 29, 2026 18:04
Copilot AI review requested due to automatic review settings January 29, 2026 18:04
@groupthinking groupthinking merged commit f2a91b8 into jules-audit-agent-16337681246389421261 Jan 29, 2026
3 of 5 checks passed
@groupthinking groupthinking deleted the copilot/sub-pr-2-again branch January 29, 2026 18:04
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request fixes a path resolution issue in the nightly audit agent script that caused failures when executed from cron or outside the repository root directory. The change anchors the log_dir and report_dir paths to the project root using Path(__file__).resolve().parent.parent, ensuring consistent path resolution regardless of the working directory from which the script is invoked.

Changes:

  • Anchored log_dir and report_dir paths to project root in scripts/nightly_audit_agent.py
Comments suppressed due to low confidence (2)

scripts/nightly_audit_agent.py:17

  • Import of 'os' is not used.
import os

scripts/nightly_audit_agent.py:22

  • Import of 'List' is not used.
    Import of 'Optional' is not used.
from typing import Dict, List, Any, Optional

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.

2 participants