Skip to content

Commit 4f2d2d2

Browse files
speak-agentclaude
andcommitted
the refusal carries its code, because something reads it
The mcpp-index compatibility measurement distinguishes "this graph does not supply what the member asked for" from "the member did not build" --- a distinction that decides whether a member counts against a compatibility figure --- and it was written to do so on the refusal code `interface-not-provided`. That code reached no output: `refusal::record` is read by `mcpp doctor` and by one branch of the build-database path, and a `mcpp build` prints none of it. The consumer's judge could never fire. The code is now printed in the diagnostic, the way E0006 is, and e2e 743 asserts it. A refusal that only a person can recognise forces every machine consumer to match prose --- and prose that a package's own compile error could coincidentally contain. Found by running the consumer's own criterion against the engine rather than reading it: a mechanism with no way to trigger is the defect class this whole branch exists to remove, and it had one of its own. Co-authored-by: Claude Code <noreply@anthropic.com>
1 parent 9fca8e7 commit 4f2d2d2

2 files changed

Lines changed: 20 additions & 1 deletion

File tree

‎src/build/prepare.cppm‎

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11227,9 +11227,18 @@ prepare_build(bool print_fingerprint,
1122711227
names += "\n ";
1122811228
names += mI;
1122911229
}
11230+
// THE CODE IS PRINTED, THE WAY E0006 IS, BECAUSE SOMETHING
11231+
// READS THIS. A refusal that only a person can recognise
11232+
// forces every machine consumer to match prose --- and prose
11233+
// that a package's own compile error could coincidentally
11234+
// contain. The mcpp-index compatibility measurement
11235+
// distinguishes "this graph does not supply what the member
11236+
// asked for" from "the member did not build" on exactly this
11237+
// token, and that distinction decides whether a member counts
11238+
// against a compatibility figure.
1123011239
return std::unexpected(std::format(
1123111240
"'{}' requires interfaces the resolved implementation does "
11232-
"not provide.{}\n"
11241+
"not provide. [interface-not-provided]{}\n"
1123311242
" provided by {} ({} interface{})\n"
1123411243
" This is refused before anything is compiled "
1123511244
"because dependency resolution is the earliest time the "

‎tests/e2e/743_kernel_abi_interfaces_are_resolved_not_preprocessed.sh‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,16 @@ echo "$out" | grep -q "fakekernel" || {
134134
echo "$out" >&2
135135
exit 1
136136
}
137+
# AND THE CODE, BECAUSE SOMETHING READS THIS. mcpp-index's compatibility
138+
# measurement tells "this graph does not supply what the member asked for"
139+
# from "the member did not build" on this token; without it that consumer has
140+
# to match prose, and the distinction decides whether a member counts against
141+
# a compatibility figure.
142+
echo "$out" | grep -q "\[interface-not-provided\]" || {
143+
echo "FAIL: the refusal must carry its code the way E0006 does" >&2
144+
echo "$out" >&2
145+
exit 1
146+
}
137147
# Nothing compiled: the answer exists before the compiler is reached, and a
138148
# refusal that arrives after an object file has been written has answered at
139149
# the wrong time even when it answers correctly.

0 commit comments

Comments
 (0)