Skip to content

Conversation

@kevinbackhouse
Copy link
Collaborator

Same concept as #99, for the logs directory.

Copilot AI review requested due to automatic review settings December 2, 2025 17:37
Copilot finished reviewing on behalf of kevinbackhouse December 2, 2025 17:39
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 PR centralizes log file paths using platformdirs.user_log_dir, moving logs from a hardcoded local directory to per-user OS-appropriate locations.

  • Replace hardcoded "logs/" paths with path_utils.log_file_name across modules.
  • Initialize logging to write to files returned by log_file_name in several components.
  • Remove Docker and devcontainer assumptions about a local logs directory.

Reviewed changes

Copilot reviewed 12 out of 13 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
src/seclab_taskflow_agent/render_utils.py Switch render output logging to logging.debug with a platformdirs-based log file path; adds logging.basicConfig in module.
src/seclab_taskflow_agent/path_utils.py Introduces log_dir and log_file_name using platformdirs.user_log_dir to resolve log locations.
src/seclab_taskflow_agent/mcp_servers/memcache/memcache.py Moves logging initialization to use log_file_name for mcp_memcache.log.
src/seclab_taskflow_agent/mcp_servers/logbook/logbook.py Updates logging to use log_file_name for mcp_logbook.log and adjusts imports.
src/seclab_taskflow_agent/mcp_servers/echo/echo.py Updates logging to use log_file_name, but uses an incorrect relative import for path_utils.
src/seclab_taskflow_agent/mcp_servers/codeql/mcp_server.py Moves logging initialization to use log_file_name for mcp_codeql.log.
src/seclab_taskflow_agent/mcp_servers/codeql/client.py Attempts to use log_file_name for stderr log path, but has an invalid import and a malformed string literal.
src/seclab_taskflow_agent/main.py Switches RotatingFileHandler path to log_file_name, removing manual logs dir creation.
docker/run.sh Removes creation of local logs/data directories and DATA_DIR env mount.
README.md Removes example bind mount of local logs directory.
.gitignore Removes ignore rules for local logs directory.
.dockerignore Removes logs/** ignore entry.
.devcontainer/post-create.sh Removes logs/data directory creation and .env entry for CODEQL_DBS_BASE_PATH.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings December 2, 2025 17:42
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copilot finished reviewing on behalf of kevinbackhouse December 2, 2025 17:46
@kevinbackhouse kevinbackhouse marked this pull request as ready for review December 2, 2025 17:47
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

Copilot reviewed 12 out of 13 changed files in this pull request and generated 4 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings December 2, 2025 17:50
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
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

Copilot reviewed 12 out of 13 changed files in this pull request and generated 2 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@m-y-mo
Copy link
Contributor

m-y-mo commented Dec 3, 2025

Does this create the logs in the ./local/ directory?

@kevinbackhouse
Copy link
Collaborator Author

Does this create the logs in the ./local/ directory?

Yes. On Linux, it creates the directory ~/.local/state/seclab-taskflow-agent/log.

@m-y-mo
Copy link
Contributor

m-y-mo commented Dec 3, 2025

Can you make it so that you can overwrite with env like the data dir? Otherwise it'll be a pain to read the logs when running the docker.

m-y-mo
m-y-mo previously approved these changes Dec 3, 2025
@kevinbackhouse
Copy link
Collaborator Author

smoke test

Copilot AI review requested due to automatic review settings December 3, 2025 11:50
Copilot finished reviewing on behalf of kevinbackhouse December 3, 2025 11:53
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

Copilot reviewed 12 out of 13 changed files in this pull request and generated 2 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings December 3, 2025 11:56
Copilot finished reviewing on behalf of kevinbackhouse December 3, 2025 11:59
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

Copilot reviewed 12 out of 13 changed files in this pull request and generated 5 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@kevinbackhouse
Copy link
Collaborator Author

smoke test

@github-actions
Copy link

github-actions bot commented Dec 3, 2025

⚠️ Cannot proceed with deployment

  • reviewDecision: REVIEW_REQUIRED

All deployments from forks must have the required reviews before they can proceed. Please ensure this PR has been reviewed and approved before trying again.

@kevinbackhouse
Copy link
Collaborator Author

smoke test

@github-actions
Copy link

github-actions bot commented Dec 3, 2025

⚠️ Cannot proceed with deployment

  • reviewDecision: REVIEW_REQUIRED

All deployments from forks must have the required reviews before they can proceed. Please ensure this PR has been reviewed and approved before trying again.

@kevinbackhouse
Copy link
Collaborator Author

smoke test

@github-actions
Copy link

github-actions bot commented Dec 3, 2025

Deployment Triggered 🚀

kevinbackhouse, started a branch deployment to smoketest (branch: 2f65245ad9fa48d233f323bd201425be89d92cba)

You can watch the progress here 🔗

Details
{
  "type": "branch",
  "environment": {
    "name": "smoketest",
    "url": null
  },
  "deployment": {
    "timestamp": "2025-12-03T16:02:55.789Z",
    "logs": "https://github.com/GitHubSecurityLab/seclab-taskflow-agent/actions/runs/19900325006"
  },
  "git": {
    "branch": "2f65245ad9fa48d233f323bd201425be89d92cba",
    "commit": "2f65245ad9fa48d233f323bd201425be89d92cba",
    "verified": true,
    "committer": "web-flow",
    "html_url": "https://github.com/GitHubSecurityLab/seclab-taskflow-agent/commit/2f65245ad9fa48d233f323bd201425be89d92cba"
  },
  "context": {
    "actor": "kevinbackhouse",
    "noop": false,
    "fork": true,
    "comment": {
      "created_at": "2025-12-03T16:02:34Z",
      "updated_at": "2025-12-03T16:02:34Z",
      "body": "smoke test",
      "html_url": "https://github.com/GitHubSecurityLab/seclab-taskflow-agent/pull/105#issuecomment-3607583345"
    }
  },
  "parameters": {
    "raw": null,
    "parsed": null
  }
}

@github-actions
Copy link

github-actions bot commented Dec 3, 2025

Deployment Results ❌

kevinbackhouse had a failure when deploying branch 2f65245ad9fa48d233f323bd201425be89d92cba to smoketest

Details
{
  "status": "failure",
  "environment": {
    "name": "smoketest",
    "url": null
  },
  "deployment": {
    "id": 3413652958,
    "timestamp": "2025-12-03T16:03:37.851Z",
    "logs": "https://github.com/GitHubSecurityLab/seclab-taskflow-agent/actions/runs/19900325006",
    "duration": 42
  },
  "git": {
    "branch": "2f65245ad9fa48d233f323bd201425be89d92cba",
    "commit": "2f65245ad9fa48d233f323bd201425be89d92cba",
    "verified": true
  },
  "context": {
    "actor": "kevinbackhouse",
    "noop": false,
    "fork": true
  },
  "reviews": {
    "count": 1,
    "decision": "APPROVED"
  },
  "parameters": {
    "raw": null,
    "parsed": null
  }
}

@kevinbackhouse
Copy link
Collaborator Author

smoke test

@github-actions
Copy link

github-actions bot commented Dec 3, 2025

⚠️ Cannot proceed with deployment

  • reviewDecision: APPROVED
  • commitStatus: PENDING

CI checks must be passing in order to continue

@kevinbackhouse
Copy link
Collaborator Author

smoke test

@github-actions
Copy link

github-actions bot commented Dec 3, 2025

Deployment Triggered 🚀

kevinbackhouse, started a branch deployment to smoketest (branch: 62f6771cff934846ca7498339a8589b464c7404f)

You can watch the progress here 🔗

Details
{
  "type": "branch",
  "environment": {
    "name": "smoketest",
    "url": null
  },
  "deployment": {
    "timestamp": "2025-12-03T16:11:29.115Z",
    "logs": "https://github.com/GitHubSecurityLab/seclab-taskflow-agent/actions/runs/19900593194"
  },
  "git": {
    "branch": "62f6771cff934846ca7498339a8589b464c7404f",
    "commit": "62f6771cff934846ca7498339a8589b464c7404f",
    "verified": true,
    "committer": "web-flow",
    "html_url": "https://github.com/GitHubSecurityLab/seclab-taskflow-agent/commit/62f6771cff934846ca7498339a8589b464c7404f"
  },
  "context": {
    "actor": "kevinbackhouse",
    "noop": false,
    "fork": true,
    "comment": {
      "created_at": "2025-12-03T16:11:10Z",
      "updated_at": "2025-12-03T16:11:10Z",
      "body": "smoke test",
      "html_url": "https://github.com/GitHubSecurityLab/seclab-taskflow-agent/pull/105#issuecomment-3607625298"
    }
  },
  "parameters": {
    "raw": null,
    "parsed": null
  }
}

@github-actions
Copy link

github-actions bot commented Dec 3, 2025

Deployment Results ✅

kevinbackhouse successfully deployed branch 62f6771cff934846ca7498339a8589b464c7404f to smoketest

Details
{
  "status": "success",
  "environment": {
    "name": "smoketest",
    "url": null
  },
  "deployment": {
    "id": 3413712610,
    "timestamp": "2025-12-03T16:15:03.030Z",
    "logs": "https://github.com/GitHubSecurityLab/seclab-taskflow-agent/actions/runs/19900593194",
    "duration": 214
  },
  "git": {
    "branch": "62f6771cff934846ca7498339a8589b464c7404f",
    "commit": "62f6771cff934846ca7498339a8589b464c7404f",
    "verified": true
  },
  "context": {
    "actor": "kevinbackhouse",
    "noop": false,
    "fork": true
  },
  "reviews": {
    "count": 1,
    "decision": "APPROVED"
  },
  "parameters": {
    "raw": null,
    "parsed": null
  }
}

@kevinbackhouse kevinbackhouse merged commit 82c32f1 into GitHubSecurityLab:main Dec 3, 2025
9 checks passed
@kevinbackhouse kevinbackhouse deleted the log_dir branch December 3, 2025 16:21
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