GEMMA DEVELOPER AGENTSAVED EVIDENCE
← Dataset Exploration
ARCHIVED TRAINING / dynaconf/dynaconf

dynaconf__dynaconf-1184

This is a preserved training example. Membership in the current training wave has not been verified.
dynaconf/dynaconf · Task 61 of 169

Problem statement

[bug] Regression: get_history() of dynamic value throwing DynaconfFormatError
**Describe the bug**
In release 3.2.6 calling `get_history()` on a `LazySettings` object with a dotted key having a dynamic `@format` value incorrectly throws a `dynaconf.utils.parse_conf.DynaconfFormatError`. This is a regression from release 3.2.5. A minimal reproducable example is provided below.

**To Reproduce**
Steps to reproduce the behavior:

1. Having the following folder structure

<!-- Describe or use the command `$ tree -v` and paste below -->

<details>
<summary> Project structure </summary>

```bash
.
├── get_history_bug.py
└── settings.toml

1 directory, 2 files
```
</details>

2. Having the following config files:

<!-- Please adjust if you are using different files and formats! -->

<details>
<summary> Config files </summary>

**settings.toml**
```toml
[default]

[a]
b = "foo"
c = "bar"
d = "@format {this.a.b} {this.a.c}"
```

</details>

3. Having the following app code:

<details>
<summary> Code </summary>

**get_history_bug.py**
```python
from dynaconf import Dynaconf, get_history
from pprint import pprint

settings = Dynaconf(settings_files=["settings.toml"])

def main() -> None:
    pprint(settings.as_dict())
    print(f"Expecting to get the history of key 'a.d' with value {settings['a']['d']}")
    pprint(get_history(settings, "a.d"))

if __name__ == "__main__":
    main()
```

</details>

4. Executing under the following environment

<details>
<summary> Execution </summary>

```bash
% python3 -m venv .venv
% source .venv/bin/activate
% pip3 install dynaconf==3.2.6
Collecting dynaconf==3.2.6
  Obtaining dependency information for dynaconf==3.2.6 from https://files.pythonhosted.org/packages/e2/14/c8a7d861262139688fa465d2e27ff7113764d6fa03b15b9c7b666729ea2e/dynaconf-3.2.6-py2.py3-none-any.whl.metadata
  Using cached dynaconf-3.2.6-py2.py3-none-any.whl.metadata (9.1 kB)
Using cached dynaconf-3.2.6-py2.py3-none-any.whl (231 kB)
Installing collected packages: dynaconf
Successfully installed dynaconf-3.2.6

[notice] A new release of pip is available: 23.2.1 -> 24.2
[notice] To update, run: pip install --upgrade pip
% python3 get_history_bug.py
{'A': {'b': 'foo', 'c': 'bar', 'd': 'foo bar'}, 'DEFAULT': {}}
Expecting to get the history of key 'a.d' with value foo bar
Traceback (most recent call last):
  File "/home/glenn.mcallister/dynaconf-mre/.venv/lib64/python3.12/site-packages/dynaconf/utils/parse_conf.py", line 151, in __call__
    return self.function(value, **context)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'dict' object has no attribute 'a'

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/home/glenn.mcallister/dynaconf-mre/get_history_bug.py", line 12, in <module>
    main()
  File "/home/glenn.mcallister/dynaconf-mre/get_history_bug.py", line 9, in main
    pprint(get_history(settings, "a.d"))
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/glenn.mcallister/dynaconf-mre/.venv/lib64/python3.12/site-packages/dynaconf/utils/inspect.py", line 264, in get_history
    data = _get_data_by_key(data, key, sep=sep) if key else data
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/glenn.mcallister/dynaconf-mre/.venv/lib64/python3.12/site-packages/dynaconf/utils/inspect.py", line 335, in _get_data_by_key
    return traverse_data(data, key_dotted_path)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/glenn.mcallister/dynaconf-mre/.venv/lib64/python3.12/site-packages/dynaconf/utils/inspect.py", line 331, in traverse_data
    result = result[key]
             ~~~~~~^^^^^
  File "/home/glenn.mcallister/dynaconf-mre/.venv/lib64/python3.12/site-packages/dynaconf/utils/boxing.py", line 26, in evaluate
    return recursively_evaluate_lazy_format(value, settings)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/glenn.mcallister/dynaconf-mre/.venv/lib64/python3.12/site-packages/dynaconf/utils/__init__.py", line 424, in recursively_evaluate_lazy_format
    return _recursively_evaluate_lazy_format(value, settings)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/glenn.mcallister/dynaconf-mre/.venv/lib64/python3.12/site-packages/dynaconf/utils/__init__.py", line 432, in _recursively_evaluate_lazy_format
    value = value(settings)
            ^^^^^^^^^^^^^^^
  File "/home/glenn.mcallister/dynaconf-mre/.venv/lib64/python3.12/site-packages/dynaconf/utils/parse_conf.py", line 234, in __call__
    result = self.formatter(self.value, **self.context)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/glenn.mcallister/dynaconf-mre/.venv/lib64/python3.12/site-packages/dynaconf/utils/parse_conf.py", line 155, in __call__
    raise DynaconfFormatError(
dynaconf.utils.parse_conf.DynaconfFormatError: Dynaconf can't interpolate variable because 'dict' object has no attribute 'a'
```

</details>

**Expected behavior**
As in releases 3.2.4 and 3.2.5 I expected to get the history for the key, as demonstrated below with 3.2.5:

<details>
<summary> Execution </summary>

```bash
% python3 -m venv .venv
% source .venv/bin/activate
% pip3 install dynaconf==3.2.5
Collecting dynaconf==3.2.5
  Obtaining dependency information for dynaconf==3.2.5 from https://files.pythonhosted.org/packages/d6/b1/9b995a140fa4984047b44653036b655ed52680a2293a481614539bc01a07/dynaconf-3.2.5-py2.py3-none-any.whl.metadata
  Using cached dynaconf-3.2.5-py2.py3-none-any.whl.metadata (9.1 kB)
Using cached dynaconf-3.2.5-py2.py3-none-any.whl (230 kB)
Installing collected packages: dynaconf
Successfully installed dynaconf-3.2.5

[notice] A new release of pip is available: 23.2.1 -> 24.2
[notice] To update, run: pip install --upgrade pip
% python3 get_history_bug.py
{'A': {'b': 'foo', 'c': 'bar', 'd': 'foo bar'}, 'DEFAULT': {}}
Expecting to get the history of key 'a.d' with value foo bar
[{'env': 'default',
  'identifier': '/home/glenn.mcallister/dynaconf-mre/settings.toml',
  'loader': 'toml',
  'merged': False,
  'value': '@format {this.a.b} {this.a.c}'}]
```

</details>

**Environment (please complete the following information):**
 - OS: Linux/Fedora39
 - Dynaconf Version: 3.2.6
 - Frameworks in use: None

**Additional context**
- N/A

Training membership

opd_e4b_pure_v6a opd_e4b_pure_v6b opd_e4b_self_audit_v4

Task issues extracted from preserved verified_rft_messages training examples. This is not a verified current RL wave manifest.

Task and snapshot provenance

Snapshot captured 2026-11-12T17:06:59.476467+00:00 · Autoresearch-Arena/gemma-4-developer-agent

{
  "datasets": [
    "opd_e4b_pure_v6a",
    "opd_e4b_pure_v6b",
    "opd_e4b_self_audit_v4"
  ],
  "examples": 5,
  "instance_id": "dynaconf__dynaconf-1184",
  "problem_statement": "[bug] Regression: get_history() of dynamic value throwing DynaconfFormatError\n**Describe the bug**\r\nIn release 3.2.6 calling `get_history()` on a `LazySettings` object with a dotted key having a dynamic `@format` value incorrectly throws a `dynaconf.utils.parse_conf.DynaconfFormatError`. This is a regression from release 3.2.5. A minimal reproducable example is provided below.\r\n\r\n**To Reproduce**\r\nSteps to reproduce the behavior:\r\n\r\n1. Having the following folder structure\r\n\r\n<!-- Describe or use the command `$ tree -v` and paste below -->\r\n\r\n<details>\r\n<summary> Project structure </summary>\r\n\r\n```bash\r\n.\r\n├── get_history_bug.py\r\n└── settings.toml\r\n\r\n1 directory, 2 files\r\n```\r\n</details>\r\n\r\n2. Having the following config files:\r\n\r\n<!-- Please adjust if you are using different files and formats! -->\r\n\r\n<details>\r\n<summary> Config files </summary>\r\n\r\n**settings.toml**\r\n```toml\r\n[default]\r\n\r\n[a]\r\nb = \"foo\"\r\nc = \"bar\"\r\nd = \"@format {this.a.b} {this.a.c}\"\r\n```\r\n\r\n</details>\r\n\r\n3. Having the following app code:\r\n\r\n<details>\r\n<summary> Code </summary>\r\n\r\n**get_history_bug.py**\r\n```python\r\nfrom dynaconf import Dynaconf, get_history\r\nfrom pprint import pprint\r\n\r\nsettings = Dynaconf(settings_files=[\"settings.toml\"])\r\n\r\ndef main() -> None:\r\n    pprint(settings.as_dict())\r\n    print(f\"Expecting to get the history of key 'a.d' with value {settings['a']['d']}\")\r\n    pprint(get_history(settings, \"a.d\"))\r\n\r\nif __name__ == \"__main__\":\r\n    main()\r\n```\r\n\r\n</details>\r\n\r\n4. Executing under the following environment\r\n\r\n<details>\r\n<summary> Execution </summary>\r\n\r\n```bash\r\n% python3 -m venv .venv\r\n% source .venv/bin/activate\r\n% pip3 install dynaconf==3.2.6\r\nCollecting dynaconf==3.2.6\r\n  Obtaining dependency information for dynaconf==3.2.6 from https://files.pythonhosted.org/packages/e2/14/c8a7d861262139688fa465d2e27ff7113764d6fa03b15b9c7b666729ea2e/dynaconf-3.2.6-py2.py3-none-any.whl.metadata\r\n  Using cached dynaconf-3.2.6-py2.py3-none-any.whl.metadata (9.1 kB)\r\nUsing cached dynaconf-3.2.6-py2.py3-none-any.whl (231 kB)\r\nInstalling collected packages: dynaconf\r\nSuccessfully installed dynaconf-3.2.6\r\n\r\n[notice] A new release of pip is available: 23.2.1 -> 24.2\r\n[notice] To update, run: pip install --upgrade pip\r\n% python3 get_history_bug.py\r\n{'A': {'b': 'foo', 'c': 'bar', 'd': 'foo bar'}, 'DEFAULT': {}}\r\nExpecting to get the history of key 'a.d' with value foo bar\r\nTraceback (most recent call last):\r\n  File \"/home/glenn.mcallister/dynaconf-mre/.venv/lib64/python3.12/site-packages/dynaconf/utils/parse_conf.py\", line 151, in __call__\r\n    return self.function(value, **context)\r\n           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\r\nAttributeError: 'dict' object has no attribute 'a'\r\n\r\nThe above exception was the direct cause of the following exception:\r\n\r\nTraceback (most recent call last):\r\n  File \"/home/glenn.mcallister/dynaconf-mre/get_history_bug.py\", line 12, in <module>\r\n    main()\r\n  File \"/home/glenn.mcallister/dynaconf-mre/get_history_bug.py\", line 9, in main\r\n    pprint(get_history(settings, \"a.d\"))\r\n           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^\r\n  File \"/home/glenn.mcallister/dynaconf-mre/.venv/lib64/python3.12/site-packages/dynaconf/utils/inspect.py\", line 264, in get_history\r\n    data = _get_data_by_key(data, key, sep=sep) if key else data\r\n           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\r\n  File \"/home/glenn.mcallister/dynaconf-mre/.venv/lib64/python3.12/site-packages/dynaconf/utils/inspect.py\", line 335, in _get_data_by_key\r\n    return traverse_data(data, key_dotted_path)\r\n           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\r\n  File \"/home/glenn.mcallister/dynaconf-mre/.venv/lib64/python3.12/site-packages/dynaconf/utils/inspect.py\", line 331, in traverse_data\r\n    result = result[key]\r\n             ~~~~~~^^^^^\r\n  File \"/home/glenn.mcallister/dynaconf-mre/.venv/lib64/python3.12/site-packages/dynaconf/utils/boxing.py\", line 26, in evaluate\r\n    return recursively_evaluate_lazy_format(value, settings)\r\n           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\r\n  File \"/home/glenn.mcallister/dynaconf-mre/.venv/lib64/python3.12/site-packages/dynaconf/utils/__init__.py\", line 424, in recursively_evaluate_lazy_format\r\n    return _recursively_evaluate_lazy_format(value, settings)\r\n           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\r\n  File \"/home/glenn.mcallister/dynaconf-mre/.venv/lib64/python3.12/site-packages/dynaconf/utils/__init__.py\", line 432, in _recursively_evaluate_lazy_format\r\n    value = value(settings)\r\n            ^^^^^^^^^^^^^^^\r\n  File \"/home/glenn.mcallister/dynaconf-mre/.venv/lib64/python3.12/site-packages/dynaconf/utils/parse_conf.py\", line 234, in __call__\r\n    result = self.formatter(self.value, **self.context)\r\n             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\r\n  File \"/home/glenn.mcallister/dynaconf-mre/.venv/lib64/python3.12/site-packages/dynaconf/utils/parse_conf.py\", line 155, in __call__\r\n    raise DynaconfFormatError(\r\ndynaconf.utils.parse_conf.DynaconfFormatError: Dynaconf can't interpolate variable because 'dict' object has no attribute 'a'\r\n```\r\n\r\n</details>\r\n\r\n**Expected behavior**\r\nAs in releases 3.2.4 and 3.2.5 I expected to get the history for the key, as demonstrated below with 3.2.5:\r\n\r\n<details>\r\n<summary> Execution </summary>\r\n\r\n```bash\r\n% python3 -m venv .venv\r\n% source .venv/bin/activate\r\n% pip3 install dynaconf==3.2.5\r\nCollecting dynaconf==3.2.5\r\n  Obtaining dependency information for dynaconf==3.2.5 from https://files.pythonhosted.org/packages/d6/b1/9b995a140fa4984047b44653036b655ed52680a2293a481614539bc01a07/dynaconf-3.2.5-py2.py3-none-any.whl.metadata\r\n  Using cached dynaconf-3.2.5-py2.py3-none-any.whl.metadata (9.1 kB)\r\nUsing cached dynaconf-3.2.5-py2.py3-none-any.whl (230 kB)\r\nInstalling collected packages: dynaconf\r\nSuccessfully installed dynaconf-3.2.5\r\n\r\n[notice] A new release of pip is available: 23.2.1 -> 24.2\r\n[notice] To update, run: pip install --upgrade pip\r\n% python3 get_history_bug.py\r\n{'A': {'b': 'foo', 'c': 'bar', 'd': 'foo bar'}, 'DEFAULT': {}}\r\nExpecting to get the history of key 'a.d' with value foo bar\r\n[{'env': 'default',\r\n  'identifier': '/home/glenn.mcallister/dynaconf-mre/settings.toml',\r\n  'loader': 'toml',\r\n  'merged': False,\r\n  'value': '@format {this.a.b} {this.a.c}'}]\r\n```\r\n\r\n</details>\r\n\r\n**Environment (please complete the following information):**\r\n - OS: Linux/Fedora39\r\n - Dynaconf Version: 3.2.6\r\n - Frameworks in use: None\r\n\r\n**Additional context**\r\n- N/A",
  "repo": "dynaconf/dynaconf",
  "source": "v2/experiments/train_data/opd_e4b_pure_v6a/verified_rft_messages.jsonl",
  "source_sha256": "f045b7ca5b3883a1e2eaee81e1c02a4a1b53dd7b7b36e98bacb2ba5823a15148"
}
{
  "captured_at": "2026-11-12T17:06:59.476467+00:00",
  "membership": "archived training",
  "membership_evidence": "Task issues extracted from preserved verified_rft_messages training examples. This is not a verified current RL wave manifest.",
  "name": "Preserved post-training task archive",
  "source": "Autoresearch-Arena/gemma-4-developer-agent",
  "source_revision": "016496de222aaafca0d4ee4c18efc63ba616f76e",
  "sources": [
    {
      "path": "v2/experiments/train_data/opd_e4b_cispo_v5/verified_rft_messages.jsonl",
      "sha256": "a43610ad0dfb6ace95375cfae09000f41afc0338cc925af870a4ade7a9b20c4c"
    },
    {
      "path": "v2/experiments/train_data/opd_e4b_hybrid_v3/verified_rft_messages.jsonl",
      "sha256": "bd326303eb127e8e5e08f03daf97bb88d79d19709d59f3f93f348bc56686a8df"
    },
    {
      "path": "v2/experiments/train_data/opd_e4b_onpolicy_v3/verified_rft_messages.jsonl",
      "sha256": "960c680e797e823a0d3a22f4b1d5ef60a72971373d703b877340b0c9126aaf68"
    },
    {
      "path": "v2/experiments/train_data/opd_e4b_pure_v6a/verified_rft_messages.jsonl",
      "sha256": "f045b7ca5b3883a1e2eaee81e1c02a4a1b53dd7b7b36e98bacb2ba5823a15148"
    },
    {
      "path": "v2/experiments/train_data/opd_e4b_pure_v6b/verified_rft_messages.jsonl",
      "sha256": "0f62460a9706eea5e1605255896f191ab00cb5706c5f1f2e1c293e9a718218dc"
    },
    {
      "path": "v2/experiments/train_data/opd_e4b_pure_v7/verified_rft_messages.jsonl",
      "sha256": "e37f7bd675322f3f81500b73559d60d5f602ca0537bf19f5cb06332c728c7b72"
    },
    {
      "path": "v2/experiments/train_data/opd_e4b_pure_v7b/verified_rft_messages.jsonl",
      "sha256": "b864bdc8695183433eef6e31cb8d33fad44ba3aded2170c1ade4ad5b2944ce23"
    },
    {
      "path": "v2/experiments/train_data/opd_e4b_self_audit_v4/verified_rft_messages.jsonl",
      "sha256": "0026023745afb8f3dc1c176dc7f7171157b4ad5a66656b524af218e8e19ceee6"
    },
    {
      "path": "v2/experiments/train_data/rft_e4b_aligned_v2/verified_rft_messages.jsonl",
      "sha256": "92a4515fee9d152b0d4c510ee3ce4caaaffe2003ba7584469f8027f174aab18c"
    },
    {
      "path": "v2/experiments/train_data/rft_v1/verified_rft_messages.jsonl",
      "sha256": "a42453ccd7ac7680b0a03865e8e7080bc8bf74c8d9d193b440c441ed46f8512b"
    },
    {
      "path": "v2/experiments/train_data/rft_v2/verified_rft_messages.jsonl",
      "sha256": "18f4b3bd7e651f83c6acab479c9475e3fa50dc652a384f309e97146983ac85ba"
    }
  ]
}