Files
dev/Makefile
T
zeekay 8cd3a7d268 upstream: hanzoai/codex at 3ee47c105, the delta as commits; the build-time edits go
upstream/codex is now hanzoai/codex, whose main is openai/codex with
Hanzo's commits on it, and dev builds that checkout as committed: no
`make prepare`, nothing rewritten, `git -C upstream/codex status` empty
after a build and a test run. A bump is `git merge upstream/main` on the
fork's main, with conflicts in git, then the gitlink here.

openai/codex moves from 11da6b9e to 3ee47c105 (288 commits). Of the 106
anchored edits one had lost its ground, the --sandbox-state-json help that
upstream reworded, and was re-anchored before the delta became commits on
the fork: hanzo (Dev's crates in its workspace), tui, cli, config, core,
words, brand (the name rule's 227 literals) and version (the version
rule's 126 reads). The edit that set upstream's workspace version to
0.7.0-dev.1 is dropped: no upstream code reads its own version any more.
None of the anchors touched the zsh fork, shell-escalation or gateway_auth
code upstream removed or renamed, and the Hanzo crates built against the
moved APIs unchanged.

The version: hanzo-version moves into the fork, hanzo-dev hands it its own
CARGO_PKG_VERSION at startup, and DEV_VERSION is gone. The root
[workspace.package] version is the release's, and release.yml holds the
tag to it as well as to npm/package.json. Dev's libraries stay 0.0.0,
since upstream crates depend on them, so a release still recompiles
hanzo-dev alone. cli.rs fails on any upstream read of its own version.

Gone: patches/ (upstream.json, brand.json, and the Bazel patches only the
root MODULE.bazel names, which no build here runs), crates/hanzo-upstream
and crates/hanzo-version. The V8 fetch for `make test-upstream` is
scripts/v8.sh; `make bump` prints the merge steps; `make reset` goes. The
root Cargo.toml mirrors the fork's workspace dependencies: shell-escalation
and mxc-sdk out, the split mxc crates, gix 0.89, rmcp 3.5.1 and rustls
0.23.46 in.
2026-10-15 07:16:51 -07:00

59 lines
2.0 KiB
Makefile

CARGO_HOME ?= $(HOME)/.cargo
export PATH := $(CARGO_HOME)/bin:$(PATH)
export NEXTEST_HIDE_PROGRESS_BAR := true
CARGO := RUST_MIN_STACK=8388608 cargo
.PHONY: all build release install test test-upstream bump v8 fmt clean help
.DEFAULT_GOAL := build
all: build
## build: build the dev binary
build:
@$(CARGO) build --locked -p hanzo-dev --bin dev
## release: build the optimized dev binary
release:
@$(CARGO) build --locked --release -p hanzo-dev --bin dev
## install: put the release binary on PATH
install: release
@$(CARGO) install --locked --path crates/hanzo-dev --bin dev
## test: run the Hanzo test suite
test:
@$(CARGO) nextest run --locked --no-fail-fast $(ARGS)
## test-upstream: run hanzoai/codex's own suite against the pinned checkout
# voice-host wants GStreamer >= 1.28, which no current distribution ships, and
# nothing else in the workspace depends on it. The fork's workspace names Dev's
# crates, so cargo resolves them into codex-rs/Cargo.lock as it runs.
test-upstream: v8
@. target/v8-env.sh && $(CARGO) nextest run --no-fail-fast \
--manifest-path upstream/codex/codex-rs/Cargo.toml \
--workspace --exclude codex-voice-host $(ARGS)
## bump: say how to move upstream/codex forward (it runs nothing)
bump:
@echo 'upstream/codex is hanzoai/codex: its main is openai/codex plus our commits.'
@echo ' git -C upstream/codex remote add upstream https://github.com/openai/codex.git # once'
@echo ' git -C upstream/codex switch main && git -C upstream/codex pull --ff-only origin main'
@echo ' git -C upstream/codex fetch upstream && git -C upstream/codex merge upstream/main'
@echo ' make build test # then push main to hanzoai/codex and commit the gitlink here'
## v8: download and verify the V8 build the upstream suite links
v8:
@scripts/v8.sh
## fmt: format the crates Hanzo owns
fmt:
@$(CARGO) fmt -p hanzo-dev -p hanzo-config -p hanzo-tui -p hanzo-kai -p hanzo-loop
## clean: discard build output
clean:
@$(CARGO) clean
help:
@grep -hE '^## ' $(MAKEFILE_LIST) | sed 's/## / make /' | sort