refactor(config): dedup migrate idempotency checks, add shadow_sentinel step - #6194
Merged
Merged
Conversation
bug-ops
force-pushed
the
feat/issue-5934/shadow-sentinel-migration
branch
from
July 12, 2026 23:56
b822b52 to
0372513
Compare
bug-ops
enabled auto-merge (squash)
July 12, 2026 23:56
…el step Convert ~40 hand-rolled TOML section-header idempotency checks across crates/zeph-config/src/migrate/*.rs to the shared section_header_present() helper, closing correctness gaps from raw substring matching (unanchored matches on dotted keys, inline tables, and non-header text). Five conversions changed observable idempotency-guard behavior; each is now pinned by a regression test. Add migration step 81 (migrate_shadow_sentinel_config) and the matching commented [security.shadow_sentinel] block to config/default.toml, closing the gap where this opt-in security section was undocumented and had no migration path for existing configs, unlike every other [security.*] subsection. Closes #5934 Closes #5933
bug-ops
force-pushed
the
feat/issue-5934/shadow-sentinel-migration
branch
from
July 13, 2026 00:01
0372513 to
e4f30d6
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
crates/zeph-config/src/migrate/*.rs(features.rs, memory.rs, mcp.rs, tools.rs, session.rs, serve.rs, infra.rs, llm.rs) to the sharedsection_header_present()helper, which correctly handles inline-commented headers, implicit subtable parents, and commented-out headers — closing correctness gaps in the raw substring/line checks each step previously hand-rolled.migrate_goals_config,migrate_memory_graph_config(beam_search),migrate_egress_config,migrate_vigil_config,migrate_tools_compression_config— each now pinned by a regression test on the exact dotted-key/inline-table counterexample that previously suppressed injection by coincidence.migrate_shadow_sentinel_config) and a matching commented[security.shadow_sentinel]block toconfig/default.toml, closing the gap where this opt-in security section (already fully implemented and wired throughSecurityConfig) was undocumented indefault.tomland had no migration path for existing configs, unlike every other[security.*]subsection.Closes #5934
Closes #5933
Test plan
cargo +nightly fmt --checkcleancargo clippy --profile ci --workspace --all-targets --features "desktop,ide,server,chat,pdf,scheduler,testing" -- -D warningscleancargo nextest run --config-file .github/nextest.toml -p zeph-config— 768/768 passed (765 baseline + 3 new regression tests)RUSTFLAGS="-D warnings" RUSTDOCFLAGS="--deny rustdoc::broken_intra_doc_links" cargo doc --no-deps --workspace --features "desktop,ide,server,chat,pdf,scheduler"cleangitleaks protect --staged --no-banner --redact— 0 leaksmigrate-configCLI run against a copy of the shippedconfig/default.toml(fullMIGRATIONS+ConfigMigratorpipeline) — confirmed idempotent, step 81 correctly absent from the pending list since the section is already present (commented)[Unreleased].local/testing/playbooks/shadow-sentinel-migration-step-81.mdand.local/testing/coverage-status.mdupdated