[libgraphql-core-v1] Task 16.5: Plan audit & touch-up#103
Merged
Conversation
Repairs this plan doc against the shipped Tasks 1-16 code and corrects defects in the remaining task specs, per a two-agent audit: - Fix stale claims (Task 2 doctest note; File Structure drift: schema_def.rs, edit_distance/, conversion_helpers.rs, into_graphql_type.rs, removed type_reference_validator.rs) - Add AD18: operation-side source maps are owned by operation artifacts (the prior Task 19 sketch resolved operation spans against Schema.source_maps, which only holds schema documents) - Add AD19: registry borrows use a second 'reg lifetime + FragmentRegistryRef owned/borrowed enum for combined documents (the prior single-'schema borrow could not typecheck) - Rewrite Task 18/19 sketches accordingly; split Task 19 into 19a-19d - Add "v0 -> v1 Public API Disposition" (strings-only parity decision; deliberately-dropped API list; facade ast glob re-export rationale) - Correct Task 21 serde addendum (Span/ByteSpan/DirectiveLocationKind already derive serde) and specify the _macro_runtime public contract - Reaffirm complete September 2025 spec validation as a v1.0 goal: Validation Coverage Checklist boxes verified against code and annotated with owning tasks; spec-section cross-check items added - Add Task 16.6 (schema hardening: @OneOf, type extensions, IsValidImplementation 2.f, build-error spec notes, hygiene), Tasks 21.1-21.5 (spec-completeness validators; block cutover), and Tasks 22-27 (cutover: macros rewire, facade rewire, crate replacement, graphql-parser purge, docs, trackers) Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TipQtpvuLuHjHmRsVEgwJw
Addresses pre-PR review findings: - SelectionSetBuilder field in OperationBuilder sketch missing 'reg lifetime (would not compile as sketched) - Task 16 body still referenced schema/schema.rs (file is schema_def.rs) - Commit Strategy claimed 5 validators incl. removed type-ref validator - Spurious spec citation (nonexistent section 5.4.1.4) in checklist - libgraphql_core_v2 typos in doctest sketches (5 sites) - Doctest-alias file count clarified (6 of 7 names/*.rs) - mutation_type_name() hygiene item premise clarified (SchemaBuilder accessor, not the Schema one) - Added closing Unresolved Questions section per tracker-doc convention Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TipQtpvuLuHjHmRsVEgwJw
CI's clippy (1.96) now flags the empty-enum check's nested if under -Dwarnings; collapse it into a match guard per clippy's suggestion. Pre-existing on main (Task 16 code) — surfaced here because this is the first PR since the toolchain moved. No behavior change; all 208 v1 tests pass. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TipQtpvuLuHjHmRsVEgwJw
jeffmo
commented
Jul 7, 2026
… for registry - Rename the registry-borrow lifetime 'reg -> 'fragreg throughout (matches v0's existing convention for this exact lifetime) - Replace the custom FragmentRegistryRef borrowed-or-owned enum with std::borrow::Cow<'fragreg, FragmentRegistry<'schema>> per review -- same shape, plus Deref for free; documents the Clone-derive requirement this adds across the fragment/selection types Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TipQtpvuLuHjHmRsVEgwJw
…ites, AD18 gaps Applies the MUST-FIX findings (plus cheap checklist SHOULD-FIXes) from the 3-stage fan-out review of this PR (5 expert reviewers -> adversarial critic -> arbiter): - Correct the false "from_str (exist)" claim in the API Disposition ledger; SchemaBuilder::from_str is now a 16.6e work item (with the source-label parameter fix, so operation builders copy the right signature) - Remove the false "Schema already has resolve_span" claim; Schema:: resolve_span is now a 16.6e work item - Fix four Sep-2025 section renumberings the checklist carried from Oct-2021 (5.4.3 required args, 5.2.4.1 single root field, 5.2.2.1 operation-name uniqueness, 5.2.3.1 lone anonymous) and add the missing 5.2.1.1 operation-root-type-exists row - AD18: pin error-note scope (eager LineCol is operation-side only; schema errors keep the shipped deferred-Span ErrorNote), add the index-0 builtin seeding rule (Span::dummy() must never resolve to user text), and record the cross-artifact resolve_span misuse mitigation (doc-authoritative resolution with disjoint id spaces) - Reconcile Task 18/19 sketches with AD18/AD19: Operation gains source_maps, OperationBuilder.source_map becomes Option, Selection- SetBuilder gains source-map access for eager error resolution, stale operation_kind.rs sketch removed (module exists at crate root), query_type() Option mismatch fixed, Clone derives added per AD19, Variable keeps its definition directives, set_fragment_registry added for the programmatic path - Replace leaked session-internal P2.x labels with durable 16.6a-c ids - New Task 16.6f owns the biggest coverage hole: SDL directive- application validation (5.7.1-.3 + argument rules) plus root-type distinctness (3.3.1), directive self-reference (3.13), and empty input objects; extend-schema handling added to 16.6b; @deprecated-on-required to 16.6c; oneOf-literal + IsNonNullPosition named in 21.1/21.3; 5.5.1.4 scoped per-document; 5.1.1/5.5.1.2 rows and three verified [x] rows added so checklist absence is meaningful - 19d: specify supplied-registry + in-document-fragments merge semantics - 19a: require an explicit decision on __schema/__type meta-fields - 19c: single-root-field respec'd as full CollectSubscriptionFields Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TipQtpvuLuHjHmRsVEgwJw
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.
Summary
Task 16.5 (meta-task): a two-agent audit of the v1 plan — completed Tasks 1–16 verified against the shipped code on
main, and remaining Tasks 17–21 stress-tested for design defects — surfaced stale claims, two spec-design defects, unimplemented validations in "completed" work, silently-dropped v0 APIs, and entirely-untasked cutover work. This PR repairslibgraphql-core-v1-plan.mditself so every subsequent task executes against a corrected spec. Doc-only change — no code is touched.Design corrections (new Architectural Decisions)
SourceMapId(1)intoOperationBuilder::from_ast, butSpan.source_map_idindexesSchema.source_maps, which only holds schema documents and is immutable afterbuild(). Operation spans would resolve against schema text or panic. New design: operation artifacts (FragmentRegistry,ExecutableDocument,Operation) own their documents' source maps; spans index the owning artifact; errors resolve spans eagerly at construction.ExecutableDocument<'schema>holding&'schema FragmentRegistry<'schema>cannot typecheck (the registry lives shorter than the schema, so a&'schemaborrow of it is unobtainable). New shape:ExecutableDocument<'schema, 'reg>with aFragmentRegistryRefborrowed/owned enum — theOwnedvariant restores v0's combined fragments+operations single-document capability.Plan repairs
ignore(they use a hiddenuse libgraphql_core_v1 as libgraphql_core;alias and DO run); Commit Strategy claimed 5 validators (type-ref validator was removed in Task 15); Task 16 body referencedschema/schema.rs(real file:schema_def.rs)schema_def.rs,validators/edit_distance/,conversion_helpers.rs,into_graphql_type.rs, crate-rootoperation_kind.rs)Span/ByteSpan/SchemaSourceMap/DirectiveLocationKindalready derive serde — not a blocker; documented the real caveat (non-ASCII column resolution after deserialization) and specified the_macro_runtimepublic contract thatemittable_schema.rsemits againstGoal reaffirmation + new tasks
@oneOf§3.13.5 unimplemented; type extensions silently dropped with dead error kinds; IsValidImplementation 2.f TODO; build-level errors missing spec notes) → new Task 16.6 (schema hardening, 5 sub-PRs)from_strentry points restored; file-I/O APIs deliberately dropped and documented), plus the facadeastglob re-export rationaleVerification
cargountouched. Markdown code fences balanced; internal cross-references (AD numbers, task numbers, file paths) verified againstorigin/main:crates/libgraphql-core-v1schema.rsrefs, validator count, spurious §5.4.1.4 citation,libgraphql_core_v2typos, unresolved-questions section added)🤖 Generated with Claude Code
https://claude.ai/code/session_01TipQtpvuLuHjHmRsVEgwJw
Generated by Claude Code