Skip to content

Preserve unresolved loadSpec references for lazy traversal - #390

Open
warp-agent-staging[bot] wants to merge 13 commits into
mainfrom
factory/loadspec-composition
Open

Preserve unresolved loadSpec references for lazy traversal#390
warp-agent-staging[bot] wants to merge 13 commits into
mainfrom
factory/loadspec-composition

Conversation

@warp-agent-staging

@warp-agent-staging warp-agent-staging Bot commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

Summary

Keep static loadSpec strings unresolved on Signature so Warp can resolve them lazily during completion traversal (APP-5777). Nested aws/* and gcloud/* targets are imported as sanitized JSON at their natural paths so the strict embedded graph gate stays empty. Coordinated Warp PR: warpdotdev/warp#15817

Changes

  • Deserialize command-level string loadSpec onto fig_types::Command and Signature; ignore non-string/function-style values.
  • signature_by_name looks up slash-path targets; commands() omits nested assets so they are not top-level commands.
  • Graph validation plus all_embedded_load_spec_references_resolve fail CI if any embedded pointer is missing or cyclic.
  • Restore 264 aws/* and 67 gcloud/* loadSpec pointers that exist upstream. Drop only gcloud/alpha and gcloud/beta.
  • Import reachable targets from pinned autocomplete aef52ac via script/import_load_spec_targets into json/aws/*.json and json/gcloud/*.json.
  • Keep Warp-supported static fields and existing suggestions. Strip functions/_NuFrRa_/unsupported payloads. Normalize each item's own description to a concise leading statement (max 240 chars). aws/application-autoscaling delete-scaling-policy --resource-id is The identifier of the resource associated with the scalable target.
  • rust-embed 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.
  • Clippy with warnings denied passed.
  • Corpus: 331 files, 35.89 MiB raw. Description max 240, zero _NuFrRa_. Structured --generate-cli-skeleton suggestions still ["input","output"].

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.
@warp-agent-staging

Copy link
Copy Markdown
Contributor Author

This PR was generated with Warp.

Comment @warp-factory on this PR to send it follow-up work.

View run View conversation View on Slack

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.
@warp-agent-staging warp-agent-staging Bot changed the title Resolve static loadSpec composition for command signatures Preserve unresolved loadSpec references for lazy traversal Sep 4, 2026
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
acarl005 marked this pull request as ready for review September 4, 2026 19:47
warp-agent-staging Bot and others added 3 commits September 4, 2026 20:17
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>

@warp-agent-staging warp-agent-staging Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

warp-agent-staging Bot and others added 5 commits September 4, 2026 20:51
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants