Commit Graph
56 Commits
Author SHA1 Message Date
zeekayandHanzo Dev d3d1dfa1d3 dev is ours: the Hanzo Cloud by default, a binary named dev, our namespaces
hanzoai/dev went public defaulting to someone else's cloud. Four things were
wrong, and all four now have a test that fails if they come back.

DEFAULT PROVIDER AND MODEL. built_in_model_providers() gains `hanzo` -- the
Hanzo Cloud at api.hanzo.ai/v1, Responses wire, bearer from HANZO_USER_KEY --
and it is the default. The default model is zen5-coder. This was not cosmetic:
the old default is not in the gateway catalog, so it 400s against our own
cloud. Measured, not assumed:

  POST api.hanzo.ai/v1/responses model=gpt-5-codex -> 400 "model is not
      available. Use GET /v1/models to list available models"
  POST api.hanzo.ai/v1/responses model=zen5-coder  -> 200, clean output

Our own CLI already documented the bug from the other side -- dev.rs says
"Name the model too -- codex's built-in default is not in the gateway catalog
and would 400" and passes `-c model=` on every launch to work around it. It
also asserts that on the native gateway NO model_provider override is needed,
which is only true once `hanzo` is the built-in default. It is now.

zen5-coder over enso because dev is a coding agent and because enso returns
system-prompt text on the Responses wire that dev actually speaks; zen5-coder
returns the answer. Model ids were read from GET /v1/models with a bearer, not
guessed. Other providers stay fully configurable -- this is the default, not
the only choice.

THE LOGIN COMMAND. Messages said `code login` / `codex login`. The real command
is `hanzo auth login` (`hanzo login` is not a command -- it is swallowed as an
AI task). It now lives once, as auth::LOGIN_COMMAND, so no message can drift
into naming a command that does not exist. References to this binary's own
subcommand became `dev login`.

A BINARY NAMED dev. HEAD built `code` and `codex` and nothing named `dev`, so a
release cut today would ship no `dev` -- and `hanzo code` launches a bare `dev`
off PATH, so every new install would break. `dev` is now the canonical bin,
declared first; `code` remains as an alias to the same program, never the
reverse. The CLI identifies as `dev` / "Hanzo Dev", not "OpenAI Codex".

OUR NAMESPACES. The pipeline published to @just-every/* on npm and pushed
formulae to just-every/homebrew-tap. Both of ours already exist and are already
populated at v0.6.91 -- @hanzo/dev plus all five @hanzo/dev-<target> packages,
and hanzoai/homebrew-tap's Formula/hanzo-dev.rb, which installs `dev` and
expects assets named dev-<triple>. Nothing here is squatted; this is our own
distribution, reclaimed. Assets are renamed to match the formula.

Two live supply-chain bugs fell out of that, both worse than a naming problem:
postinstall.js (runs on every npm install) and the tui auto-updater fetched
from a third party's releases -- the updater also told our users to
`npm install -g @just-every/code@latest`. Worse, a shadowed `isWSL` const put
the two fast paths in the temporal dead zone, so their catch blocks swallowed
the error and EVERY install fell through to that download: the five published
platform packages were never used, and the third-party fetch was not an edge
case but the only path that ran. Fixed and exercised in a sandbox across all
three paths. codex-cli/.pack/ -- a committed `npm pack` artifact CI
regenerates, and the reason the bad URL had two homes -- is now untracked.

DURABILITY, because upstream-merge.yml merges openai/codex every 30 minutes.
A one-time edit to a default is a suggestion that survives until the next
merge. Two mechanisms:

  - .github/merge-policy.json prefer_ours_globs listed only codex-rs/** while
    the workspace that SHIPS is code-rs/**, so it protected nothing that
    ships. The identity-bearing code-rs files are now listed.
  - code-rs/core/tests/hanzo_identity.rs asserts all four properties -- the
    provider, a Zen default, a bin named dev, and no third-party publish
    target. Upstream has no such file, so a merge cannot conflict with it or
    carry the guard away with the thing it guards. Policy can be edited;
    a red build cannot be ignored.

The gate is not decorative: it failed on the un-retargeted pipeline
("release.yml still references `@just-every/`") and went green only when the
pipeline was actually fixed.

Verified: cargo build --bin dev clean; hanzo_identity 4/4; code-core lib
332 passed, 1 failed -- git_info::test_collect_git_info_with_remote, which
fails identically on a clean origin/main checkout here because this machine
has a global [email protected]:.insteadof rewrite. Pre-existing and
environmental, not from this change.

  $ dev exec "say OK"        # fresh profile, no config
  Hanzo Dev v0.0.0
  model: zen5-coder
  provider: hanzo

Co-authored-by: Hanzo Dev <[email protected]>
2026-08-01 14:05:00 -07:00
James Peterandzeekay 11fa2750eb fix(tui/auto-drive): block resume while auto-resolve pending 2026-07-31 20:35:36 -07:00
James Peterandzeekay f9b95602b9 fix(tui/tools): group agent and browser tool cells 2026-07-31 20:35:35 -07:00
James Peter 30a0a065be Merge branch 'merge/code-branch-20251007-113259' into main 2025-10-08 10:27:28 +10:00
James Peter ba3dd4b8fa fix(history): dedupe assistant messages across finalize/restore 2025-10-07 22:46:12 +10:00
James Peter 3bc12aeb03 merge local main into code-branch-20251007-104544 before merge 2025-10-07 21:51:56 +10:00
James Peter aa6aaae817 fix(tui/history): clear suppressed exec cells 2025-10-07 21:29:04 +10:00
James Peter 8d138ed9bd UX: match resume hint to coder alias 2025-10-07 21:12:35 +10:00
James Peter cd1aa8dc96 fix(tui/resume): avoid duplicate assistant cells on replay 2025-10-07 20:50:32 +10:00
James Peter 382236f47b fix(mcp-server): track acp session_set_model rename 2025-10-07 20:02:39 +10:00
James Peter 2a71c32f13 Merge branch 'code-branch-20251006-101336' into main 2025-10-07 19:44:50 +10:00
James Peter c20501342e test(tui): document vt100 harness and drop flaky regressions 2025-10-07 19:24:36 +10:00
James Peter abfaf1161c fix(core/rollout): keep agent events untouched when resuming 2025-10-07 13:28:35 +10:00
James Peter a8937812a7 fix(core/rollout): preserve user attachments when resuming 2025-10-07 13:20:26 +10:00
James Peter 48d345db86 test: reintroduce minimal tests 2025-10-07 13:02:00 +10:00
James Peter c494b8c3bb test(config): wrap env var calls in EnvVarGuard drop 2025-10-07 12:40:02 +10:00
James Peter 1e5f7c1391 test(tui/vt100): add explore/reasoning repro harness 2025-10-07 12:31:39 +10:00
James Peter d157fff687 merge local main into code-branch-20251006-192649 before merge 2025-10-07 07:46:55 +10:00
James Peter 6834025471 merge local main into code-branch-20251006-105834 before merge 2025-10-07 07:46:37 +10:00
James Peter e036d07786 merge local main into code-branch-20251006-105837 before merge 2025-10-07 07:45:19 +10:00
James Peter 77dcba659c fix(tui/resume): bias provider order after restore
- track expected next request ordinal when loading resume snapshots
- add dynamic bias for incoming OrderMeta so resumed turns append
- ensure queued interrupts and exec tools reuse biased order keys
- add regression test confirming resumed output lands at tail

Closes #319
2025-10-07 06:35:44 +10:00
James Peter dd99724659 test(tui/vt100): reproduce bottom clipping regression 2025-10-07 06:07:10 +10:00
James Peter 21a44e68cb fix(tui/spinner): clear footer when agent status stalls
closes #316
2025-10-07 05:43:12 +10:00
James Peter 2459f42769 fix(tui/trust): honor allow_git_writes in trusted workspaces
Closes #314.
2025-10-07 05:22:56 +10:00
James Peter 21333e8dfe merge local main into code-branch-20251006-110017 before merge 2025-10-07 05:21:30 +10:00
James Peter 41532c4e08 test(tui): add vt100 snapshot harness and baselines 2025-10-07 04:26:06 +10:00
James Peter 0806c20a85 fix(tui/composer): support backslash continuation
Fixes #312
2025-10-07 04:18:19 +10:00
James Peter a57ca290e7 fix(core/config): honor legacy AGENTS.md fallback
Fixes #322.
2025-10-07 04:18:18 +10:00
James Peter 81eac275c8 fix(mcp): validate stdio command on PATH; improve spawn error context. Fixes #302 2025-10-06 20:23:49 +10:00
James Peter f7a49d2535 fix(mcp): validate stdio command on PATH; improve spawn error context. Fixes #302 2025-10-06 19:59:07 +10:00
James Peter c71c5cbb32 fix(rollout): prefer rollout files when resuming 2025-10-06 17:27:22 +10:00
James Peter ab3d651a23 test: run nextest in release and harden smokes 2025-10-06 16:26:26 +10:00
James Peter 7947f6fa8e merge local main into code-branch-20251006-020831 before merge 2025-10-06 14:14:08 +10:00
James Peter cef3359113 fix(tui): stabilize history ordering and scrollback 2025-10-06 14:05:00 +10:00
James Peter 6e9763fb05 fix(core/tests): restore cargo test coverage 2025-10-06 13:49:35 +10:00
James Peter 1010377c10 chore(codex-rs): align mirror with parallel tool API 2025-10-06 12:04:29 +10:00
James Peter ac1920dcc0 fix(ci): restore execpolicy cli and test deps 2025-10-06 11:46:01 +10:00
James Peter 44458d2d0e Merge upstream/main: adopt tool parallelism and exec formatting 2025-10-06 11:19:57 +10:00
James Peter 96d1fad448 merge local main into code-branch-20251005-231240 before merge 2025-10-06 10:21:48 +10:00
James Peter 175a5eac7d refactor(upstream): re-export crates and prune docs 2025-10-06 10:21:27 +10:00
James Peter a3d14642e8 fix(agents): show cloud builtin in /agents UI 2025-10-06 10:14:03 +10:00
James Peter 2077e7be5d fix(tui/explore): hold exploring header off rendered cells 2025-10-06 09:58:16 +10:00
James Peter d3b4b15eb5 chore(tui): remove legacy overlay stack 2025-10-06 08:48:22 +10:00
James Peter 01795513fe chore(tui): drop vt100-tests flag and sync docs 2025-10-06 08:40:54 +10:00
James PeterandHanzo Dev 7deab83fc3 chore: complete legacy test retirement and upstream crate adoption
This commit completes Phase 1 of the codebase cleanup plan documented in
ROADMAP.md and related migration documents.

Major changes:
- Removed legacy test suites from code-rs/ crates (~35,000 lines)
- Adopted upstream codex-mcp-client and codex-responses-api-proxy
- Deleted TUI compat layer, agent task planning docs, and orphaned modules
- Updated documentation to reflect current state and future phases

Test Coverage:
- Deleted tests from: app-server, apply-patch, chatgpt, cli, core, exec,
  login, mcp-server
- Documented 9 remaining coverage gaps requiring new tests (see
  docs/migration/legacy-tests-retirement.md)
- Preserved smoke test infrastructure in tui/tests/ui_smoke.rs

Crate Adoptions:
- mcp-client: Now re-exports codex-mcp-client with fork-specific buffer config
- responses-api-proxy: Now re-exports codex-responses-api-proxy with minimal
  wrapper
- mcp-types: Updated to use upstream types where possible

TUI Cleanup:
- Removed compat.rs ratatui adapter layer
- Deleted obsolete modules: app_backtrack, custom_terminal, scroll_view,
  text_block, transcript_app
- Archived agent_tasks/ planning docs to docs/archive/

Documentation Updates:
- ROADMAP.md: Marked Phases 1-2 complete, updated next actions
- TEST_SUITE_RESET.md: Documented Phase 1 completion
- DEAD_CODE_INVENTORY.md: Updated with deletion outcomes
- Added docs/migration/legacy-tests-retirement.md with 6-week plan
- Added docs/maintenance/prompt-architecture.md

Next Steps (Phase 2-3):
- Port critical test coverage (9 test files identified)
- Expand smoke test scenarios
- Continue upstream tracking per monthly cadence

See docs/migration/ for detailed migration status and roadmap.

Co-authored-by: Hanzo Dev <[email protected]>
2025-10-06 05:15:48 +10:00
James Peter f95ab56e7c Revert "refactor(tui): route ratatui imports through compat"
This reverts commit 00044c540f.
2025-10-05 19:48:52 +10:00
James Peter 00044c540f refactor(tui): route ratatui imports through compat 2025-10-05 19:27:12 +10:00
James Peter c4eaa8a5cc docs(tui): expand legacy plan and add smoke test scaffold 2025-10-05 18:34:07 +10:00
James Peter 9b09ea415a feat(tui): add compat adapter and smoke documentation 2025-10-05 17:33:29 +10:00
Code Snapshot 337213efa0 code snapshot 2025-10-05 16:22:02 +10:00