ID

R1168

Status

Ready

Bucket

dx

Priority

3

Theme

error-channel

Blocked by

error-dispatch-matches-graphitron-9

Created

2026-11-11

Updated

2026-11-12

An error handler that an earlier handler shadows is reported, as a warning or an error

Goal

An author who declares an @error handler that can never claim an exception, because a handler tried earlier claims everything it would, is told so when the schema is built, as a warning or as an error according to a setting the consumer chooses. Dispatch itself stays as Graphitron 9 had it (R1167, error-dispatch-matches-graphitron-9): handlers are tried in the order the schema declares them, and graphitron does not reorder them. Today such a handler goes dead with no diagnostic unless its criteria are identical to the earlier one’s.

union FilmLookupError = FilmLookupCatchAll | FilmLookupInvalid

type FilmLookupCatchAll @error(handlers: [
    {handler: GENERIC, className: "java.lang.RuntimeException", description: "The film lookup failed."}
]) { path: [String!]! message: String! }

type FilmLookupInvalid @error(handlers: [
    {handler: GENERIC, className: "java.lang.IllegalArgumentException"}
]) { path: [String!]! message: String! }

Every IllegalArgumentException is a RuntimeException, and the catch-all is declared first, so FilmLookupInvalid is never answered. After this item the build says that the IllegalArgumentException handler is unreachable behind the RuntimeException handler of FilmLookupCatchAll, and the author moves the catch-all last.

The decision is Filip’s of 2026-11-11: narrowest-first ordering (R1165, discarded) is dropped in favour of Graphitron 9’s declared order plus this diagnostic.

Glossary

  • Handler: one entry of an @error type’s handlers: argument; its kind is GENERIC, DATABASE or VALIDATION.

  • Errors container: the union, interface or single @error type that a payload’s errors field lists. A producer field (a @service field, or a payload-returning @mutation or @routine write) catches into it. Every @error type is also a container of itself, whether or not an errors field lists it alone: the order of its own handlers is a fact of the type.

  • Claims: a handler claims a throw when dispatch offers it a link of the throw’s cause chain that its predicate holds for. A GENERIC handler is offered every link from the outer exception down; a DATABASE handler is offered one, the first SQLException below an outer jOOQ DataAccessException (R1167).

  • Defect: a row of the fact store (the per-graph database the generator fills from the SDL, the classpath and the jOOQ catalog) saying a schema breaks a declared rule. Each rule is one code in graphitron_defect_type with a severity; an error code stops validate and generate through the store’s verdict (docs/architecture/explanation/defects-as-facts.adoc).

Today

Two handlers with identical criteria in one container are refused (ChannelRuleChecks.checkDuplicateMatchCriteria, "rule 8", with a copy in FieldBuilder for the DML path). Nothing else is checked: a broad handler declared before a narrower one of the same kind leaves the narrower one dead, silently. The reference page tells the author to order handlers by hand ("Nothing sorts by specificity").

The rule

R1167 fixes the order this rule judges by, and was still in Spec when this was written: at pickup, confirm it landed with the order stated here, and reopen this item if it did not. As its spec stood on 2026-11-12, dispatch walks one order: the container’s DATABASE handlers, only when the outer exception is a jOOQ DataAccessException, then its GENERIC handlers. Within a kind the order is declared order: the container’s @error types in member order, then each type’s handlers: in array order.

Handler A is shadowed in a container when a handler B of the same kind, declared before A in that container, claims every throw A claims. That is decidable from what the author wrote and the class hierarchy:

  • GENERIC behind GENERIC: A’s class is B’s class or a subtype of it, and B has no matches: or A’s matches: text contains B’s.

  • DATABASE behind DATABASE: B has no sqlState/code or A carries the same one, and the same matches: rule holds. Every DATABASE handler is offered the same one link and reads the same messages above it, so nothing else tells two of them apart.

  • VALIDATION never enters dispatch and takes no part.

Identical criteria are the case where the containment runs both ways, so this rule covers rule 8 and replaces it.

A handler of the other kind never shadows. The report is for a handler that is provably dead, and under R1167 no handler is dead because of the other kind. A GENERIC handler never precedes a DATABASE one in the order, so it cannot shadow one. A DATABASE handler precedes the GENERIC ones only for a throw whose outer exception is a DataAccessException with an SQLException below it, and a GENERIC handler is still reached by every other throw of its class: the class thrown as itself, or inside a wrapper that is not a DataAccessException, and, where the class is itself a DataAccessException, thrown with no SQLException below it (the ten domain exceptions of the first consumer R1167 studied are thrown exactly so). So R1165’s cross-kind rows through java.sql.SQLException, and its "precedes" pair, are not part of this rule. This is why the item depends on R1167 and is not stated against today’s single mixed order: against that order a GENERIC handler on Exception declared first does shadow every DATABASE handler, and the rule would report handlers that R1167 brings back to life.

The grain is the handler in the narrowest container that orders it against its shadower. A pair within one @error type is a fact of the type: the handler is dead wherever the type is a member, and it is reported once, under the type as its own container, not once per union the type is in. (In the first consumer R1167 studied, one type holding two duplicate pairs is the first member of 159 unions.) A pair across two member types is a fact of the union or interface that orders the two types: the same type can be a member of two unions, shadowed in one and live in the other, and each is reported or not on its own. For an interface the members are ordered by type name; the report says which earlier handler it judged against, so the author can see the order.

What is not reported, because it is not provable: two handlers that overlap with neither containing the other (two matches: texts on one class, a sqlState handler and a code handler), and a handler on an abstract class whose every current concrete subclass is claimed earlier.

Decisions

The first three were put to principles-architect; its answers are under "Architect consultation". Decision 1 follows from the architecture pages. Decisions 2, 3 and 4 are Filip’s of 2026-11-11: review round 1 put each to him by name with its recommendation, and he asked for the spec to be revised and sent back to review without changing any of them, so each stands as recommended. Decision 5 answers review round 2. It is this revision’s, made on Filip’s instruction of 2026-11-12 to revise against that round and reported to him with it; principles-architect was consulted on it (second consultation, below).

  1. A defect, not a lint rule. The lint channel has the configuration seat already (<lint><disabledRules>), but it has no path to stop a build, and fact-model.adoc says nothing new is added to the family its rules are stated in. The defect family stops the build and puts the finding at the handler in the editor. So the rule is one defect code.

  2. The default is error, and the setting demotes it to warning. The handler is provably dead, and the remedy is to move one line. A schema arriving from Graphitron 9 with such a handler built there and stops building here until the handler is moved or the code is demoted; R1167’s compatibility ruling is about where a throw is routed, not about what is refused, and this decision does not extend it to refusals. Identical criteria are already a hard error today, so error by default changes nothing for them. The first consumer R1167 studied shows the case is real: its schemas carry two exact duplicate pairs in the type that opens 159 of its 161 unions, two tuples repeated across members, and three handlers behind a broader one of the same code (R1167, "First-client evidence"). Rule 8 refuses that consumer today with no way through; with this item it builds once it demotes the code. That evidence postdates the ruling, so it is recorded here for Filip and does not change the default.

  3. Demotion is a general, small mechanism, used here first. No consumer setting moves a defect’s severity today: graphitron_defect_type.severity is "a function of the code and nothing else". A code declares whether it may be demoted (a new boolean column, true for this code and false for every existing one, since most defects leave the generator nothing well defined to emit), the consumer names the codes to demote in the plugin configuration, and naming a code that may not be demoted fails the build. Severity becomes a function of the code and the configuration, both facts in the store, and the two places that state the old rule are restated with it (see "Demotion").

  4. JDK ancestry is captured in this item. The goal’s example compares two JDK classes and the store has no ancestry for them (see "Implementation"). R1166 was the item for that capture and was discarded with R1165; this rule cannot be delivered without it, so its content is folded in here and is not re-filed as an item of its own. The editor’s className: completion is a second reader of the capture and stays out of this item.

  5. The build reports every warning-severity defect. Today such a defect shows in the editor and the MCP server and nowhere in a build, so a demoted code would leave the build silent, which is the state this item exists to end. The build logs every warning-severity defect, whether its code is a warning by declaration or by demotion: severity is one fact, and the build, the editor and the MCP server read it alike. The one warning-severity code today, NODE_METADATA_UNREADABLE, therefore starts printing in the build log, a consumer-visible change this item owns (see "Warnings in the build log").

Implementation

Platform throwables (the capture R1166 described). code_throwable and code_throwable_supertype are written by CodeCapture.throwables from the classpath census alone, so java.lang.RuntimeException appears only as some library exception’s supertype_name and nothing says IllegalArgumentException is one. Capture the platform’s throwables into the same two relations under a platform source: both relations key on store_source, and FederationCapture is the precedent for a source that is not a classpath entry, registered and stamped by version. Stamp this one by the runtime version, so it re-reads when the JDK changes and is swept like any other. Admit the throwables in the packages that the modules of the generator’s boot layer export to everyone (ModuleLayer.boot()), not java.base and java.sql alone: the classifier resolves a handler’s class by reflection, which loads from any of them, so a narrower capture leaves a class the build accepts and the rule cannot judge (java.net.http.HttpTimeoutException after java.io.IOException). Attach the platform source to every graph through store_graph_source, as FederationCapture attaches its library, since the capture is keyed by source and a graph reads only its own sources. The relation comments say the ancestry is that of the JDK the generator runs on, which is what the classifier’s reflection reads today. roadmap/derived-read-cost-is-a-shape-problem.md plans a reshaping of supertypes in the code family; this adds rows and leaves the shape alone.

The generated client exception. <outputPackage>.schema.GraphitronClientException is emitted by the run and has no code_throwable row. graphitron_runtime_class is the precedent for a class no classpath declares: add a kind for it and a superclass column (graphql.GraphqlErrorException, today the constant ExceptionClass.GeneratedClientException.SUPERCLASS), and read its ancestry through that superclass’s code_throwable_supertype rows. graphql-java’s jar is in the captured classpath.

Two derived relations and the rule. Names are the implementer’s; the grains are not. All three are written in the anchoring phase by a graphitron stage that runs after fetchers (it reads graphitron_errors_field), declared in meta_stage, meta_relation and meta_stage_write, with touched_at on every row and a sweep. The graphitron gatherer may already read the code family (meta_gatherer_dependency).

  • Container handler sequence, grain "one dispatch-capable handler of an errors container, at its declared rank within its kind": keyed by container name, @error type name and the handler’s declared index (its position in graphitron_ast_error_handler_entry, which counts every element of the list as written), carrying the kind and the rank, with the handler entry’s written position as a cascading foreign key. Containers are every union or interface an errors field lists and every @error type as a container of itself. R1167 reads this same order through a query in ErrorChannelRelation and turned a stored relation down for having one reader; this rule is the second, so the relation is stored here and ErrorChannelRelation is repointed at it. The repointed read keeps ranking for its dispatch index. R1167’s index is a handler’s ordinal among its type’s handlers that are not VALIDATION: a fact of the handler in its type and of no container, so the relation does not carry it. The rows of a type’s own container are exactly that type’s dispatch-capable handlers, and the read ranks them by declared index, in SQL, as R1167’s read ranks today.

  • Shadowing, grain "this handler is shadowed by that earlier handler, in the narrowest container that orders them both": one row per pair for which the rule holds, under the type’s own container for a pair within one type and under a union or interface for a pair across two of its member types. A handler can have a row under its own type and another under a union, each naming a different earlier handler; both are true and both are kept, and the relation’s comment says so. The rows are a statement over the sequence, the handler entries (graphitron_ast_error_handler_entry and its GENERIC and DATABASE subtype relations) and code_throwable_supertype, plus a substring test. "A’s class is B’s class or a subtype of it" is read as the names being equal or B’s class being a supertype_name of A’s. The equal-names arm reads no ancestry and holds whether or not the class has a code_throwable row, so identical criteria are always a row, as rule 8 refuses them today. For the subtype arm, a class present in two classpath entries has two code_throwable rows and the rule reads the union of their supertypes. That union is over the sources of the graph being judged and no others: code_throwable is keyed by source, so the statement reaches it through store_graph_source, and a class on a sibling graph’s classpath neither shadows nor is shadowed here.

  • The defect: one code in graphitron_defect_type, ERROR_HANDLER_SHADOWED with lsp_code GRAPHITRON_ERROR_HANDLER_SHADOWED as every existing row pairs the two, written into graphitron_entry_defect at the shadowed handler’s position, with a detail relation keyed by defect, container and shadowing handler (type name and declared index), never a detail string. Where several earlier handlers shadow one in a container, the detail names the first of that container. The build’s message names the earlier handler and the container from those rows, through an explanation read on EntryDefectVerdict beside keyColumns; the editor and the MCP tool show the statement at the shadowed handler, as they do for every defect whose detail is a relation. Follow "Adding a defect" in defects-as-facts.adoc.

Unresolved classes. A GENERIC handler naming a class with no code_throwable row from any source of its graph, and which is not the generated client exception, has no ancestry to read, so the subtype arm gives it no row, as shadower or as shadowed; the equal-names arm still judges it. Where the class does not load, the classifier’s existing refusal of the unresolved name is what fails that build. Where it loads and still has no row, as a platform class in a package its module does not export does, the handler is accepted and judged by name alone: such a handler behind one on its superclass is not reported. The shadowing relation’s comment says both.

Rule 8 goes. Delete ChannelRuleChecks.checkDuplicateMatchCriteria, its call in ErrorChannelWalker, and the FieldBuilder.checkDuplicateMatchCriteria copy with its two callers (FieldBuilder and BuildContext). Rule 7 (more than one VALIDATION handler) is a different rule and stays.

Demotion. graphitron_defect_type gains the "may be demoted" column. The plugin gains a list parameter naming codes to report as warnings. A consumer writes the code, not the lsp_code: it is the relation’s key, it is never null, and it is what the build failure prints in brackets (EntryDefectVerdict.error), which is where a consumer meets the name when the build stops. The configuration gatherer writes the list to a store_graph_ relation keyed by graph and code, as store_graph_lint_disabled_rule is written for <disabledRules> (StoreEntries.lintDisabledRules), and transcribes it as configured. What makes a wrong entry fail is the relation’s key into the vocabulary: the row carries the "may be demoted" value pinned to true, with a foreign key on the code and that value into graphitron_defect_type, so a code nothing declares and a code that may not be demoted are both unwritable, as graphitron_result_class.shape is pinned so its foreign key holds a type to an object result. The refused write is reported as a build failure that names the entry and lists the codes that may be demoted, read from graphitron_defect_type once the write has failed. This is not LintConfig.validated’s shape, which compares against a Java enum at the Maven seam before a store is open: the defect vocabulary exists only as rows, so the check is the database’s, and the gatherer decides nothing against rows outside its corpus. `graphitron_defect_type is a stated relation (meta_stated_relation), its rows the DDL file’s and no gatherer’s output, so a key into it from a store gatherer’s relation reads nothing that runs later; store_graph_write_stage keys into the stated meta_stage the same way. No architecture page says in words that a stated relation sits outside the gatherer order, so that reading is put to Filip with this revision. EntryDefectVerdict and the diagnostic view read a finding’s severity as the code’s own unless the graph demotes it. The two statements of the old rule are restated in the same change: the graphitron_defect_type.severity column comment ("A function of the code and nothing else"), and docs/architecture/explanation/defects-as-facts.adoc, whose column table, "Adding a defect" steps and closing line ("once declared with error severity, the code stops validate and `generate`") gain the demotion column, the question a new code answers about it, and the exception a demoted code makes.

Warnings in the build log. This route landed ahead of this item, under R876, as specified below. A warning-severity defect reaches the editor and the MCP server today through the diagnostic view’s entry arm, and reaches a build nowhere: EntryDefectVerdict.rows selects error rows only, and the build logs BuildWarning`s, none of which comes from a defect. The route mirrors the error side. `EntryDefectVerdict reads both severities, each row at the severity its graph gives the code, and assembles one message for both (the statement, the detail, the explanation, the code in brackets), so a defect reads the same as an error and as a warning. The error rows stay what GraphQLRewriteGenerator.storedRefusals turns into build errors. The warning rows are logged by the generator wherever it logs warnings today (logWarnings, on every entry point, a round the store refuses included), in the same file:line:column: warning: form. They are not BuildWarning`s, and they are not handed to `ReportFacts.write. That channel is for findings with no stored row of their own: BuildWarningFacts stores what it is given into lint_finding and build_warning_no_rule, both arms of the diagnostic view, so a defect sent that way would show twice in the editor and the MCP tool, beside its own entry arm. The pass carries the stored warnings beside its warnings as it carries walkErrors beside errors, which is how a stored refusal already stays out of what is written back. <lint> suppression does not reach them.

The route is for every warning-severity defect (decision 5), so NODE_METADATA_UNREADABLE starts printing. Before landing, count what it hits on the sakila example and in the fact documents: defects-as-facts.adoc calls a defect raised on a valid schema a regression to fix ahead of the work it was found during, and a line in every build log is where one would now show. That page’s sentence "A warning-severity defect shows in the editor and the MCP server and does not stop a build" is restated with the build log in it, in the same change as the two statements above.

Tests

  • A fact document for the platform capture: java.lang.IllegalArgumentException has a code_throwable row under the platform source and code_throwable_supertype rows reaching java.lang.Throwable; so has a throwable outside java.base and java.sql (java.net.http.HttpTimeoutException); and the platform source is a store_graph_source row of the graph.

  • A fact document for the rule: a schema with each row of the rule; two JDK classes (IllegalArgumentException behind RuntimeException); a library class behind a JDK class; the generated client exception behind RuntimeException; identical criteria (rule 8’s cases, moved from ErrorChannelClassificationTest); identical criteria on a class with no code_throwable row; a handler shadowed within its own type, where the type is a member of two unions and the pair is one row, under the type; a handler with a row under its own type and another under a union, each naming a different earlier handler; one @error type in two containers, shadowed in one only; an interface carrier; a handler shadowed by two earlier handlers of one container. Expected sequence rows, shadowing rows, the defect and its detail row. Near misses that raise nothing: the narrow handler declared first; two different matches: texts on one class; a sqlState handler and a code handler; a DATABASE handler declared after GENERIC on java.lang.Exception; a GENERIC handler on java.sql.SQLException declared after a bare DATABASE handler.

  • Graph scoping: a handler class whose only code_throwable rows sit under a source the judged graph does not hold draws no shadowing row. A fact document if one can state a second graph’s source, a seeded store test otherwise.

  • Demotion and the build log. EntryDefectVerdictTest gains the demoted case and the warning read: the row is no error, it is a warning, and its message is the one the error carried, the earlier handler named. A store-backed build test (on StoreBackedBuild in graphitron-maven-plugin, beside LintSuppressionDiagnosticsParityTest, which already drives GraphQLRewriteGenerator over a store and reads the diagnostic view back) runs the goal’s schema twice. Without the demotion the build fails on ERROR_HANDLER_SHADOWED. With it the build generates, the pass’s stored warnings hold the finding at the shadowed handler’s position, and the diagnostic view holds exactly one row for it, the entry arm’s at warning: that count is what pins the double report out. A NODE_METADATA_UNREADABLE case asserts that a warning by declaration takes the same route.

  • Configuration: naming an unknown code, and naming a code that may not be demoted, each fail when the configuration is captured, naming the entry and listing the codes that may be demoted (StoreEntriesTest); the configuration fact documents (facts/scenarios/configuration.graphqls and its sweep sibling) gain the list and its sweep.

  • ErrorChannelWalkerTest loses its rule 8 arm.

  • Execution tier, on the sakila example: none. The rule changes no generated code; R1167’s tests own dispatch.

User documentation (first-client check)

docs/manual/reference/directives/error.adoc, Constraints, replacing the duplicate-criteria bullet and following R1167’s bullet on order within a kind:

  • A handler that can never be reached is rejected: one declared after a handler of the same kind that matches everything it does. That is a subclass after its superclass, a handler with matches: after the same handler without, a sqlState or code handler after a DATABASE handler with neither, or two handlers with the same criteria. The build’s message names the earlier handler; declare the narrower one first. A GENERIC handler and a DATABASE handler never hide one another, whichever is declared first.

docs/manual/reference/mojo-configuration.adoc, a new parameter row and a short section:

Some of the rules graphitron rejects a schema for can be turned into warnings, where the schema still has a well-defined meaning without the fix. Name the rule’s code, as shown in the build failure:

<configuration>
  <reportAsWarnings>
    <code>ERROR_HANDLER_SHADOWED</code>
  </reportAsWarnings>
</configuration>

A code that is misspelled, or that cannot be turned into a warning, fails the build with the list of codes that can. A rule turned into a warning is still reported: in the build log, in your editor and through the MCP diagnostics tool.

docs/manual/how-to/error-channel.adoc: the pitfall on handler order says the build catches it. docs/manual/how-to/migrating-from-legacy.adoc: a schema with a handler that was already dead on Graphitron 9 is now rejected, with the <reportAsWarnings> entry as the way to migrate first and fix later. docs/manual/reference/diagnostics-glossary.adoc gets the code’s entry, giving both names: ERROR_HANDLER_SHADOWED as the build prints it and <reportAsWarnings> takes it, and GRAPHITRON_ERROR_HANDLER_SHADOWED as the editor shows it.

Roadmap entries

  • Changelog: a schema with a shadowed handler stops building unless it demotes the code. The commit is feat(R1168)! with a BREAKING-CHANGE: footer naming the fix (declare the narrower handler first) and the opt-out.

  • Changelog, second line: a warning-severity defect is now printed in the build log, NODE_METADATA_UNREADABLE among them.

  • Not in scope: moving rule 7 into the store; reporting overlap that is not containment; showing a defect’s detail rows in the editor; a handler made unreachable by R1171’s default member (error-channel-default-member, in Backlog), which is not in the order this rule judges until that item lands and is that item’s to add to the rule.

Retired vocabulary

  • checkDuplicateMatchCriteria (both the ChannelRuleChecks and FieldBuilder members), and "rule 8" / Rule 8 as the name of the identical-criteria check in javadoc, test names and the how-to.

  • "Nothing sorts by specificity" as the reference page’s whole statement on handler order.

Other solutions we’ve considered

  • Sort handlers narrowest first (the discarded R1165). Ends the ordering chore, but answers differently from Graphitron 9 wherever a broad handler was declared first.

  • A lint rule escalated by configuration. Warning by default through the existing <lint> block, with a new child naming rules to treat as errors. It reuses the seat, but a lint finding is assembled after the classification walk and cannot stop validate before it, so "error" would be a second verdict path beside the store’s.

  • Two defect codes, one per severity. The configuration would then decide which code a row carries, and a code names the rule broken, not how the consumer feels about it.

  • Check in the classifier, by reflection, beside rule 8. Smallest, and needs no platform capture. It adds a rule to the walk the store is replacing and reads by reflection a fact the store should hold; the defects page lists the Java-judged rule families as what remains to move.

  • A third BuildWarning arm for a stored defect. One list for every warning, and the sealed switch makes each consumer decide. It puts a finding that has a stored row and a code into the channel for findings that have neither, and its arm in BuildWarningFacts would be the one variant whose persistence is a no-op.

  • The build reads its warnings from the diagnostic view. No new read, but the build would then read the editor’s surface and not its own verdict: a second build reader beside EntryDefectVerdict.

  • Log demoted codes only. NODE_METADATA_UNREADABLE stays out of the build log. Severity would then mean two things, depending on how a code came by it.

  • Check the demotion list in the configuration gatherer before writing it. A friendlier place to build the message, but a capture phase would be deciding against rows outside its corpus, and the key refuses the same entries.

  • Report a pair within one type once per union the type is in. One fact stated at the wrong grain: 160 detail rows saying one thing for the first consumer studied.

  • State the rule against today’s mixed order, with R1165’s cross-kind rows, and land before R1167. It would report DATABASE handlers behind a GENERIC catch-all, which R1167 makes reachable: a defect on a schema that is about to be valid.

Architect consultation

principles-architect was consulted at take-up on three forks.

  • Lint rule or defect. It favoured one defect code over a lint rule (no build-stopping path, and the lint family’s rule view takes nothing new) and over two codes; the plan follows it. It noted that no architecture page lets a consumer setting override a code’s severity or says whether a Graphitron 9 schema must keep building, and that both are for Alf and Filip; they are decisions 2 and 3, since ruled by Filip. It suggested the override be a fact captured from the configuration and read by EntryDefectVerdict; the plan follows that. It preferred folding rule 8 into the new defect, with a separate always-error code only if identical criteria must stay an error under demotion; the plan folds it into the one code.

  • Store or classifier, and the JDK capture. It ruled for the store, one reader or three, and for the platform capture as its own re-filed item with its two readers named. The plan takes the store and keeps the capture inside this item, since R1166 was discarded on Filip’s word hours earlier; decision 4 is his ruling to keep it in. It asked for the defect at the shadowed handler’s position with container and shadowing handler in a detail relation, and for the handler sequence to be a stored relation shared with R1167’s ErrorChannelRelation; the plan follows both.

  • Phases. It agreed with depending on R1167 and with "provably dead in every phase" as the test. The plan’s finding that this leaves no cross-kind shadowing at all was reached after the consultation and has not been put to it.

It was consulted again on 2026-11-12, for the revision answering review round 2, on four forks.

  • How a warning-severity defect reaches the build log. The revision leaned towards a third BuildWarning arm. It advised against it: a stored defect has a code and a row, the warning channel is for findings with neither, and an arm whose persistence is a no-op is the sign of a type that is not the finding’s home. It advised mirroring the error side instead, with EntryDefectVerdict reading both severities and the generator logging the warning half, and against the build reading the diagnostic view, which would be a second build reader. The plan follows it.

  • Every warning-severity defect, or demoted codes only. Every one, severity being one fact; restate the page’s sentence, treat NODE_METADATA_UNREADABLE in the build log as a consumer-visible change, and count what that code hits before landing, since a defect on a valid schema is a regression. The plan follows all three; this is decision 5.

  • Where the demotion list is checked. It agreed with the pinned column and the foreign key into graphitron_defect_type, and advised against a check in the configuration gatherer ahead of the write, a capture phase deciding against rows outside its corpus: transcribe, let the key refuse, and read the vocabulary for the message once the write has failed. The plan follows it. It read a key from a store relation into a stated relation as no breach of "reads go upstream only", and pointed out that no page says so in words and that this is for Alf and Filip; the plan records the reading, cites store_graph_write_stage as the same shape, and puts it to Filip.

  • A pair within one type. It agreed the pair is a fact of the type and asked for the shadowing relation’s grain to say so, not only its detail rows, with a fact document case where a handler has a row under its own type and another under a union. The plan follows both.

The reading of R1167’s revised order, that no handler shadows one of the other kind, was not put to it; R1167’s own spec states the same conclusion.

Reviewer findings

Round 1: Spec → Ready (session_01FY5Uvre2eFKqcXm8MZv32W, 2026-11-11)

Verdict: withhold. The goal reads cleanly on its own, every symbol, relation, test and page the body names exists as named, and the shape fits the tree: one defect code owned by a stage, a detail relation and not a detail string, derived tables written in the anchoring phase, rule 8 leaving the walk as the store takes it over. Decision 1 needs no ruling beyond what the pages already say (defects-as-facts.adoc, and fact-model.adoc on the family the lint rules are stated in). One blocking finding, one the author can settle in a sentence, and three notes.

Finding 1 (question two: fit; and question one for decision 2). The plan rests on three decisions it says are unruled, so it cannot be handed over as written. "Decisions that need a ruling" lists them as open, the architect consultation says two are for Alf and Filip, and R1167 holds itself out of Ready on the same ground ("need a ruling before the item is Ready"). A reviewer session cannot give those rulings, and signing off would turn three recommendations into the approved plan by default. They are not interchangeable arms either:

  • Decision 2 (default error). It decides the consumer-visible outcome the goal leaves open: whether a schema that built on Graphitron 9, and whose dispatch R1167 keeps identical, stops building. The body covers the other answer with "it is a plain feat`" only. It is more than that: with `warning as the default the mechanism of decision 3 points the other way (a code that may be raised, not one that may be demoted), <reportAsWarnings> is the wrong parameter, and the error.adoc draft ("is rejected") and the migration paragraph are wrong as drafted.

  • Decision 3 (demotion as a general mechanism). It amends a rule the tree states in two places: the graphitron_defect_type.severity column comment ("A function of the code and nothing else") and defects-as-facts.adoc ("once declared with error severity, the code stops validate and generate`"). `workflow.adoc has a ruling committed to the page that owns its subject on the day it is given; the body names neither that page nor the column comment among what the item changes.

  • Decision 4 (the platform capture inside this item). The architect asked for it as its own item; the body keeps it in and puts the split to Filip.

What satisfies this: the rulings on 2, 3 and 4, recorded in the body with who gave each and when, and the section restated as decisions made. If 2 goes to warning, the Demotion paragraph, the tests and the two manual drafts are restated for that direction. For 3, defects-as-facts.adoc and the severity column comment join what the item changes, unless the ruling’s own docs commit has already covered the page.

Response. Filip was given the three in this round’s report on 2026-11-11 and asked for the revision without changing any, so the body records each as his, as recommended. "Decisions that need a ruling" is now "Decisions" and states each as made; decision 2 no longer argues the other default, and the "plain feat`" clause is gone from "Roadmap entries". For decision 3 the Demotion paragraph now names the `graphitron_defect_type.severity column comment and defects-as-facts.adoc (column table, "Adding a defect", closing line) as restated by this item; no separate docs commit was made, since the page would describe a column the tree does not have until the item lands.

Finding 2 (question one: the first-client draft). The draft names a code the build failure does not show. The mojo-configuration.adoc draft says "Name the rule’s code, as shown in the build failure" and gives GRAPHITRON_ERROR_HANDLER_SHADOWED. The build failure prints graphitron_defect_type.code (EntryDefectVerdict.error appends it in brackets), which carries no prefix (ROUTE_AMBIGUOUS); the GRAPHITRON_-prefixed name is lsp_code, which the editor shows (GRAPHITRON_ROUTE_AMBIGUOUS). The Demotion paragraph keys the configuration relation by code. Say which of the two names a consumer writes, and make the draft and the relation agree.

Response. The consumer writes the code. The Demotion paragraph says so and why (the relation’s key, never null, what the build failure prints), the defect bullet names the pair (ERROR_HANDLER_SHADOWED, GRAPHITRON_ERROR_HANDLER_SHADOWED), the draft’s example carries the unprefixed code, and the glossary entry gives both names with where each is seen.

Notes, not blocking.

  • "Unresolved classes" says the classifier’s refusal covers every GENERIC class with no code_throwable row. A JDK throwable outside java.base and java.sql (java.net.http.HttpTimeoutException, javax.naming.NamingException) loads by reflection, so the classifier accepts it, and it has no row, so it is neither refused nor judged. Say that such a handler is not reported, or admit every system module. Response. Both. The capture admits the boot layer’s exported packages, not two modules, with a test on java.net.http.HttpTimeoutException; "Unresolved classes" now separates a class that does not load (refused) from one that loads with no row (accepted, not judged, not reported).

  • code_throwable is keyed by source and not by graph. The shadowing statement should say it reads only the sources of the graph it judges, and that the platform source is attached to each graph as FederationCapture attaches its library, so one graph’s classpath cannot raise a defect on another graph’s schema. Response. Taken. The capture paragraph attaches the platform source through store_graph_source, the shadowing bullet reads code_throwable through it, and "Tests" gains the scoping case.

  • R1167 is in Spec with rulings of its own pending. This item’s rule is stated against R1167’s order, so a change to that order in R1167’s review reopens this one. Response. "The rule" now opens with the pickup check: confirm R1167 landed with the order stated here, and reopen this item if it did not.

Round 2: Spec → Ready (session_01FY5UvuPcoH2xjvpofcwirM, 2026-11-11)

Verdict: withhold. The goal reads cleanly on its own, every symbol, relation, test and page the body names exists as named, the rule is sound against the predicates the emitted router evaluates and against R1167’s two phases, and round 1’s findings are answered in the body. One blocking finding and three notes.

Finding 1 (question one: viability; question two for the seam). The warning half of the goal has no route to the build, and the plan defers finding that out to pickup. The goal says the author is told "when the schema is built, as a warning or as an error", and "Tests" asserts that "the finding is a warning in the build’s report". On the build side the Demotion paragraph changes one thing, EntryDefectVerdict no longer counting a demoted row as an error, and leaves the rest to a pickup check ("confirm that a warning-severity defect already reaches the build log") whose fallback covers a path that exists and is untested, not one that is absent. The check can be made now, and the path is absent:

  • EntryDefectVerdict.rows selects severity = 'error', and its javadoc says a warning-severity defect is no part of the verdict.

  • The build logs BuildWarning`s and nothing else (GraphQLRewriteGenerator.logWarnings), and nothing turns a defect into one: `storeWarnings gathers the lint findings, the session-state and dependency advisories, the tag narrowings and the fan-out advisory.

  • The diagnostic view’s entry arm is the one reader of a warning-severity defect, and only the LSP (DiagnosticFacts) and the MCP server (DiagnosticsTool) read that view. defects-as-facts.adoc says as much: such a defect "shows in the editor and the MCP server".

So as planned, a consumer who demotes the code gets a build that says nothing about the handler, which is the state this item exists to end, and the migration advice ("migrate first and fix later") leaves nothing in a CI log to fix later from. The missing route is a fork, not a line. BuildWarning is sealed to NoRule and LintFinding, and BuildWarningFacts stores both back into relations that are arms of the same diagnostic view, so a defect sent through that channel shows twice in the editor and the MCP tool, beside its own entry arm. And a route for every warning-severity defect starts printing NODE_METADATA_UNREADABLE, the one such code today, where a route for demoted codes alone does not.

What satisfies this: the plan says how a warning-severity defect reaches the build log, through which seam, how the editor and the MCP tool keep showing it once, and whether NODE_METADATA_UNREADABLE prints as a consequence; the defects-as-facts.adoc sentence quoted above joins the statements the item restates; the pickup sentence goes; and "Tests" names where the logged warning is asserted.

Response. Taken whole. "Warnings in the build log" is the route: EntryDefectVerdict reads both severities and assembles one message, the generator logs the warning rows where it logs warnings today, and they are neither BuildWarning`s nor handed to `ReportFacts.write, mirroring walkErrors beside errors, so the editor and the MCP tool keep showing the defect once through its entry arm. The route is for every warning-severity defect (decision 5), so NODE_METADATA_UNREADABLE prints, with a count of what it hits owed before landing and a changelog line. The defects-as-facts.adoc sentence joins the restated statements, the pickup sentence is gone, and "Tests" names a store-backed build test that asserts the logged warning and exactly one diagnostic row. The fork was put to principles-architect, whose advice changed the seam (see "Architect consultation").

Notes, not blocking.

  • "Fails the build at configuration, as an unknown lint rule id does (LintConfig.validated)" is not like for like. That check compares against LintRule.ids(), a Java enum, at the Maven seam before a store is open; the defect codes exist only as rows of graphitron_defect_type. Say where the check reads the vocabulary from: the configuration gatherer would be reading a graphitron-family relation, and meta_gatherer_dependency puts store upstream of graphitron. Response. The check is the database’s. The configuration relation carries the "may be demoted" value pinned to true with a foreign key into graphitron_defect_type, the gatherer transcribes the list and reads the vocabulary only to word the failure once the write is refused. graphitron_defect_type is a stated relation and no gatherer’s output; the Demotion paragraph says why that is no downstream read, names store_graph_write_stage as the same shape, and puts the unwritten part to Filip.

  • "Unresolved classes" gives a class with no code_throwable row no shadowing rows at all, while the shadowing bullet reads "A’s class is B’s class" as the names being equal, which needs no ancestry. Two handlers with identical criteria on such a class are refused by rule 8 today and would pass unreported; say which is meant. Response. The equal-names arm reads no ancestry and always judges, so identical criteria stay refused on any class. The shadowing bullet and "Unresolved classes" both say so, and the rule’s fact document gains the case.

  • R1167’s read, as its spec now stands, takes each handler’s dispatch index (its ordinal among the type’s handlers that are not VALIDATION), and the sequence relation carries the declared index and the rank within a kind. The repoint works if the read keeps ranking or the relation carries that index; since the grain is fixed here, say which. Response. The read keeps ranking. The dispatch index is a fact of the handler in its type and of no container, so the relation does not carry it; the rows of a type’s own container are that type’s dispatch-capable handlers, ranked by declared index in the read. The sequence bullet says so and says what the declared index is.

Also revised, beyond the round. R1167’s spec changed after this round was written: dispatch walks one order, DATABASE handlers for a jOOQ error only and then GENERIC, and it records a first Graphitron 9 consumer. "The rule", the glossary’s claims and the paragraph on the other kind are restated against that order; the conclusion that neither kind shadows the other holds, on a different argument. The consumer’s schemas are why a pair within one type is now reported once, under the type, and they are recorded under decision 2 as evidence that postdates Filip’s ruling on the default. R1171’s default member is named out of scope.

Round 3: Spec → Ready (session_01FY5UvumNW334YGNLzzsEAf, 2026-11-12)

Verdict: sign off. Both gate questions are answered, and round 2’s finding is resolved in the body.

The goal reads on its own: an author who declares a handler that an earlier handler of the same kind makes unreachable is told so by the build, which names the earlier handler; the build stops by default, and a consumer who lists ERROR_HANDLER_SHADOWED under <reportAsWarnings> gets a warning that still prints in the build log, the editor and the MCP tool. It is reachable: the rule is sound against R1167’s order as that spec stands at a61cff94, the store’s verdict runs before classification so the default stops the build with rule 8 gone, a demoted graph falls through to the classifier and generates, and the two severity readers the body names (EntryDefectVerdict.rows and the diagnostic view’s entry arm) are the only ones in the tree. The plan extends shapes the tree has: one defect code owned by a stage with a detail relation, derived tables written in the anchoring phase with a mark and a sweep, a source that is no classpath entry on FederationCapture’s terms, a pinned column carrying a foreign key as `graphitron_result_class.shape does, and a warning route that mirrors the error side and stays out of ReportFacts.write.

Notes, not blocking.

  • The Demotion paragraph puts one reading to Filip: that a foreign key from a store gatherer’s relation into the stated graphitron_defect_type is no downstream read. No gate in the tree refuses it (MetaDeclarationGateTest judges views, not keys) and store_graph_write_stage is the same shape, so the plan can be handed over on it. If he rules otherwise, where the list is checked moves and the item reopens for that paragraph; if he confirms it, the sentence is owed to the page that owns the rule, per workflow.adoc.

  • "As every existing row pairs the two" is not so: 119 of the 124 codes pair X with GRAPHITRON_X, and the five that do not are this family’s own (ERRORS_FIELD_MIXED_MEMBERS and its siblings carry graphitron.error-channel.*). The chosen lsp_code follows the majority; the implementer should know the neighbours differ.

  • Decision 2 says the first consumer "builds once it demotes the code". Identical criteria have never reached the generator, rule 8 having refused them, and the store-backed build test runs the goal’s schema, which is the subtype case that generates today. One identical-criteria schema generated and compiled under demotion would pin that claim (question one).

  • A pair across two member types is one detail row per union that orders them, so two types that sit together in many unions give one shadowed handler many rows. The build’s message is assembled from those rows and wants a bound on how many containers it names.

  • The diagnostic view’s entry arm reads t.severity twice, the second time to decide whether the stale-module hint is appended; both reads take the graph’s severity.

  • R1167 went to Ready on trunk while this round was written (a61cff94), its order unchanged. The pickup check at the head of "The rule" stands until it lands.