Skip to content

Multiple files hardcode execFileSync/execSync maxBuffer instead of registering in DEFAULTS #1739

Description

@carlos-alm

While fixing the DEFAULTS-registration gap for resolveSecrets' execFileSync options in src/infrastructure/config.ts (gauntlet rule 7, Titan phase 7), noticed the same magic-number pattern repeated elsewhere in the codebase — each hardcodes a maxBuffer value inline for a subprocess call instead of sourcing it from DEFAULTS:

  • src/features/cochange.ts:57maxBuffer: 50 * 1024 * 1024
  • src/features/check.ts:345maxBuffer: 10 * 1024 * 1024
  • src/domain/analysis/diff-impact.ts:52maxBuffer: 10 * 1024 * 1024
  • src/domain/graph/builder/stages/native-orchestrator.ts:1467maxBuffer: 100 * 1024 * 1024

Per CLAUDE.md's convention ("never introduce new hardcoded magic numbers in individual modules... always add them to DEFAULTS"), these should each get a named DEFAULTS entry (grouped under whichever config section is most appropriate per file, e.g. DEFAULTS.check, DEFAULTS.coChange) instead of an inline literal, mirroring the fix applied to config.ts's resolveSecrets.

Out of scope for the current phase (targets only src/infrastructure/config.ts) — filed separately per scope-discipline policy.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    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