Commit Graph
68 Commits
Author SHA1 Message Date
Joseph MaglyandClaude Opus 5.5 189bf73eee Add Pain Axis phase-1 replication harness and local results
scripts/pain_axis_replication.py drives the concept API through the Pain Axis
replication gate, the Appendix C/D ablation conditions (plus joint-removal
arms), the Section 4.2 re-steer ladder, and the toolkit evaluation battery.
The report records results on Qwen 2.5 7B, Gemma 2 2B and Gemma 2 9B
Instruct, including a pain-direction-specific drop in safety refusal.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-16 01:58:00 -04:00
Joseph MaglyandClaude Opus 5.5 db39905ffa fix(eval): report invalid completions beside refusal rates and stop rewarding degeneration (#312)
`refusal_rate` and its callers counted empty, reasoning-only and degenerate
completions as non-refusals, so the Bayesian optimizer objective and
tourney and benchmark rankings could reward an edit that destroyed output.

- New `measure_refusals` returns a `RefusalMeasurement` (refused, valid,
  invalid, total, rate over valid completions, invalid rate).
- `refusal_rate`, `refusal_rate_with_ci` and `heretic_eval.arditi_refusal_rate`
  gain `exclude_invalid`. The default keeps the legacy all-response
  denominator for a deprecation window; `refusal_rate_with_ci` adds
  valid, invalid and total counts.
- Verification metadata adds invalid counts, the valid-only rate and a
  refusal objective that counts invalid completions as refusals.
- The Bayesian optimizer, tourney and benchmark rankings use that objective
  and record invalid rates; displayed refusal rates are unchanged.
- docs/refusal-metrics.md documents the denominators and the planned
  default change.

Fixes #312

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 17:16:26 -04:00
Joseph MaglyandClaude Opus 5.5 d5a5c12a28 ci(release): time-box coverage and duration exceptions and parallelize the base suite
With Gloo sharded, the release lane measures what no release run had
checked since v0.1.3: mature-CPU line coverage is 91.79% (floor 94%; branch
84.66% still passes), and the suite takes 990-1042 s against a 350 s
budget, with five tests over the 15 s limit.

Per the maintainer decision tracked in #304:
- move mature_cpu_statement to 91.5 behind a threshold exception that
  expires 2026-11-14;
- raise suite and marker duration budgets to measured values plus ~20% and
  own the eight tests at or above 14 s until the same date;
- make threshold exceptions expire for real: the validator ignored the
  expires date, so a lapsed exception would have kept a lowered floor.

Python 3.12 also exceeded thirty minutes because it reran the exact base
suite inline. Run that suite in a parallel release-base-core job and only
combine its coverage in Tests py3.12. The combiner now includes
subprocess coverage siblings of the core data file.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-14 14:05:03 -04:00
Joseph MaglyandClaude Opus 5.5 27c64e4e19 fix(supply-chain): reject malformed license text overrides without crashing
Non-string package, version or expression fields raised TypeError during
policy validation and license evaluation. Report them as policy failures
and skip them when matching inventory rows.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-14 12:00:41 -04:00
Joseph MaglyandClaude Opus 5.5 1e3ffb7fc6 ci(supply-chain): keep qwen-hybrid installed and license-checked on hosted runners
Excluding the qwen-hybrid extra would have dropped causal-conv1d,
flash-linear-attention and fla-core from the release license inventory
without any failure. Instead, install causal-conv1d without CUDA kernels via
its own CAUSAL_CONV1D_SKIP_CUDA_BUILD switch in the operator-UI gate and the
supply-chain job.

The full inventory then needs two permissive SPDX expressions (MIT-0 for
cffi, Apache-2.0 OR BSD-3-Clause for cryptography, both via the mcp extra)
and a strict mechanism for packages whose metadata carries verbatim license
text: a text override binds one package version and the SHA-256 of the
exact text to an already allowed expression, and fails when unused.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-14 11:51:06 -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 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
Joseph Magly 4751c5c87b Merge remote-tracking branch 'upstream/main' into fix/245-phase-admission 2026-10-08 17:53:29 -04:00
Joseph MaglyandClaude Opus 5.5 636fd5c19a ci: shard PR core tests across a duration-balanced matrix
Since #272 the "PR core tests" job runs every selected non-Gloo test in
one runner under a 10-minute timeout, and broad selections now exceed it.
Shard it like the Gloo tests: pr-select emits core_shards from a single
CORE_SHARD_COUNT constant and writes selected-core-N.txt once with
scripts/shard_pr_tests.py --kind core, balanced by per-file durations
measured from CI JUnit (ci/core-test-durations.json; unlisted files use
default_seconds). pr-core-tests becomes a matrix whose empty shards record
exit code 5, and check_pr_partitions.py requires the exact core-N and
gloo-N artifact set before "Pull request core" combines coverage.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-08 17:41:18 -04:00
Joseph Magly 57b4a2e808 Merge remote-tracking branch 'upstream/main' into fix/245-phase-admission
# Conflicts:
#	ci/test-risk-map.json
#	tests/test_conditional_gate_scripts.py
2026-10-08 16:47:14 -04:00
Joseph MaglyandClaude Opus 5.5 4c6a5c46f6 feat(distributed): add bounded distributed canonical export
(cherry picked from commit de990f633e151f329ef5e844ed55f60a9a0b247c)

Ported for #244 (part 5/6). Internal-only content from the archived
commit was dropped: .aiwg records and the internal security-docs test.
Doc and policy conflicts keep upstream wording and add only the export
references. The new Gloo test file carries the gloo marker and a
duration entry. Marked experimental in user docs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-08 16:28:40 -04:00
Joseph Magly 2ed95176a9 Merge remote-tracking branch 'upstream/main' into feat/248-portable-gsq 2026-10-08 16:27:45 -04:00
Joseph Magly 3f17ad49e6 Merge remote-tracking branch 'upstream/main' into fix/245-phase-admission 2026-10-08 16:04:12 -04:00
Joseph Magly 94c8a8974e Merge remote-tracking branch 'upstream/main' into feat/248-portable-gsq 2026-10-08 14:11:32 -04:00
Joseph MaglyandClaude Opus 5.5 6db084a4f2 fix(gpu): admit only the work that follows and warn once per invocation
Refinement admits the validation gate alone, not the evaluation capture it
never runs, so default mode cannot reject a run for forwards that do not
happen. Repeated admissions inside one benchmark method, Concept Lab
action, informed/Ouroboros loop or concept evaluation share a warning
scope: each boundary still observes memory afresh, but a phase/device
warns once per invocation.

Refs #245

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-08 13:47:35 -04:00
Joseph MaglyandClaude Opus 5.5 79344856c8 fix(distributed): prove whole-model rollback and bound VERIFY memory
- Rollback after a VERIFY failure now proves the whole model against the
  pristine baseline (voted, with consensus) before lifecycle emission or
  journal deletion. EXCISE alone proves only its edited operations. A
  failed proof keeps the journals, quarantines and reports
  LMS_VERIFY_STATE_UNCERTAIN instead of a clean rollback.
- Inference-mode setup moved inside the preparation vote, so nothing
  fallible sits between the vote and the TP forward. Failures inside
  the forward are documented as the bounded timeout / rank-loss boundary
  and tested with a real internal all_reduce.
- Retained logit rows are cloned out of the padded batch, so retained
  storage equals the admitted bytes.
- The hardware evidence checker validates each attempt against its own
  mount attestation while still requiring the same physical host and GPUs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-08 12:47:50 -04:00
Joseph MaglyandClaude Opus 5.5 06d20c7015 fix(gpu): admit refinement validation and split-layer forwards honestly
Admit VALIDATE before the iterative-refinement gate, and re-admit EXCISE
afterwards, so strict mode can reject the gate before it materialises.
Treat forward workspace as estimate-only when a decoder layer is split
across devices, since the estimator would charge every participant with
the whole layer; unsplit single- and multi-GPU numbers are unchanged.

Admit the stages that informed/Ouroboros loops, Concept Lab, concept
baseline and evaluation, checkpoint verification and the benchmark script
run outside the main pipeline. Work without a qualified bound is
unmodelled: default mode warns and proceeds, strict mode rejects.

Refs #245

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-08 12:43:01 -04:00
Joseph MaglyandClaude Opus 5.5 2ef2a76792 feat(distributed): verify collective edits fail closed
(cherry picked from commit 2fbc38cd512f1130b4931ba5a7ffaf2e666d3008)

Ported for #244 (part 4/6). Internal-only content from the archived
commit was dropped: .aiwg records and the internal security-docs test.
Doc conflicts keep upstream wording and add only the VERIFY references.
The new Gloo test file carries the gloo marker and a duration entry.
Marked experimental in user docs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-08 11:53:55 -04:00
Joseph MaglyandClaude Opus 5.5 8f3e76a623 fix(gsq): recheck inputs after assembly, validate loader metadata, contain shard refs
- Re-verify consumed shards, progress.json, base-model files, and the
  GSQ/model configs after save_model.py returns; refuse if any changed
  during assembly.
- Require quantization_status "compressed", no input/output activation
  schemes, and the static, non-reordered weight scheme the pinned
  assembler writes.
- Require assembled index references to be plain top-level
  assembler-named shards contained in the output directory.
- Map the GSQ source pin, CLI entrypoint, and docs to the GSQ tests, and
  let mapped non-production paths select their surface tests.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-08 11:35:14 -04:00
Joseph MaglyandClaude Opus 5.5 52e42cc181 feat(distributed): add transactional excise rollback
(cherry picked from commit ba6e1bb45a964dd0980b2e1440debd93cf94da45)

Ported for #244 (part 3/6). Internal-only content from the archived
commit was dropped: .aiwg records and the internal security-docs test.
The new Gloo test file carries the gloo marker and a duration entry.
Marked experimental in user docs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-07 17:35:33 -04:00
Joseph Magly d5ad837760 Merge remote-tracking branch 'upstream/main' into fix/245-phase-admission 2026-10-07 17:30:11 -04:00
Joseph Magly ea31ac953b Merge remote-tracking branch 'upstream/main' into feat/248-portable-gsq 2026-10-07 17:07:09 -04:00
Joseph MaglyandClaude Opus 5.5 a90a734f42 ci: reject unreadable partition coverage and keep the shard count editable
coverage combine only warns on an unreadable input and still combines
the rest, so validate each accepted partition database (readable,
coverage schema, at least one measured file) and fail on any combine
warning. The policy test now pins one positive shard-count constant
rather than its current value.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-07 16:50:47 -04:00
Joseph MaglyandClaude Opus 5.5 18857ca331 ci: split pr-core into selection, core, and Gloo jobs
Replace the in-job concurrent pytest processes with separate jobs, each
with its own runner and 10-minute budget. PR test selection runs once
and publishes the selected list and deterministic duration-balanced
Gloo shard lists (shard count is one constant). PR core tests and the
PR gloo tests matrix upload candidate-bound status, JUnit, logs and
coverage data. The required Pull request core job needs all three,
runs always(), fails closed unless every upstream job succeeded and
every partition that ran supplied coverage, combines accepted data in
an isolated directory, and runs the unchanged changed-line floor.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-07 16:35:24 -04:00
Joseph Magly 3eca37095f Merge remote-tracking branch 'upstream/main' into fix/245-phase-admission 2026-10-07 15:55:59 -04:00
Joseph MaglyandClaude Opus 5.5 ba95833170 Revert three-process Gloo sharding in pr-core
Two real CI runs (37676597269 attempts 1 and 2) showed that two
concurrent Gloo shards oversubscribe the 4-vCPU hosted runner: each
shard took about as long as the whole single Gloo partition did (4m20s
to 4m36s), the core partition slowed from about 50s to 1m40s, and one
cold-start readiness bound failed. Test-step wall time did not improve
(4m38s to 4m40s versus 4m32s to 5m57s). Restore the two-process design.

This reverts commits 8681ef7 and 7f8a2d7.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-07 15:54:57 -04:00
Joseph MaglyandClaude Opus 5.5 7f8a2d7fd0 ci: weight only real gloo marker usage when sharding
Detect the gloo marker by AST so tests that merely mention it in strings
(policy fixtures) do not take a Gloo-sized weight and unbalance the
shards. The duration-inventory policy test shares the same detector.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-07 15:43:00 -04:00
Joseph MaglyandClaude Opus 5.5 8681ef718b ci: shard pr-core Gloo tests across two duration-balanced processes
Split the selected test files into two Gloo shards by deterministic
longest-first assignment over a committed duration table measured from
CI JUnit. Every selected file lands in exactly one shard, so unlisted
Gloo files still run. pr-core now runs three concurrent pytest
processes with the same exit-code, empty-side, artifact and coverage
combine rules; an empty shard never invokes pytest.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-07 15:39:58 -04:00
Joseph MaglyandClaude Opus 5.5 1b936c1dfc feat(distributed): add deterministic probe distill stages
(cherry picked from commit f9a289e267889c297cefcdc67eea92c4b8eb8d4d)

Ported for #244 (part 2/6). Internal-only content from the archived
commit was dropped: .aiwg records and the internal security-docs test.
Marked experimental in user docs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-07 14:00:29 -04:00
Joseph Magly c7cc1ea8b6 Merge remote-tracking branch 'upstream/main' into feat/248-portable-gsq
# Conflicts:
#	ci/test-risk-map.json
2026-10-07 12:51:53 -04:00
Joseph Magly d76e649d87 Merge remote-tracking branch 'upstream/main' into fix/245-phase-admission
# Conflicts:
#	ci/test-risk-map.json
#	obliteratus/abliterate.py
#	tests/test_conditional_gate_scripts.py
2026-10-07 12:37:19 -04:00
Joseph MaglyandClaude Opus 5.5 8844bf8723 feat(gpu): admit per-device phase memory before pipeline work
Add a reusable phase-admission module that estimates per-device demand
(resident weights, activations/KV, staging, logits, edit workspace) for
each pipeline phase and checks it against freshly observed free memory,
utilization ceilings and lifecycle broker grants before the phase starts.
Over-budget phases fail with the device and shortfall. Load admission is
exposed as admit_model_load for reuse by UI reloads.

Refs #245

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-07 12:36:55 -04:00
Joseph MaglyandClaude Opus 5.5 e9a6a43c36 feat(gsq): add portable 2-bit GSQ quantization workflow
Add obliteratus.gsq: a pinned external GSQ source record (repository,
commit, prepared-tree SHA-256, calibration dataset revision), a
fail-closed textual adapter, a generic projection-coverage validator
(Qwen3.5/3.8 hybrid linear attention including in_proj_a/in_proj_b;
Qwen3.8 resolves to 496 projections), a standalone finite-Hessian /
damping / Cholesky-diagnostic guard that runs verbatim inside GSQ, and a
plain-environment fetch/prepare/config/run/validate/assemble CLI.

Rendered configs use num_workers 0 and keep activation capture in RAM;
the adapter asserts every capture batch was filled. No deployment
services, launcher identities, or GPU brokers are involved.

CPU tests cover coverage rejection and non-finite Hessian failure; a
gpu/download/slow conditional gate runs Qwen3.5-0.8B end to end.

Closes #248

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-07 11:33:01 -04:00
Joseph MaglyandClaude Opus 5.5 8066e59c73 feat(distributed): add exact Llama native TP loader
(cherry picked from commit 4caf45b04a8faa55f191b22c069f58714236689b)

Ported for #244 (part 1/6). Internal-only content from the archived
commit was dropped: .aiwg records, internal runner-policy routing, and the
internal security-docs test. Marked experimental in user docs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-07 11:23:27 -04:00
Joseph Magly 985c9e9363 feat: add safe distributed checkpoint intake and preflight 2026-09-04 19:43:53 -04:00
Joseph Magly beb4707401 ci: release tested source snapshots only 2026-08-22 11:28:30 -04:00
Joseph Magly 06e80af7b6 feat: add Jetson contributor validation path 2026-08-21 20:12:35 -04:00
Joseph Magly 38efd3dc0a ci: adopt tiered contributor validation 2026-08-20 23:11:24 -04:00
Joseph Magly b25b3f3b66 fix: harden quantized checkpoint integration 2026-08-16 12:57:17 -04:00
Brian Bell 62b006f6c4 feat: FP8 and NVFP4 checkpoint support (dequantize, surgery in float, BF16 output)
Point obliteratus at an FP8 or NVFP4 checkpoint and it just works:
the loader detects the format from config.json + safetensors metadata
(no weight loads), dequantizes shard-by-shard to a temporary BF16 copy,
then runs the normal float pipeline and saves BF16.

Supported layouts:
- FP8 DeepSeek-style block-wise (weight_scale_inv + weight_block_size)
- FP8 per-channel / per-tensor (compressed-tensors, ModelOpt)
- NVFP4 ModelOpt (uint8 nibbles + FP8 group scales + FP32 global),
  including MIXED_PRECISION checkpoints (FP8 mixer + NVFP4 experts)
- NVFP4 compressed-tensors (reciprocal scales)

Design:
- New pure-torch obliteratus/models/quant_dequant.py; no new deps.
  NVFP4 unpack uses torch.float4_e2m1fn_x2 when a runtime probe proves
  it works, else a chunked nibble LUT (bounds transient int64 index
  memory; a naive implementation OOMed at 96GB on a 30B model).
- Scale keys are dropped only when their base weight exists in the
  same shard, so legitimate params ending in _scale (logit_scale et al.)
  survive.
- Unsupported schemes (fbgemm, quanto, W4A4, ...) fail loudly at load,
  naming the scheme.
- Surgery guards: float8 or packed uint8 reaching _dequantize_weight or
  any fused-MoE path raises RuntimeError instead of silently upcasting
  (bitsandbytes quant_state params are explicitly excluded).
- Save path strips quantization metadata and logs that output is BF16;
  re-quantization for serving is out of scope (llm-compressor/modelopt).
- CLI: new --trust-remote-code flag; help text documents auto-detection.

Validated end-to-end on 1x A100-80GB (see PR description):
Nemotron-3-Nano-Omni-30B NVFP4 (mixed) and FP8, Qwen3-8B-FP8
(block-wise) vs Qwen3-8B BF16 baseline (perplexity 4.23 vs 4.33).
2026-08-16 12:11:07 -04:00
Joseph Magly c90240f1e9 test: govern unavailable conditional environments 2026-08-16 09:05:41 -04:00
Joseph Magly acc6b3b254 test: close Gate 3 tiny-runtime semantics 2026-08-16 07:53:00 -04:00
Joseph Magly bb84e55f77 test: cover tournament and operator UI contracts 2026-08-16 06:18:45 -04:00
Joseph Magly 3574800094 ci: enforce Ruff across all scripts 2026-08-16 03:49:09 -04:00
Joseph Magly a377ceefbd test: add service orchestration contracts 2026-08-16 03:06:46 -04:00
Joseph Magly c74538a2be test: harden checkpoint transaction reliability 2026-08-16 00:28:15 -04:00
Joseph Magly 51529ad1d7 test: add Gate 3 numerical oracle contracts 2026-08-15 20:09:21 -04:00
Joseph Magly 753c53d07f Enforce Gate 3 test quality budgets 2026-08-15 04:33:15 -04:00
Joseph Magly fa99d5a424 fix: bound conditional evidence waivers 2026-08-15 02:00:50 -04:00