Muse review r1 for #623: the config tie check walks every path the head is
registered under (any owner config or its text config saying tied, or a
disagreement between paths, means tied); tie metadata is read as an
undirected link graph matched over every suffix form of every module path, so
cycles and suffix-form links are never read as untied; edit memory is
admitted from shape/dtype/placement before any offloaded value is read, then
again exactly before any edit allocation. The NaN-aware bounded comparison
moves to offload_surgery and is reused by adopt_tied_alias.
Codex review r4 for #618: when the study metric has no measured change, the
fallback is the first measured metric in name order (the order save_json
writes), so a live run, replay and the viewer agree; the order-preserving
reader is no longer needed and is removed. Every upload, drop or demo load
starts a new generation and stale reads are ignored. Viewer percentages use
the absolute baseline and show unavailable for a zero baseline, as the
report does.
Codex review r3 for #621: once the opt-in no-replace checkpoint commit has
published, it is never rolled back (a later sync failure is reported and the
complete checkpoint left in place), and discovery never moves or deletes a
published file (a later failure names what was published); only private temp
files are removed. The staging path is never cleaned after a no-replace
publish. The default replace_existing=True path keeps main's semantics
unchanged (its rollback race is tracked in #645).
Codex review r3 for #618: the viewer trims ASCII whitespace by scanning
instead of a backtracking regex; report availability, plotted deltas, the
heatmap and the summary compute changes from each metric's own value and
baseline so generated column names cannot collide with raw metric names;
failed uploads clear the results and show an error; strict JSON (no NaN or
Infinity tokens) is documented as the shared input contract.
Codex review r2 for #618: the results viewer reads uploaded files with an
order-preserving JSON reader so metric selection walks baseline keys in file
order like Python (integer-like keys included), and the viewer and
report._metric_value share one strict numeric-string grammar (ASCII digits,
sign, decimal point, exponent; ASCII whitespace only; finite).
Codex review r2 for #621: the promoted directory's identity is recorded at
promotion and rollback leaves a destination whose identity changed untouched
(keeping any backup); no-replace rename tests run portably on hosts without
the primitive; ENOTEMPTY maps to FileExistsError and the unsupported-rename
message names a remedy.
Codex review r2 for #616: the exact overlap check's host scratch (a
conservative 48 bytes per checked element) is counted in snapshot admission
and restore validation, so staging_bytes stays a hard cap and an unadmitted
check fails closed; the offset tensors are created on the CPU explicitly.
Codex review r1 for #618: the results viewer builds its stats, chart and
table with DOM nodes and text only (no innerHTML), so a crafted results.json
cannot inject markup; its impact-metric selection mirrors save_plots exactly
(string primary only, measured baseline plus at least one measured ablation);
every render clears all result regions. Plots are written to a temp file and
moved into place only on success, figures are always closed, and a fallback
metric is labelled on the chart. A node-based test exercises the viewer.
Codex review r1 for #616: the sorted-stride overlap test is sufficient but
not necessary, so valid interleaved layouts (e.g. as_strided (3,2)/(2,3)) and
some empty tensors were refused. Empty tensors are admitted; when the fast
test fails, an exact uniqueness check over the narrowed view's storage
offsets runs up to 4,194,304 elements, and layouts above that cap are refused
as "could not be proven non-overlapping". Docs distinguish the two refusals.
The detector guard test also pins duplicate config.json as fail-closed.
Codex review r1 for #621: discovery refuses to stamp a pin onto inherited
ID-only operations it cannot verify (unpinned base, or an unfingerprintable
loaded tokenizer). The opt-in no-clobber checkpoint commit and the discovery
publisher use an atomic no-replace rename (renameat2 RENAME_NOREPLACE on
Linux, renamex_np RENAME_EXCL on macOS) and fail closed where none exists;
rollback deletes only files whose identity still matches what was published.
The recipe-digest compatibility test now uses a preserved pre-change
normalizer and a frozen recipe fixture, so normalization drift is caught.
Codex review r1 for #617: the pre-parse secret-token and
distributed+preflight guards now print to stderr, and `runs` catches archive
errors (unknown or malformed run id, unfinished run) with a one-line stderr
diagnostic, exit 1 and empty stdout. Docs and changelog state the success
and error output contract; MCP_LOCAL_SETUP.md notes that policy validation
runs before the missing-extra check.
From the BT6 re-audit: the legacy `obliteratus run` study path (enumerate →
apply_batch) now runs the shared ID-only guard and fails closed with no
opt-out. The bundled-recipe compatibility test derives its baseline from a
pre-pin technique registry instead of hard-coded digests, so legitimate recipe
changes on main don't break it. A pin that cannot be verified (tokenizer
without get_vocab) is recorded as pin_unverifiable.
From the round-3 BT6 audit: tie-map matching now considers every module path
(alias) of the embedding and head, plus prefix-normalized forms, and a map
naming only one side of the pair is undetermined rather than untied. The
last-resort value comparison treats matching NaN positions as equal, so a
tied model with NaN rows is no longer read as untied.
From the BT6 re-audit: the config of the module that owns the head now
decides first (the top-level config when the top-level model holds the head,
as transformers 5 ties), weighed with its own text config so either saying
tied means tied. Tie metadata is matched with shared module prefixes removed,
and a link-bearing map that never names the pair is undetermined rather than
untied. Ambiguity now resolves toward tied or cannot-establish, never untied.
From the BT6 audit of this PR: discovery now emits ID-only operations
routinely, so applying a config with a different tokenizer could edit the
wrong rows. Discovery embeds the tokenizer vocabulary SHA-256 in the config
(a field serialized only when set, so existing configs and bundled recipe
digests are unchanged). One shared guard, called by `vocab-surgery apply` and
the recipe technique, refuses ID-only operations unless the pin matches the
loaded tokenizer. The CLI keeps an explicit, receipt-recorded
--allow-unpinned-id-operations; the recipe path has no opt-out. An
unavailable vocabulary digest is recorded with a reason, and discover writes
the config before the report.
From the BT6 audit of this PR: decide offloaded ties from the most specific
source first (pair tie metadata, then the head-owning sub-model's flag, then
the text config, then the top-level flag), so a composite config's top-level
tie_word_embeddings no longer overrides more specific metadata. Compare
matrix values only when no source decides, in bounded CPU chunks, so mixed
resident/offloaded placement can't raise a device mismatch. An empty tie map
is undetermined rather than untied. Add tests for the resident row-transaction
failure paths.
scripts/check_checkpoint_docs.py treats inline code that starts with the
project name as a CLI example and parses it, so the runbook wording added for
#626 failed test_checkpoint_documentation_contract_passes_offline.
The checkpoint adapter reason rendered `install_extra=obliteratus[<extras>]==<version>`,
and the refusal-recovery pilot printed `install obliteratus[recovery]`. pip
resolves both against an index, where the `obliteratus` project is
quarantined with no installable files. The reason keeps its `install_extra=`
key with bare extra names and adds `install_hint` (source checkout
`uv sync --locked --extra ...`) and `project_version`, within the schema's
2048-character limit. The pilot gives the same source-checkout guidance.
Fixes#626
The DCP (.metadata, *.distcp) and DeepSpeed zero-rank detectors scanned
every inventoried file instead of the duplicate-checked name map, so after
the #612 change two sibling DCP sets (or duplicated zero_pp_rank_* files)
merged into one component instead of failing closed as before. Detectors now
select from the name map through shared basename predicates, and a guard test
fails if any detector consumes a basename the duplicate check does not cover.
The results viewer preferred primary_metric whenever the key existed, but
unavailable metrics are saved as null, so the #607 case threw in toFixed
and rendered nothing. Use the study metric only when its baseline is a
finite number (own property only), otherwise the first measured metric, as
`obliteratus report` does; skip ablations without a measured value and show
a message when nothing is measurable.
Decide offloaded embedding/head ties from shared backing, tie metadata and
tie_word_embeddings instead of materialized tensor identity. Tied offloaded
edits commit through every backing alias, and tie status that cannot be
established fails closed.
Resident edits are now row-level with row-only rollback. Edits are admitted
against an edit-memory budget (default half of available host memory, or
edit_memory_bytes=) before any allocation or write.
Fixes#599Fixes#601
Discovery checks that each token's text resolves back to its id. Tokens that
don't round-trip become flagged ID-only operations instead of failing at
apply time or being silently dropped. Reports record the tokenizer
vocabulary SHA-256, and apply/discover accept --expected-tokenizer-sha256.
apply rechecks its destination under the commit lock (new opt-in
replace_existing=False on atomic_checkpoint_directory); discover publishes
its files atomically with exclusive creation. Other checkpoint writers are
unchanged.
Fixes#600Fixes#602
Record the study's chosen impact metric as an optional `primary_metric` key
in results.json so `report` replays the same chart; files without the key
keep the first-metric behaviour. Write the impact and heatmap plots
independently, fall back to a metric with a measured change, and print only
the files written in this run, flagging stale plots from earlier runs.
Fixes#606Fixes#607Fixes#604
Add `runs` to the CLI machine-JSON command set so every durable-run
subcommand writes only its JSON document to stdout.
Replace the missing-`mcp`-extra hint with the source-checkout installs from
docs/MCP_LOCAL_SETUP.md. The PyPI project named `obliteratus` is quarantined
and has no installable files, so the hint no longer points there.
Fixes#611Fixes#603
Checkpoint inspection now fails on a repeated basename only for names the
format probes resolve (weights, shards, indexes, adapter/model config,
producer metadata); other files are inventoried by relative path.
Snapshot restore writes expanded (stride-0) resident buffers through a
non-overlapping view, keeping layout and identity. Values that vary along an
expanded axis are rejected before any write, and other internally
overlapping layouts are refused at snapshot creation.
Fixes#612Fixes#613
Codex review r5 for #592 (2 x P2):
- A deferred SIGINT is raised as an exact KeyboardInterrupt instance
carrying `signum` and the original exception as context, so
`except KeyboardInterrupt` callers handle it and an uncaught one still
exits by SIGINT on Python 3.12 (which only does so for the exact type).
SIGTERM keeps ProcessInterrupted(SystemExit).
- Each post-cleanup selector wait is capped at the poll interval while
the overall drain deadline is kept, so huge finite drain values cannot
overflow the platform timestamp.
Docs note that a drain of zero skips the post-cleanup read. Regressions
fail on the previous head; verified on the pinned Python 3.12 lane.
Codex review r4 for #592 (4 x P2):
- After the group is terminated, draining uses an independent short
bound (0.25 s default, OBLITERATUS_PROCESS_DRAIN_SECONDS override) and
then closes both pipes, so a descendant that escaped the group while
holding stdout/stderr cannot hang the evaluator.
- Nested owners share pending cancellation up the ownership chain, so
the earliest signal wins and is delivered exactly once in either
order.
- A SIGINT during exception cleanup reaches the outermost owner as a
KeyboardInterrupt with the original exception kept as context.
- Deterministic coverage of the ownership-loss guard: an independently
reaped leader raises the ownership error with zero killpg calls.
Docs and docstrings now state that an inherited SIGCHLD=SIG_IGN is
rejected before spawning (fail closed) rather than restored.
Codex review r3 (5 x P2):
- Evaluator output is drained while polling the leader's exit; once the
leader exits the group is terminated and draining completes, so a
descendant holding a pipe no longer turns a pass into a timeout/hang.
- Owned groups require exclusive reaping: SIGCHLD=SIG_IGN is restored
to SIG_DFL for the owned scope, and detected loss of ownership fails
closed without signalling an unreserved PGID (contract documented).
- A signal deferred during exception cleanup is forwarded to the
enclosing owner while the in-flight exception is kept; ProcessSignals
documents and tests 'first signal wins, delivered exactly once'.
- Test helpers track every group from creation and terminate+reap in
finally, including before readiness and in nested verify-edit.
Regressions fail on the previous heads and pass now; also synchronizes
the vLLM repeated-stop test and covers the procfs fallback.
Codex review r1 for #605:
- High: SAE expansion was estimated from _harmful_means, empty before
collection, so it was sized as zero. SAE training counts now come from
the configured positive and control prompts.
- High: exact affine LEACE was sized as float32 but fits in float64 on
CPU/CUDA. Device selection and distill admission now budget its
covariance, decomposition and live operands at the fitter's actual
dtype, shared from leace_exact.
- Medium: terminal cleanup after a failed run now drops all transient
analysis references (means, shield atoms, directions, subspaces,
workspace, resolved device) so accelerator memory is released.
Regression tests cover SAE and exact-LEACE fallback at a mocked memory
boundary, LEACE in distill admission, and cleanup after PROBE and
DISTILL failures.
Resolve against #593 (quick-check settings) and #591 (tied-head
migration) by keeping both sides: the pipeline gains analysis_device
alongside refusal_check_mode/confidence; migration and the shipped
recipes emit allow_tied_head_edit and the analysis_device cpu pin;
_structured relaxes both the refusal-check settings and
analysis_device for historical resolution records; both sides' tests
are kept.
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