Conversation
Use the existing doc state and disable HTML-to-Markdown conversion for this graph. Cover run() with local HTML and a mocked URL loader, including force mode. DKM Gaming
Validate matching references with Pydantic v2. Preserve other JSON for semantic comparison, and only use the dictionary equality shortcut for dictionary inputs. Add regression coverage for lists and schema-invalid objects. DKM Gaming
Author
|
DKM Gaming — Closing this PR pending end-to-end verification, including the full test suite. We will reopen it once that verification is complete. |
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.
CodeGeneratorGraph.run()cannot reach code generation because both HTML consumers expectoriginal_html, but no node writes that state key. Once that is repaired, a list returned as the reference answer raisesTypeErrorinsemantic_comparison()because it is unpacked with**.The official OpenAI example constructs this graph and calls
run()directly, so it uses the affected path too.Reproduction
On the base commit, this reaches
ValueError: Error parsing input keys for HtmlAnalyzerwithout a provider call:The second failure can be reproduced independently on that graph:
GenerateAnswerNodeusesJsonOutputParser(pydantic_object=schema), which supplies format instructions but does not validate the returned JSON against the schema. A list or a nonconforming object can therefore reach this method.Changes
docstate in both HTML consumers. Enable FetchNode's existingscript_creatoroption for this graph so OpenAI/forced conversion does not replace the HTML with Markdown. The shared fetch node is unchanged.run()with local HTML and a mocked URL loader, OpenAI and forced-conversion paths, valid reference objects, lists, and schema-invalid reference objects. The run tests execute the fixed test-generated extractor and its validation loops.Validation
uv run --frozen --with pytest-timeout pytest tests/test_code_generator_graph.py: 11 passed. The initial seven-case regression set on the base commit produced 6 failed / 1 passed, reproducing the missing state and reference-type failures before the fixes.git diff --checkpasses.UV_FROZEN=true make lintstill fails with the same six pre-existing F401 errors inbatch_generate_answer_node.pyandutils/batch_api.py, reproduced before the patch.tests/test_generate_answer_node.pyhas three pre-existing failures / five passes on the base commit (test_execute_multiple_chunks,test_execute_merge_json_decode_error,test_init_chat_ollama_format). No changes to that node or its tests.--with pytest-timeoutsupplies the plugin required by the existing strict pytest configuration without changing project dependencies or the lockfile. No live LLM/browser integration tests, full suite, mypy, or all-files pre-commit run.Based on
pre/beta, in two commits, one per defect.DKM