FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Harden stable release publication and Homebrew installation by igorcosta · Pull Request #463 · autohandai/code-cli · GitHub

Harden stable release publication and Homebrew installation - #463

Draft
igorcosta wants to merge 663 commits into
mainfrom
agent/homebrew-release-repair
Draft

Harden stable release publication and Homebrew installation#463
igorcosta wants to merge 663 commits into
mainfrom
agent/homebrew-release-repair

Conversation

Copy link
Copy Markdown
Contributor

What changed

  • normalize manual stable release inputs so both 0.9.3 and v0.9.3 resolve to the bare version 0.9.3
  • reject malformed or non-stable manual versions before the workflow builds or publishes anything
  • preflight npm packaging, Homebrew tap access, formula rendering, checksums, and Ruby syntax before creating the public GitHub release
  • publish the verified tap formula only after the release exists
  • replace tap-first installation guidance with brew install autohandai/code/autohand-code across the maintained documentation
  • add regression coverage for version normalization, release ordering, shell safety, formula rendering, and Homebrew 6 guidance

Why

The failed stable run accepted v0.9.3, then added another v when creating the tag and release. That produced the public vv0.9.3 release and passed v0.9.3 into the Homebrew renderer. The workflow also created the public GitHub release before proving that npm and Homebrew publication could succeed.

Homebrew 6 no longer trusts a separately tapped third-party repository by default. The fully qualified formula command taps and trusts the single formula in one step, which is the supported installation path for issue #462.

Impact

A stable release now fails before publication when its version, npm package, tap access, formula, checksums, or Ruby syntax is invalid. Existing CLI behavior is unchanged. The previous command alias remains in the formula, while public install guidance uses the Homebrew 6-compatible command.

Related to #462. Keep the issue open until a corrected public release and a clean Homebrew 6 install are verified.

Checks

  • bun test tests/ci/releaseWorkflow.test.ts tests/homebrew.spec.ts (24 passed)
  • actionlint .github/workflows/release.yml
  • bun lint
  • bun run proof (534 unit files / 7,716 tests passed; build and declarations passed; 54/54 Tuistory tests passed)

igorcosta and others added 30 commits May 13, 2026 16:51
Assert that deferred-sounding final text renders without a default repair turn while explicit completion hooks can still request repair behavior.

Co-authored-by: Autohand Evolve <code-noreply@autohand.ai>
Update the Ink status line contract so transient activity labels do not share the active-turn chrome with metrics and cancel hints. Cover background sync notification separation and authenticated /about routing through the slash command handler.

Co-authored-by: Autohand Evolve <code-noreply@autohand.ai>
Keep the rotating Ink activity labels in the active status line, but stop the React loop from replacing them with tool lifecycle strings. Completed tool details continue to render through the chat/tool output log.

Co-authored-by: Autohand Evolve <code-noreply@autohand.ai>
Add exact coverage for tool capability inventory answers so they remain valid final responses instead of being treated as announced actions without tool calls.

Co-authored-by: Autohand Evolve <code-noreply@autohand.ai>
Expose ui.activityVerbsEnabled through the settings registry and multi-word config set parsing so users can run autohand config set verbs activity true or false.

Keep activity verbs enabled by default while falling back to a stable Working status when disabled.

Co-authored-by: Autohand Evolve <code-noreply@autohand.ai>
Implement durable /goal state, queue handling, template resolution, agent tools, and RPC/ACP support with focused regression coverage.

Co-authored-by: Autohand Evolve <code-noreply@autohand.ai>
Add the slash_goal feature switch and use it to guard persistent goal commands, tools, prompts, RPC, and ACP surfaces. Refresh feature-gated goal tools after /features toggles so active sessions pick up changes without restart.

Co-authored-by: Autohand Evolve <code-noreply@autohand.ai>
Avoid re-archiving an assistant response after the next user prompt has already been echoed into the Ink transcript. This keeps completed answers attached to the question that produced them while preserving immediate submit feedback.

Co-authored-by: Autohand Evolve <code-noreply@autohand.ai>
Teach the Ink chat transcript to render fenced diff and patch blocks with the existing themed diff renderer instead of printing literal markdown fences.

Add regression coverage for assistant responses that include diff fences so changed lines remain readable in the terminal.

Co-authored-by: Autohand Evolve <code-noreply@autohand.ai>
Emit a transcript entry as soon as the ReAct loop parses a tool call, before execution starts, so users can see what the LLM is doing while the status line carries live progress. The display path is provider-agnostic because it runs after native and structured tool calls are normalized into ToolCallRequest.

Keep silent_tool_output as the opt-out: when ui.silentToolOutput is true, tool-call starts and completed tool output remain hidden from the Ink transcript while model/session tool messages are still preserved. Add renderer and chat-log support for tool_call history rows plus regression coverage for default visibility and chronological ordering.

Co-authored-by: Autohand Evolve <code-noreply@autohand.ai>
Detect raw unified diff blocks in assistant and chat history content, not only fenced diff markdown or git_diff tool entries.

Route those blocks through the existing Ink themed diff renderer so theme diff colors apply consistently to headers, hunks, additions, removals, and context lines.

Co-authored-by: Autohand Evolve <code-noreply@autohand.ai>
Add a UI config setting for completion reports, expose sitrep-friendly config aliases, and omit completion-report prompt guidance when users disable it.

Co-authored-by: Autohand Evolve <code-noreply@autohand.ai>
Render git diff lines with explicit ANSI generated from the active Autohand theme tokens instead of relying on Ink color props in the static chat transcript.

Cover real git_diff chat history, disabled ambient chalk colors, and Dracula palette colors so future renderer changes cannot silently flatten diff output again.

Co-authored-by: Autohand Evolve <code-noreply@autohand.ai>
Stop the device-auth login loop when the authorization server reports a cancelled status, surface a clear message, and leave local auth config untouched.

Co-authored-by: Autohand Evolve <code-noreply@autohand.ai>
Keep the Ink two-press Ctrl+C warning, but route the second press to the runtime exit path so active work is aborted and pending instructions are cleared instead of rendering queued /quit entries.

Co-authored-by: Autohand Evolve <code-noreply@autohand.ai>
Sync typed input to the renderer owner immediately, use Ink cursor positioning for the composer, and raise the default Ink render cadence while preserving paste and multiline behavior with focused regression coverage.

Co-authored-by: Autohand Evolve <code-noreply@autohand.ai>
Add a quiet gutter and themed summary styling for git diff output while preserving explicit theme ANSI colors in Ink transcripts.

Co-authored-by: Autohand Evolve <code-noreply@autohand.ai>
Add adaptive Autohand logo variants and use terminal width for startup, login, and about surfaces.

Co-authored-by: Autohand Evolve <code-noreply@autohand.ai>
Co-authored-by: Autohand Evolve <code-noreply@autohand.ai>
Describe configurable activity verbs and symbols in the configuration reference.

Co-authored-by: Autohand Evolve <code-noreply@autohand.ai>
Co-authored-by: Autohand Evolve <code-noreply@autohand.ai>
Avoid masking retryable startup or provider errors with an uninitialized ConversationManager failure when recovery tries to add a continuation note before the system prompt exists.

Co-authored-by: Autohand Evolve <code-noreply@autohand.ai>
Treat Ollama chat messages as optional so qwen3/template fallback responses do not crash when the API returns a bare completion payload.

Add regression coverage for bare non-stream responses and bare streaming done chunks.

Co-authored-by: Autohand Evolve <code-noreply@autohand.ai>
Load Codex and Claude user skill locations into the production skills registry so $ mention autocomplete has the same skills users can activate.

Update composer hints and add regression coverage for registry discovery and the Ink skill dropdown.

Co-authored-by: Autohand Evolve <code-noreply@autohand.ai>
Load npx skills locations from ~/.agent/skills and ~/.agents/skills, plus project-level shared and third-party agent skill directories, into the skills registry.

Document the new discovery paths and cover user and workspace discovery with focused registry tests.

Co-authored-by: Autohand Evolve <code-noreply@autohand.ai>
Adds OpenCode and Kimi importers, wires them into the import registry and CLI docs, and extends Gemini import support to preserve MCP server configuration.

Includes focused importer coverage for settings, MCP, memory, skills, hooks, and session conversion paths.

Co-authored-by: Autohand Evolve <code-noreply@autohand.ai>
Remove unsupported Ink 7 render options and hooks while preserving composer input handling and cursor positioning through local compatibility code.

Co-authored-by: Autohand Evolve <code-noreply@autohand.ai>
igorcosta and others added 29 commits July 27, 2026 15:24
Capture the approved design for delivering non-opt-out announcements to the
CLI through the existing /v1/announcements API: an inline block in the launch
welcome and a persistent announcement line above the composer status line.

Records the decisions that shaped the implementation — per-announcement
dismissal instead of a global off switch, text-only mapping over the
media-first step schema, sanitization of server-controlled text before it
reaches the terminal, and the startup cache-lag trade made to keep launch
off the network.

Force-added because docs/plans/ is gitignored, matching the earlier design
docs already tracked there.

Co-authored-by: Autohand Evolve <code-noreply@autohand.ai>
Close the review findings on the announcements delivery path. Each fix lands
with a regression test that fails before it.

Hold the request deadline across the response body read. Releasing the abort
timer once headers arrived left the body with no deadline, so a server that
answered and then stalled would hang /whatsnew indefinitely with the UI
already paused behind onBeforeModal.

Strip bidirectional overrides, isolates, and zero-width characters alongside
the existing C0/C1 pass. Announcement text is server-controlled and cannot be
switched off, so a Trojan Source payload could render a CTA whose visible URL
differs from the real one. This also strips U+200D, trading component glyphs
on compound emoji for the guarantee that no invisible character reaches stdout.

Parse announcements individually rather than as one batch, and stop pinning
step.type to an image|video enum. The CLI renders text and ignores media, so a
single unrecognized step type would otherwise blank a feed that fails silently
by design.

Commit the cache through atomicWriteJson, matching PingService and
SessionManager. Two sessions share this file and the write queue only
serializes one process, so a torn write took the payload and every local
dismissal with it. Dismissal ids the server has stopped returning are now
pruned, since those are settled while a still-served id means the POST never
landed.

Make postSeen and postDismiss actually await their requests instead of
detaching them behind a promise that resolves immediately.

Theme and memoize the announcement line, hoist its grapheme segmenter out of
the per-frame render path, and move its user-facing strings into the
translation catalogue.

Co-authored-by: Autohand Evolve <code-noreply@autohand.ai>
node-pty's read loop does not work under Bun. The PTY delivers no data and
never fires onExit, so executeStreamingShellCommand awaited a promise that
could only settle on abort. Every shell tool call that took the PTY path hung
indefinitely, and since the CLI runs under Bun in development and RPC mode,
Esc was the only way out.

Isolated by running the same command and environment under both runtimes:
node exits in ~1.5s having produced 882 bytes, bun produces 0 bytes and never
exits. The environment was not a factor. A command that takes 730ms was
observed occupying a session for over 25 minutes.

Skip the PTY path on runtimes that cannot drive it and fall through to the
non-PTY executor already used when node-pty is missing or fails to spawn.

Add opt-in PTY lifecycle tracing behind AUTOHAND_DEBUG covering spawn, first
output, exit, abort, and every fallback. The absence of a first-output line
after a spawn line is what identified this, and the original report had no
diagnostic trail at all.

Co-authored-by: Autohand Evolve <code-noreply@autohand.ai>
Register /changelog in the interactive command surface, fetch and format recent GitHub releases for terminal display, and document the command. Cover formatting, failure handling, registry wiring, and the built PTY rendering flow.

Co-authored-by: Autohand Evolve <code-noreply@autohand.ai>
Verify the component's theme formatter wiring without requiring ANSI output when NO_COLOR is set, matching the existing TUI source-contract tests and the CI runner environment.

Co-authored-by: Autohand Evolve <code-noreply@autohand.ai>
The composer lagged while a turn was running because the once-a-second status
refresh ran git synchronously on the main thread. Nothing else could execute
during those calls, so keystrokes and renders were held back.

SessionDiffStatsTracker.getStats() was the bulk of it. It had no cache, and
three separate timers polled it: each call ran git diff --numstat plus two
git ls-files invocations through spawnSync, then counted newlines a byte at a
time through the Buffer iterator for every new untracked file. Measured in
this repository it blocked for 21.8ms per call, roughly 44ms of every second.
It now serves the last snapshot and recomputes in the background through
execFile, which brings the call cost to 0.0004ms, and the newline scan is
indexed rather than iterated.

resolveStatusLineGitLabel had the same shape behind a five second cache,
blocking for 10.98ms whenever that cache expired. It now refreshes in the
background and returns the last known label.

Both keep git off the calling thread entirely. Stats and the branch label are
briefly empty at session start, which is invisible in practice and is the
right trade for a status line that must never stall the UI.

Co-authored-by: Autohand Evolve <code-noreply@autohand.ai>
Replace the success-only memory reflection gate with structured turn outcomes, immutable transcript snapshots, and ordered background processing. Teach extraction to retain only evidence-backed durable lessons from failures and cancellations while treating diagnostics as untrusted data. Document the OptMem-inspired roadmap and keep auto-memory behavior synchronized across config references.

Co-authored-by: Autohand Evolve <code-noreply@autohand.ai>
Assert every grouped read result and a single terminal tree connector without coupling the PTY test to nondeterministic parallel completion order.

Co-authored-by: Autohand Evolve <code-noreply@autohand.ai>
Locate the cleanup assignment after the quality pipeline and require its enclosing finally block without relying on a fixed source-character window.

Co-authored-by: Autohand Evolve <code-noreply@autohand.ai>
Record memory mutations before updating the compatible JSON view, serialize concurrent writers, recover torn tails, and support deterministic view rebuilds from the event stream. Preserve legacy memory and sync behavior while documenting the staged OptMem rollout.

Co-authored-by: Autohand Evolve <code-noreply@autohand.ai>
…r, made soft modifications for memory component, now using Victortalin idea behind zoom in and out of memory across spatial time, consider like mirroring previous lessons, also reflecting on error and stop signals via hooks, add better resync
Make the append-only event ledger the durable source of truth, with rebuildable projections and bounded hierarchical summaries. Add ranked recall, zoom/forget/rebuild and delete operations across tools and slash commands, merge canonical histories during sync, and document the recovery model.

Co-authored-by: Autohand Evolve <code-noreply@autohand.ai>
Record skill activations and slash-command outcomes as privacy-safe project memory events, derive ranked capability preferences for future context, flush pending skill writes at shutdown, and keep slash-command arguments and skill bodies out of the ledger.

Co-authored-by: Autohand Evolve <code-noreply@autohand.ai>
Defer status-line Git process creation beyond the render call stack and use a single common-path branch query with load-tolerant asynchronous bounds. Report signalled detached processes on exit even when inherited pipes remain open, and harden real-process tests against CI scheduling pressure.

Co-authored-by: Autohand Evolve <code-noreply@autohand.ai>
Publish live agent activity, surface peer state in the CLI, and guard overlapping file and repository mutations with configurable awareness modes. Add focused unit, Ink, and real PTY coverage plus localized configuration documentation.

Co-authored-by: Autohand Evolve <code-noreply@autohand.ai>
Introduce "autohandai" as a first-class provider across the CLI, setup wizard,
/model, ACP, and JSON-RPC surfaces, with two plan styles: cloud (Autohand-hosted,
OpenAI-compatible inference with account-token or API-key auth) and local (Apple
Silicon MLX). The provider ships the Fantail coding model (16k context) and the
Moa thinking model (256k context, reasoning effort), with model detection,
image-capability checks, i18n strings, and documentation.

Local setup hardening:
- Install the llmfit helper with --local so it lands in ~/.local/bin without
  sudo. A sudo password prompt cannot be answered while Ink owns the terminal
  in raw mode, which previously cancelled local setup. Add ~/.local/bin to PATH
  for spawned llmfit and mlx commands so a user-local install resolves.
- Stop downloading MLX models through llmfit, a GGUF/llama.cpp tool that rejects
  --runtime and cannot fetch MLX weights. mlx_lm.server now auto-downloads on
  first load, with a download-aware readiness timeout.

Setup progress UI:
- Render local-setup progress through a new Ink component in the alternate
  screen instead of console.log, so it no longer bleeds over the welcome banner.
  Shows a spinner, block progress bar, percentage, and phase label driven by a
  progress event emitter, with a non-TTY fallback.

Test stability:
- Make the git-safety fixtures hermetic and bounded (ignore global/system git
  config, disable terminal prompts and GPG signing, cap each invocation) to
  eliminate an intermittent 30s beforeEach hook timeout under parallel runs.

Co-authored-by: Autohand Evolve <code-noreply@autohand.ai>
…X runtime

Address issues found while exercising the Local (Apple Silicon MLX) setup flow.

Setup progress UI:
- Fix the progress titles for the local flow. The runtime step reused the model
  picker's "Choose a local coding model" label, which rendered as the heading
  while the server started. Use dedicated "Setting up Autohand AI Local" and
  "Starting your local Autohand AI model" strings.

Memory safety:
- Refuse to launch mlx_lm.server when the selected model does not fit in the
  memory available right now. MLX loads weights into unified memory, so an
  oversized model would thrash or be killed before it serves. Available memory
  is read from vm_stat on macOS (free + inactive + speculative + purgeable),
  falling back to os.freemem elsewhere. Capture llmfit's memory_required_gb so
  recommended models carry an accurate estimate and show their size in the picker.

Pinned, verified MLX runtime:
- Pin mlx-lm to a known-good version everywhere it is installed (the setup
  wizard and both install scripts) so provisioning is reproducible instead of
  drifting to whatever is latest.
- Verify the pinned version on probe, not just presence: read the installed
  mlx-lm version via uv/pipx/pip and reinstall when it mismatches; trust the
  existing install when the version cannot be determined to avoid churn.
- Install the llmfit helper with --local in the install scripts too, matching
  the wizard, so the CLI installer never blocks on a sudo password prompt.

Co-authored-by: Autohand Evolve <code-noreply@autohand.ai>
Co-authored-by: Autohand Evolve <code-noreply@autohand.ai>
Capture the design and implementation plan for making concurrent sessions
in one project directory aware of each other, and record the incident that
prompted it: a second session committed twice and left 26 modified files in
the shared tree while the first was mid-turn, which nearly resulted in one
session committing another's in-flight work.

Both documents describe the shipped behaviour: three configurable tiers
defaulting to warn, activity published on the existing heartbeat, git
mutation and file collision warnings, drift detection read from .git
without spawning git, and claims that inherit registry liveness.

Force-added because docs/plans/ is gitignored, matching the design docs
already tracked there.

Co-authored-by: Autohand Evolve <code-noreply@autohand.ai>
Forward explicit Autohand home and config locations through the sanitized development environment so interactive provider and model selections are saved to the same configuration used on the next run.

Add environment-contract coverage and a built terminal restart scenario that verifies the provider and model are persisted and restored.

Co-authored-by: Autohand Evolve <code-noreply@autohand.ai>
Derive shell completion output from the live Commander command tree while preserving direct generator compatibility. Install agent, autohand, and autohand-code consistently across package, Unix, Windows, local, and Homebrew surfaces, with regression coverage and usage documentation.

Co-authored-by: Autohand Evolve <code-noreply@autohand.ai>
The CLI declared moa at 256,000 while the gateway advertises 1,000,000,
so the client was truncating roughly three quarters of the context the
model can accept - a capability loss on large repositories.

Raise the three source constants, the two tests asserting them, and the
English docs. The local MLX and Acme fixture examples keep 256,000; they
are unrelated. maxCompletionTokens stays 262,144, which is an output cap
rather than a context limit.
Update cloud and local provider configuration tests to assert the 1M-token context window introduced by the current Autohand AI model contract.

Co-authored-by: Autohand Evolve <code-noreply@autohand.ai>
Accept an optional leading v on manual stable releases, reject malformed versions before publication, and keep Homebrew documentation on the trusted fully qualified install path.

Co-authored-by: Autohand Evolve <code-noreply@autohand.ai>
Validate tap visibility, token write access, rendered formula syntax, and the npm package before creating a public GitHub release. Remove the ineffective protected-branch version push and retain the prepared tap update for the post-release publication step.

Co-authored-by: Autohand Evolve <code-noreply@autohand.ai>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant


Back | FazBrowse Home | New Git URL