Skip to content

[Code Quality] Consolidate legacy vs AWF sandbox config duplication (BoundedQueriesConfig/AWFBoundedQueriesConfig, SRTNetworkConfig/AWFNetworkC [Content truncated due to length] #50002

Description

@github-actions

Description

typist analysis (discussion #49984) found a systemic "legacy vs AWF" config duplication pattern: the same sandbox concepts are modeled twice with hand-written field-by-field copy functions bridging them.

Suggested Changes

  • BoundedQueriesConfig (pkg/workflow/tools_types.go:450) vs AWFBoundedQueriesConfig (pkg/workflow/awf_config.go:192)
  • SRTNetworkConfig (pkg/workflow/sandbox.go:147) vs AWFNetworkConfig (pkg/workflow/awf_config.go:247)

Steps:

  1. Confirm the AWF variants carry no fields beyond the legacy type.
  2. Replace copy functions with direct marshal/embed of a single canonical type.
  3. Run compiler + sandbox tests.

Files Affected

  • pkg/workflow/tools_types.go
  • pkg/workflow/awf_config.go
  • pkg/workflow/sandbox.go

Success Criteria

  • Single canonical type per concept, no hand-written copy functions
  • All existing compiler/sandbox tests pass

Source

Extracted from Typist - Go Type Consistency Analysis discussion #49984

Priority

High - removes a class of copy-paste-drift risk in sandbox security config. Estimated effort: 6-9 hours.

🔍 Task mining by Discussion Task Miner - Code Quality Improvement Agent · auto · 88.4 AIC · ⌖ 4.01 AIC · ⊞ 10.3K ·

  • expires on Aug 4, 2026, 5:45 AM UTC-08:00

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions