Skip to content

fix(config): migration does not add guardrail keys for configs without [security.guardrail] #2158

@bug-ops

Description

@bug-ops

Summary

Unit test migrate::tests::security_without_guardrail_gets_guardrail_commented fails in v0.17.0.

Reproduction

cargo nextest run --config-file .github/nextest.toml --workspace --lib --bins

Output:

FAIL [0.010s] zeph-config migrate::tests::security_without_guardrail_gets_guardrail_commented

thread panicked at crates/zeph-config/src/migrate.rs:1178:9:
migration must add guardrail keys for configs without [security.guardrail]: got:

[security]# autonomy_level = "supervised"

# [security.content_isolation]
# enabled = true
...

Expected behavior

When a config has [security] but no [security.guardrail] section, migration should inject commented guardrail stub keys into the output.

Actual behavior

Migration outputs only [security] header with a comment for autonomy_level, no guardrail stub is added.

Context

Labels

bug

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions