Preserve unresolved loadSpec references for lazy traversal - #390
Open
warp-agent-staging[bot] wants to merge 13 commits into
Open
Preserve unresolved loadSpec references for lazy traversal#390warp-agent-staging[bot] wants to merge 13 commits into
warp-agent-staging[bot] wants to merge 13 commits into
Conversation
Add schema support for command-level loadSpec strings and compose the target spec at load time, keeping wrapper name/description. Missing targets and cycles are detected deterministically; production loading skips unresolved references so specs like aws.json still deserialize.
Contributor
Author
|
This PR was generated with Warp. Comment |
signature_by_name and commands now convert Fig specs independently so static loadSpec strings survive on Signature. Graph validation still walks exact and slash-path targets to report missing refs and cycles.
4 tasks
The fvm/gcloud/corpus tests in lib.rs were not the right gate. Graph validation stays in completion-metadata unit tests; signature_by_name deserializes assets inline again.
Keep type names unchanged; drop Fig from comments added with the unresolved loadSpec field.
acarl005
marked this pull request as ready for review
September 4, 2026 19:47
Drop dangling aws/* and gcloud/* loadSpec pointers so the corpus only references specs that exist. Valid hops such as fvm->flutter remain.
Keep the strict embedded graph gate and import nested specs from withfig/autocomplete instead of deleting resolvable slash-path references. gcloud/alpha and gcloud/beta stay as wrappers because those files do not exist upstream. Nested assets are looked up by path and omitted from top-level commands(). Co-Authored-By: Warp Agent <agent@warp.dev>
Generated with script/import_fig_nested_specs from withfig/autocomplete@aef52ac so slash-path loadSpec targets such as aws/iam and gcloud/compute resolve. Co-Authored-By: Warp Agent <agent@warp.dev>
Contributor
Author
There was a problem hiding this comment.
Important: confirm the native binary-size increase
Restoring the 331 referenced AWS/GCloud targets adds approximately 65 MiB of raw embedded JSON (41 MiB AWS + 24 MiB GCloud). The resulting release libwarp_command_signatures artifact is approximately 99 MiB, and native warp_completer/app builds enable embed-signatures, so this payload ships in native Warp binaries.
Please confirm that this size increase is acceptable and document the tradeoff in both coordinated PRs, or choose a compressed/externalized packaging design before merge.
The importer now walks a sorted work queue: convert each target, parse the JSON, and enqueue newly discovered static slash-path loadSpec values so nested pointers inside imported assets are not dropped. Co-Authored-By: Warp Agent <agent@warp.dev>
Turn on rust-embed's native `compression` feature (include-flate) so embedded JSON is deflated at compile time without a custom gzip layer. Lookup still returns the original bytes. Co-Authored-By: Warp Agent <agent@warp.dev>
Replace the ad hoc importer with script/import_load_spec_targets, keep only Warp-supported static fields, and cap each item's own description at 240 characters. Nested specs live under json/autogenerated/load_spec_targets and are still looked up as aws/<name> and gcloud/<name>. Co-Authored-By: Warp Agent <agent@warp.dev>
Imported from pinned upstream autocomplete aef52ac into json/autogenerated/load_spec_targets. Descriptions are item-specific and capped; structured suggestions are unchanged. Co-Authored-By: Warp Agent <agent@warp.dev>
Drop the dedicated autogenerated subtree and extra embed mapping. Nested slash-path assets stay at their natural paths and are still omitted from commands(). Co-Authored-By: Warp Agent <agent@warp.dev>
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
Keep static
loadSpecstrings unresolved onSignatureso Warp can resolve them lazily during completion traversal (APP-5777). Nestedaws/*andgcloud/*targets are imported as sanitized JSON at their natural paths so the strict embedded graph gate stays empty. Coordinated Warp PR: warpdotdev/warp#15817Changes
loadSpecontofig_types::CommandandSignature; ignore non-string/function-style values.signature_by_namelooks up slash-path targets;commands()omits nested assets so they are not top-level commands.all_embedded_load_spec_references_resolvefail CI if any embedded pointer is missing or cyclic.aws/*and 67gcloud/*loadSpec pointers that exist upstream. Drop onlygcloud/alphaandgcloud/beta.aef52acviascript/import_load_spec_targetsintojson/aws/*.jsonandjson/gcloud/*.json.suggestions. Strip functions/_NuFrRa_/unsupported payloads. Normalize each item's own description to a concise leading statement (max 240 chars).aws/application-autoscalingdelete-scaling-policy --resource-idisThe identifier of the resource associated with the scalable target.compression(include-flate) remains enabled.Verification
node --test script/import_load_spec_targets.test.mjs: 10 passed.cargo test -p warp-command-signatures --lib: 180 passed, including description bound ≤240, identity vs source JSON, and the strict loadSpec graph gate._NuFrRa_. Structured--generate-cli-skeletonsuggestions still["input","output"].