6 Commits

Author SHA1 Message Date
Zach Lloyd
424e3d827f Allow common skills install failures to continue scripts (#11438)
## Description
- Make common-skills install failures non-fatal in `script/run` and
`script/bootstrap`.
- Print a clear stderr line when installation cannot complete, then
continue the normal run/bootstrap flow.
- Keep strict resolver/install behavior unchanged outside the entrypoint
failure handling.

Oz conversation:
https://staging.warp.dev/conversation/2fff0589-38e0-48ec-869e-707afcc1b10b

## Linked Issue
- [ ] The linked issue is labeled `ready-to-spec` or
`ready-to-implement`.
- [ ] Where appropriate, screenshots or a short video of the
implementation are included below (especially for user-visible or UI
changes).

## Testing
- [x] `bash -n script/run script/bootstrap`
- [x] Isolated temp-directory harness that forces
`script/resolve_common_skills` to fail and confirms both entrypoints
continue.
- [ ] I have manually tested my changes locally with `./script/run`

## Agent Mode
- [x] Warp Agent Mode - This PR was created via Warp's AI Agent Mode

CHANGELOG-NONE

Co-Authored-By: Oz <oz-agent@warp.dev>

Co-authored-by: Oz <oz-agent@warp.dev>
2026-05-20 15:33:14 -06:00
Zach Lloyd
a529cdbf03 Move common skills management to common-skills scripts (#10617)
## Description
Move common-skills install/remove/verify responsibilities out of the
Warp checkout and into `warpdotdev/common-skills/scripts`, then have
Warp delegate to those scripts.

This keeps the common skill management logic with the common skills repo
while preserving the existing Warp developer flows:
- `script/bootstrap` and `script/run` resolve the common-skills scripts
from `WARP_COMMON_SKILLS_SCRIPTS_DIR`, a sibling `../common-skills`
checkout, or a common-skills worktree.
- Both entrypoints pass `--repo-root` so the external scripts operate on
the current Warp checkout.
- Bootstrap and run now verify installed common skills against
`skills-lock.json` after install/update.
- Documentation and Oz environment guidance now point at the external
common-skills scripts.

This PR depends on the companion `warpdotdev/common-skills` branch
`zach/move-common-skill-scripts`, which adds the scripts used here.

script/bootstrap

<img width="839" height="182" alt="Screenshot 2026-05-10 at 3 32 42 PM"
src="https://github.com/user-attachments/assets/347e469f-ac4c-4e18-980f-87d6a9a1a469"
/>

<img width="1044" height="102" alt="Screenshot 2026-05-10 at 5 37 22 PM"
src="https://github.com/user-attachments/assets/09f6d4ff-43a5-40c8-88c7-8df82c73b74c"
/>


## Linked Issue
N/A
- [ ] The linked issue is labeled `ready-to-spec` or
`ready-to-implement`.
- [ ] Where appropriate, screenshots or a short video of the
implementation are included below (especially for user-visible or UI
changes).

## Testing
- `bash -n script/run script/bootstrap`
- `bash -n
/Users/zach/.warp-dev/worktrees/common-skills/move-common-skill-scripts/scripts/install_common_skills
/Users/zach/.warp-dev/worktrees/common-skills/move-common-skill-scripts/scripts/remove_common_skills
/Users/zach/.warp-dev/worktrees/common-skills/move-common-skill-scripts/scripts/verify_common_skills`
- `pwsh -NoProfile -Command '$null = [scriptblock]::Create((Get-Content
-Raw "script/windows/bootstrap.ps1"))'`
- `git diff --check`
- Smoke-tested bootstrap/run common-skills paths using temporary copies
that no-op platform setup/app launch.

- [ ] I have manually tested my changes locally with `./script/run`

### Screenshots / Videos
N/A — script and documentation changes only.

## Agent Mode
- [x] Warp Agent Mode - This PR was created via Warp's AI Agent Mode

Conversation:
https://staging.warp.dev/conversation/d6752e7c-9dfc-4929-a524-002bd7d2ecaa

Co-Authored-By: Oz <oz-agent@warp.dev>

---------

Co-authored-by: Oz <oz-agent@warp.dev>
2026-05-13 16:13:22 -06:00
Evelyn Xu
fd2a608ace [Quality-547] add bert_tiny_v2 model and update input classifier (#10756)
## Description
<!-- Please remember to add your design buddy onto the PR for review, if
it contains any UI changes! -->
Add [retrained nld
classifier](https://github.com/warpdotdev/ml_models/pull/2) to dogfood;
Meanwhile changing model file storage from raw blobs to lfs for
optimizing git efficiency

It could resolve the misfires reported in
[quality-547](https://linear.app/warpdotdev/issue/QUALITY-547/laundry-list-of-misfires);
For quality 543 on file paths misfires, some are still pending to
resolve by improving heuristics.

## About switching to git lfs to store model binary files
| Scenario | Potential Impact | Failure Risk | Mitigation |
|---|---|---|---|
| Fresh clone with `git-lfs` installed | `git clone` (and subsequent
`git pull`) automatically invokes the smudge filter, which fetches the
real ONNX blobs from LFS in place of the pointer files. `rust-embed`
embeds the actual model bytes at build time. | None — classifier loads
normally. | No mitigation needed; this is the happy path. |
| Fresh clone without `git-lfs` installed | ONNX paths land as ~130-byte
pointer stubs. `rust-embed` embeds the pointer file at build time;
runtime tries to load it as ONNX. | `candle::InferenceRunner::new` fails
and the classifier silently falls back to `HeuristicClassifier`. App
still builds and runs — no compile-time break, but a behavioral
regression. | `script/bootstrap` now refuses to proceed if `git-lfs` is
missing and runs `git lfs install --local && git lfs pull` when present;
`WARP.md` documents it. |
| Existing clone, user pulls this branch with `git-lfs` installed but
never enabled in the repo | `git lfs install --local` hasn't been run,
so the smudge filter is inactive. | The v1 file may stay correct
(already a blob locally) but the new v2 file appears as a pointer. |
Same bootstrap step covers it; users who skip bootstrap can run `git lfs
install && git lfs pull` once. |
| Existing clone, user pulls without ever installing `git-lfs` | The v2
model lands as a pointer (silent classifier fallback). | Build succeeds,
but classifier silently degrades to heuristic fallback. | Bootstrap
requirement + `WARP.md` note + the runtime `log::warn!("Failed to load
onnx classifier (v2): ...")` makes the failure greppable in logs. |
| Existing clone with `git-lfs` installed and enabled | `git pull`
invokes the smudge filter automatically, fetching the v2 blob from LFS
to replace the pointer. `rust-embed` picks up the real bytes on the next
build. | None — classifier loads normally. | No mitigation needed; this
is the happy path for existing clones. |
| Forks / branches based on pre-LFS commits | Cherry-picks or merges
crossing the LFS boundary need `git-lfs` locally to render the binaries
correctly. | Low — no history rewrite is needed since we're only
renormalizing on this commit. | Old branches keep working with raw blobs
because their `.gitattributes` doesn't yet have the LFS rule. |

### TL;DR — Risk Mitigation Summary

**1. Fresh clones (hard enforcement at bootstrap)**
The actual gate lives in `script/bootstrap`, which now (a) refuses to
proceed if `git-lfs` is not installed, and (b) runs `git lfs install
--local && git lfs pull` automatically when it is. The `WARP.md` note
complements this by explaining the requirement and providing recovery
commands for users who bypass bootstrap.

**2. Existing clones (tiered recovery)**
- **Hard failure path:** If a build or runtime error surfaces (e.g.
`candle::InferenceRunner::new` panics or the agent reports a missing
model), the agent's remediation is to run `git lfs install --local &&
git lfs pull` once and retry.
- **Silent fallback path:** If the build succeeds but the classifier
silently regresses to `HeuristicClassifier`, we accept it as a
non-blocking degradation. The `log::warn!("Failed to load onnx
classifier (v2): ...")` line makes the condition greppable in logs, and
the next bootstrap run will self-heal.

**3. CI (requires explicit opt-in to LFS)**
Update CI `with: lfs: true` to any job that compiles the app, runs
classifier tests, or bundles release artifacts. Please see
3bf92118b8

## Linked Issue
<!--
Link the GitHub issue this PR addresses. Before opening this PR, please
confirm:
-->
- [ ] The linked issue is labeled `ready-to-spec` or
`ready-to-implement`.
- [ ] Where appropriate, screenshots or a short video of the
implementation are included below (especially for user-visible or UI
changes).

## Testing
<!--
How did you test this change? What automated tests did you add? If you
didn't add any new tests, what's your justification for not adding any?

Manual testing is required for changes that can be manually tested, and
almost all changes can be manually tested. If your change can be
manually tested, please include screenshots or a screen recording that
show it working end to end.

You can run the app locally using `./script/run` - see WARP.md for more
details on how to get set up.
-->

- [x] I have manually tested my changes locally with `./script/run`
For the CI changes on LFS, we see below logs in CI logs to verify CI
does fetch raw binary model files
```
28217b297a * app/assets/windows/arm64/OpenConsole.pdb (30 MB)
6eca0f5ba1 * app/assets/windows/arm64/conpty.pdb (6.4 MB)
3cf69e7c9b * app/assets/windows/x64/OpenConsole.pdb (34 MB)
e9347e3fa6 * app/assets/windows/x64/conpty.pdb (6.5 MB)
05b2aaba0e * crates/input_classifier/models/onnx/bert_tiny_v1.onnx (18 MB)
1fd8afc92b * crates/input_classifier/models/onnx/bert_tiny_v2.onnx (18 MB)
```
[macos
CI](https://github.com/warpdotdev/warp/actions/runs/25768466066/job/75686351916)
[Linux
CI](https://github.com/warpdotdev/warp/actions/runs/25768466066/job/75686351926)
[Windows
CI](https://github.com/warpdotdev/warp/actions/runs/25768466066/job/75686351937)
### Screenshots / Videos
<!-- Attach screenshots or a short video demonstrating the change, where
appropriate. Remove this section if it is not relevant to your PR. -->
https://www.loom.com/share/94f99078f8614b2bbc05eab7f8d1a7d1
in this video we tested on the misfires listed in quality-547
- left: warp dev
- right: warp local build on this change

Video for dogfood feature
https://www.loom.com/share/196ffbc863aa4b39894f4e821ab54d85
## Agent Mode
- [ ] Warp Agent Mode - This PR was created via Warp's AI Agent Mode

<!--
## Changelog Entries for Stable

The entries below will be used when constructing a soft-copy of the
stable release changelog. Leave blank or remove the lines if no entry in
the stable changelog is needed. Entries should be on the same line,
without the `{{` `}}` brackets. You can use multiple lines, even of the
same type. The valid suffixes are:

- NEW-FEATURE: for new, relatively sizable features. Features listed
here will likely have docs / social media posts / marketing launches
associated with them, so use sparingly.
- IMPROVEMENT: for new functionality of existing features.
- BUG-FIX: for fixes related to known bugs or regressions.
- IMAGE: the image specified by the URL (hosted on GCP) will be added to
Dev & Preview releases. For Stable releases, see the pinned doc in the
#release Slack channel.
- OZ: Oz-related updates. Use `CHANGELOG-OZ`. At most 4 Oz updates are
shown in-app per release.

CHANGELOG-NEW-FEATURE: {{text goes here...}}
CHANGELOG-IMPROVEMENT: {{text goes here...}}
CHANGELOG-BUG-FIX: {{text goes here...}}
CHANGELOG-BUG-FIX: {{more text goes here...}}
CHANGELOG-IMAGE: {{GCP-hosted URL goes here...}}
CHANGELOG-OZ: {{text goes here...}}
-->

---------

Co-authored-by: Oz <oz-agent@warp.dev>
2026-05-13 18:27:25 +00:00
Zach Lloyd
b84e3e98d9 Add opt-in common skills installer (#10121)
## Description
Replaces the custom common-skills lock file with the standard project
lock generated by `npx skills`, and wires local setup to restore
checked-in common skills from that lock.

This PR:
- Removes `.agents/common-skills.lock` and the custom common-skills
lock/update workflow.
- Adds `skills-lock.json`, the standard `npx skills` project lock for
skills sourced from `warpdotdev/common-skills`.
- Keeps the copied `.agents/skills/*` files checked in so local and
cloud agents can discover repo-local skills directly from the checkout.
- Reworks `script/install_common_skills` to restore from
`skills-lock.json` via `npx --yes skills@1.5.6 experimental_install`.
- Stores the local install stamp under
`.git/warp/common-skills-lock.hash` so normal restores do not dirty the
worktree.
- Updates `script/run` to check the lock before building and restore
skills only when the lock hash changed.
- Keeps `./script/bootstrap --install-common-skills` and
`.\script\windows\bootstrap.ps1 -InstallCommonSkills` as explicit
bootstrap paths that delegate to the same installer.
- Adds `specs/common-skills-installation/TECH.md` with separate Mermaid
diagrams for the local install/update flow and the Oz Claude cloud-agent
environment setup flow.

Pretty cool loom of what's coming on orchestration for anyone interested
:)

https://www.loom.com/share/87212dc5a6824573861794e32cf9902d

## Flow
### Local agent install/update flow
1. `warpdotdev/warp` checks in both `skills-lock.json` and
`.agents/skills/*`.
2. `script/run` calls `script/install_common_skills --if-needed
--non-interactive --quiet` before launching the local build.
3. The installer hashes `skills-lock.json` and compares it with
`.git/warp/common-skills-lock.hash`.
4. If the hash matches, it skips restore and continues the build.
5. If the hash is missing or stale, it runs `npx --yes skills@1.5.6
experimental_install`, restores `.agents/skills/*` with the pinned
`skills@1.5.6` CLI, writes the new local stamp, and then continues.
6. To intentionally update common skills, run `npx --yes skills@1.5.6
update -p -y` and commit the resulting `skills-lock.json` and
`.agents/skills/*` changes together.

### Oz Claude cloud-agent environment setup flow
1. Oz provisions or reuses a cloud environment and clones/syncs
`warpdotdev/warp`.
2. Environment setup should invoke `./script/install_common_skills
--if-needed` after checkout sync and before starting the Claude agent.
3. Fresh environments restore from `skills-lock.json`; reused
environments skip when the cloud-local stamp matches.
4. The Claude agent starts with repo-local checked-in skills
discoverable, and runs may still pass explicit skill specs such as
`warpdotdev/warp:create-pr`.

The Oz environment hook itself lives outside this repo; this PR makes
the repository checkout self-sufficient and idempotent when that hook
invokes the installer.

## Linked Issue
- [ ] The linked issue is labeled `ready-to-spec` or
`ready-to-implement`.
- [ ] Where appropriate, screenshots or a short video of the
implementation are included below (especially for user-visible or UI
changes).

## Screenshots / Videos
Not applicable; script/docs/skills change.

## Testing
- `bash -n script/install_common_skills script/run script/bootstrap`
- PowerShell parse check for `script/windows/bootstrap.ps1`
- `./script/install_common_skills --if-needed --quiet` using pinned
`skills@1.5.6`
- second `./script/install_common_skills --if-needed --quiet` skip-path
check
- `git diff --check`
- Earlier branch validation: `cargo check --manifest-path Cargo.toml`
- Earlier branch validation: `cargo fmt --all --manifest-path
Cargo.toml`
- Earlier branch validation: `cargo clippy --manifest-path Cargo.toml
--workspace --all-targets --all-features --tests -- -D warnings`

## Agent Mode
- [x] Warp Agent Mode - This PR was created via Warp's AI Agent Mode

Co-Authored-By: Oz <oz-agent@warp.dev>

---------

Co-authored-by: Oz <oz-agent@warp.dev>
2026-05-09 19:20:01 +00:00
Tautik Agrahari
ce89a98b53 fix(bootstrap): warn before sudo and document install steps (#9501)
- new `script/warp_sudo`: echoes each privileged command, prompts
`[y/N]` from `/dev/tty`, shells to real `sudo` on confirm.
`WARP_BOOTSTRAP_YES=1` or non-tty stdin skips.
- `script/bootstrap`: static `--help` install list dropped. `-y`/`--yes`
exports `WARP_BOOTSTRAP_YES=1` for children.
- ten direct `sudo` call-sites in `script/{macos,linux}/bootstrap` +
`script/linux/install_{build,runtime,test}_deps` switched to
`warp_sudo`. windows unchanged.
- `README.md`: short "what `./script/bootstrap` does" subsection
pointing at the platform scripts as the source of truth.

closes #9421.
2026-05-04 16:36:47 -04:00
David Stern
0dbd3d567a Initial public release of Warp.
Repo-Sync-Origin: warpdotdev/warp-internal@12af1d983b
2026-04-28 08:43:33 -05:00