Skip to content

Add timestamp logging and x402_ttl configuration option#17

Merged
RyanKung merged 4 commits into
masterfrom
feature/add-timestamp-logging-and-ttl-config
Dec 3, 2025
Merged

Add timestamp logging and x402_ttl configuration option#17
RyanKung merged 4 commits into
masterfrom
feature/add-timestamp-logging-and-ttl-config

Conversation

@RyanKung

@RyanKung RyanKung commented Dec 3, 2025

Copy link
Copy Markdown
Contributor
  • Add current timestamp logging in payment verification flow

    • Log current timestamp when processing X-PAYMENT header
    • Log current timestamp in facilitator response
    • Include maxTimeoutSeconds in payment header logs
  • Add x402_ttl configuration directive

    • Allow configuring payment authorization TTL (1-3600 seconds, default: 60)
    • Set PaymentRequirements.max_timeout_seconds from configuration
    • Update documentation in README.md
  • Add comprehensive tests

    • Unit tests for timestamp logging functionality
    • Integration tests for timestamp logging in Docker environment
    • All tests passing
  • Code quality improvements

    • All code formatted with cargo fmt
    • All clippy warnings resolved
    • Build succeeds without warnings

- Add current timestamp logging in payment verification flow
  - Log current timestamp when processing X-PAYMENT header
  - Log current timestamp in facilitator response
  - Include maxTimeoutSeconds in payment header logs

- Add x402_ttl configuration directive
  - Allow configuring payment authorization TTL (1-3600 seconds, default: 60)
  - Set PaymentRequirements.max_timeout_seconds from configuration
  - Update documentation in README.md

- Add comprehensive tests
  - Unit tests for timestamp logging functionality
  - Integration tests for timestamp logging in Docker environment
  - All tests passing

- Code quality improvements
  - All code formatted with cargo fmt
  - All clippy warnings resolved
  - Build succeeds without warnings

- Add .env.build to .gitignore (local build configuration)
- Add timestamp logging for payment verification debugging
- Add x402_ttl configuration directive for customizing payment authorization TTL
- Include maxTimeoutSeconds in payment header logs
- Add comprehensive unit and integration tests for timestamp logging
- Improve code quality: all clippy warnings resolved, formatting applied
@RyanKung RyanKung force-pushed the feature/add-timestamp-logging-and-ttl-config branch from c4ddd84 to 579e1a0 Compare December 3, 2025 10:19
- Add check_container_exists() helper function to avoid code duplication
- Improve Docker logs retrieval to handle both stdout and stderr
- Increase wait times and log line counts for better reliability
- Add debug logging to help diagnose test failures
- All timestamp logging tests now pass successfully

@RyanKung RyanKung left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

LGTM

@RyanKung RyanKung merged commit 15e96b4 into master Dec 3, 2025
7 checks passed
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