Skip to content

fix(agent): store managed process logs under tmp#140

Merged
Nauyix merged 1 commit into
mainfrom
fix/agent-transient-process-logs
Jun 10, 2026
Merged

fix(agent): store managed process logs under tmp#140
Nauyix merged 1 commit into
mainfrom
fix/agent-transient-process-logs

Conversation

@Nauyix

@Nauyix Nauyix commented Jun 10, 2026

Copy link
Copy Markdown
Collaborator

Pull Request Checklist

Please ensure your PR meets the following requirements:

  • Code follows the style guidelines
  • Tests pass locally (make test or make docker-test)
  • Code is formatted (make format)
  • Documentation updated if needed
  • Commit messages follow conventional commits
  • PR description is complete and clear

Summary

This PR moves the default stdout/stderr capture files for agent-managed processes into /tmp/axon-agent/logs. Explicit stdout_log and stderr_log profile overrides continue to work as before.


Motivation

  • Agent-managed one-shot processes such as robot_startup, recorder, and transfer can produce large stdout/stderr logs.
  • Keeping default capture files under the persistent agent state directory causes those logs to accumulate over time.
  • The new default keeps transient process output in /tmp while preserving configured log paths for deployments that need persistence.

Changes

Modified Files

  • apps/axon_agent/src/process_manager.cpp - Change the default managed-process log directory from state_dir/logs to /tmp/axon-agent/logs.
  • apps/axon_agent/test/test_agent_service.cpp - Add coverage for the default transfer stdout/stderr paths.
  • docs/designs/axon-agent-design.md - Document the new transient default log location.
  • packaging/deb/agent/default/axon-agent - Update the default config comments to describe where managed-process logs are written.

Added Files

N/A

Deleted Files

N/A


Type of Change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update (documentation changes only)
  • Refactoring (code improvement without functional changes)
  • Performance improvement (code changes that improve performance)
  • Test changes (adding, modifying, or removing tests)

Impact Analysis

Breaking Changes

None expected. Profiles that explicitly configure stdout_log or stderr_log keep the existing configured path behavior.

Backward Compatibility

The default path for unmanaged stdout/stderr capture changes from the agent state directory to /tmp/axon-agent/logs. Agent APIs still report the effective log path in process state, and read_log continues to read from that path.


Testing

Test Environment

  • ROS Distribution: N/A
  • OS: Local Axon development checkout
  • Build Type: Standalone apps/axon_agent build

Test Cases

  • Unit tests pass locally
  • Integration tests pass locally
  • E2E tests pass (if applicable)
  • Manual testing completed

Full local CI was skipped at user request for this small agent/default-path change. Before committing this same diff, focused local validation was run successfully with:

cmake -S apps/axon_agent -B build-codex-agent -DAXON_AGENT_BUILD_TESTS=ON -DAXON_REPO_ROOT=/home/liuxy/ab_ws/axon
cmake --build build-codex-agent --target test_agent_service test_process_manager
ctest --test-dir build-codex-agent --output-on-failure -R 'test_agent_service|test_process_manager'

Manual Testing Steps

N/A

Test Coverage

  • New tests added
  • Existing tests updated
  • Coverage maintained or improved

Screenshots / Recordings

N/A


Performance Impact

  • Memory usage: No change
  • CPU usage: No change
  • Recording throughput: No change
  • Lock contention: No change

Documentation


Related Issues

  • Fixes N/A
  • Related to N/A
  • Refers to N/A

Additional Notes

N/A


Reviewers

N/A


Notes for Reviewers

  • Please review whether /tmp/axon-agent/logs is the right default location for transient managed-process stdout/stderr capture.
  • Please verify deployments that need persistent managed-process logs can continue using explicit stdout_log and stderr_log profile settings.

Checklist for Reviewers

  • Code changes are correct and well-implemented
  • Tests are adequate and pass
  • Documentation is updated and accurate
  • No unintended side effects
  • Performance impact is acceptable
  • Backward compatibility maintained (if applicable)

- Move default managed-process stdout/stderr capture to /tmp/axon-agent/logs

- Preserve explicit stdout_log and stderr_log overrides from profile YAML

- Document the transient log location and cover the default transfer path

This keeps one-shot robot_startup, recorder, and transfer logs out of the persistent agent state directory so they do not accumulate there over time.

@greptile-apps greptile-apps Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Your free trial has ended. If you'd like to continue receiving code reviews, you can add a payment method here.

@Nauyix Nauyix merged commit f89d691 into main Jun 10, 2026
18 checks passed
@Nauyix Nauyix deleted the fix/agent-transient-process-logs branch June 10, 2026 08:24
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