Repository navigation
test: read the unread documents for claims - #140
Merged
Merged
Conversation
docs/option.md, docs/result.md, docs/merge-patches.md, the Serilog README's WithTypeKit(), the AspNetCore README's closed set as a fault type, OrderId.New() in the Generators README and [RequireCustomInitialization] in the Analyzers README become 157 claims, each quoted verbatim and naming the tests that hold it; the four unheld C06 claims on the closed-set fault section name theirs. The nine unread: waivers are gone, and option.md, result.md and the Serilog README join PromiseDocuments. Where no test held a promise, one does now: CMTK0006 over a marked struct, no `where` on a result, no bare error conversion, Catch over a Task, a ValueTask callback's binding, no ToHttpResult over Result<T, Exception>, a plain closed set mapped on its own, a patch's 400, `= default` on a patch parameter, and a value object inside a patch under a source-generated context. Each was seeded in src/ and caught. No promise turned out false. Closes #98 Co-Authored-By: Claude Opus 5.5 <[email protected]>
…document-claims # Conflicts: # test/oracles/claims.json
This was referenced Oct 29, 2026
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 #98
Problem
The first oracle catalogue (#97) waived nine public surfaces as
unread:: their documents had never been read for promises.Option,ResultandPatch<T>with their extensions,Choose,OrNull,GuidValueExtensions.New,WithTypeKit(),ToHttpResult()over a closed set and[RequireCustomInitialization]had no claim naming the tests that hold them, so a promise indocs/option.md,docs/result.md,docs/merge-patches.mdor the Serilog, AspNetCore, Generators and Analyzers READMEs could lose its test without the catalogue noticing.Change
test/oracles/claims.json, one per promise, each quoted verbatim and naming the test classes that hold it: 46 fordocs/option.md, 65 fordocs/result.md, 33 fordocs/merge-patches.md, 8 for the Serilog README, 1 for the AspNetCore README's closed set as a fault type, 1 forOrderId.New()in the Generators README and 3 for[RequireCustomInitialization]in the Analyzers README. The fourC06claims on the closed-set fault section that held nothing now name their tests.unread:waivers are gone.oracles statuslists no unread waiver, and every public member is claimed or waived.PromiseDocumentsgainsdocs/option.md,docs/result.mdand the Serilog README.UnassignedNoDefaultMemberAnalyzerTests: CMTK0006 reports a struct marked[RequireCustomInitialization]and leaves an unmarked struct of value objects alone.ResultWithValueTests: query syntax over a result has nowhere(CS1936), and a bare error doesn't convert to a valued result (CS0029).ResultCatchTests:Catchover aTask, anasynclambda included, fails to compile namingCatchAsync.ResultContinuationTests: a callback returning aValueTaskbindsTapAsyncandTapErrorAsyncto the overload that doesn't wait, andMapAsynckeeps theValueTaskas the value;.AsTask()and anasynclambda bind to the waiting overload.FaultResponsePartsTests: noToHttpResultoverload accepts aResult<T, Exception>.FaultSetDefaultTests: a closed set that is no fault set, mapped on its own, is answered throughToHttpResult().HostConfigurationTests: a value object a patch carries refuses a body with the same bare 400.PatchSchemaTests:= defaulton a patch parameter breaks the document (the schema exporter throws), pinned so the page is corrected when it stops doing so.SourceGeneratedJsonTests: a value object inside a patch is read with its own converter under a source-generated context that lists neither it nor its wrapped type, and keeps its rule, path and silence about the input.No promise turned out false, so
candidates.jsonstays empty and no bug was filed. Two sentences have no claim, because no test can hold them: the Serilog README's "needs Serilog 4.0.0 or later" (a dependency floor), and the merge-patches page's sentence that a static constructor registers each closedPatch<T>'s converter under Native AOT (the consumer smoke test'saotconsumer measures it, and that's no test class). There is no changelog line, because consumers see no change.Tests
CodoMetis.TypeKit.Oracles.Tests: 27 passed, catalogue, surface coverage and promise documents included.Each new test was seeded and caught: a defect planted in
src/, the test run red for the planted reason, the file restored.[RequireCustomInitialization]A_struct_marked_RequireCustomInitialization_reports_and_an_unmarked_one_does_notWhereon a resultQuery_syntax_has_no_whereTError(explicit, so the test project still builds)A_bare_error_does_not_convertCatch(Func<Task>)without its[Obsolete(error: true)]Catch_over_a_task_is_a_compile_error_naming_CatchAsyncTapAsync(Func<T, ValueTask>)overloadA_callback_that_returns_a_ValueTask_binds_to_the_overload_that_does_not_waitToHttpResult(this Result<Exception>)overloadToHttpResult_accepts_no_result_whose_error_is_an_exceptionA_closed_set_that_is_no_fault_set_is_answered_with_a_mapping_of_its_ownA_minimal_API_answers_a_refused_body_with_a_bare_400(the patch rows)A_value_object_inside_a_patch_is_read_with_its_own_converter= default(the control)A_patch_parameter_defaulted_with_default_breaks_the_documentThe full suite through
build-verdict test: 18498 passed, 471 skipped.🤖 Generated with Claude Code