mirror of
https://github.com/hanzoai/dev.git
synced 2026-10-25 03:32:32 +00:00
Our history is just-every's with author emails rewritten, so the graphs are
disjoint and git finds no merge base. Supplied one by hand: d1f1f51a41, the
just-every commit matching our Oct-2025 fork point (22 files apart). 9618
upstream commits, 7004 files, +1.81M/-159k, 37 conflicts.
Resolution:
- Upstream code where our side was the Oct-2025 prototype of a feature they
have since reimplemented 3-5x larger (agent_runs, browser_sessions,
history_cell/{agent,browser}, the vt100 harness and its snapshots).
- Upstream's config.rs module split (builder/defaults/sources/validation)
kept; zen5-coder and the provider-follows-model rule re-applied on top.
- Ours where the file IS the identity: README, package.json, postinstall,
release notes pipeline, integration-zed.
- Hybrid where upstream improved a file we had branded: updates.rs (their
release-repo migration, our hanzoai/dev), release.yml (their fail-fast npm
auth check, our package name), chatwidget.rs (their turn handling, our
HANZO_USER_KEY hint), exec human output (their 237 lines, our banner).
Superseded and dropped deliberately: our resume_command_name() coder-alias
hack — upstream's derive_resume_command_name() reads the invocation basename
generically, which yields "dev" for us.
LLM.md now records the real topology and the sync point; AGENTS.md and
CLAUDE.md are symlinks to it again. Single parent on purpose: adopting
jecode/main as a second parent would re-import 13,742 commits carrying the
upstream author emails a prior rewrite deliberately removed.
Version 0.2.188 -> 0.2.189.
Co-authored-by: Hanzo Dev <[email protected]>
115 lines
3.9 KiB
Makefile
115 lines
3.9 KiB
Makefile
set working-directory := "codex-rs"
|
|
set positional-arguments
|
|
export JUST_SHELL := justfile_directory() / "scripts/just-shell.py"
|
|
set shell := ["python3", "-c", 'import os, runpy; runpy.run_path(os.environ["JUST_SHELL"], run_name="__main__")']
|
|
set windows-shell := ["python", "-c", 'import os, runpy; runpy.run_path(os.environ["JUST_SHELL"], run_name="__main__")']
|
|
|
|
rust_min_stack := "8388608" # 8 MiB
|
|
python := if os_family() == "windows" { "python" } else { "python3" }
|
|
|
|
# Display help
|
|
help:
|
|
just -l
|
|
|
|
# `codex`
|
|
alias c := codex
|
|
codex *args:
|
|
cargo run --bin codex -- {args}
|
|
|
|
# `codex exec`
|
|
exec *args:
|
|
cargo run --bin codex -- exec {args}
|
|
|
|
# Start `codex exec-server` and run codex-tui.
|
|
[no-cd]
|
|
[positional-arguments]
|
|
[unix]
|
|
tui-with-exec-server *args:
|
|
{{ justfile_directory() }}/scripts/run_tui_with_exec_server.sh "$@"
|
|
|
|
# Run the CLI version of the file-search crate.
|
|
file-search *args:
|
|
cargo run --bin code-file-search -- "$@"
|
|
|
|
# format code
|
|
fmt:
|
|
cargo fmt -- --config imports_granularity=Item 2>/dev/null
|
|
|
|
fix *args:
|
|
cargo clippy --fix --tests --allow-dirty {args}
|
|
|
|
clippy *args:
|
|
cargo clippy --tests {args}
|
|
|
|
[unix]
|
|
install:
|
|
rustup show active-toolchain
|
|
cargo fetch
|
|
|
|
# Run `cargo nextest` since it's faster than `cargo test`, though including
|
|
# --no-fail-fast is important to ensure all tests are run.
|
|
#
|
|
# Run `cargo install --locked cargo-nextest` if you don't have it installed.
|
|
# Prefer this for routine local runs. Workspace crate features are banned, so
|
|
# there should be no need to add `--all-features`.
|
|
test:
|
|
RUST_MIN_STACK={{ rust_min_stack }} cargo nextest run --no-fail-fast
|
|
|
|
# Run Bazel-backed end-to-end macrobenchmarks with optimized binaries.
|
|
bench-e2e:
|
|
# Keep measured binaries comparable to production-style optimized builds.
|
|
bazel test --compilation_mode=opt --cache_test_results=no --test_output=streamed //codex-rs:e2e-benchmarks
|
|
|
|
# Run Bazel-backed end-to-end macrobenchmarks once per case with release-like
|
|
# Rust cfg paths but fastbuild codegen.
|
|
bench-e2e-smoke:
|
|
# Avoid optimizer cost because smoke runs only check that benchmarks work.
|
|
# Compile target Rust code through the same release-only cfg paths as opt.
|
|
# Compile exec-platform Rust tools through those release-only cfg paths too.
|
|
bazel test --compilation_mode=fastbuild --@rules_rust//rust/settings:extra_rustc_flag=-Cdebug-assertions=no --@rules_rust//rust/settings:extra_exec_rustc_flag=-Cdebug-assertions=no --cache_test_results=no --test_output=streamed --test_arg=--test //codex-rs:e2e-benchmarks
|
|
|
|
# Build and run Codex from source using Bazel.
|
|
# On Unix, use `[no-cd]` and `--run_under="cd $PWD &&"` to ensure Bazel runs
|
|
# the command in the current working directory.
|
|
[no-cd]
|
|
[unix]
|
|
bazel-codex *args:
|
|
bazel run //codex-rs/cli:codex --run_under="cd $PWD &&" -- "$@"
|
|
|
|
[windows]
|
|
bazel-codex *args:
|
|
bazel run //codex-rs/cli:codex --run_under='cd /d "{{ invocation_directory_native() }}" &&' -- @($args | Select-Object -Skip 1)
|
|
|
|
[no-cd]
|
|
bazel-lock-update:
|
|
bazel mod deps --lockfile_mode=update
|
|
|
|
[no-cd]
|
|
[unix]
|
|
bazel-lock-check:
|
|
{{ justfile_directory() }}/scripts/check-module-bazel-lock.sh
|
|
|
|
[windows]
|
|
bazel-lock-check:
|
|
bazel mod deps --lockfile_mode=error; if ($LASTEXITCODE -ne 0) { Write-Error "MODULE.bazel.lock is out of date. Run 'just bazel-lock-update' and commit the updated lockfile."; exit 1 }
|
|
|
|
bazel-test:
|
|
bazel test --test_tag_filters=-argument-comment-lint //... --keep_going
|
|
|
|
[no-cd]
|
|
[unix]
|
|
bazel-clippy:
|
|
bazel_targets="$({{ justfile_directory() }}/scripts/list-bazel-clippy-targets.sh)" && bazel build --config=clippy -- ${bazel_targets}
|
|
|
|
[no-cd]
|
|
[unix]
|
|
bazel-argument-comment-lint:
|
|
bazel build --config=argument-comment-lint -- $({{ justfile_directory() }}/tools/argument-comment-lint/list-bazel-targets.sh)
|
|
|
|
build-for-release:
|
|
bazel build //codex-rs/cli:release_binaries
|
|
|
|
# Run the MCP server
|
|
mcp-server-run *args:
|
|
cargo run -p code-mcp-server -- "$@"
|