Skip to content

fix(mcp): a re-baseline is not a first sighting - #147

Merged
blitzcrieg1 merged 1 commit into
masterfrom
fix/rebaseline-visibility
Sep 2, 2026
Merged

blitzcrieg1 merged 1 commit into
masterfrom
fix/rebaseline-visibility

Conversation

@blitzcrieg1

Copy link
Copy Markdown
Owner

Closes #146. Corrects the migration I shipped in #144 yesterday.

What was wrong

#144 made a baseline computed under an older FINGERPRINT_VERSION re-baseline rather than report a change, so the release that closed the _meta blind spot would not alert on every server on upgrade day. That part was right.

It returned new to do it. And new already means "we had never seen this server".

So the two became indistinguishable, and they carry different evidence:

Status Means
new We had never seen this server
new (before this PR) We had a baseline, our hashing changed, and we are trusting whatever the server says today without comparing it to anything

If a server was already poisoned before the upgrade, the re-baseline adopts the poisoned state as trusted and reports it under a word that also means nothing has ever been wrong here.

That trades a loud false positive for a silent false negative, which is the worse half of the trade for a recorder. It is also the same trust-on-first-use hole a reviewer had already raised about installation timing: a recorder installed after a swap has a permanently clean trail. #144 reintroduced it at the upgrade rather than the install, and for every server at once.

The fix

new          outcome=success  unverified=False  MCP tool schema observed
rebaselined  outcome=success  unverified=True   ...re-baselined after a fingerprint change;
                                                 trust-on-first-use, not compared against
                                                 the previous baseline
changed      outcome=changed  unverified=False  ...rug-pull candidate
same         outcome=success  unverified=False  MCP tool schema observed

unverified_baseline is structured rather than left in prose, so a SIEM can count unverified baselines instead of matching a reason string. The status stays success and carries no ATLAS technique, because adopting a baseline is not a rug pull.

This is the same principle already used elsewhere here: coverage reports four states rather than a boolean so unknown cannot be read as fine, and a failed listing emits unavailable rather than nothing. The migration was the one place it was skipped.

The test was pinning the bug

test_a_baseline_from_the_old_hashing_re_baselines_instead_of_alerting asserted the verdict was new. That was exactly the wrong thing to be satisfied by, and it passed while the defect existed. It now asserts the two statuses differ, and a second test pins that the distinction survives into the trail rather than living only in the verdict.

1,166 tests pass, ruff clean, ruleset fingerprint unchanged at 15846a0915769d4a.

Reported by @Santoshkumarpuppala, who has now corrected two of these designs before they shipped and one after.

🤖 Generated with Claude Code

Closes #146. Corrects the migration shipped in #144.

That migration made a baseline computed under an older FINGERPRINT_VERSION
re-baseline rather than report a change, which stopped a false rug pull on
every server on upgrade day. It returned `new` to do it, and `new` already
means "we had never seen this server".

So the two were indistinguishable, and they carry different evidence. If a
server was already poisoned before the upgrade, the re-baseline adopts the
poisoned state as trusted and reports it under a word that also means nothing
has ever been wrong here. That trades a loud false positive for a silent false
negative, which is the worse half of the trade for a recorder, and it is the
same trust-on-first-use hole that a reviewer had already raised about
installation timing. #144 reintroduced it at the upgrade instead of the
install, and for every server at once.

`classify_observation` now returns `rebaselined`. The event carries a distinct
reason saying the baseline was not compared against its predecessor, and a
structured `unverified_baseline` flag so a SIEM can count them rather than
match prose. It stays outcome `success` and carries no ATLAS technique,
because adopting a baseline is not a rug pull.

The test that pinned the old behaviour asserted the verdict was `new`, which
was exactly the wrong thing to be satisfied by. It now asserts the two statuses
differ, and a second test pins that the distinction survives into the trail
rather than living only in the verdict.

Ruleset fingerprint unchanged at 15846a0915769d4a.

Reported by @Santoshkumarpuppala, who has now corrected two of these designs
before they shipped and one after.

Co-Authored-By: Claude Opus 5 <[email protected]>
@blitzcrieg1
blitzcrieg1 merged commit 263349d into master Sep 2, 2026
9 checks passed
@blitzcrieg1
blitzcrieg1 deleted the fix/rebaseline-visibility branch September 2, 2026 17:58
@github-actions github-actions Bot locked and limited conversation to collaborators Sep 2, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

mcp_schema: a re-baseline must be distinguishable from a first sighting

1 participant