58 Commits
Author SHA1 Message Date
Joseph Magly 966ab62b46 feat(recipes): accept nine recipes confirmed in the 2026-11-21 validation run
Ship as accepted v2 data the nine recipes that passed the protocol final
test and were accepted by the operator on 2026-11-27: Granite 4.1 8B,
Llama-3.2-1B, Llama-3.2-3B, OLMoE-1B-7B, Phi-4-mini, Qwen3.5-0.8B,
Qwen3.5-9B, Llama-3.1-8B-Instruct-abliterated and DeepSeek-R1-Distill-
Qwen-7B. Each ships a KL-advisory evaluation profile and value-only
confirmation and verify-edit evidence bound by SHA-256, following the two
recipes accepted in 134bd2c.

The Llama-3.2 results predate the chat-template date pin (#690) and are not
comparable with later measurements. Two recipes were confirmed with
analysis_device auto (resolved to cuda:0) and ship as confirmed; the shipped
CPU-extraction test now names them explicitly.
2026-11-27 13:51:50 -05:00
Joseph Magly e2e7e30799 fix(recipes): make cleanup diagnostics best effort without stdout fallback or duplicates
Section A of #675: with stderr None, diagnostics are dropped instead of going to stdout; a failed flush never re-prints the line; recipe search/confirm keep exit 4 (no traceback) when stderr is closed or missing; docstrings say never raises an Exception / best effort; the contended-write test requires a failing print and the unencodable case asserts the refusal and CRITICAL lines.

Refs #675
2026-11-25 13:33:04 -05:00
Joseph Magly f95dc6b481 Merge main 3a49e8e into fix/652-654-recipe-cleanup-followups; deliver signals after the lock wait
Review r2 for #660: the launch guard takes the run's signals and checks them
once it holds the cleanup lock and has checked the marker, before any launch,
reservation or guarded body, so a SIGINT/SIGTERM deferred during the bounded
wait releases the lock with nothing launched or reserved. Wired into the
search start check, the commit guard, the confirmation reservation and every
step launch; an exception before the guard yields counts as a refusal for
injected runners. The nested-lock test is bounded by a thread join, and an
interrupt during close is raised when no cleanup failure propagates.
2026-11-25 03:57:54 -05:00
Joseph Magly 2288aaa470 fix(recipes): keep the cleanup-lock holder hint from breaking the lock wait
Muse BT6 audit of 87598e3 for #660: _lock_holder returns the generic hint
unless the platform is Linux and catches any exception, so a Windows host (no
os.major/os.minor) or a failing /proc/locks read can no longer escape either
lock path. Adds tests for a context cycle on the close stack and for a nested
launch guard refused after the bounded wait; the docs describe both.
2026-11-25 03:21:31 -05:00
Joseph Magly 87598e3693 fix(recipes): bound the cleanup-lock wait and keep cleanup failures primary over any close error
Every wait for the recipe cleanup lock is capped at 60 s with stderr progress
naming the lock and, where available, the holder PID; a launch check that
times out is refused with exit 4 instead of hanging. cleanup_failure_first()
closes resources through a yielded ExitStack and attaches any close error,
including KeyboardInterrupt and SystemExit, as a note on a propagating cleanup
failure. An end-to-end test pins that a raw OSError from the evaluator's
normal-exit stop exits 4 with a marker.

Fixes #652
Fixes #654
2026-11-25 02:44:44 -05:00
Joseph Magly d4296aa8a5 Merge pull request #625 from elder-plinius/fix/622-process-group-followups
Bound the post-SIGKILL leader wait; restore non-Python signal handlers
2026-11-25 02:20:39 -05:00
Joseph Magly 4c28b193bd fix(recipes): record a release failure after any entered launch as a cleanup failure
Grok review r8 for #625: the launch guard records when its body is entered and
keeps the body's in-flight exception, so a lock-release failure after entry,
whether the body completed or raised, becomes a ProcessGroupCleanupError
chained from that exception with the OSError as a note. cleanup_failure_first
keeps the cleanup error's own context and follows only close-error chains; a
release failure after a durable marker write says the marker was recorded.
2026-11-24 23:32:27 -05:00
Joseph Magly 65a2d0f922 fix(process): keep cleanup failures through guard release, close errors and Windows vLLM stop
Codex review r7 and the Muse BT6 audit for #625: guard balance is recorded
before an abandoned guard is closed, and a release failure during that close
becomes a new cleanup failure chained to the runner's exception; any exception
raised while the guard is unbalanced is a fresh, unrecorded cleanup failure;
evaluator pipe and selector close errors are attached as notes instead of
replacing a cleanup failure; the non-POSIX vLLM stop terminates and kills the
process handle and treats survival or any stop error as a cleanup failure;
marker writes wait at most 60 s for the cleanup lock, then fail closed.
2026-11-24 22:58:49 -05:00
Joseph Magly 14db27413a fix(recipes): record cleanup failures on every platform and for raising runners
Muse review r6 for #625 and the Muse BT6 audit: search converts and records a
plain cleanup error before the non-POSIX re-raise and both recipe CLIs exit 4
on any ProcessGroupCleanupError; the injected-runner guard balance is checked
whether the runner returns or raises; a lock-release failure after launch,
a failed non-POSIX kill and a vLLM server surviving SIGKILL are cleanup
failures; confirmation's marker names the failing step's log; CHANGELOG
records exit 4, the marker and the launch_guard runner keyword.
2026-11-24 22:17:06 -05:00
Joseph Magly 30a2fa65eb fix(process): treat every group stop failure and skipped launch guard as a cleanup failure
Codex/Muse review r5 for #625: any error stopping a step's process group,
after an interrupt or a normal exit with any code (including the evaluator's
normal-exit stop and VllmServer.stop), becomes a ProcessGroupCleanupError
chained to the original, so search and confirmation write the marker. A
skipped or unbalanced launch guard on any step raises a plain
ProcessGroupCleanupError so the marker is recorded and resume is refused.
Docs clarify the cooperative-runner trust boundary.
2026-11-24 21:26:02 -05:00
Joseph Magly bb49a5e1f2 fix(recipes): require injected runners to enter the launch guard
From the Muse BT6 audit of #625: launch_guard returns a wrapped context
manager that counts an entry only after the real guard has taken the lock
and checked the marker, and counts exits; after the step the run requires at
least one entry and matching exits, so calling the factory without entering
it fails closed (exit 4). The CLI no longer prints the first error line twice.
2026-11-24 20:55:56 -05:00
Joseph Magly 42137dc159 fix(recipes): keep exit 4 through log and stop failures; guard every launch path
Codex review r4 for #625: the step exit code is captured before the log
closes and an observed exit 4 stays a cleanup failure even when stopping the
step group fails afterwards; every launch path (POSIX, non-POSIX and injected
runners) holds the cleanup guard through process creation and waits outside
it, and a runner that skips the guard fails closed; the recipe CLI prints the
cleanup error's notes and any interrupting signal on exit 4.
2026-11-24 20:20:27 -05:00
Joseph Magly 89ed250be2 fix(recipes): hold the cleanup lock through each launch and keep cleanup failures primary
Codex review r3 for #625: the shared cleanup lock is held from each marker
check through the step's process launch (and around the initial git call),
with a documented lock order; a cleanup failure set after a normal exit 4 is
raised ahead of a deferred signal; confirmation records exit 4 before any
fallible bookkeeping; a vLLM stop failure no longer replaces a propagating
ProcessGroupCleanupError; lock and record-write failures fail closed (exit 4)
and never replace an established cleanup failure.
2026-11-24 19:40:53 -05:00
Joseph Magly 1937d3afa6 fix(recipes): keep cleanup failures through interrupts and coordinate a durable marker
Codex review r2 for #625: an interrupted wait for verify-edit checks the
child's exit code and reports a cleanup failure (exit 4) as
ProcessGroupCleanupError with the interrupt as cause, so the marker is
written; ProcessSignals keeps a propagating cleanup error primary over a
deferred signal (the signal is attached as a note). Search and confirmation
share a run-dir lock for the marker and re-check it before every step; the
marker is written with fsync of the file and directory and fails closed on any
write error. Confirmation checks the marker before running git.
2026-11-24 18:10:54 -05:00
Joseph Magly b90bfc8a9b fix(recipes): stop search and confirmation on verify-edit cleanup failure
From the BT6 re-audit: when verify-edit exits 4 (process-group cleanup
failed, so an evaluator or vLLM group may still be alive), recipe search no
longer launches further candidates and confirmation stops before recording a
verdict. Both write a durable process-cleanup-failed.json marker and exit 4;
a resumed search or another confirmation refuses to start while the marker
exists, until an operator has checked for leftover processes and removed it.
2026-11-24 17:28:47 -05:00
Joseph Magly 521e8111ac fix(process): budget nested cleanup, propagate cleanup failures, hold timed-out leaders
Codex review r1 for #625: the verify-edit step budget now covers both nested
group cleanups (grace plus the bounded post-SIGKILL wait for each), so the
vLLM group is still stopped when the evaluator leader is stuck.
ProcessGroupCleanupError propagates as a distinct failure chained to the
original error (never reported as untested; verify-edit exits 4). Timed-out
leaders are held in a module registry so CPython's Popen cleanup cannot reap
them and reuse the PGID; registry cleanup re-checks ownership through
terminate_group before any signal.
2026-11-24 17:16:38 -05:00
Joseph Magly 85cbd237ac fix(abliterate): keep failed-run cleanup going after stage errors; propagate probe OOMs
Codex review r1 for #631: each failed-run cleanup stage (repair-adapter
removal, each steering-hook removal, both releases) records its own error and
cleanup continues, with interrupts deferred until cleanup finishes and still
winning; the original failure is kept by identity and all accumulated notes
are copied onto a winning interrupt. select_analysis_device propagates
allocation failures (MemoryError and backend out-of-memory errors recognized
by device.is_oom_error, including MPS) instead of falling back to CPU. Caught
stage errors drop their traceback frames before the next stage runs.
2026-11-24 17:15:50 -05:00
Joseph Magly 58b1407f46 fix(abliterate): keep the original failure when failed-run cleanup release fails
Failed-run cleanup no longer replaces the triggering PipelineFailure: release
errors are logged and attached as exception notes, interrupts still win
(including over an earlier release error), and both releases are always
attempted; direct cleanup calls still raise the first release error.
run_informed gets the same treatment. Adds GeneratorExit fail-closed coverage
for sparse accessors and parameter/buffer iteration in _model_tensor_ownership.
select_analysis_device falls back to CPU with a logged reason on ordinary
probe exceptions; OOM and interrupts propagate.

Fixes #629
2026-11-24 16:12:33 -05:00
Joseph Magly 4eba3b3736 Merge main 16f181a into fix/622-process-group-followups 2026-11-24 15:45:47 -05:00
Joseph Magly 16f181a578 Merge pull request #605 from elder-plinius/feat/590-analysis-on-device
Run abliteration analysis math on the model's device
2026-11-24 15:36:12 -05:00
Joseph Magly 42e11eeebf fix(process): bound the post-SIGKILL leader wait and restore non-Python handlers
Bound the wait for the group leader after the final group signal (10 s) and
raise ProcessGroupCleanupError instead of hanging. The leader stays unreaped
on timeout, so its PGID remains reserved and a later cleanup can still
signal and reap it. Restore a previous non-Python (None) SIGINT/SIGTERM
handler as SIG_DFL with a warning instead of raising TypeError. The
_running test helper treats ESRCH during the procfs read as not running,
and the remaining error and non-Linux branches of process_groups.py are
covered.

Fixes #622
2026-11-24 15:21:56 -05:00
Joseph Magly 001057182a fix(process): deliver SIGINT as KeyboardInterrupt and bound selector waits
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.
2026-11-23 19:59:03 -05:00
Joseph Magly 71576c39f8 fix(process): bound post-cleanup drain and share signal state across owners
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.
2026-11-23 18:24:48 -05:00
Joseph Magly ffe66b8096 fix(process): drain safely, own reaping, and never drop cancellations
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.
2026-11-23 16:39:51 -05:00
Joseph Magly f2db169384 Merge upstream/main into feat/590-analysis-on-device
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.
2026-11-23 12:20:52 -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 cb49b92777 Merge remote-tracking branch 'upstream/main' into fix/589-search-process-groups 2026-11-23 12:18:43 -05:00
Joseph Magly 3c8c20242f fix(recipes): stop candidate subprocess trees when a search is interrupted
recipe search, recipe confirm and verify-edit's capability vLLM server
started subprocesses that survived when the parent was stopped. An
orphaned edit kept 18 GB of GPU memory and broke the next queued
search. Subprocesses now start in their own process group; on
SIGTERM, SIGINT or an exception the whole group gets SIGTERM, a grace
period, then SIGKILL. The interruption is recorded in the candidate
record so a resumed search retries it. POSIX only; Windows behaviour
is unchanged.

Fixes #589
2026-11-22 11:51:16 -05:00
Joseph Magly c47c2c1033 fix(recipes): preserve v1 tied-head behaviour when migrating to v2
v1 recipes projected a tied LM head implicitly; the v2 projection
technique refuses that unless the recipe declares it. migrate_v1 now
emits allow_tied_head_edit: true when v1 would project the head (a
no-op on untied models) and lm_head: skip when v1 disabled head
projection, with provenance. It never silently skips a head edit v1
would have made. Migrated v1 search grids follow the same rule, and
shipped v1-derived data is updated.

Fixes #588
2026-11-22 11:51:15 -05:00
Joseph Magly ee4935e798 Merge upstream/main into feat/569-concept-unification
Apply #571's projection resolution schema additions (reference,
$defs) before wrapping it in the concept-or-projection conditional.
2026-11-21 01:40:04 -05:00
Joseph Magly 7c9f9764ec feat(recipes): unify concept packs with v2 edit steps
Concept-pack ExtractionRecipe maps onto the direction_source and
placement of v2 techniques: concept_recipe_to_v2 converts every shipped
pack into a normalized v2 step whose direction source is a pinned
concept_pack input, with pack-level extraction pins normalized into
explicit parameters. Packs applied by activation steering use a new
steering.activation_addition v1 technique wrapping the existing
intervention code; refusal is expressed as weight projection like any
other concept. Applied steps may register cleanup that the executor
runs if a later step fails, so steering hooks are removed.

Fixes #569
2026-11-21 01:27:14 -05:00
Joseph Magly 134bd2c32c feat(recipes): move recipe tools to v2 pipelines; v1 read-only
recipe search, confirm, promote and obliterate --recipe now operate on
v2 recipes: search grids are v2 step variations (recipe-search-grid v2,
same preregistered selection rule), confirmation and promotion consume
evaluation profiles and bind evidence to applied resolution records,
and --recipe applies pipelines through apply_recipe. v1 recipes and
grids load through mechanical migration with a notice; writing v1 is
refused. Shipped v1 data is migrated to v2, and the two recipes
confirmed on the protocol final test in the initial core run ship as
accepted v2 data: llama3.1-8b-e03-reg02 and qwen2.5-1.5b-mid10-18-dim1,
with KL-advisory profiles and value-only confirmation evidence.

Fixes #571
2026-11-21 01:27:13 -05:00
Joseph Magly 824adeeb21 Merge upstream/main into feat/567-evaluation-profiles
Keep both the evaluation-profile and pinned-input exports and risk-map
entries; apply_projection takes both #568's recipe_metadata and this
branch's device, dtype and reference_prompts.
2026-11-20 22:11:26 -05:00
Joseph Magly df61ca3db9 feat(recipes): reconcile pinned inputs with the LoRA repair executor
Recipes now declare everything a step consumes. Training corpora use
the new recovery_corpus input kind (pinned by the recovery metadata
digest, train or calibration role) and LoRA repair consumes the
resolved corpus. Run-specific locations are runtime_binding inputs with
the new runtime role; they cannot satisfy a data role. apply_recipe
rejects declared inputs the caller leaves unbound and caller bindings
the recipe does not declare, resolves pinned inputs once, and records
input digests and runtime binding names (never paths) in the
resolution record. Techniques adapt resolved inputs through an
optional TechniqueSpec.prepare_inputs hook, so the executor stays
technique-neutral.
2026-11-20 22:02:22 -05:00
Joseph Magly 635fff939b Merge upstream/main into feat/568-pinned-inputs
Resolve projection_runtime imports and risk-map entries; the LoRA
repair recipe's input declarations are reconciled in the next commit.
2026-11-20 21:46:01 -05:00
Joseph Magly ad32fb54d1 Merge upstream/main into feat/567-evaluation-profiles 2026-11-20 21:41:38 -05:00
Joseph Magly 790731ffea feat(recipes): add versioned evaluation profiles
Add obliteratus.evaluation-profile/v1: one digest-referenced evaluation
contract for v2 recipes. A profile carries a partial verify-edit spec
(endpoints, margins, capability decoding and tier), a kl_policy (gate or
advisory) and calibration evidence references (noise floor or random
control) whose digests and schemas are verified and whose adopted
thresholds are recorded per field. Profiles layer family then
individual over defaults with resolve_margins precedence; advisory KL
sets the endpoint not required. v2 recipe confirmation resolves the
profile and records the resolved spec digest; the v1 spec path is
unchanged. Ships a candidate Llama-3.1-8B-Instruct profile with advisory
KL and its random-control evidence, local paths redacted.

Fixes #567
2026-11-20 21:41:32 -05:00
Joseph Magly d57585ecae feat(recipes): add adapter.lora_repair technique and pipeline executor
The second v2 technique, registered only through the technique
registry with no change to the model-recipe.v2 schema or validator.
adapter.lora_repair v1 wraps the existing LoRA recovery (assistant-only
loss): explicit defaults from RecoveryConfig, LoRA targets from
placement writer roles, training on the previous step's model state,
and an adapter or merged-weight artifact with SHA-256 digests in its
resolution payload. apply_recipe runs ordered steps fail-fast, binds
declared inputs and outputs between steps, and chains each step's
payload into one resolution record. recover.py gains keyword-only
dropout and exact-target seams with unchanged defaults.

Fixes #570
2026-11-20 17:23:40 -05:00
Joseph Magly 65439c0a8b feat(recipes): pin v2 inputs by digest with declared split roles
Add an extensible input-kind registry (protocol_split, prompt_pairs_file,
concept_pack, chat_template, reference_model). resolve_inputs
materializes each named input, verifies its SHA-256 and returns its
declared role. Normalization validates input declarations and step
consumption before hashing: technique steps may consume only train or
calibration inputs, search evaluation only tune and confirmation only
final_test, so the final test set cannot reach fitting. The projection
technique extracts from the resolved train input, and the resolution
record carries verified input digests. Protocol disjointness checks are
shared with search.

Fixes #568
2026-11-20 17:23:39 -05:00
Joseph Magly e25c6e94e7 Merge upstream/main into feat/565-projection-technique
Resolve docs/MODEL_RECIPES.md keeping both the projection technique
section and the checkpoint resolution records section from #576, and
correct the latter's stale note: legacy records use a fixed created_at
sentinel, not the metadata file's modification time.
2026-11-20 16:45:18 -05:00
Joseph Magly c10db5abee feat(recipes): persist checkpoint resolution records
Add obliteratus.recipe-resolution/v1: what an applied recipe actually
did, as a canonical record (recipe digest, engine and code commit,
target with structure facts such as tied embeddings, per-step technique
payloads validated by registered techniques, artifacts with digests).
Checkpoints now save recipe-resolution.json atomically beside the
weights. resolution_from_metadata adapts older checkpoints from
abliteration_metadata.json; such records use a fixed created_at
sentinel because the metadata has no timestamp, so their digest depends
on content (bound by the metadata sha256), not on file times. The
random-direction control reads the record when present and records its
digest, and confirmation records the resolution digest.

Fixes #566
2026-11-19 18:54:59 -05:00
Joseph Magly 370ab37352 feat(recipes): register the v2 abliteration.projection technique
The first technique in the v2 registry. Its normalizer expands the
authoring form (preset plus overrides, which v1 migration emits) into
fully explicit parameters through _effective_projection_options, now the
single source for both AbliterationPipeline.__init__ and recipes, so
implicit defaults such as embed_regularization 0.35 (fallback) versus
0.5 (advanced) become explicit. The applier resolves placement, runs the
pipeline with pinned layers and returns a resolution payload (resolved
layers, writers, effective ranks, KL-restored groups, effective params,
checkpoint digests). On models that tie input and output embeddings an
LM-head edit is rejected unless allow_tied_head_edit is set (or the head
is skipped), and safeguards that would change the plan reject unless
declared.

Fixes #565
2026-11-19 18:54:57 -05:00
Joseph MaglyandClaude Opus 5.5 2e13bdff53 Merge upstream/main into feat/564-placement-resolver
Resolved shared registration files by keeping both sides.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-19 18:30:42 -05:00
Joseph Magly 94c7a47a5f feat(recipes): placement vocabulary and per-model resolver
Add a technique-independent placement contract (recipe-placement v1)
and resolver. Layers are absolute indices, a depth fraction window, or a
registered selector with params: middle_fraction (middle60 at 0.2-0.8
reproduces today's indices), all, all_except_first, and score-based
knee, knee_cosmic and top_k, which declare their required inputs.
Writers are roles (attn_out, mlp_out, embeddings, lm_head, router,
experts) or module patterns, mapped to the modules EXCISE edits today.
resolve_placement returns explicit layers and module names with
provenance, fails clearly on empty or invalid results, and flags tied
input/output embeddings so techniques can apply structure rules. New
selectors register without schema changes.

Fixes #564
2026-11-19 18:23:02 -05:00
Joseph Magly a2e9301063 feat(recipes): v2 core schema, normalizer and technique registry
Add obliteratus.model-recipe/v2, a technique-neutral core: engine
requirements, target (identity or family match plus typed structural
requirements), inputs by reference with split roles, an ordered
pipeline of steps (technique id and version, params, placement, inputs,
outputs, constraints), an evaluation profile reference, and the v1
lifecycle fields. Steps are validated and normalized by their technique
through a versioned registry interface. normalize_recipe produces an
idempotent, fully explicit record with a canonical SHA-256.
load_recipe dispatches on the schema version; migrate_v1 maps a v1
recipe to one abliteration.projection step carrying its preset and
overrides. V1_AUTHORING_ALLOWED stays True until the tools move to v2.

Fixes #563
2026-11-19 18:23:01 -05:00
Joseph Magly 3797d10229 docs(recipes): publish the recipe plan and v2 design; mark v1 ready for testing
The per-model recipe issues (#539-#547) and the v2 issues (#563-#571)
reference a plan and a design review that existed only in a local
artifact store. Publish both as docs/MODEL_RECIPES_PLAN.md and
docs/MODEL_RECIPES_V2_DESIGN.md (machine-specific paths removed), and
add a status note to docs/MODEL_RECIPES.md: v1 is the supported format
for testing, the v1 testing loop, the matric-eval requirement for
deterministic capability scoring, and the open KL-margin question.
2026-11-19 17:04:11 -05:00
Joseph Magly df20cd76ba Merge pull request #557 from elder-plinius/feat/542-bind-qwen38-presets
Bind the Qwen3.8 presets to the pinned 27B revision
2026-11-19 14:02:31 -05:00
Joseph Magly 11cbddb2df fix(recipes): bind Qwen3.8 presets to the pinned 27B revision
qwen38_e01/e02/e03 were validated for Qwen/Qwen3.8-27B but ran on any
model. A single binding table now maps each preset to the pinned stock
identity. When run() would edit with a bound preset and the model
identity (explicit recipe_model_id/recipe_revision or a Hugging Face
snapshot path) is not the bound one, the edit is refused unless
allow_recipe_transfer is set, which records the transfer in metadata and
logs a warning. Construction and evaluation-only uses (checkpoint
evaluation) are unaffected. obliterate exposes the presets locally with
--allow-recipe-transfer; remote runs reject them. The campaign passes
its locked stock identity and sets transfer only for the small-model
rehearsal. The new options are appended to the constructor signature and
added to the refusal golden configs (tensors unchanged).

--recipe now labels a family recipe applied to a member with a passing
confirmation of the unchanged recipe confirmed-family-member instead of
family-application.

Fixes #542
2026-11-19 13:40:11 -05:00
Joseph MaglyandClaude Opus 5.5 6434ff702d Merge upstream/main into feat/547-family-promotion
Resolved shared registration files by keeping both sides.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-19 13:36:17 -05:00
Joseph Magly e3a5386176 feat(recipes): require two model sizes for family promotion
A family recipe becomes accepted only through an explicit promotion
that finds passing confirmations of the unchanged family recipe (same
digest) on at least two matching member models of different sizes:
different layer counts, or at least 25% more estimated parameters at
equal depth. Failed, stale and non-matching confirmations do not count,
and the reason for each record is reported. recipe promote writes the
accepted family recipe with frozen evidence (counted confirmation
records and digests) into a review directory; recipe promote-member
writes an individual recipe that inherits the family, bound to one
confirmed member. RecipeRegistry gains an exact model/revision
confirmed-member query for the family-application label. Confirmation
records may carry the model's architectures (optional; older records
remain valid).

Fixes #547
2026-11-19 13:24:09 -05:00