tr
TryGhost
GitHub
Ghost
Workspace
GitHub
CI Pipeline Executions
Current execution
Succeeded
claude/nconf-config-freeze-ay169g
Runs and Agents
Configuration
Self-Healing CI
Project Graph
Circular Dependencies
Enterprise
Resource Usage
Analysis
Conformance
Enterprise
Runs
Current run
Succeeded
Tasks
Resource Usage
Insights
Compare tasks
Analytics
Sign in
Toggle sidebar
Fixed frozen config rejecting required() and handing back mutable objects no ref Two problems with the freeze helper, both found in review. required() was in the mutator list, but it isn't one: nconf implements it as a read - it calls get() for each key and throws when one is missing. Blocking it would have made post-load config validation throw "Config is frozen" in every non-test environment. It's out of the list, with a test covering both the passing and missing-key cases while frozen. Object-valued reads were cached and handed back by reference, so a caller that mutated what it got rewrote the cache for every later reader. configure() in data/db/connection.js does exactly that - it assembles the knex config by mutating the object it's passed, which is config.get('database'). That made the two ways of reading a key disagree: get('database').pool -> {} (whatever knex bootstrap bolted on) get('database:pool') -> undefined (no store has it) Cached values are now deep-frozen, so a mutation raises a TypeError naming the site instead of silently corrupting config, and configure() clones before mutating. The clone is worth having on its own: mutating the object config handed back was already writing through to nconf's stores for nested keys, since nconf's merge shares subtrees by reference. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011s9ZdgxjVXMr7YTh4UtmtH
nx run ghost-monorepo:lint:boundaries
⌘K
Succeeded
nx run ghost-monorepo:lint:boundaries
Click to copy
Linux
4 CPU cores
read-write
access token used
ea8df3f9
30722
GitHub
Ghost
Workspace