Skip to content

fix(init): AI enrichment precedence flipped from ANTHROPIC_API_KEY gate to CLI-first (staging review — PR #2018) #2023

Description

@rapiercraft-forgedock

Problem

The same CLI-over-API-key precedence flip as MAT-1 is applied to forgedock init AI enrichment. Previously enrichment was gated purely on ANTHROPIC_API_KEY presence; now a locally-installed claude CLI takes precedence, silently switching backend and behavior for existing init users.

Source: PR #2018 (staging → main deploy review) — finding MAT-2
Location: bin/init-enrich.mjs:resolveEnrichBackend
Confidence: CONFIRMED
Severity: MEDIUM

Source Branch Context

Code branch: staging
Worktree base: origin/staging

When fixing: git worktree add ../fix-{slug} -b fix/{slug} origin/staging

Acceptance Criteria

  • Finding validated: VALIDATED / FALSE_POSITIVE / INCONCLUSIVE
  • If VALIDATED: fix implemented and tested on origin/staging
  • Regression test added covering this path

Metadata

Metadata

Assignees

No one assigned

    Labels

    needs-validationReview finding awaiting human validation. Managed by ForgeDock.priority:P1High priority — major feature broken, no workaround. Managed by ForgeDock.review-findingDefect or improvement found during automated PR review. Managed by ForgeDock.staging-reviewFinding from a staging branch review before deploy to main. Managed by ForgeDock.

    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