Example

What a compilation proves, and where it refuses wrongly

Compare the compiler with an exhaustive enumeration of legal bundles and find a case where it reports infeasibility although a legal bundle exists.

A conformance suite shows the compiler agrees with a reference on the cases both of them were given. It does not show the compiler is complete — that a refusal to assemble is ever wrong. The chapter’s evidence for that question is a counterexample, and the repository ships one: a constructed case where the compiler says INSUFFICIENT_BUDGET and a legal bundle exists.

Run it

git clone https://github.com/ernanhughes/project-context-compiler.git
cd project-context-compiler
git checkout 8d8bd31a20788c4c3298dfdffac741c507211a58
npm ci
node scripts/feasibility-oracle.mjs conformance/completeness-v1

Node 22 or later. The oracle enumerates legal subsets exhaustively and shares the compiler’s cost units. No model, no network.

Expected outcome

greedy-false-refusal/requested	budget=800	compiler=INSUFFICIENT_BUDGET	legal_sets=1	FALSE REFUSAL

compilations: 1	false successes: 0	false refusals: 1

One case, and it is a false refusal. The compiler admits mandatory forms by lowest marginal cost, takes the cheaper form of the mandatory content, and then cannot afford the resolver that the other form would have needed.

Why the case is constructed this way

The repository states the construction, and it is worth reading because it shows what the counterexample is and is not:

`greedy-false-refusal`: mandatory content A has two forms. Form a1 (100 tokens) depends on resolver r
(500 tokens); form a2 (300 tokens) has no dependency. Required content B (b1, 50 tokens) also depends on r.
The compiler admits mandatory forms first by lowest marginal cost: a1 costs 600 with its resolver, a2 costs 300,
so it takes a2, and b1 then cannot afford r. The bundle {a1, b1, r} satisfies the declared constraints and
fits the 800-token budget, so a legal bundle exists.

The oracle’s own verdict is stored beside the fixture, so the claim is pinned rather than remembered:

greedy-false-refusal/requested	budget=800	compiler=INSUFFICIENT_BUDGET	legal_sets=1	FALSE REFUSAL

compilations: 1	false successes: 0	false refusals: 1

Mechanism and limitations

Documented: the construction and its limits are in conformance/completeness-v1/README.md, which says in its first line that these cases are not part of the compiler-v1 conformance corpus and are not compared with any frozen Python output. The oracle is scripts/feasibility-oracle.mjs.

Observed: the run above. The compiler reported INSUFFICIENT_BUDGET on a request where the exhaustive enumeration found exactly one legal subset, so the refusal was wrong. There were no false successes in this case set.

Not shown. One constructed case is one counterexample, not a measurement of how often the compiler refuses wrongly. The oracle shares the compiler’s cost units and its assumption that two forms of one content identity may not coexist, so it tests completeness under those assumptions and not completeness in general. The completeness cases are outside the conformance corpus and have no frozen Python comparison. The finding is that a greedy admission order can refuse a feasible request; it is not a demonstration that a different order would be better in general, and the chapter’s own framing keeps the counterexample exploratory until its fixture, expected outcome and run identity are pinned in the evidence register.

Canonical source and the completeness fixtures .

Understand this example

Copy this prompt into your AI tool. No code runs here.

Apply this example

Copy this prompt into your AI tool. No code runs here.