fix(doctor): report stored settings the pin leaves unapplied - #2813
Merged
Merged
Conversation
|
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.
Refs #2514, #2728.
Root cause
The daemon Doctor kernel's configuration read (
configuration_read_from_pin) answeredInSyncfor every pinned snapshot by assumption. #2728 made a stored index pattern the pin leaves unapplied a typed finding (setting_findings), but onlyConfigurationGetand a CLI-only check intracedecay doctorconsulted it. The canonical report (MCP, dashboard and the CLI's "Canonical Doctor findings") still printedconfiguration: effective configuration matches the resolved authority (configuration.resolved.in-sync)beside the CLI's own issue line: two authorities that contradicted each other.Change
ConfigurationDriftV1::Unapplied(Vec<UnappliedConfigurationSettingV1>): the kernel read runssetting_findings(the fix(config): report uncompilable stored index patterns #2728 authority) over the pinned snapshot; any finding makes the readUnapplied. The mapper emits a degradedconfiguration.resolved.unappliedfinding naming the key, pattern, compiler message and the repair.check_project_index_paths: the canonical finding is now the single authority and the CLI renders it as an issue (exit code 1 via the existing degraded → issue mapping), so the defect is counted once.Fails on origin/master (test kept, production files from origin/master)
The test pairs the unapplied pin with a clean pin (
docs/**only) that must still read in-sync.Runtime journey (debug CLI from this branch, isolated HOME, capped daemon scope)
Healthy profile, branch daemon +
tracedecay doctor(exit 0):Seeding the legacy state: beta.63 (the last release that stored patterns unchecked) accepted
index.exclude.v1 = ["src/[abc","docs/**"]in an isolated profile, but this branch (like origin/master since #2747) refuses that beta.63 profile with a typed reset (Store profile authority requires reset ... graph_scopes has an incompatible number of columns ... run tracedecay wipe --all --yes), and the current write path refuses the pattern (tracedecay_configuration_set refused the request (configuration.invalid_request)). So no master-readable profile can hold the state today; the falsifiable evidence is the kernel test above. Forging the stored revision digests to seed it was deliberately not done.Verification
cargo test -p tracedecay-daemon-service -p tracedecay-contracts -p tracedecay --lib doctor: 9 + 35 + 39 passedcargo test -p tracedecay-contracts --test contracts_suite doctor: 14 passedcargo clippy -p tracedecay-contracts -p tracedecay-daemon-service -p tracedecay --all-targets -- -D warnings: cleancargo fmt --all -- --check: clean; ripwire--quality-deltaand--edit-checkon the changed symbols: no contract change, no pre-existing symbol made worse.