fix(cli): pass graph export EDN options directly - #13200
Open
hahaArthur17 wants to merge 1 commit into
Open
Conversation
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
--edn-optionsdirectly tothread-api/export-edn, preserving the worker's top-level option structure.:export-type :graphonly when callers omit:export-type.:graph-optionsfor:graph-human.Why
As reported in #13071, the previous
export_payloadimplementation kept:export-typeat the top level but wrapped every other key under:graph-options. The worker'sbuild-exportfunction reads:block-id,:page-id,:rows, and:node-idsfrom the top level, so selected-node exports receivedniland could report success while writing an empty:pages-and-blocksresult.This follows the suggested fix from the issue: remove that generic wrapper and forward the EDN options map directly. The CLI still inserts
:export-type :graphwhen it is omitted.I reproduced the original behavior on the latest
masterbefore making the change: the source block was queryable, the export command exited successfully, but the generated EDN contained an empty:pages-and-blocks [].Verification
:node-idswas missing, then passed after the fix.:selected-nodes, and verifies that the output contains the block text.git diff --checkpassed.Compatibility note
:graph-humancustomization now follows the worker's native contract and must be supplied explicitly under:graph-options, for example:{:export-type :graph-human :graph-options {:include-timestamps? true}}The CLI help, examples, and documentation are updated accordingly.
AI assistance
I used AI-assisted tools to help analyze the CLI/worker contract, implement the change, design regression coverage, and run verification. I reviewed the resulting diff and validated the fix with a real CLI export before opening this PR.
Fixes #13071