Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
a9318a4
Bring the 0.7 board onto main: work orders, trial, audit and harvest …
claude Oct 11, 2026
7bed166
A07: security fixes from the 2026-10-08 audit
claude Oct 11, 2026
3508ee8
A01: provider-aware reasoning control and thinking-cutoff recovery
claude Oct 11, 2026
190a4c1
A02: open parameter surface for requests and the owned runtime
claude Oct 11, 2026
f801b52
A03: provider presets and hosted model discovery (with B03 Ollama auth)
claude Oct 11, 2026
9ba7be1
A04: hosted-provider resilience: retries and degenerate-output guard
claude Oct 11, 2026
86c1ab8
A05: model capability probe with labelled suggestions
claude Oct 11, 2026
76529ee
A06: small-model edit robustness: replace_file and forgiving old_text
claude Oct 11, 2026
f322b8f
A09: README for new users, lighter package and a repository-weight rule
claude Oct 11, 2026
93b788c
A08: managed CUDA 12 runtime option, prepared for the owner PC
claude Oct 11, 2026
eb02759
A10: truthful harness labels and the matched 0.7 PC re-run script
claude Oct 11, 2026
518518c
B01: editing a connection keeps its custom settings (audit A03)
claude Oct 11, 2026
ccf9807
B02: text typed while connecting is never overwritten (audit A04, part)
claude Oct 11, 2026
258374f
B06: a selected runtime or engine never silently falls back (audit A10)
claude Oct 11, 2026
73812c4
B07: manual model-ID entry on a key terminals can send (audit A18)
claude Oct 11, 2026
999b3f2
B08: a cancelled connection check opens nothing later (audit A19)
claude Oct 11, 2026
6acd751
B09: GGUF import checks the full fixed header (audit A12, part)
claude Oct 11, 2026
05ea611
B10: an oversized paste explains itself instead of vanishing (audit A…
claude Oct 11, 2026
6042ae4
H01: graphical Home dashboard harvested from build/final-pass
claude Oct 11, 2026
1787b4d
Record the 0.7 board status: orders, commits, results, deferrals
claude Oct 11, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ jobs:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
with:
ref: ${{ inputs.tag || github.ref }}
# Releases use the gh CLI with GH_TOKEN; no later step needs git credentials.
persist-credentials: false
- name: Validate tag and prepare workspace
run: |
python3 - <<'PY'
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/verify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ jobs:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
- name: Check training data boundaries and assistant-target encoding
run: python3 -m unittest discover -s training/tests -v
- name: Keep the repository light and free of credentials
run: |
python3 scripts/check_repo_weight.py
python3 scripts/secret_scan.py --all
linux:
runs-on: ubuntu-24.04
timeout-minutes: 60
Expand Down
6 changes: 4 additions & 2 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,10 @@ shell commands or TOML edits. Never lose an unsent message after a connection er

The reference target is Linux, GTX 1070 8 GB VRAM, and 16 GB RAM. Cloud CPU results
do not establish that machine's performance. Retain CPU operation. Every live
model evaluation must explicitly use an uncensored/abliterated checkpoint, as
requested by the owner. Deterministic protocol fixtures have no model weights.
model evaluation must label its checkpoint truthfully with
`--artifact-label uncensored|standard|hosted` (owner direction 2026-10-08: uncensored,
abliterated, standard and hosted models are all first-class); uncensored/abliterated
checkpoints remain the default evaluation target. Deterministic protocol fixtures have no model weights.

Use the existing checkout; do not create a worktree unless requested. In the cloud:

Expand Down
170 changes: 170 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,175 @@
# Changelog

## Unreleased — 0.7 (work orders in docs/WORK_ORDERS_0.7.md)

### A06 small-model edit robustness

- `replace_file(path, new_text)` in the compact tool profiles: a checkpointed
whole-file rewrite of a file of at most 300 lines that the model read in full at
its current revision (bound to the full-file read handle). Whole-file edits are
the most reliable format for models under about 14B.
- `old_text` replace now tries an exact match, then a whitespace-normalised line
match (re-indenting `new_text` to the file when only indentation differed, and
saying so in the tool result). On a miss it returns the closest current span
with a fresh handle; ambiguous matches are refused, never guessed.
- Settings → Tools & access → *Tool focus* describes the compact profiles' new
capability; the compact prompts mention `replace_file`.

### A05 model capability probe

- *Probe this model* (Settings → Models, Ctrl+P, `alt probe`) reads native context
and template facts (`/props` on llama.cpp, `/api/show` on Ollama), then sends one
bounded request (at most 512 output tokens) with a trivial tool and the model's
default thinking. It records whether the model called the tool, reasoned, or hit
the limit.
- Suggestions are labelled choices: thinking off or low, a larger output allowance,
compact tools, or matching the server's native context. Nothing is applied until
you pick one (`alt probe --apply ID` headless). Reports are stored per model
identity under `probes/`. Owned runtimes are started and stopped for the probe.

### A04 hosted-provider resilience

- Retries for HTTP 429, 5xx and dropped connections with capped exponential
backoff that honours `Retry-After` (default 2, 0–8). Each retry counts as a model
call against the shared allowance and is logged in the receipt.
- Output guard (automatic for remote servers, on or off): the relay holds each
response, detects leaked chat-template tokens (`<|…|>`) or mixed-script noise in
scripts the conversation never used, discards it once and resends. The discarded
bytes are kept as evidence and recorded as a provider fault, never as model
output; a second fault returns a clear error. Tokens stay charged.
- Model output and sampling → *Provider retries* and *Output guard*, Ctrl+P →
*Hosted output guard*, and `alt inference --retries N --output-guard auto|on|off`.

### A03 provider presets and hosted discovery (+ B03 authenticated Ollama)

- Presets fill the endpoint, key-variable name and thinking dialect: NVIDIA NIM,
OpenRouter, Groq, Together, DeepSeek, Mistral, Gemini (OpenAI-compatible),
Cerebras, LM Studio, vLLM/SGLang, llama.cpp, Ollama and Custom. TUI: Connect →
*A hosted API or another server preset*, or Ctrl+P → *Connect a hosted API*.
Headless: `alt init --preset nvidia --model z-ai/glm-5.3`.
- The model picker searches long hosted catalogs as you type; `alt models
--filter WORDS` does the same headless.
- Keys remain environment-variable references; a missing variable is reported
before connecting. `smoke_goose` proves the key reaches the provider on every
model call and never appears in Alt's state, logs or evidence.
- B03: Ollama connections with a key variable work end to end (the engine no
longer refuses them; the relay already sends the bearer key).

### A02 open parameter surface

- Request parameters per connection: repeat penalty (spelled per server),
presence/frequency penalty, seed, stop sequences, typical-p, and an extra
request JSON object merged last. Alt-owned keys (`model`, `messages`, `tools`,
`tool_choice`, `stream`, `stream_options`, output-token fields, `n`) are refused.
- Ollama receives `options.num_ctx` from the connection context and an optional
`keep_alive` unless *server default* is chosen; Alt reads the loaded context back
from `/api/ps` and says when the server ignored it.
- Owned llama-server: mmproj, MoE-on-CPU layers, tensor override and split, main
GPU, RoPE/YaRN scaling, mlock, no-mmap, chat-template file, draft model for
speculative decoding, and `extra_args` (binding, key, model, alias and context
flags refused). The argv comes from one pure function (`runtime::server_args`).
- TUI: Settings → Models → *Advanced parameters* and Ctrl+P, with labelled fields
and a raw JSON view of the exact request fields and runtime argv. CLI:
`alt params set|unset|show`.

### Audit items (B) and harvest (H)

- B01 (audit A03): editing a connection patches only the name, provider, address,
key variable and dialect; context, steps, inference settings, the selected model
and the uncensored claim are kept, and the model list opens on the current model.
- B02 (audit A04, part): a message sent before the model is ready is held apart from
the composer. Text typed while connecting stays for the next message; on failure,
cancel or a closed connection the held message comes back exactly once, ahead of it.
- B06 (audit A10): an explicitly selected llama-server or agent engine is
authoritative. If it is missing, Alt says so and names the path instead of
silently using the managed or PATH copy.
- B07 (audit A18): manual model-ID entry moved from Ctrl+M (sent as Enter by most
terminals) to Alt+M and a *Type model ID* button; allowance recovery was already in
the palette (N06).
- B08 (audit A19): cancelling a connection check stops the inventory request at once
and a late result is discarded; the form stays and no model dialog reopens.
- B09 (audit A12): GGUF files must carry the full 24-byte header (supported version 2
or 3, plausible tensor and metadata counts) on import and after downloads; a
magic-only or truncated file is refused before anything loads.
- B10 (audit A21, part): a paste larger than a text field's 64 KiB limit is refused
with a message giving its size and the file-path alternative, instead of
vanishing. The 60×18 connection-form layout remains deferred.
- H01 (harvested from `build/final-pass-2026-10-08`): on terminals of at least about
96×30, Home is a dashboard with model, project and tools status cards and a
two-column grid of action cards, drawn through the theme engine; 80×24 keeps the
Start-here list. Same indexes, keys and mouse targets.

### A10 harness labels and matched re-run script (prepared; owner PC runs it)

- `scripts/live_acceptance.py`: required `--artifact-label uncensored|standard|hosted`
recorded truthfully (`--uncensored` stays an alias); hosted runs need no local
file hash; `--api-key-env`, `--thinking-level`, `--dialect`, and `--check-args`
validation without requests.
- `scripts/pc_matrix_0_7.sh`: the trial matrix (8 cases, 16K, compact, 4,096
output, 3 repeats) for Spark 4B (Ollama), MiMo 9B abliterated and standard
(llama.cpp CUDA) and two NVIDIA models, in a trial arm and a thinking-off arm, with
a VRAM headroom check before each GPU cell, recorded skips and stopping every
server it starts. `--dry-run` prints and validates all cells in the cloud.
- `docs/PC_HANDOFF_0.7.md` gives the owner the A08 and A10 steps.

### A08 managed CUDA 12 runtime (prepared for the owner PC; not run)

- GPU detection from `nvidia-smi` (name, VRAM, compute capability, driver) and a
labelled CUDA 12 fit check (compute 6.1+, driver 525.60+).
- A pinned-archive installer (`runtime::install_pin`: resumable download, SHA256,
unpack, previous copy kept until the new one is in place) and a `CUDA12` pin slot.
The slot is empty in this commit: no CUDA build has been verified yet, so
automatic installation refuses with guidance. `scripts/pin_cuda_runtime.py` builds a
deterministic archive from a verified PC build and prints the exact pin;
`scripts/pc_cuda_check.sh` checks the runtime on the PC first.
- Managed runtimes get their own folder on `LD_LIBRARY_PATH`. CPU stays the default:
installing never selects the CUDA runtime or changes GPU layers (`alt install
cuda-runtime --use` or the TUI's explicit *Use the CUDA runtime*).
- Settings → Runtime → *GPU runtime (CUDA 12)* and Ctrl+P.

### A09 repository weight and README (+ B11 package size)

- README opens with what a new user needs: install, connect a model (local or a
hosted preset), first task. Results and evidence moved to *Status and evidence*.
- Packages ship guides, summaries and screenshots but not `docs/evidence` or raw
research data; `docs/EVIDENCE.md` in the package points to the exact source commit.
- `scripts/check_repo_weight.py` (in CI with a full secret scan) refuses tracked
files over 1 MiB and model weights or archives. History is not rewritten.

### A01 reasoning control and thinking-cutoff recovery

- One **Thinking** setting (`default | off | low | medium | high | budget:N`),
translated per server dialect: llama.cpp `chat_template_kwargs.enable_thinking` +
`reasoning_budget_tokens`; Ollama `think` + `reasoning_effort`; vLLM / SGLang /
NIM `chat_template_kwargs`; OpenAI-style `reasoning_effort`. Receipts record the
fields sent. Settings → Models, Ctrl+P, and `alt inference --thinking/--dialect`.
- A response that ends at the output limit with reasoning only is a *thinking
cutoff*: charged, never resent silently. The TUI offers labelled recovery
(thinking off or low for this connection, or a larger allowance); headless
`--json` emits a typed `reasoning_cutoff` event.

### A07 security (audit 2026-10-08)

- "Allow this session" and `--allow-tools` now cover project actions only
(checkpointed edits, configured checks, skill helpers). Terminal commands,
external MCP tools and untagged engine requests need a separate opt-in:
**Allow terminal this session** in the TUI or `--allow-terminal` headless.
Candidate exploration keeps `--allow-tools` only, so its terminal requests are denied.
- Project tools never list, read or edit Alt's own data folder when a project
contains it; choosing `$HOME` or `/` as the project shows a warning.
- More credential names are excluded and compared case-insensitively: `.envrc`,
`.netrc`, `.npmrc`, `.pypirc`, `.git-credentials`, `id_rsa*`, `id_ed25519*`,
`id_ecdsa*`, `credentials*.json`, `.docker/`, `.kube/`, `.gnupg/`, `*.p12`, `*.pfx`.
- Remote MCP connections with an authentication variable require HTTPS unless
the server is on loopback.
- The owned llama-server starts with a random per-launch key passed through a
private `--api-key-file`, and readiness requires an authenticated model listing.
- Headless `extensions check` refuses to start the server unless access is Full
(same rule as the TUI).
- `requirements-dev.txt` is hash-pinned and installed with `--require-hashes`; the
release job checks out without persisted credentials; SECURITY.md names the
current line and the owner's private-reporting switch.

## Unreleased — Neon interface (work orders N01–N09)

- Model lists now show distinct descriptions per row: parameters, quantization,
Expand Down
10 changes: 9 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ Create a Python environment for terminal/schema checks:
```bash
python3 -m venv .venv
source .venv/bin/activate
python3 -m pip install -r requirements-dev.txt
python3 -m pip install --require-hashes -r requirements-dev.txt
python3 scripts/smoke_tui.py
python3 scripts/smoke_task_tui.py
python3 scripts/smoke_workbench_tui.py
Expand Down Expand Up @@ -97,3 +97,11 @@ Workflows produce reviewable candidates; they do not publish a release automatic
A release needs its exact tested archive, build identity, dependency/SBOM evidence,
matching upgrade/rollback fixtures and explicitly recorded outstanding gates.
Repository source publication and binary-release qualification are separate steps.

## Evidence and repository weight

Commit summaries, small receipts and screenshots. Raw evidence over 1 MiB (request
logs, response captures, matrices) goes to a release asset, with a summary and its
checksum in git. Never commit model weights, archives or keys:
`python3 scripts/check_repo_weight.py` and `python3 scripts/secret_scan.py` run in CI,
and `scripts/secret_scan.py` should run before every push.
Loading
Loading