Remove unused configuration variables - #32
Merged
Conversation
Audit of agentfield.yaml revealed many config options that were defined but never actually read or used by the codebase. This creates confusion for users who set these values expecting them to have an effect. Removed from YAML config: - agentfield: mode, max_concurrent_requests, request_timeout, circuit_breaker_threshold (none were wired to any implementation) - execution_queue: worker_count, request_timeout, lease_duration, max_attempts, failure_backoff, max_failure_backoff, poll_interval, result_preview_bytes, queue_soft_limit, waiter_map_limit - ui: backend_url - storage.local: cache_size, retention_days, auto_vacuum - storage: config field - agents section entirely (discovery/scaling never implemented) Removed from Go structs: - AgentsConfig, DiscoveryConfig, ScalingConfig - CoreFeatures, EnterpriseFeatures - DataDirectoriesConfig - Unused fields from AgentFieldConfig, ExecutionQueueConfig, LocalStorageConfig, StorageConfig, UIConfig The remaining config options are all actively used: - agentfield.port, execution_cleanup.*, execution_queue webhook settings - ui.enabled/mode/dev_port - api.cors.* - storage.mode/local.database_path/local.kv_store_path/vector.* - features.did.* (all DID/VC settings) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Member
|
LGTM, old v0.1 reminiscent configs. |
Member
|
@AbirAbbas cache_size, retention_days, auto_vacuum - lets add it to backlog probably to be added to memory api but was debating to add ttl directly in the rest api for per memory setting. Good prod grooming backlog. |
AbirAbbas
added a commit
that referenced
this pull request
Apr 20, 2026
…erless-discovery security: fix SSRF in serverless agent discovery (CodeQL alert #32)
AbirAbbas
added a commit
to kiranannadatha8/agentfield
that referenced
this pull request
Apr 21, 2026
…ted parts Fixes CodeQL go/request-forgery (CWE-918) alert Agent-Field#32 on RegisterServerlessAgentHandler by splitting normalizeServerlessDiscoveryURL into a parse helper that returns a freshly constructed *url.URL (validated scheme literal, allowlisted host, path.Clean-ed path, no user/query/fragment propagated) and having the handler build the /discover URL from those sanitized components rather than string-concatenating the caller-supplied value. Also rejects opaque URLs. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Audited
control-plane/config/agentfield.yamland found many config options that were defined but never actually used by the codebase. This creates confusion for users who set these values expecting them to have an effect.Removed 103 lines of dead config/struct definitions.
What Was Removed
From YAML config:
agentfieldmode,max_concurrent_requests,request_timeout,circuit_breaker_thresholdexecution_queueworker_count,request_timeout,lease_duration,max_attempts,failure_backoff,max_failure_backoff,poll_interval,result_preview_bytes,queue_soft_limit,waiter_map_limituibackend_urlstorage.localcache_size,retention_days,auto_vacuumstorageconfig: {}agentsFrom Go structs:
AgentsConfig,DiscoveryConfig,ScalingConfigCoreFeatures,EnterpriseFeaturesDataDirectoriesConfigAgentFieldConfig,ExecutionQueueConfig,LocalStorageConfig,StorageConfig,UIConfigWhat Remains (All Actively Used)
Test plan
go build ./...succeedsgo test ./internal/config/...passesgo test ./internal/storage/...passesgo test ./cmd/...passesgo test ./internal/application/...passesgo test ./internal/server/...passes🤖 Generated with Claude Code