Commit Graph
88 Commits
Author SHA1 Message Date
Joseph Magly 50cc0eca8e fix(abliterate): fail closed on unknown ownership; release interrupted results
Codex review r5 for #605 (3 x Medium):
- Ownership covers sparse model components (COO indices/values and the
  compressed layouts' index and value tensors). When the storage of a
  result or a model tensor cannot be identified, the result is cleared
  (fail closed) instead of copied.
- The sweep holds no per-field locals across iterations, and traceback
  frames along the original interrupt's cause/context chain are cleared
  before re-raising and before resource release, so interrupted results
  are collectable before accelerator memory is released. The original
  exception object is still raised.
- A further interrupt during the fail-closed clearing pass retries the
  field instead of aborting the pass; the first interrupt propagates.
Fourteen regressions fail on the previous head; GPU-marked tests cover
CUDA sparse buffer components and CUDA result lifetime at release.
2026-11-23 19:24:19 -05:00
Joseph Magly 3dfb1618ee fix(abliterate): treat storage-sharing views as model-owned; defer interrupts
Codex review r4 for #605 (2 x Medium):
- Tensors that share storage with any model parameter or buffer (views,
  slices, detached aliases, .data) are recognized as model-owned from
  storage metadata only, with no content transfer, and are cleared
  instead of copied to the host.
- A KeyboardInterrupt/SystemExit during the result sweep is recorded:
  the remaining fields are cleared without conversion, offload-directory
  removal and accelerator memory release still run, and the original
  interrupt is then re-raised.
Regressions fail on the previous head; GPU-marked coverage for real
parameter/buffer views and a parameter .data alias alongside an
independent result that is still converted.
2026-11-23 18:24:28 -05:00
Joseph Magly 77acb2c27b fix(abliterate): make failed-run release fail closed and never copy weights
Codex review r3 for #605 (5 x Medium):
- The release sweep never detaches or copies model parameters or
  model-owned buffers (for example a preserved output head); such
  references are cleared.
- Memo entries are committed per field, so a failed nested transfer
  cannot leave partial copies for later aliases.
- A field is cleared before logging, logging is guarded so callbacks or
  cancellation cannot mask the original failure, and KeyboardInterrupt/
  SystemExit propagate after the field is cleared.
- Fail closed: only supported result shapes are converted; fields with
  unsupported shapes (plain or slots objects, tensor dict keys), cycles
  that cannot be rebuilt faithfully, or conversion errors are cleared.
Eleven regressions fail on the previous head; GPU-marked coverage for
model-owned tensors and unsupported results on real CUDA tensors.
2026-11-23 17:30:25 -05:00
Joseph Magly 7b719a47c2 fix(abliterate): release every retained accelerator tensor safely after failure
Codex review r2 for #605 (2 x Medium):
- Failed-run cleanup now sweeps every pipeline attribute (excluding the
  model handle and modules) and moves any accelerator tensor to the host,
  covering LoRA adapter factors (_lora_adapters) and other retained
  fields. One memo spans all fields so aliases stay shared; a field that
  cannot be converted is logged and cleared, so cleanup never raises
  over the original failure.
- _tensors_to_cpu is memoized (id -> copy), never mutates its input,
  returns CPU-only values unchanged, and rebuilds named tuples
  (_make), list/tuple/dict/set subclasses and dataclasses including
  init=False and frozen fields.
Tests: namedtuple, init=False and frozen dataclasses, aliasing across
calls, CPU identity, conversion-failure fallback, and (GPU-marked) LoRA
factors and cross-field aliases moved off CUDA.
2026-11-23 16:57:48 -05:00
Joseph Magly 0a709e48b1 fix(abliterate): keep failed-run results inspectable, on the host
The r1 cleanup fix cleared concept_directions, concept_subspaces and the
validated concept direction after a failed run, breaking the contract
that callers can inspect results, reports and metadata after failure
(test_excise_adjacent_failures, test_concept_gate_pipeline). Results are
now retained and moved to the CPU, which still releases all accelerator
memory; collection intermediates stay cleared. _tensors_to_cpu moves
tensors nested in dicts, sequences and dataclasses. Tests cover the
corrected cleanup contract, the helper, and (GPU-marked) CUDA tensors
ending on the host.
2026-11-23 16:32:43 -05:00
Joseph Magly d62f4aafe9 feat(abliterate): run analysis math on the model's device
When the model is on CUDA or MPS, activation stacks and the analysis
math (difference means, winsorizing, whitening, per-layer SVD in
float32, refinement and KL logits) now stay on that device instead of
being copied to the host, where they used about 10 host cores per edit.
A new analysis_device setting (auto | model | cpu) is a v2 projection
parameter: auto, the default for v2 recipes, uses the model's device and
falls back to the CPU with a logged reason for offloaded, split or meta
models or when the pre-collection memory estimate exceeds free device
memory. The device actually used is recorded in resolution records and
checkpoint metadata. v1-migrated recipes and the shipped recipes pin
cpu so confirmations made with CPU-extracted directions re-apply
exactly; direct pipeline calls keep their CPU default. CPU results are
unchanged.

Fixes #590
2026-11-23 12:19:09 -05:00
Joseph Magly 811854194e feat(obliterate): verify-checkpoint reload-and-generate parity
The REBIRTH save stage only checked that files exist and parse, so a
save that dropped or mangled the edit passed silently (#525).

- `obliterate --record-reference` records greedy outputs of the
  in-memory edited model on the pinned obliteratus-verify-v1 prompt set
  (8 harmful + 8 harmless, 32 tokens) into a sidecar with digests of the
  files the reload reads.
- `obliteratus verify-checkpoint` reloads the checkpoint from local
  safetensors only, regenerates greedily and compares token ids: exact
  match, prefix agreement and harmful refusal-rate change against
  per-reload tolerances (strict for full precision, provisional for
  bitsandbytes 8/4-bit, overridable and recorded).
- Fails with named reasons for no or empty reference, files changed
  since the reference, tokenizer mismatch, divergence, invalid outputs
  and, with --stock-model, an edit that was not persisted. A
  structural-only check can never pass.
- Versioned report bound to checkpoint digests, prompt-set digest and
  runtime; exit 0 pass, 2 input error, 3 verification failed.
- CPU tests use a tiny local GPT-2 through the real REBIRTH; a CUDA and
  bitsandbytes test runs in the conditional gates.
2026-11-18 11:56:26 -05:00
Joseph Magly 284d9e09dc Merge pull request #517 from elder-plinius/feat/issue-511
Opt-in numeric geometry preservation evaluation
2026-11-16 22:17:27 -05:00
Joseph MaglyandClaude Opus 5.5 101cfa7c88 feat(analysis): opt-in numeric geometry preservation evaluation
Add a bounded evaluation of whether shifting a known predictive mean
preserves a known non-target spread (#511), producing reproducible
evidence and negative results rather than a universal steering claim.

- Whole sequences are split into fit, calibration and held-out
  partitions per seed block before any activation is collected.
  Geometry is fitted on fit rows only, matched-mean scales are found on
  calibration rows only, and the preregistration (tolerances, arm
  choices, scales) is frozen by digest before any held-out pass.
- Seven arms with exposed choices and reversible, restoration-checked
  hooks; matched-displacement and matched-mean comparisons are reported
  separately, and PCA-plane proximity can never establish preservation.
- Paired intervals over seed blocks, separate AdamW and L-BFGS probe
  fits (optimizer-dependent outcomes flagged conditional), explicit
  zero handling, separate costs, and exploratory labels for
  extrapolated cells. Curvature stays null.
- Golden synthetic arc fixtures with known answers: a spread-preserving
  variant and a radius-dependent variant the chord arm distorts.
- Every attempted cell, arm and comparison is logged; synthetic runs are
  rated hypothesis and never claim pretrained reproduction. The opt-in
  pretrained campaign refuses until both model revisions are pinned and
  runs only behind an explicit environment flag.
- `obliteratus experiments numeric-geometry`, catalog rows and a new
  documentation section.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-16 22:09:11 -05:00
Joseph MaglyandClaude Opus 5.5 6c2f79672f feat(experiments): matched-precision reasoning controls for backend qualification
Extend backend qualification so precision-induced changes in reasoning
outcomes are separated from intervention effects (#512).

- Precision declarations record weight, activation and KV-cache
  precision, quantizer and calibration identity; incomplete or
  inconsistent declarations are refused.
- A bounded, preregistered pilot protocol fixes candidate, dataset,
  decoding, output budget, seed blocks, final-answer parser, margins,
  drift limit, resource objective and disjoint splits.
- The pilot loads four fresh cells on the same rows: the unedited parent
  and the saved candidate at the CPU float32 reference and at the
  declared precision.
- Per-row outcomes separate final-answer correctness from reasoning and
  total tokens and termination; truncated or unparsable outputs count
  as wrong.
- Paired bootstraps give precision effects within each artifact,
  intervention effects within each precision and their interaction.
  Gates apply per task and pooled, and expose harm hidden by a pooled
  pass. Shared-prefix KL is reported apart from free-running
  disagreement.
- Token cost never gates; an efficiency claim needs every gate to pass
  and the preregistered resource to improve.
- Support matrix schema 2 carries precision fields and pilot attempts;
  pilots never add qualified pairs, and schema 1 records still load.
- `obliteratus experiments qualify reasoning`; CUDA path in the
  conditional gate.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-16 22:03:40 -05:00
Joseph MaglyandClaude Opus 5.5 458059e066 feat(experiments): backend qualification and support matrix
Start milestone 5 (F20): qualify each saved artifact on an explicit
backend against the CPU float32 reference of the same artifact, and
record exactly which pairs qualify.

- Only fully verified persistent candidates are accepted; each run
  loads the saved artifact fresh from disk on the reference and on the
  declared backend after checking digests.
- Backend descriptors make device, dtype, quantization, attention,
  tokenizer and cache mode explicit; their digest is the backend id, so
  native and quantized results are separate rows.
- Paired evaluation on independent rows checks realized settings,
  target rate, completion agreement, logit and site-activation drift and
  collateral endpoints. Latency and memory stay outside the digest.
- Unsupported combinations are recorded unsupported without loading or
  falling back; unavailable hardware is refused and leaves the pair
  untested. Failures are permanent and block broader claims.
- A versioned support matrix lists exactly the qualified pairs. CUDA
  tests run in the cuda-runtime conditional gate.
- `obliteratus experiments qualify run|matrix`.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-16 13:05:58 -05:00
Joseph MaglyandClaude Opus 5.5 a559c7fd6c Merge main into feat/obs-execution and unify device-aware model identity
Integrate the weight fingerprint from #451 with CUDA execution:

- model_identity is now device-aware (require_dense_device) and always
  includes the weight fingerprint, so CUDA runs carry it too;
  execution_identity simply delegates. The fingerprint is
  device-independent: the same weights give the same digest on CPU and
  CUDA.
- New optional spec setting model.fingerprint ("sampled" default,
  "full"), dropped from the filled spec at its default so existing
  digests are unchanged. It applies to the run's model identity and
  therefore every step's reuse check; capture manifests keep a sampled
  fingerprint.
- Resolve additive conflicts in capture_identity.py, inputs.py, the risk
  map and OBSERVATION_RUNS.md by keeping both sides.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-13 16:47:38 -05:00
Joseph MaglyandClaude Opus 5.5 2539cdb2b7 feat(experiments): chat templates, seeded sampling, batching and CUDA observation
Remove the observation runner's execution limits.

- Chat templates: an optional prompt section renders each prompt
  through the tokenizer's chat template (optional system message,
  generation prompt), tokenized without extra special tokens. The
  rendered-prompt digest joins the generation step identity and each
  record; capture uses the same rendered prompts.
- Decoding: seeded sampling (temperature, top-p, top-k) alongside
  greedy, with a per-example seed derived from the spec seed and example
  id. Comparison treats sampled outcomes as exact only when strategy,
  device, dtype and seed match, and says why otherwise.
- Batching: optional left-padded greedy batches with an explicit,
  recorded pad token; rows are cut at their first eos so batched and
  unbatched outcomes agree. Sampling with batches is refused because
  per-example seeds cannot hold.
- Devices: dense CUDA for the runner and capture, with shards written
  from CPU copies and device/dtype recorded. Quantized, offloaded,
  dispatched, meta, split-device and MPS models are refused with
  explicit reasons.

The schema stays additive within version 1; options at their defaults
are dropped from the filled spec, so existing spec digests are
unchanged (pinned in tests).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-13 16:33:51 -05:00
Joseph MaglyandClaude Opus 5.5 bbb0177915 feat(analysis): fill baseline profile work counters
Baseline profiles reported unique examples, token presentations,
forwards, generated tokens and tensor bytes as null. Count them from
load completion through cleanup with pass-through observers: a forward
pre-hook on the loaded model and instance-level wrappers on generate and
activation collection, all removed on exit and after failures.

Counters are recorded per stage and totalled. A counter that cannot be
observed stays null with a reason (stages before load, calls without an
attention mask or input ids, batched generation, forwards outside
activation collection, or embedding calls that bypass the watched
model). Changes are additive within profile schema version 1; default
baseline artifacts are unchanged, profiled or not.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-12 20:35:46 -05:00
Joseph Magly 362acdb87b Merge pull request #430 from 0xreconlion/fix/bounded-norm-reduction
Bound norm-capture scratch to a chunk budget instead of promoting a whole weight
2026-11-11 14:52:58 -05:00
Joseph MaglyandClaude Opus 5.5 5b4291eebe fix(numerics): accumulate bounded norms on the host
frobenius_norm_bounded added each chunk's CUDA result into a CPU
float64 tensor, which raises a device-mismatch RuntimeError for any
weight not on the CPU. Norm capture and restoration run whenever
norm_preserve is on, so every GPU run would have failed.

Accumulate into a Python float instead. That keeps float64
accumulation and works on CUDA and MPS (which has no float64). Widen
chunks straight to contiguous memory so a transposed chunk is not
copied a second time by reshape, and run the reduction under no_grad.

Add a CUDA conditional test that fails on the previous head and covers
the helper and the real capture/restore path on a CUDA layer.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-11 11:32:46 -05:00
Joseph Magly da21816610 test(analysis): record local RTX 4090 proof 2026-11-04 11:41:43 -05:00
Pliny the Younger 95d2825db1 Add conversational neuron studies with controlled trials and verified resets 2026-10-30 13:19:10 -04:00
Joseph Magly d2f6676882 build: prepare Python 3.11 and pinned Gradio security backport 2026-10-29 11:14:50 -04:00
Pliny the Younger 92775708f0 Preserve Neuron Lab evidence through a verified reset 2026-10-28 19:10:55 -04:00
Joseph Magly b88177b9a1 fix: expire neuron downloads with their browser session 2026-10-27 20:33:43 -04:00
Pliny the Younger a7846cb682 feat(ui): unify research workspace, paired neuron experiments and live surgery observatory
Add bounded contrast candidate screening, explicit prompt provenance, atomic paired conversations and redacted evidence exports. Unify the application shell and task navigation, add an opt-in per-run surgery event observatory, preserve public generator compatibility, and wire cooperative stream-close cancellation. Verify numerical invariants, lifecycle isolation and real Gradio paths.
2026-10-27 18:23:50 -04:00
Pliny the Younger 05f83d4e73 feat(ui): turn Neuron Lab into an interactive latent observatory
Add browser-local spatial activation replay with orbit, zoom, token travel, paused/reduced motion, and model-layer destinations. Render measured signed values faithfully with illustrative depth, and clean up retained-node listeners and detached scenes. Add runtime lifecycle, navigation, payload, and real Gradio regression coverage.
2026-10-27 17:28:07 -04:00
Pliny the Younger a2324b572f feat: turn Neuron Lab into an interactive activation workbench
Add a responsive amber control rack, signed activity chart and token map, ordered intervention cards, and measured comparison outputs. Preserve editor selection and one-sided clamp bounds across recipe changes; cover display escaping and callback flows.
2026-10-27 17:06:14 -04:00
Pliny the Younger 3873d0b2ba feat: add reversible Neuron Lab to Concept Lab
Add scoped native MLP channel controls, strict versioned recipes, and isolated Neuron Lab sessions with inspection, ordered editing, comparison, cancellation, and immutable exports. Cover arithmetic, lifecycle, real offline model forwards and Gradio callbacks; document the CPU reference boundary.
2026-10-27 16:11:54 -04:00
Joseph MaglyandClaude Opus 5.5 1bc7bbad49 fix(tests): open the worker log directory without following any symlink
Review of 9eabacc: lstat/O_NOFOLLOW only protected the final path
component, so a symlinked ancestor (e.g. /var/run) was accepted and
mkdir(parents=True) followed ancestors before validation. The opt-in log
directory is now walked from "/" one component at a time with
O_DIRECTORY|O_NOFOLLOW relative to the parent fd, missing components are
created 0700 relative to that fd, relative paths and ".." are rejected,
and ownership/permissions are checked on the final opened fd.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-22 15:12:02 -04:00
Joseph MaglyandClaude Opus 5.5 9eabacc911 fix(tests): validate opt-in worker log directory; fix fd test
Review of e3ab98d: OBLITERATUS_TP_WORKER_LOG_DIR accepted existing
world-writable or symlinked directories. It must now be a private
(owner-only, no group/other write) non-symlink directory owned by the
current user, and log files are created relative to an O_NOFOLLOW
directory fd with O_EXCL and mode 0600; anything else fails closed. The
launch/wait fd test now tracks each launch's descriptors separately so it
no longer depends on fd number reuse.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-22 14:32:52 -04:00
Joseph MaglyandClaude Opus 5.5 e3ab98da38 fix(tests): use static rendezvous for local TP2 and allow torchrun keys
On torch 2.13 the c10d backend gives workers MASTER_ADDR=getfqdn() and a
fresh MASTER_PORT from the shared TCPStore (launcher.api returns no
master endpoint for non-static backends), which the launcher contract
rejects. local_tp2 now uses --rdzv-backend=static with the profiled
--master-addr/--master-port and --node-rank=0; the is_host approach is
dropped. two_host_tp2 keeps c10d. Allow ROLE_NAME and
TORCHELASTIC_SIGNALS_TO_HANDLE (set by torchrun 2.13) and LC_CTYPE (PEP
538 locale coercion) in the worker environment. Verified on 2x A100.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-22 14:05:31 -04:00
Joseph MaglyandClaude Opus 5.5 eaca7f9177 fix(tests): host the c10d store for local TP2 and prefer physical NICs
The llama-tp-local-gpu gate failed on a 2x A100 host with
"DistNetworkError: The client socket has timed out ... connect to
(172.27.0.1, ...)". torch's c10d rendezvous only hosts the TCPStore when
_matches_machine_hostname(host) is true; on hosts whose hostname resolves
only to 127.0.1.1 no private IP matches, so every agent acts as a client.
The harness also picked a Docker bridge (br-*) because it took the first
RFC1918 address in sorted interface order.

- local_tp2 passes --rdzv-conf=is_host=1 (two-host shape unchanged).
- Interface ranking prefers non-virtual interfaces (docker, br-, veth,
  virbr, cni, flannel, tailscale, lo deprioritized) with the old rule as
  fallback; optional OBLITERATUS_TP_INTERFACE exact override.
- Opt-in worker log capture via OBLITERATUS_TP_WORKER_LOG_DIR (0600,
  O_EXCL); default stays DEVNULL.
Helpers move to tests/conditional/_llama_tp_harness.py with CPU tests.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-22 13:22:35 -04:00
Joseph Magly 002e6e56e1 feat: complete local readiness across UI, MCP and memory admission
Integrate bounded admission, UI ownership and controls, opt-in durable MCP execution, rank-local TP2 groundwork, regression hardening and operator guides. Physical larger-memory and two-host qualification remain separate.
2026-10-20 17:58:20 -04:00
Joseph MaglyandClaude Opus 5.5 593c4359cb fix: address review findings (gpu-driver)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-18 15:15:36 -04:00
Joseph MaglyandClaude Opus 5.5 7ef799b7ab fix: address review findings (gpu-driver)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-18 15:01:11 -04:00
Joseph MaglyandClaude Opus 5.5 85ffaf40fd feat(gpu): multi-GPU qualification driver and per-device admission
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-18 14:48:34 -04:00
Joseph MaglyandClaude Opus 5.5 7b164c1a98 fix: keep base arithmetic on ordinary inputs (core review B1/B2)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-18 03:00:23 -04:00
Joseph MaglyandClaude Opus 5.5 6e8352f5ca fix: address review findings (audit-core)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-18 00:33:43 -04:00
Joseph MaglyandClaude Opus 5.5 3b8eb06ddb fix: address review findings (audit-core)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-17 21:59:18 -04:00
Joseph MaglyandClaude Opus 5.5 a4a2eb4961 Merge upstream/main into feat/310-moe-expert-concepts
Resolve the risk-map conflict with #133 by keeping both new contract
surfaces.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-17 16:05:27 -04:00
Joseph MaglyandClaude Opus 5.5 6db06724f6 fix: address review findings for #133
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-17 13:44:13 -04:00
Joseph MaglyandClaude Opus 5.5 44a629297d fix: address review findings for #133
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-17 13:30:06 -04:00
Joseph MaglyandClaude Opus 5.5 b612c54acc fix: address review findings for #310
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-17 13:22:03 -04:00
Joseph MaglyandClaude Opus 5.5 0567ef6574 test(ui): report the actual operator-UI result when the concept-pack guard assertion fails
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-14 12:50:00 -04:00
Joseph MaglyandClaude Opus 5.5 d0f14f77d9 fix(ci): restore the hosted model and operator-UI conditional gates
Scheduled Conditional tests have failed since late August on two hosted
gates, which also blocks release certification:

- model-download-runtime: the operator-only Qwen3.8-27B BF16 regression
  lived in the gate file and always skips on hosted runners; the gate
  runner rejects any skip. Move it to tests/conditional/test_qwen38_runtime.py,
  outside every hosted gate.
- operator-ui: `uv sync --all-extras` now pulls the qwen-hybrid extra,
  whose causal-conv1d sdist builds only against a CUDA toolkit. Exclude
  qwen-hybrid there and in the tag-only supply-chain job, which runs the
  same sync and would fail the next release.

Policy tests pin both invariants.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-14 11:39:27 -04:00
Joseph Magly 3d653241ae Merge remote-tracking branch 'upstream/main' into feat/246-ui-load-admission 2026-10-08 20:22:44 -04:00
Joseph Magly 84f5a508b8 Merge remote-tracking branch 'upstream/main' into feat/246-ui-load-admission 2026-10-08 19:39:53 -04:00
Joseph MaglyandClaude Opus 5.5 c925908f21 fix(ui): preserve resident model on pre-unload failures; hand off timeout cleanup (#246)
Failures before the previous model is unloaded restore metadata and status
without touching the resident model or lifecycle. Timeout and unstarted
worker paths transfer cleanup before the terminal yield so the slot is
never retained by a suspended generator.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-08 19:28:59 -04:00
Joseph MaglyandClaude Opus 5.5 6d1e5d664f fix(ui): finish load-failure cleanup before releasing the model slot (#246)
Release lifecycle, drop references and free allocator memory before a
failed attempt's claim is rolled back, and roll back before obliterate's
terminal error yields when no worker remains.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-08 19:13:49 -04:00
Joseph MaglyandClaude Opus 5.5 4eb1a4cd4b fix(distributed): refuse live two-host stages that need shared storage
The archived topology commits predate the merged EXCISE, VERIFY and
EXPORT stages. A cross-stage audit for the one-GPU-per-host layout found:
- Live preflight and LOADED evidence use attempt storage shared by the
  ranks (rank-0 directory, nonce file, file receipts). They now refuse the
  two-host GPU layout after configuration consensus and before any
  staging access (LMS_TOPOLOGY_UNSUPPORTED; the model session reports
  LMS_TP_PLAN_UNSUPPORTED).
- Canonical EXPORT assumes one shared destination tree across writer
  ranks. It now refuses the layout with a voted
  LMS_EXPORT_TOPOLOGY_UNSUPPORTED before any resource or filesystem work.
- PROBE admitted host memory only on rank 0. Each rank now admits its own
  working set through the existing unanimous vote.
- The evidence checker reconstructs each attempt's topology from
  fixed-size redacted records. EXPORT's attempt hash binds the VERIFY
  binding set, and part 5's per-attempt hardware and mount checks are kept.
EXCISE, rank journals, VERIFY and the launcher are code-level compatible
and are covered by new mocked tests. Docs describe the refusals.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-08 18:51:24 -04:00
Joseph MaglyandClaude Opus 5.5 5f7bd87774 fix(ui): guarded UI loads with shared load admission (#246)
Route every direct UI load/reload (chat lazy reload, session switch,
A/B comparison, post-run chat reload) through one guarded attempt in the
new gradio-free obliteratus/ui_model_load.py. The attempt calls the same
phase_admission.admit_model_load the CLI loader uses, with the same
confidence-tiered semantics and no UI-specific bound, and on any failure
drops partially loaded models, clears traceback-held tensors, frees
allocator memory and releases the lifecycle once.

Model-slot ownership is exclusive and transactional: a failed switch
restores the previous session metadata (previous model cleanly unloaded,
lazily recoverable from a validated checkpoint) and never publishes
partial state. Fixes the same-model deadlock in load_bench_into_chat.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-08 18:42:20 -04:00
Joseph MaglyandClaude Opus 5.5 0492ebaa35 feat(distributed): admit closed two-host TP2 topology
(cherry picked from commit 37f407850916ebe76575d73112c4d26fe08bf421)

Ported for #244 (part 6/6). Internal-only content from the archived
commit was dropped: .aiwg records and the internal security-docs test.
Doc and test conflicts keep upstream wording and add only the topology
references; internal tracker numbers were replaced with upstream framing.
Marked experimental in user docs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-08 18:22:31 -04:00
Joseph Magly 7fb9ea186d Merge remote-tracking branch 'upstream/main' into feat/244-tp2-export 2026-10-08 17:59:18 -04:00