anchor.diff:      end.
   
   merge_configs(Remote, Local) ->
  -    % we need to merge in any cluster invariants
       merge_configs(mergable(), Remote, Local, []).
   
   merge_configs([], _Remote, Local, Acc) ->
  
positive.code: 
  handle_call({set, KVList}, _From, State) ->
      State2 = merge_configs(#config{dynamic = [KVList]}, State),
      {reply, ok, State2}.
  
  %%--------------------------------------------------------------------
  
  load_file_config(ConfigPath) ->
      DefaultConfig = config_default:default(),
      % Static config file.
      {ok, S} = read_file_config(ConfigPath),
      % Dynamic data directory.
      {value, DirPath} = search([S, DefaultConfig], directory),
      ok = filelib:ensure_dir(DirPath),
      % Dynamic config file.
      D = case read_file_config(filename:join(DirPath, "dynamic.cfg")) of
              {ok, DRead} -> DRead;
              _           -> []
          end,
      #config{static = [S, DefaultConfig], dynamic = [D]}.
  
  read_file_config(ConfigPath) -> file:consult(ConfigPath).
  
  pick_node_and_merge(Local, Nodes) when length(Nodes) == 0 -> Local;
  pick_node_and_merge(Local, Nodes) ->
  
negative.code: 
  %% gen_server callbacks
  
  init(undefined) -> % Useful for unit-testing.
      {ok, #config{static = [config_default:default()]}};
  
  init({config, D}) -> % Useful for unit-testing.
      {ok, #config{static = [config_default:default()], dynamic = [D]}};
  
  init(ConfigPath) ->
      Config = load_config(ConfigPath),
      Merged = pick_node_and_merge(Config, nodes([visible])),
      % TODO: Should save the merged dynamic file config.
      {ok, Merged}.
  