Skip to content

[Export Audit] Dead barrel file src/services/agent-environment.ts with unused export #3801

@github-actions

Description

@github-actions

API Surface Issue

Category

Dead barrel file / Unused export

Summary

  • File: src/services/agent-environment.ts
  • Symbol: buildAgentEnvironment
  • Issue: The entire barrel file is unused - the re-exported function is never imported from this location

Evidence

The barrel file exists and re-exports buildAgentEnvironment:

export { buildAgentEnvironment } from './agent-environment/environment-builder';

However, no source files import from this barrel:

$ grep -r "from './services/agent-environment'" src/ --include="*.ts"
# (no results - zero imports)

All consumers import buildAgentEnvironment from services/agent-service.ts instead:

// src/compose-generator.ts
import { buildAgentEnvironment, buildAgentVolumes, buildAgentService, buildIptablesInitService } from './services/agent-service';

This barrel was created during the refactoring that split agent-environment into a subdirectory, but was never actually used as the import path.

Recommended Fix

Remove the entire barrel file src/services/agent-environment.ts:

rm src/services/agent-environment.ts

The export is already available through services/agent-service.ts, which is the canonical import location used by all consumers.

Impact

  • Dead code risk: Medium - unused barrel adds maintenance burden
  • Maintenance burden: Low - removing the file eliminates potential confusion about import paths

Related


Detected by Export Audit workflow. Triggered by push to main on 2026-05-25

Generated by API Surface & Export Audit · ● 8.7M ·

  • expires on Jun 24, 2026, 6:09 PM UTC

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions