Serve a request by the revision its _meta declares, not by the carrier - #7
Merged
Conversation
ping was refused with -32601 whenever a request carried per-request _meta
naming any revision, including 2025-11-25, where ping exists. The clause's
own comment named 2026-07-28; the code named no revision.
Red first, before any edit to lib/:
$ mix test test/beam_mcp/negotiation_test.exs
12 tests, 2 failures
exit=2
Nine pre-existing tests passed. Full output in logs/red.txt, written by the
command. Measured against the pre-fix tree:
ping + _meta 2026-07-28 -> {"error":{"code":-32601,...}}
ping + _meta 2025-11-25 -> {"error":{"code":-32601,...}} <- the defect
ping + _meta, no version -> {"result":{}} <- the boundary
ping bare -> {"result":{}}
The same cond modernised every result on the same version-blind basis, so a
request declaring 2025-11-25 was answered with resultType and modern _meta
serverInfo -- two fields 2026-07-28 introduced and 2025-11-25 does not
define. Same root cause, so fixed together; fixing only ping would have left
the clause version-blind.
The clause now branches on the declared version: 2026-07-28 refuses ping and
modernises, 2025-11-25 answers ping and does not, anything else is -32022.
Decided against the specification rather than the symptom. Two alternatives
were rejected and the argument is in the slice PLAN. Refusing a _meta that
names 2025-11-25 would contradict this server's own advertisement -- it
returns that revision from server/discover and lists it in the -32022
supported payload, and the spec tells a client receiving -32022 to select
from that list and retry, which produces exactly this message. Fixing only
the ping guard would have kept an envelope announcing a revision the client
did not ask for. The three specification pages quoted are archived under
logs/, fetched by curl rather than recalled.
Coverage: every test in the file discarded the returned state, so the new
era branches were untested for state threading. Three tests added; two are
mutation-killed (logs/mutation-a.txt, logs/mutation-b.txt, raw captures),
the third guards a write that does not exist and is not scored.
$ ./tools/gate.sh
format / compile / test / credo pass
reuse pass (19 commentable files)
licence files pass
Gate OK. exit=0
$ mix test
39 tests, 0 failures
Version 0.1.2. NOTE FOR RELEASE: this removes resultType and _meta
serverInfo from results for every method on the legacy-declared path, not
just ping. A 0.1.0 client reading result.resultType there gets nil after
what is numbered a patch. The removal is labelled under its own Changed
heading in the changelog, and whether 0.2.0 is the honester number is left
to the release decision. 0.1.1 reached main and was never published; its
documentation fix ships inside 0.1.2.
Reviewed over six rounds by two independent lanes on checkouts of the index.
Both approved tree d9b0c01e. This commit adds their two round-6 reports and
one correction they named: a tally sentence in FINDINGS.md that asserted a
count contradicted by the tree's own reports, deleted rather than retyped,
inside the paragraph arguing a typed count is indistinguishable from a
derived one.
Signed-off-by: Ayla Croft <aylacroft@proton.me>
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.
Closes the
pingdefect live in published0.1.0: the_metaclause refusedpingwith-32601for every revision reaching it, including2025-11-25, wherepingexists. Its own comment named2026-07-28; the code named no revision.Red first
Nine pre-existing tests passed. Full output at
slices/001b-ping-guard/logs/red.txt, written by the command.Two halves of one defect
The same version-blind
condalso stampedresultTypeand modern_metaserverInfoonto results answering2025-11-25requests — two fields2026-07-28introduced and2025-11-25does not define. Fixing onlypingwould have left the clause version-blind.The clause now branches on the declared version.
2026-07-28refusespingand modernises;2025-11-25answerspingand does not; anything else is-32022.Decided against the fetched specification rather than the issue text. Refusing a
_metanaming2025-11-25would contradict this server's own advertisement — it returns that revision fromserver/discoverand lists it in the-32022supportedpayload, and the spec tells a client receiving-32022to select from that list and retry the request, which produces exactly this message. The three specification pages quoted are archived underlogs/, fetched bycurl, and the sweep re-fetches and diffs them against upstream.Verification
Three tests added for state threading through the new branches; two are mutation-killed with raw captures at
logs/mutation-a.txtandlogs/mutation-b.txt, the third guards a write that does not exist and is not scored — stated rather than claimed.Review
Six rounds, two independent lanes, each on a
git archivecheckout of the index; both lanes printed the tree hash they read and both matchedgit write-tree. Twelve reports, each written by its own lane, are inlogs/. Both approved treed9b0c01e.lib/andtest/have not changed since round 2 — both lanes cleared the substance early, and every round after was evidence integrity. What that caught, three times running, was an archive whose bytes were not its command's, where each fix introduced the next instance. It stopped when the population was derived rather than the instance patched;tools/archive_sweep.shnow classifies every file and exits 1 if the population and the classifications disagree, scored by mutation rather than asserted.Release note — needs a decision before publish
This removes
resultTypeand_metaserverInfofrom results for every method on the legacy-declared path, not justping. A0.1.0client readingresult.resultTypethere getsnilafter what is numbered a patch. The removal is labelled under its own### Changedheading; whether0.2.0is the honester number is left open deliberately.0.1.1reachedmainand was never published — its documentation fix ships inside0.1.2.Known, filed rather than folded in
tools/listomitsttlMs/cacheScopeandserver/discovercarries noresultType, both required by2026-07-28(SCR-261). Two gaps intools/gate.sh's own honesty (SCR-262). A conditional defect in the sweep's exit status, harmless today and blocking the moment it is wired into CI, is filed separately.