Skip to content

Conversation

@m-005
Copy link
Member

@m-005 m-005 commented Jan 21, 2026

Part 1 of the Foundation stage for objects-node daemon.

Changes

Adds configuration type definitions for the node daemon:

  • NodeConfig - Main configuration struct with nested settings
  • NodeSettings - Data directory, API port, and bind address
  • NetworkSettings - Relay URL and discovery topic
  • StorageSettings - Blob size and total storage limits
  • IdentitySettings - Registry URL

All structs include:

  • Default implementations with sensible values
  • Serde serialization support
  • Comprehensive documentation

Testing

  • Default value tests
  • Serialization round-trip tests

Dependencies

  • Added toml crate for TOML file parsing
  • Added thiserror for error handling

Part of the Foundation stage (1/4). Next: Config Loading (#35).

m-005 added a commit that referenced this pull request Jan 21, 2026
Part 2 of the Foundation stage for objects-node daemon.

## Changes

Implements configuration loading and validation:

- ConfigError enum with proper error types (IO, Parse, Validation)
- from_env() - Load configuration from environment variables only
- load_or_create() - Load from TOML file or create with defaults
- load() and save() - TOML file I/O with parent directory creation
- validate() - Comprehensive validation:
  - API port in valid range (1024-65535)
  - Valid IP address for bind address
  - HTTPS-only relay URLs
  - RFC-002 compliant discovery topic format
- Environment variable overrides with proper precedence

## Testing

Uses temp-env for safe environment variable testing (no unsafe blocks):
- Config file creation and loading
- Environment variable override tests
- Validation error cases (invalid port, IP, URL, topic)
- Round-trip serialization

## Dependencies

- Added temp-env for safe test environment manipulation
- Added tempfile for temporary test directories

Part of the Foundation stage (2/4). Builds on: #34. Next: State Types (#36).

Pull Request: #39
m-005 added a commit that referenced this pull request Jan 21, 2026
Pull Request: #34

Part 1 of the Foundation stage for objects-node daemon.

## Changes

Adds configuration type definitions for the node daemon:

- NodeConfig - Main configuration struct with nested settings
- NodeSettings - Data directory, API port, and bind address
- NetworkSettings - Relay URL and discovery topic
- StorageSettings - Blob size and total storage limits
- IdentitySettings - Registry URL

All structs include:
- Default implementations with sensible values
- Serde serialization support
- Comprehensive documentation

## Testing

- Default value tests
- Serialization round-trip tests

## Dependencies

- Added toml crate for TOML file parsing
- Added thiserror for error handling
@m-005 m-005 force-pushed the spr/m-005/config-types-nodeconfig-struct-definitions branch from 6029800 to ad96b9d Compare January 21, 2026 03:48
@OBJECTSHQ OBJECTSHQ deleted a comment from claude bot Jan 21, 2026
@m-005 m-005 force-pushed the spr/m-005/config-types-nodeconfig-struct-definitions branch from ad96b9d to 1525ce6 Compare January 23, 2026 23:22
Pull Request: #34

Part 1 of the Foundation stage for objects-node daemon.

## Changes

Adds configuration type definitions for the node daemon:

- NodeConfig - Main configuration struct with nested settings
- NodeSettings - Data directory, API port, and bind address
- NetworkSettings - Relay URL and discovery topic
- StorageSettings - Blob size and total storage limits
- IdentitySettings - Registry URL

All structs include:
- Default implementations with sensible values
- Serde serialization support
- Comprehensive documentation

## Testing

- Default value tests
- Serialization round-trip tests

## Dependencies

- Added toml crate for TOML file parsing
- Added thiserror for error handling
@m-005 m-005 force-pushed the spr/m-005/config-types-nodeconfig-struct-definitions branch from 1525ce6 to 0f9ef1c Compare January 24, 2026 00:19
@m-005 m-005 merged commit 08d10a8 into main Jan 24, 2026
5 checks passed
@m-005 m-005 deleted the spr/m-005/config-types-nodeconfig-struct-definitions branch January 24, 2026 09:56
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