Skip to content

Fail closed when a named profile file is missing - #875

Merged
TheGreatAxios merged 2 commits into
mainfrom
cl-7636-fail-closed-when-profile-names-a-missing-file
Sep 11, 2026
Merged

TheGreatAxios merged 2 commits into
mainfrom
cl-7636-fail-closed-when-profile-names-a-missing-file

Conversation

@TheGreatAxios

Copy link
Copy Markdown
Collaborator

Summary

  • An explicit --profile name (or a project profile key) whose file does not exist now throws, naming the missing path, instead of silently running on defaults
  • Optional absence of the project overlay profile.json stays silent

Verification

  • bun test src/profiles.test.ts — 14 pass, exit 0
  • Independent critic: ready, no blocking findings

Fixes CL-7636

@linear-code

linear-code Bot commented Sep 10, 2026

Copy link
Copy Markdown

CL-7636

@TheGreatAxios TheGreatAxios left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review · Comment

Missing named profile files fail closed in resolveProfile; a missing project overlay stays optional.

Findings

  • src/profiles.test.ts — merge test still reimplements { ...namedProfile } and comments that home cannot be injected, while this diff adds home and uses it in the new tests. Drive that merge through resolveProfile(cwd, undefined, home).

@TheGreatAxios TheGreatAxios left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Critic · Comment

Throw after loadProfile null is the right layer. ENOENT-only null keeps JSON/schema errors distinct. Optional third home arg; loadConfig still calls the two-arg form.

Findings

  • Merge test comment is now false; project-over-named merge is not actually executed via resolveProfile.

@TheGreatAxios
TheGreatAxios force-pushed the cl-7636-fail-closed-when-profile-names-a-missing-file branch 6 times, most recently from d119733 to 9d152f9 Compare September 11, 2026 03:25
@TheGreatAxios
TheGreatAxios force-pushed the cl-7636-fail-closed-when-profile-names-a-missing-file branch from 9d152f9 to 1ac65b0 Compare September 11, 2026 03:26
@TheGreatAxios
TheGreatAxios merged commit e60971f into main Sep 11, 2026
9 checks passed
@TheGreatAxios
TheGreatAxios deleted the cl-7636-fail-closed-when-profile-names-a-missing-file branch September 11, 2026 03:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant