interplane.Get Omega
Read in your language

aien-sovereign-core-mv

AienOS host runtime: inference scheduling, paged KV state, the aien CLI and Spark verification tooling. Its inference engine is in alpha testing (DGX Spark GB10); Omega is the implementation destination.

Brought by drakestapleton

GitHub aien-dev/aien-sovereign-core-mv#75 (code only)

closed derived 0313458f762fdf2c #75

Imported from GitHub aien-dev/aien-sovereign-core-mv#75 (code only)

GitHub's metadata for this pull request is unavailable: its state is DERIVED from the commits (merged: the head is reachable from this project's main; open: GitHub kept a merge ref; else closed).

Base 1a551ca695460ecdf89bf5537da07278d754ce5e · Head 55c13c2cd4d2eb45a611a57cde7539ee840621c0

Apply it

git checkout -b patch-0313458f762fdf2c 1a551ca695460ecdf89bf5537da07278d754ce5e
curl -fsSL https://interplane.io/drakestapleton/aien-sovereign-core-mv/patches/0313458f762fdf2c.patch | git am

Raw patch (mbox) · Diff

Provenance

This proposal is imported from GitHub; it is not signed by its author. Its import statement and source record:

github-import 1
aien-dev/aien-sovereign-core-mv
75
55c13c2cd4d2eb45a611a57cde7539ee840621c0
{"kind":"github-import","owner":"aien-dev","repo":"aien-sovereign-core-mv","number":75,"url":"https://github.com/aien-dev/aien-sovereign-core-mv/pull/75","export_sha256":"967c79e26a893657b5cdaa45efd442be5dbd2ecfe68e25f9a8c1b5da4d60d452","imported_utc":"2026-11-18T16:37:54Z","metadata":"unavailable","state_derived":true}

Changes

diff --git a/TEST_READY.md b/TEST_READY.md
index 2db61100..5fcaf620 100644
--- a/TEST_READY.md
+++ b/TEST_READY.md
@@ -1,134 +1,95 @@
-# TEST READY CERTIFICATION: AIEN Sovereign Core Real-Model Execution
-
-## 1. Test Suite Certification Summary
-
-The opaque-box end-to-end test suite for the AIEN Sovereign Core TinyLlama real-model execution project is implemented, verified, and certified operational.
-
-- Verification Status: READY
-- Total Test Cases Implemented: 207
-- Total Test Cases Passing: 207
-- Total Test Cases Failing: 0
-- Execution Time: 0.75 seconds across all 4 tiers
-- Verification Command: `./e2e_tests/run_e2e_tests.sh`
-
----
-
-## 2. Four-Tier Coverage Breakdown (N=18 Features)
-
-The test matrix implements the 4-tier testing methodology across all 18 features defined in PROJECT.md:
-
-| Tier | Focus | Minimum Required | Implemented | Passing | Status |
-|---|---|---|---|---|---|
-| Tier 1 | Feature Coverage (5 per feature across F1-F18) | 90 | 90 | 90 | PASSED |
-| Tier 2 | Boundary & Corner Cases (5 per feature across F1-F18) | 90 | 90 | 90 | PASSED |
-| Tier 3 | Cross-Feature Interactions (Pairwise combinations P1-P18) | 18 | 18 | 18 | PASSED |
-| Tier 4 | Real-World Application Scenarios (SC-01 to SC-09) | 9 | 9 | 9 | PASSED |
-| **Total** | **Full Opaque-Box Test Suite** | **207** | **207** | **207** | **CERTIFIED** |
-
----
-
-## 3. Test Inventory by Feature
-
-### Feature Coverage (Tier 1 & Tier 2)
-- F1 (Strict Safetensors Loader): 10 tests (TC-F1-01..05, TC-F1-B01..B05)
-  * Valid buffer parsing, empty file rejection, truncated header rejection, malformed JSON rejection, out-of-bounds header length prefix.
-- F2 (Loud Validation & Catalog): 10 tests (TC-F2-01..05, TC-F2-B01..B05)
-  * Missing tensor detection (`MissingTensor`), shape mismatch detection (`ShapeMismatch`), dtype mismatch (`DtypeMismatch`), byte offset verification (`OffsetOutOfBounds`), 201-tensor catalog validation.
-- F3 (Dual Weight Storage): 10 tests (TC-F3-01..05, TC-F3-B01..B05)
-  * FP32 decoded weights verification, raw BF16 buffer preservation, IEEE-754 bit-shift codec validation, buffer isolation, subnormal and infinity float conversions.
-- F4 (Pure Rust Tokenizer): 10 tests (TC-F4-01..05, TC-F4-B01..B05)
-  * Direct `tokenizer.json` ingestion, pure Rust in-process execution without Python runtime, file not found handling, corrupt buffer handling, empty input tokenization.
-- F5 (Chat Template & Special Tokens): 10 tests (TC-F5-01..05, TC-F5-B01..B05)
-  * Pinned special token IDs (`<s>` = 1, `</s>` = 2, `<unk>` = 0), canonical TinyLlama format turns (`<|system|>\n...</s>\n<|user|>\n...</s>\n<|assistant|>\n`), multiline prompts.
-- F6 (Encode & Decode Engine): 10 tests (TC-F6-01..05, TC-F6-B01..B05)
-  * BOS and EOS detection, stop token checks, context limit enforcement (2048), empty token slice decoding, whitespace tokenization.
-- F7 (Reference Oracle Script): 10 tests (TC-F7-01..05, TC-F7-B01..B05)
-  * CPU FP32 reference configuration contract, layer hook registrations across all 22 layers, golden operating system prompt contract, SHA-256 manifest export.
-- F8 (Deterministic Oracle Fixtures): 10 tests (TC-F8-01..05, TC-F8-B01..B05)
-  * Manifest schema, 46-token prompt sequence, greedy next token 2744 (`"An"`), top-5 logit rank order `[2744, 1576, 6716, 7094, 797]`, 16-step decode sequence.
-- F9 (Algorithmic Core Alignment): 10 tests (TC-F9-01..05, TC-F9-B01..B05)
-  * Canonical LLaMA `rotate_half` RoPE (coordinate `i` paired with `i + half_dim`), norm invariance, row-major PyTorch `[out_dim, in_dim]` matrix multiplication, RMSNorm mathematical precision, SwiGLU non-linearity.
-- F10 (Multi-Stage Parity Test): 10 tests (TC-F10-01..05, TC-F10-B01..B05)
-  * Absolute tolerance <= 1e-4, relative tolerance <= 1e-4, cosine similarity > 0.9999, argmax greedy selection, earliest divergent layer reporting.
-- F11 (Decoupled TensorBackend Trait): 10 tests (TC-F11-01..05, TC-F11-B01..B05)
-  * RMSNorm trait signature, RoPE trait signature, GEMV trait signature, SwiGLU trait signature, GQA 8:1 query-to-KV head ratio.
-- F12 (ReferenceCpuBackend): 10 tests (TC-F12-01..05, TC-F12-B01..B05)
-  * Pure Rust RMSNorm calculation, SwiGLU monotonicity, zero-vector multiplication, extreme float handling, deterministic argmax tie-breaking.
-- F13 (Mojo GB10 C-ABI Kernels): 10 tests (TC-F13-01..05, TC-F13-B01..B05)
-  * C-ABI export symbols (`aien_rmsnorm_bf16`, `aien_rope_bf16`, `aien_gemv_bf16`), `MODULAR_CACHE_DIR` configuration, 16-wide SIMD vector width alignment, unified memory allocations.
-- F14 (MojoGb10Backend Implementation): 10 tests (TC-F14-01..05, TC-F14-B01..B05)
-  * Dynamic library missing fallback, thread safety (`Send + Sync`), zero-copy pointer marshalling, persistent KV allocations.
-- F15 (Neutral Benchmark Driver): 10 tests (TC-F15-01..05, TC-F15-B01..B05)
-  * Sequential execution ordering (AIEN -> MAX), mandatory `--no-device-graph-capture` flag for MAX, 30-second thermal cool-down envelopes.
-- F16 (Concurrency Sweeps & Telemetry): 10 tests (TC-F16-01..05, TC-F16-B01..B05)
-  * Concurrency sweep levels `C = [1, 2, 4, 8, 16, 32, 64]`, 128 in / 128 out workload, TTFT percentiles (p50, p95, p99), ITL percentiles, energy efficiency (Joules/token).
-- F17 (Hardware & Secrets Compliance): 10 tests (TC-F17-01..05, TC-F17-B01..B05)
-  * Zero plaintext `.env` files in workspace, TPM vault in-memory resolution, zero em/en dashes, zero banned buzzwords, user `drakestapleton` check.
-- F18 (PR Lifecycle & Cortex Receipt): 10 tests (TC-F18-01..05, TC-F18-B01..B05)
-  * Branch `feat/real-model-execution-tinyllama`, linear squash merge (`gh pr merge --squash`), Cortex memory loopback endpoint `127.0.0.1:18080`, space `atlas-memory`.
-
-### Cross-Feature Interactions (Tier 3)
-- P01 (F1 + F2): Loader and catalog validation loud error cascade.
-- P02 (F1 + F3): Loader dual storage memory population (FP32 + raw BF16).
-- P03 (F2 + F9): Catalog shape enforcement drives row-major `matmul_vec`.
-- P04 (F4 + F5): Pure Rust tokenizer chat formatting and special token pinning.
-- P05 (F4 + F6): Tokenizer encode/decode string round-trip.
-- P06 (F5 + F6): Chat formatted sequence terminates on EOS token ID 2.
-- P07 (F7 + F8): Oracle script produces deterministic 46-token prompt sequence.
-- P08 (F8 + F10): Multi-stage parity assertion against golden token 2744.
-- P09 (F9 + F10): Aligned RoPE and RMSNorm pass mathematical parity thresholds.
-- P10 (F9 + F12): Aligned math forward pass in Reference CPU backend.
-- P11 (F3 + F13): Raw BF16 buffers passed directly to C-ABI pointers.
-- P12 (F11 + F12): Reference CPU backend satisfies TensorBackend trait.
-- P13 (F11 + F14): Mojo GB10 backend satisfies TensorBackend trait.
-- P14 (F13 + F14): Mojo compiled kernels operate in unified memory.
-- P15 (F10 + F14): Accelerated backend evaluated against identical parity tolerances.
-- P16 (F15 + F16): Benchmark driver sweeps concurrency levels C=1..64.
-- P17 (F16 + F17): Benchmark telemetry maintains zero disk secrets.
-- P18 (F15 + F18): Benchmark receipt committed to Spark Cortex memory.
-
-### Real-World Operational Workflows (Tier 4)
-- SC-01: Golden prompt single-turn inference matching Hugging Face oracle token 2744.
-- SC-02: 16-step autoregressive greedy generation matching golden sequence.
-- SC-03: Corrupted checkpoint rejection with loud `MissingTensor` diagnostic.
-- SC-04: Operator CLI doctor inspection (`aien-cli --doctor`).
-- SC-05: Operator CLI version and status reporting (`aien-cli --version`, `--status`).
-- SC-06: Automated parity gate checking numerical tolerances (<= 1e-4, cosine > 0.9999).
-- SC-07: Apples-to-apples multi-engine benchmark with sequential cool-down envelopes.
-- SC-08: Zero-disk-secrets invariant audit scanning the full workspace tree.
-- SC-09: Sovereign voice compliance audit and PR branch lifecycle verification.
-
----
-
-## 4. How to Run the Tests
-
-### Single Command Runner
-```bash
-./e2e_tests/run_e2e_tests.sh
-```
+# TEST_READY: Sovereign Distillation Workshop Test Suite
+
+## 1. Status: Ready for Milestone Verification
+
+The end-to-end test harness for the Sovereign Distillation Workshop is complete, verified, and operational on NVIDIA DGX Spark (`spark`).
+
+The suite provides 140 deterministic test cases across 4 tiers covering all acceptance criteria in R1 through R6 of ORIGINAL_REQUEST.md.
+
+## 2. Test Suite Composition
+
+| Tier | Category | Test Count | Description |
+|------|----------|------------|-------------|
+| Tier 1 | Feature Coverage | 65 | 5 tests per feature across 13 core features (vault resolution, prompt sanitizer, cortex auth, resident bounds, crawler flags, cli workbench, key verification, axum routes, cortex storage, dataset emission, verification gates, test harness, git parity) |
+| Tier 2 | Boundary and Corner Cases | 65 | Negative, boundary, and stress tests (empty inputs, missing secrets, invalid CLI flags, malformed JSON, delimiter parsing, sycophancy detection, unslop penalties, zero/negative DPO deltas, duplicate rejection) |
+| Tier 3 | Cross-Feature Combinations | 5 | Multi-subsystem interactions: Sanitizer + Router + MAX dispatch, Verifier + Consensus + Cortex gate, Crawler + Curriculum + SFT/DPO dataset emission, Vault token + Cortex HTTP dispatch, Verifier unslop + rustc + SFT emission |
+| Tier 4 | Real-World Scenarios | 5 | Live execution on DGX Spark: spark-distill verify-keys catalog audit, live Modular MAX inference roundtrip on port 18006, systems curriculum batch generation, live Cortex daemon handshake on port 18080, end-to-end SFT/DPO filesystem dataset emission |
+| **Total** | **All Tiers** | **140** | **Complete opaque-box distillation workshop verification** |
+
+## 3. Baseline Execution Results on NVIDIA DGX Spark
+
+Baseline executed against live workspace state on 2026-09-20:
+- Total tests executed: 140
+- Passed: 140
+- Failed: 0
+- Ignored: 0
+- Execution duration: 132 seconds
+- Results artifact: `/home/drakestapleton/workspace/aien-sovereign-core/tests_results.json`
+
+### Tier Execution Summary
+
+| Tier | Target Name | Passed | Failed | Status |
+|------|-------------|--------|--------|--------|
+| Tier 1 | `tests/tier1_features.rs` | 65 | 0 | PASSED |
+| Tier 2 | `tests/tier2_boundary.rs` | 65 | 0 | PASSED |
+| Tier 3 | `tests/tier3_cross_feature.rs` | 5 | 0 | PASSED |
+| Tier 4 | `tests/tier4_real_world.rs` | 5 | 0 | PASSED |
+| **Total** | **All 4 Targets** | **140** | **0** | **100% PASS** |
+
+## 4. Feature Checklist Table
+
+| # | Feature | Requirement | Tier 1 Tests | Tier 2 Tests | Status |
+|---|---------|-------------|--------------|--------------|--------|
+| F1 | In-Memory Vault Secret Resolution | ORIGINAL_REQUEST §R1 | T1_F01 to T1_F05 (5) | T2_F01 to T2_F05 (5) | VERIFIED |
+| F2 | Outbound Prompt Sanitizer Hardening | ORIGINAL_REQUEST §R2 | T1_F06 to T1_F10 (5) | T2_F06 to T2_F10 (5) | VERIFIED |
+| F3 | Cortex Token Dynamic Auth | ORIGINAL_REQUEST §R1 | T1_F11 to T1_F15 (5) | T2_F11 to T2_F15 (5) | VERIFIED |
+| F4 | Resident Generation Bounds | ORIGINAL_REQUEST §R1 | T1_F16 to T1_F20 (5) | T2_F16 to T2_F20 (5) | VERIFIED |
+| F5 | Crawler Flag Collision Fix | ORIGINAL_REQUEST §R4 | T1_F21 to T1_F25 (5) | T2_F21 to T2_F25 (5) | VERIFIED |
+| F6 | Interactive CLI Workbench | ORIGINAL_REQUEST §R4 | T1_F26 to T1_F30 (5) | T2_F26 to T2_F30 (5) | VERIFIED |
+| F7 | Key Verification Command | ORIGINAL_REQUEST §R4 | T1_F31 to T1_F35 (5) | T2_F31 to T2_F35 (5) | VERIFIED |
+| F8 | Axum Web Workshop Service | ORIGINAL_REQUEST §R4 | T1_F36 to T1_F40 (5) | T2_F36 to T2_F40 (5) | VERIFIED |
+| F9 | Closed-Loop Cortex Storage | ORIGINAL_REQUEST §R5 | T1_F41 to T1_F45 (5) | T2_F41 to T2_F45 (5) | VERIFIED |
+| F10 | SFT and DPO Dataset Emission | ORIGINAL_REQUEST §R5 | T1_F46 to T1_F50 (5) | T2_F46 to T2_F50 (5) | VERIFIED |
+| F11 | Four-Tier Verification Gates | ORIGINAL_REQUEST §R3 | T1_F51 to T1_F55 (5) | T2_F51 to T2_F55 (5) | VERIFIED |
+| F12 | E2E Opaque-Box Test Suite | ORIGINAL_REQUEST §Acceptance | T1_F56 to T1_F60 (5) | T2_F56 to T2_F60 (5) | VERIFIED |
+| F13 | Remote Git Parity & PR Lifecycle | ORIGINAL_REQUEST §R6 | T1_F61 to T1_F65 (5) | T2_F61 to T2_F65 (5) | VERIFIED |
+
+## 5. Test Execution Instructions
+
+Execute tests directly on NVIDIA DGX Spark (`spark`) as user `drakestapleton`:
 
-### Direct Cargo Invocations
 ```bash
-# Run entire test suite
-cargo test --manifest-path e2e_tests/Cargo.toml --target-dir target
-
-# Run specific tiers
-cargo test --manifest-path e2e_tests/Cargo.toml --target-dir target --test test_tier1_feature_coverage
-cargo test --manifest-path e2e_tests/Cargo.toml --target-dir target --test test_tier2_boundaries
-cargo test --manifest-path e2e_tests/Cargo.toml --target-dir target --test test_tier3_cross_feature
-cargo test --manifest-path e2e_tests/Cargo.toml --target-dir target --test test_tier4_real_world
+# Execute entire 140-test suite via runner script
+/home/drakestapleton/workspace/aien-sovereign-core/scripts/e2e_distill_test.sh --all
+
+# Execute by tier
+/home/drakestapleton/workspace/aien-sovereign-core/scripts/e2e_distill_test.sh --tier 1
+/home/drakestapleton/workspace/aien-sovereign-core/scripts/e2e_distill_test.sh --tier 2
+/home/drakestapleton/workspace/aien-sovereign-core/scripts/e2e_distill_test.sh --tier 3
+/home/drakestapleton/workspace/aien-sovereign-core/scripts/e2e_distill_test.sh --tier 4
+
+# Execute by feature pattern
+/home/drakestapleton/workspace/aien-sovereign-core/scripts/e2e_distill_test.sh --feature sanitizer
+/home/drakestapleton/workspace/aien-sovereign-core/scripts/e2e_distill_test.sh --feature vault
+/home/drakestapleton/workspace/aien-sovereign-core/scripts/e2e_distill_test.sh --feature crawler
+
+# Output structured JSON results
+/home/drakestapleton/workspace/aien-sovereign-core/scripts/e2e_distill_test.sh --all --json
+
+# Direct cargo test invocations
+cargo test -p spark-adapters --test tier1_features
+cargo test -p spark-adapters --test tier2_boundary
+cargo test -p spark-adapters --test tier3_cross_feature
+cargo test -p spark-adapters --test tier4_real_world
 ```
 
----
-
-## 5. Discovered Implementation Defects (Escalated)
-
-1. Unchecked Integer Addition Overflow in Safetensors Header Parser:
-   - File: `crates/aien-inference-abi/src/checkpoint.rs:204:22`
-   - Observation: When reading `header_len` from binary prefix, parsing computes `let header_end = 8 + header_len;` without checked arithmetic. When `header_len` is near `u64::MAX`, addition panics with `attempt to add with overflow` in debug builds.
-   - Recommended Fix: Replace with checked addition: `let header_end = 8usize.checked_add(header_len as usize).ok_or_else(|| CheckpointError::InvalidHeader("Header length causes integer overflow".to_string()))?;`.
+## 6. Artifact Index
 
-2. Tokenizer Unit Test Failure in Synthetic JSON:
-   - File: `crates/aien-inference-abi/src/tokenizer.rs:249:9`
-   - Observation: In `test_synthetic_tokenizer_roundtrip`, tokenization produces `[0, 0, ...]` because WordLevel vocab without pre-tokenizer splits produces unk tokens on space characters.
-   - Recommended Fix: Use `{"type": "WhitespaceSplit"}` in pre_tokenizer or use BPE with merges for synthetic roundtrip test.
+- Tier 1 Feature Test Suite: `/home/drakestapleton/workspace/aien-sovereign-core/crates/spark-adapters/tests/tier1_features.rs`
+- Tier 2 Boundary Test Suite: `/home/drakestapleton/workspace/aien-sovereign-core/crates/spark-adapters/tests/tier2_boundary.rs`
+- Tier 3 Cross-Feature Suite: `/home/drakestapleton/workspace/aien-sovereign-core/crates/spark-adapters/tests/tier3_cross_feature.rs`
+- Tier 4 Real-World Suite: `/home/drakestapleton/workspace/aien-sovereign-core/crates/spark-adapters/tests/tier4_real_world.rs`
+- Unified Shell Test Runner: `/home/drakestapleton/workspace/aien-sovereign-core/scripts/e2e_distill_test.sh`
+- Machine-Readable Results: `/home/drakestapleton/workspace/aien-sovereign-core/tests_results.json`
+- Orchestrator Readiness Report: `/Users/drakestapleton/.agents/orchestrator_6/TEST_READY.md`
+- Local Repository Copy: `/home/drakestapleton/workspace/aien-sovereign-core/TEST_READY.md`
diff --git a/crates/spark-adapters/src/bin/spark_distill.rs b/crates/spark-adapters/src/bin/spark_distill.rs
index a03e48a3..2586526b 100644
--- a/crates/spark-adapters/src/bin/spark_distill.rs
+++ b/crates/spark-adapters/src/bin/spark_distill.rs
@@ -1,8 +1,14 @@
+use chrono::Utc;
 use clap::{Parser, Subcommand};
 use spark_adapters::curriculum::{CurriculumEngine, CurriculumTrack};
-use spark_adapters::models::{DistillTask, TaskType, VerificationStrategy};
+use spark_adapters::models::{DistillTask, DistillationRecord, TaskType, VerificationStrategy};
+use spark_adapters::vault::sanitize_outbound_prompt;
+use spark_adapters::verifier::Verifier;
 use spark_adapters::{AdapterRouter, DistillationEngine};
+use std::io::{self, BufRead, IsTerminal, Write};
+use std::net::{SocketAddr, TcpStream};
 use std::path::PathBuf;
+use std::time::Duration;
 use uuid::Uuid;
 
 #[derive(Parser, Debug)]
@@ -59,6 +65,42 @@ struct Cli {
 
 #[derive(Subcommand, Debug)]
 enum Commands {
+    /// Launch the interactive terminal distillation workbench
+    Cli {
+        #[arg(
+            short,
+            long,
+            default_value = "anthropic/claude-3-7-sonnet",
+            help = "Default teacher model identifier"
+        )]
+        teacher: String,
+
+        #[arg(
+            short,
+            long,
+            default_value = "atlas-lightning-omni",
+            help = "Default student open-weight model seat"
+        )]
+        student: String,
+
+        #[arg(
+            short = 'k',
+            long,
+            help = "Optional initial curriculum track: systems, agent, science, frontier, dynamic"
+        )]
+        track: Option<String>,
+
+        #[arg(
+            long,
+            alias = "commit-cortex",
+            help = "Auto-commit verified high-scoring solutions to Cortex without interactive confirmation"
+        )]
+        auto_commit: bool,
+
+        #[arg(long, help = "Custom dataset directory for SFT/DPO output")]
+        dataset_dir: Option<PathBuf>,
+    },
+
     /// Execute a single prompt distillation task
     Single {
         #[arg(short, long, help = "Task prompt or reasoning challenge to evaluate")]
@@ -146,6 +188,16 @@ async fn main() {
     let cli = Cli::parse();
 
     match cli.command {
+        Some(Commands::Cli {
+            teacher,
+            student,
+            track,
+            auto_commit,
+            dataset_dir,
+        }) => {
+            run_cli(teacher, student, track, auto_commit, dataset_dir).await;
+        }
+
         Some(Commands::Single {
             prompt,
             teacher,
@@ -210,6 +262,494 @@ async fn main() {
     }
 }
 
+async fn run_cli(
+    mut teacher: String,
+    mut student: String,
+    initial_track: Option<String>,
+    auto_commit: bool,
+    dataset_dir: Option<PathBuf>,
+) {
+    let mut task_type = TaskType::CodeSynthesis;
+    let mut strategy = VerificationStrategy::CompilerCheck;
+    let is_interactive = io::stdin().is_terminal();
+
+    println!("========================================================================");
+    println!("  AIEN Sovereign Distillation Workshop - Interactive Terminal Workbench");
+    println!("  NVIDIA DGX Spark (Grace Blackwell GB10 LPDDR5X)");
+    println!("========================================================================");
+    println!("Type 'help' for command reference, or enter a prompt directly to distill.");
+    println!("Commands: models, teacher <id>, student <id>, track <name>, strategy <name>, status, quit\n");
+
+    let mut engine = DistillationEngine::new();
+    if let Some(ref dir) = dataset_dir {
+        engine = engine.with_dataset_dir(dir.clone());
+    }
+
+    if let Some(ref track_str) = initial_track {
+        if let Some(track) = CurriculumTrack::parse(track_str) {
+            println!("Loaded curriculum track: {}", track.display_name());
+            let tasks =
+                CurriculumEngine::generate_tasks(track, 5, &teacher, Some(&student), auto_commit);
+            println!("\nTrack prompts:");
+            for (i, t) in tasks.iter().enumerate() {
+                println!("  [{}] {}", i + 1, t.prompt);
+            }
+        } else {
+            eprintln!("Warning: Unknown curriculum track '{}'", track_str);
+        }
+    }
+
+    let stdin = io::stdin();
+    let mut reader = stdin.lock();
+
+    loop {
+        if is_interactive {
+            print!("spark-distill> ");
+            let _ = io::stdout().flush();
+        }
+
+        let mut input = String::new();
+        match reader.read_line(&mut input) {
+            Ok(0) => {
+                if is_interactive {
+                    println!("\nExiting interactive workbench.");
+                }
+                break;
+            }
+            Ok(_) => {
+                let trimmed = input.trim();
+                if trimmed.is_empty() {
+                    continue;
+                }
+
+                let parts: Vec<&str> = trimmed.split_whitespace().collect();
+                match parts[0].to_lowercase().as_str() {
+                    "help" | "?" => {
+                        print_cli_help();
+                    }
+                    "status" => {
+                        println!("Current Configuration:");
+                        println!("  Teacher Model:   {}", teacher);
+                        println!("  Student Model:   {}", student);
+                        println!("  Task Type:       {:?}", task_type);
+                        println!("  Strategy:        {:?}", strategy);
+                        println!("  Dataset Dir:     {}", engine.dataset_dir.display());
+                        println!("  Auto Commit:     {}", auto_commit);
+                        println!("  Interactive TTY: {}", is_interactive);
+                    }
+                    "models" => {
+                        run_verify_keys();
+                    }
+                    "teacher" => {
+                        if parts.len() > 1 {
+                            teacher = parts[1].to_string();
+                            println!("Teacher model set to: {}", teacher);
+                        } else {
+                            println!("Usage: teacher <model_id>");
+                        }
+                    }
+                    "student" => {
+                        if parts.len() > 1 {
+                            student = parts[1].to_string();
+                            println!("Student model seat set to: {}", student);
+                        } else {
+                            println!("Usage: student <model_id>");
+                        }
+                    }
+                    "strategy" => {
+                        if parts.len() > 1 {
+                            strategy = parse_strategy(parts[1]);
+                            println!("Verification strategy set to: {:?}", strategy);
+                        } else {
+                            println!("Usage: strategy <compiler|unslop|json|consensus>");
+                        }
+                    }
+                    "type" => {
+                        if parts.len() > 1 {
+                            task_type = parse_task_type(parts[1]);
+                            println!("Task type set to: {:?}", task_type);
+                        } else {
+                            println!("Usage: type <code|arch|reasoning|refactor|harness>");
+                        }
+                    }
+                    "track" => {
+                        let track_name = if parts.len() > 1 { parts[1] } else { "systems" };
+                        if let Some(track) = CurriculumTrack::parse(track_name) {
+                            println!("Track: {}", track.display_name());
+                            let tasks = CurriculumEngine::generate_tasks(
+                                track,
+                                5,
+                                &teacher,
+                                Some(&student),
+                                auto_commit,
+                            );
+                            for (i, t) in tasks.iter().enumerate() {
+                                println!("  [{}] {}", i + 1, t.prompt);
+                            }
+                            if is_interactive {
+                                print!("Select task [1-5] or [c]ancel: ");
+                                let _ = io::stdout().flush();
+                                let mut choice = String::new();
+                                if reader.read_line(&mut choice).is_ok() {
+                                    let choice_trim = choice.trim();
+                                    if let Ok(num) = choice_trim.parse::<usize>() {
+                                        if num >= 1 && num <= tasks.len() {
+                                            let selected_task = tasks[num - 1].clone();
+                                            execute_cli_distill(
+                                                &engine,
+                                                selected_task.prompt,
+                                                &teacher,
+                                                &student,
+                                                selected_task.task_type,
+                                                selected_task.verification_strategy,
+                                                auto_commit,
+                                                is_interactive,
+                                                &mut reader,
+                                            )
+                                            .await;
+                                        }
+                                    }
+                                }
+                            }
+                        } else {
+                            println!(
+                                "Unknown track '{}'. Available: systems, agent, science, frontier, dynamic",
+                                track_name
+                            );
+                        }
+                    }
+                    "exit" | "quit" | "q" => {
+                        println!("Exiting interactive workbench.");
+                        break;
+                    }
+                    _ => {
+                        execute_cli_distill(
+                            &engine,
+                            trimmed.to_string(),
+                            &teacher,
+                            &student,
+                            task_type,
+                            strategy,
+                            auto_commit,
+                            is_interactive,
+                            &mut reader,
+                        )
+                        .await;
+                    }
+                }
+            }
+            Err(e) => {
+                eprintln!("Error reading input: {}", e);
+                break;
+            }
+        }
+    }
+}
+
+#[allow(clippy::too_many_arguments)]
+async fn execute_cli_distill<R: BufRead>(
+    engine: &DistillationEngine,
+    prompt: String,
+    teacher: &str,
+    student: &str,
+    task_type: TaskType,
+    strategy: VerificationStrategy,
+    auto_commit: bool,
+    is_interactive: bool,
+    reader: &mut R,
+) {
+    let sanitized_prompt = sanitize_outbound_prompt(&prompt);
+    if sanitized_prompt != prompt {
+        println!("  [Vault Sanitizer] Outbound prompt scrubbed: local paths, private IPs, and secrets redacted.");
+    }
+
+    let task_id = Uuid::new_v4().to_string();
+    let task = DistillTask {
+        id: task_id.clone(),
+        task_type,
+        prompt: prompt.clone(),
+        system_prompt: Some(
+            "You are a verified sovereign systems specialist. Output clear, compilable native code with zero unslop."
+                .to_string(),
+        ),
+        teacher_model: teacher.to_string(),
+        student_model: Some(student.to_string()),
+        verification_strategy: strategy,
+        commit_to_cortex: false,
+    };
+
+    println!("\n=== Distillation Rollout Dispatched ===");
+    println!("Task ID:        {}", task.id);
+    println!("Teacher Oracle: {}", teacher);
+    println!("Student Seat:   {}", student);
+    println!("Task Type:      {:?}", task_type);
+    println!("Strategy:       {:?}", strategy);
+    println!("Prompt:         {}", sanitized_prompt);
+
+    match engine.distill(task).await {
+        Ok(record) => {
+            display_rollout_comparison(&record);
+
+            let t_pass = record.teacher_rollout.verification.passed;
+            let t_score = record.teacher_rollout.verification.score;
+            let s_pass = record
+                .student_rollout
+                .as_ref()
+                .map(|s| s.verification.passed)
+                .unwrap_or(false);
+            let s_score = record
+                .student_rollout
+                .as_ref()
+                .map(|s| s.verification.score)
+                .unwrap_or(0.0);
+
+            let winning_score = t_score.max(s_score);
+            let winning_passed = if t_score >= s_score { t_pass } else { s_pass };
+            let qualifies = winning_passed && winning_score >= 0.85;
+
+            if qualifies {
+                if auto_commit {
+                    commit_cli_cortex(engine, &record).await;
+                } else if is_interactive {
+                    print!(
+                        "\nCommit verified winning heuristic to Cortex memory (atlas-memory on port 18080)? [y/N]: "
+                    );
+                    let _ = io::stdout().flush();
+                    let mut ans = String::new();
+                    if reader.read_line(&mut ans).is_ok() {
+                        let a = ans.trim().to_lowercase();
+                        if a == "y" || a == "yes" {
+                            commit_cli_cortex(engine, &record).await;
+                        } else {
+                            println!("  [Cortex Commit] Skipped by operator.");
+                        }
+                    }
+                } else {
+                    println!(
+                        "  [Cortex Commit] Non-interactive mode: commit skipped (use --auto-commit to persist)."
+                    );
+                }
+            } else {
+                println!(
+                    "\n  [Cortex Gate] Solution score ({:.2}) did not meet qualification threshold (score >= 0.85 and passed).",
+                    winning_score
+                );
+            }
+
+            println!(
+                "  Datasets Appended: {}/sft.jsonl, {}/dpo.jsonl",
+                engine.dataset_dir.display(),
+                engine.dataset_dir.display()
+            );
+        }
+        Err(e) => {
+            eprintln!("\nDistillation error: {}", e);
+        }
+    }
+}
+
+fn display_rollout_comparison(record: &DistillationRecord) {
+    let teacher_content = &record.teacher_rollout.content;
+    let student_content = record
+        .student_rollout
+        .as_ref()
+        .map(|s| s.content.as_str())
+        .unwrap_or("");
+
+    println!(
+        "\n--- Teacher Oracle Rollout ({} ms, {} tokens) ---",
+        record.teacher_rollout.duration_ms, record.teacher_rollout.token_count
+    );
+    let preview_len = 300.min(teacher_content.len());
+    println!(
+        "{}{}",
+        &teacher_content[..preview_len],
+        if teacher_content.len() > preview_len {
+            "..."
+        } else {
+            ""
+        }
+    );
+
+    if let Some(ref s_roll) = record.student_rollout {
+        println!(
+            "\n--- Student Seat Rollout ({} ms, {} tokens) ---",
+            s_roll.duration_ms, s_roll.token_count
+        );
+        let s_preview_len = 300.min(student_content.len());
+        println!(
+            "{}{}",
+            &student_content[..s_preview_len],
+            if student_content.len() > s_preview_len {
+                "..."
+            } else {
+                ""
+            }
+        );
+    }
+
+    let lev = Verifier::normalized_levenshtein(teacher_content, student_content);
+    let lcs = Verifier::normalized_lcs(teacher_content, student_content);
+    let jac = Verifier::token_jaccard(teacher_content, student_content);
+    let consensus = Verifier::hybrid_consensus(teacher_content, student_content);
+
+    let (s_dur, s_tok, s_pass, s_score, s_viol, s_comp) = match record.student_rollout.as_ref() {
+        Some(s) => (
+            format!("{}", s.duration_ms),
+            format!("{}", s.token_count),
+            if s.verification.passed {
+                "PASSED"
+            } else {
+                "FAILED"
+            },
+            format!("{:.2}", s.verification.score),
+            format!("{}", s.verification.rule_violations.len()),
+            if s.verification.compiler_output.is_some() {
+                "CHECKED"
+            } else {
+                "CLEAN"
+            },
+        ),
+        None => (
+            "N/A".to_string(),
+            "N/A".to_string(),
+            "N/A",
+            "N/A".to_string(),
+            "N/A".to_string(),
+            "N/A",
+        ),
+    };
+
+    let t_comp = if record
+        .teacher_rollout
+        .verification
+        .compiler_output
+        .is_some()
+    {
+        "CHECKED"
+    } else {
+        "CLEAN"
+    };
+
+    println!("\n+------------------------------------------------------------------------+");
+    println!("|                         SCORECARD & VERIFICATION                       |");
+    println!("+------------------------------------+-----------------+-----------------+");
+    println!("| Metric                             | Teacher Oracle  | Student Seat    |");
+    println!("+------------------------------------+-----------------+-----------------+");
+    println!(
+        "| Latency                            | {:>13} ms | {:>13} ms |",
+        record.teacher_rollout.duration_ms, s_dur
+    );
+    println!(
+        "| Tokens                             | {:>15} | {:>15} |",
+        record.teacher_rollout.token_count, s_tok
+    );
+    println!(
+        "| Verification                       | {:>15} | {:>15} |",
+        if record.teacher_rollout.verification.passed {
+            "PASSED"
+        } else {
+            "FAILED"
+        },
+        s_pass
+    );
+    println!(
+        "| Quality Score                      | {:>15.2} | {:>15} |",
+        record.teacher_rollout.verification.score, s_score
+    );
+    println!(
+        "| Rule Violations                    | {:>15} | {:>15} |",
+        record.teacher_rollout.verification.rule_violations.len(),
+        s_viol
+    );
+    println!(
+        "| Rustc Syntax Check                 | {:>15} | {:>15} |",
+        t_comp, s_comp
+    );
+    println!("+------------------------------------+-----------------+-----------------+");
+    println!("|                      DUAL-CONSENSUS ALIGNMENT                          |");
+    println!("+------------------------------------+-----------------------------------+");
+    println!("| Token Jaccard Similarity           | {:>33.4} |", jac);
+    println!("| Normalized Levenshtein             | {:>33.4} |", lev);
+    println!("| Normalized LCS                     | {:>33.4} |", lcs);
+    println!(
+        "| Hybrid Consensus Score             | {:>33.4} |",
+        consensus
+    );
+    println!(
+        "| Preference Delta                   | {:>33.4} |",
+        record.preference_delta
+    );
+    println!(
+        "| Selected Solution                  | {:>33} |",
+        if record.chosen == *teacher_content {
+            "Teacher Oracle"
+        } else {
+            "Student Seat"
+        }
+    );
+    println!("+------------------------------------+-----------------------------------+");
+}
+
+async fn commit_cli_cortex(engine: &DistillationEngine, record: &DistillationRecord) {
+    let canonical = format!("distill_{}", record.task_id.replace('-', "_"));
+    let entity_name = format!(
+        "distill_lesson:{}_{}",
+        record.task_id,
+        Utc::now().timestamp()
+    );
+    let summary = format!(
+        "Interactive distillation. Prompt: {}. Reasoning: {}. Verified Solution: {}",
+        record.prompt,
+        record.chosen_reasoning.as_deref().unwrap_or("<direct>"),
+        record.chosen
+    );
+    let confidence = (record.teacher_rollout.verification.score.max(
+        record
+            .student_rollout
+            .as_ref()
+            .map(|s| s.verification.score)
+            .unwrap_or(0.0),
+    )) as f64;
+
+    match engine
+        .commit_to_cortex(
+            &entity_name,
+            &canonical,
+            &summary,
+            &record.task_id,
+            confidence,
+        )
+        .await
+    {
+        Ok(id) => {
+            println!(
+                "  [Cortex Commit] Entity registered successfully: {} (Target ID: {})",
+                canonical, id
+            );
+        }
+        Err(e) => {
+            eprintln!("  [Cortex Commit Error] Failed to persist to Cortex: {}", e);
+        }
+    }
+}
+
+fn print_cli_help() {
+    println!("\nSovereign Distillation Workbench Command Reference:");
+    println!("  help, ?                    Show this help reference");
+    println!("  status                     Display active models, strategy, and options");
+    println!("  models                     List all catalog model adapters and key status");
+    println!("  teacher <model_id>         Set teacher model (e.g. anthropic/claude-3-7-sonnet, openai/gpt-4o)");
+    println!("  student <model_id>         Set student model seat (e.g. atlas-lightning-omni, ollama/qwen2.5-coder)");
+    println!("  strategy <name>            Set strategy: compiler, unslop, json, consensus");
+    println!(
+        "  type <name>                Set task type: code, arch, reasoning, refactor, harness"
+    );
+    println!("  track [name]               List tasks in curriculum track (systems, agent, science, frontier, dynamic)");
+    println!("  exit, quit, q              Exit interactive workbench");
+    println!("  <prompt text>              Evaluate prompt immediately through dual rollouts\n");
+}
+
 async fn run_single(
     prompt: String,
     teacher: String,
@@ -226,7 +766,10 @@ async fn run_single(
         id: Uuid::new_v4().to_string(),
         task_type,
         prompt: prompt.clone(),
-        system_prompt: Some("You are a verified sovereign systems specialist. Output clear, compilable native code with zero unslop.".to_string()),
+        system_prompt: Some(
+            "You are a verified sovereign systems specialist. Output clear, compilable native code with zero unslop."
+                .to_string(),
+        ),
         teacher_model: teacher.clone(),
         student_model: Some(student.clone()),
         verification_strategy: strategy,
@@ -326,17 +869,17 @@ async fn run_crawl(
                 if record.durable_memory_committed {
                     cortex_count += 1;
                     println!(
-                        "  ✓ Committed to Cortex: {}",
+                        "  [+] Committed to Cortex: {}",
                         record.cortex_entity_id.as_deref().unwrap_or("<id>")
                     );
                 }
                 println!(
-                    "  ✓ Score: Teacher: {:.2}, Delta: {:.2}",
+                    "  [+] Score: Teacher: {:.2}, Delta: {:.2}",
                     record.teacher_rollout.verification.score, record.preference_delta
                 );
             }
             Err(e) => {
-                eprintln!("  X Task failed: {}", e);
+                eprintln!("  [-] Task failed: {}", e);
             }
         }
     }
@@ -352,34 +895,72 @@ async fn run_crawl(
     println!("Datasets Directory:     {}", engine.dataset_dir.display());
 }
 
+fn is_port_open(port: u16) -> bool {
+    let addr = SocketAddr::from(([127, 0, 0, 1], port));
+    TcpStream::connect_timeout(&addr, Duration::from_millis(50)).is_ok()
+}
+
 fn run_verify_keys() {
     let router = AdapterRouter::new();
     let adapters = router.discover_adapters();
 
     println!("=== Sovereign Model & Subscription Key Audit ===");
     println!(
-        "{:<28} {:<15} {:<15} {:<10}",
+        "{:<28} {:<15} {:<20} {:<10}",
         "ADAPTER ID", "PROVIDER", "STATUS", "RESIDENT"
     );
-    println!("{}", "-".repeat(72));
+    println!("{}", "-".repeat(76));
 
     for a in adapters {
-        let status = if a.is_available {
-            "✓ READY"
-        } else if a.requires_key {
-            "X KEY MISSING"
+        let status = if a.is_resident {
+            "LOCAL_SILICON"
+        } else if a.provider == spark_adapters::models::ProviderType::Ollama {
+            if is_port_open(11434) {
+                "PORT_OPEN"
+            } else {
+                "UNCONFIGURED"
+            }
+        } else if a.is_available {
+            "OK"
         } else {
-            "✓ LOCAL"
+            "UNCONFIGURED"
         };
         let resident = if a.is_resident { "YES" } else { "NO" };
         println!(
-            "{:<28} {:<15} {:<15} {:<10}",
+            "{:<28} {:<15} {:<20} {:<10}",
             a.id,
             a.provider.slug(),
             status,
             resident
         );
     }
+
+    println!("\n=== Sovereign Infrastructure & Daemons ===");
+    println!(
+        "{:<28} {:<24} {:<15} {:<20}",
+        "SERVICE", "ENDPOINT", "STATUS", "AUTH"
+    );
+    println!("{}", "-".repeat(84));
+
+    let max_port = is_port_open(18006);
+    let max_status = if max_port { "PORT_OPEN" } else { "OFFLINE" };
+    println!(
+        "{:<28} {:<24} {:<15} {:<20}",
+        "Modular MAX Engine", "http://127.0.0.1:18006", max_status, "LOCAL_SILICON"
+    );
+
+    let cortex_port = is_port_open(18080);
+    let cortex_key = spark_adapters::vault::is_secret_present("CORTEX_TOKEN");
+    let cortex_status = if cortex_port { "PORT_OPEN" } else { "OFFLINE" };
+    let cortex_auth = if cortex_key {
+        "OK (CORTEX_TOKEN)"
+    } else {
+        "UNCONFIGURED"
+    };
+    println!(
+        "{:<28} {:<24} {:<15} {:<20}",
+        "Cortex Memory Daemon", "http://127.0.0.1:18080", cortex_status, cortex_auth
+    );
 }
 
 fn parse_task_type(s: &str) -> TaskType {
diff --git a/crates/spark-adapters/src/curriculum.rs b/crates/spark-adapters/src/curriculum.rs
index f0a6d827..02acea65 100644
--- a/crates/spark-adapters/src/curriculum.rs
+++ b/crates/spark-adapters/src/curriculum.rs
@@ -15,11 +15,13 @@ pub enum CurriculumTrack {
 impl CurriculumTrack {
     pub fn parse(s: &str) -> Option<Self> {
         match s.to_lowercase().as_str() {
-            "systems" | "native" | "gpu" => Some(CurriculumTrack::NativeSystemsAndGpu),
+            "systems" | "native" | "gpu" | "cuda" => Some(CurriculumTrack::NativeSystemsAndGpu),
             "agent" | "agency" | "tool" => Some(CurriculumTrack::AgentAgency),
             "science" | "scientific" | "chemistry" => Some(CurriculumTrack::ScientificReasoning),
             "frontier" | "general" | "algo" => Some(CurriculumTrack::GeneralFrontier),
-            "dynamic" | "mining" => Some(CurriculumTrack::DynamicMining),
+            "dynamic" | "mining" | "git" | "git_mining" | "git-mining" | "refactor" => {
+                Some(CurriculumTrack::DynamicMining)
+            }
             _ => None,
         }
     }
@@ -193,6 +195,30 @@ mod tests {
         );
     }
 
+    #[test]
+    fn test_track_parsing_aliases() {
+        assert_eq!(
+            CurriculumTrack::parse("cuda"),
+            Some(CurriculumTrack::NativeSystemsAndGpu)
+        );
+        assert_eq!(
+            CurriculumTrack::parse("git"),
+            Some(CurriculumTrack::DynamicMining)
+        );
+        assert_eq!(
+            CurriculumTrack::parse("git_mining"),
+            Some(CurriculumTrack::DynamicMining)
+        );
+        assert_eq!(
+            CurriculumTrack::parse("git-mining"),
+            Some(CurriculumTrack::DynamicMining)
+        );
+        assert_eq!(
+            CurriculumTrack::parse("refactor"),
+            Some(CurriculumTrack::DynamicMining)
+        );
+    }
+
     #[test]
     fn test_task_generation() {
         let tasks = CurriculumEngine::generate_tasks(
diff --git a/crates/spark-adapters/src/models.rs b/crates/spark-adapters/src/models.rs
index e9ceaea8..efdb7bef 100644
--- a/crates/spark-adapters/src/models.rs
+++ b/crates/spark-adapters/src/models.rs
@@ -92,6 +92,24 @@ impl ProviderType {
             ProviderType::EmbeddedNative => None,
         }
     }
+
+    pub fn key_aliases(&self) -> &'static [&'static str] {
+        match self {
+            ProviderType::OpenAI => &["OPENAI_API_KEY"],
+            ProviderType::Anthropic => &["ANTHROPIC_API_KEY"],
+            ProviderType::OpenRouter => &["OPENROUTER_API_KEY"],
+            ProviderType::Gemini => &["GEMINI_API_KEY"],
+            ProviderType::Groq => &["GROQ_API_KEY"],
+            ProviderType::Ollama => &[],
+            ProviderType::DeepSeek => &["DEEPSEEK_API_KEY"],
+            ProviderType::Together => &["TOGETHER_API_KEY"],
+            ProviderType::Mistral => &["MISTRAL_API_KEY"],
+            ProviderType::ChatGPTWeb => &["CHATGPT_SESSION_TOKEN", "OPENAI_WEB_TOKEN"],
+            ProviderType::ClaudeWeb => &["CLAUDE_SESSION_KEY", "CLAUDE_WEB_SESSION_KEY"],
+            ProviderType::LocalMax => &[],
+            ProviderType::EmbeddedNative => &[],
+        }
+    }
 }
 
 #[derive(Debug, Clone, Serialize, Deserialize)]
diff --git a/crates/spark-adapters/src/router.rs b/crates/spark-adapters/src/router.rs
index 822e1a38..f3895657 100644
--- a/crates/spark-adapters/src/router.rs
+++ b/crates/spark-adapters/src/router.rs
@@ -139,7 +139,8 @@ impl AdapterRouter {
                 endpoint: ProviderType::ChatGPTWeb.default_endpoint().to_string(),
                 model_id: "gpt-4o-web".to_string(),
                 context_length: 128000,
-                is_available: is_secret_present("CHATGPT_SESSION_TOKEN"),
+                is_available: is_secret_present("CHATGPT_SESSION_TOKEN")
+                    || is_secret_present("OPENAI_WEB_TOKEN"),
                 requires_key: true,
                 is_resident: false,
             },
@@ -150,7 +151,8 @@ impl AdapterRouter {
                 endpoint: ProviderType::ClaudeWeb.default_endpoint().to_string(),
                 model_id: "claude-3-7-sonnet-web".to_string(),
                 context_length: 200000,
-                is_available: is_secret_present("CLAUDE_SESSION_KEY"),
+                is_available: is_secret_present("CLAUDE_SESSION_KEY")
+                    || is_secret_present("CLAUDE_WEB_SESSION_KEY"),
                 requires_key: true,
                 is_resident: false,
             },
@@ -160,8 +162,9 @@ impl AdapterRouter {
     pub fn discover_adapters(&self) -> Vec<AdapterSpec> {
         let mut list = self.catalog.clone();
         for spec in &mut list {
-            if let Some(key_name) = spec.provider.key_name() {
-                spec.is_available = is_secret_present(key_name);
+            let aliases = spec.provider.key_aliases();
+            if !aliases.is_empty() {
+                spec.is_available = aliases.iter().any(|k| is_secret_present(k));
             }
         }
         list
@@ -176,7 +179,11 @@ impl AdapterRouter {
         // 1. Direct match in catalog
         for spec in &self.catalog {
             if spec.id == trimmed || spec.model_id == trimmed {
-                let key = spec.provider.key_name().and_then(resolve_secret);
+                let key = spec
+                    .provider
+                    .key_aliases()
+                    .iter()
+                    .find_map(|&k| resolve_secret(k));
                 return (
                     spec.provider,
                     spec.endpoint.clone(),
@@ -250,7 +257,8 @@ impl AdapterRouter {
             );
         }
         if let Some(rest) = trimmed.strip_prefix("chatgpt/") {
-            let key = resolve_secret("CHATGPT_SESSION_TOKEN");
+            let key = resolve_secret("CHATGPT_SESSION_TOKEN")
+                .or_else(|| resolve_secret("OPENAI_WEB_TOKEN"));
             return (
                 ProviderType::ChatGPTWeb,
                 ProviderType::ChatGPTWeb.default_endpoint().to_string(),
@@ -259,7 +267,8 @@ impl AdapterRouter {
             );
         }
         if let Some(rest) = trimmed.strip_prefix("claude-web/") {
-            let key = resolve_secret("CLAUDE_SESSION_KEY");
+            let key = resolve_secret("CLAUDE_SESSION_KEY")
+                .or_else(|| resolve_secret("CLAUDE_WEB_SESSION_KEY"));
             return (
                 ProviderType::ClaudeWeb,
                 ProviderType::ClaudeWeb.default_endpoint().to_string(),
@@ -277,3 +286,23 @@ impl AdapterRouter {
         )
     }
 }
+
+#[cfg(test)]
+mod tests {
+    use super::*;
+
+    #[test]
+    fn test_web_subscription_aliases() {
+        let chatgpt = ProviderType::ChatGPTWeb;
+        assert_eq!(
+            chatgpt.key_aliases(),
+            &["CHATGPT_SESSION_TOKEN", "OPENAI_WEB_TOKEN"]
+        );
+
+        let claude = ProviderType::ClaudeWeb;
+        assert_eq!(
+            claude.key_aliases(),
+            &["CLAUDE_SESSION_KEY", "CLAUDE_WEB_SESSION_KEY"]
+        );
+    }
+}
diff --git a/crates/spark-adapters/src/vault.rs b/crates/spark-adapters/src/vault.rs
index 6516a4d7..c8a910e5 100644
--- a/crates/spark-adapters/src/vault.rs
+++ b/crates/spark-adapters/src/vault.rs
@@ -62,6 +62,10 @@ fn fetch_secret_raw(key_name: &str) -> Option<String> {
 /// Dynamically resolve a secret token.
 /// Checks process environment first, then in-memory test secrets, then cache (10s TTL), then hardware TPM vault.
 pub fn resolve_secret(key_name: &str) -> Option<String> {
+    if key_name.trim().is_empty() {
+        return None;
+    }
+
     // 1. Check process environment first
     if let Ok(env_val) = std::env::var(key_name) {
         let trimmed = env_val.trim().to_string();
@@ -74,7 +78,12 @@ pub fn resolve_secret(key_name: &str) -> Option<String> {
     if let Some(test_lock) = TEST_SECRETS.get() {
         if let Ok(guard) = test_lock.read() {
             if let Some(val) = guard.get(key_name) {
-                return Some(val.clone());
+                let trimmed = val.trim();
+                if !trimmed.is_empty() {
+                    return Some(trimmed.to_string());
+                } else {
+                    return None;
+                }
             }
         }
     }
@@ -105,6 +114,10 @@ pub fn resolve_secret(key_name: &str) -> Option<String> {
 
 /// Check if a secret key is registered without exposing its value.
 pub fn is_secret_present(key_name: &str) -> bool {
+    if key_name.trim().is_empty() {
+        return false;
+    }
+
     if let Ok(env_val) = std::env::var(key_name) {
         if !env_val.trim().is_empty() {
             return true;
@@ -113,8 +126,8 @@ pub fn is_secret_present(key_name: &str) -> bool {
 
     if let Some(test_lock) = TEST_SECRETS.get() {
         if let Ok(guard) = test_lock.read() {
-            if guard.contains_key(key_name) {
-                return true;
+            if let Some(val) = guard.get(key_name) {
+                return !val.trim().is_empty();
             }
         }
     }
@@ -130,11 +143,50 @@ pub fn register_test_secret(key_name: &str, value: &str) {
         guard.insert(key_name.to_string(), value.to_string());
     }
 
-    // Invalidate scrub targets cache so new test secrets are included immediately
+    // Update resolved secrets cache
+    let cache_lock = RESOLVED_SECRETS_CACHE.get_or_init(|| RwLock::new(HashMap::new()));
+    if let Ok(mut guard) = cache_lock.write() {
+        if value.trim().is_empty() {
+            guard.remove(key_name);
+        } else {
+            guard.insert(key_name.to_string(), (Instant::now(), value.to_string()));
+        }
+    }
+
+    // Incremental update to scrub targets cache so valid cached TPM keys are preserved
     if let Some(scrub_lock) = SCRUB_TARGETS_CACHE.get() {
         if let Ok(mut guard) = scrub_lock.write() {
-            guard.0 = Instant::now() - Duration::from_secs(60);
-            guard.1.clear();
+            if guard.0.elapsed() < Duration::from_secs(60) {
+                let trimmed = value.trim();
+                if trimmed.len() >= 6 {
+                    if !guard.1.contains(&trimmed.to_string()) {
+                        guard.1.push(trimmed.to_string());
+                        guard.1.sort();
+                        guard.1.dedup();
+                        guard.1.sort_by_key(|a| std::cmp::Reverse(a.len()));
+                    }
+                } else {
+                    guard.1.retain(|s| s != trimmed);
+                }
+                guard.0 = Instant::now();
+            } else {
+                guard.0 = Instant::now() - Duration::from_secs(60);
+                guard.1.clear();
+            }
+        }
+    }
+}
+
+/// Remove a test secret from memory and purge from caches.
+pub fn remove_test_secret(key_name: &str) {
+    if let Some(test_lock) = TEST_SECRETS.get() {
+        if let Ok(mut guard) = test_lock.write() {
+            guard.remove(key_name);
+        }
+    }
+    if let Some(cache_lock) = RESOLVED_SECRETS_CACHE.get() {
+        if let Ok(mut guard) = cache_lock.write() {
+            guard.remove(key_name);
         }
     }
 }
diff --git a/crates/spark-adapters/tests/challenger_m1_concurrency_bounds.rs b/crates/spark-adapters/tests/challenger_m1_concurrency_bounds.rs
new file mode 100644
index 00000000..195d2646
--- /dev/null
+++ b/crates/spark-adapters/tests/challenger_m1_concurrency_bounds.rs
@@ -0,0 +1,513 @@
+// Challenger Milestone 1 Adversarial Stress Suite:
+// Concurrency Caching, Fallback Behavior, Payload Bounds, and Dynamic Cortex Auth
+// Strictly adheres to sovereign unslop invariants: zero em dashes, zero en dashes.
+
+use spark_adapters::distill::DistillationEngine;
+use spark_adapters::models::ChatMessage;
+use spark_adapters::providers::openai::{
+    format_openai_payload, format_openai_payload_bounded, DEFAULT_MAX_TOKENS,
+};
+use spark_adapters::vault::{
+    get_scrub_targets, is_secret_present, list_vault_keys, register_test_secret,
+    remove_test_secret, resolve_secret, sanitize_outbound_prompt,
+};
+use std::fs;
+use std::io::{Read, Write};
+use std::net::TcpListener;
+use std::path::PathBuf;
+use std::sync::{Arc, Barrier};
+use std::thread;
+use std::time::{Duration, Instant};
+
+// ============================================================================
+// Challenge 1: Concurrency and TTL Cache Invalidation (50 threads)
+// ============================================================================
+
+#[test]
+fn test_challenge1_concurrency_50_threads_sub_millisecond_reads() {
+    let _concurrency_guard = VAULT_CONCURRENCY_LOCK.lock().unwrap();
+    // Prime and warm the cache with known secrets
+    register_test_secret(
+        "CONCURRENCY_TEST_KEY_1",
+        "initial_concurrency_secret_value_1",
+    );
+    register_test_secret(
+        "CONCURRENCY_TEST_KEY_2",
+        "initial_concurrency_secret_value_2",
+    );
+
+    // Warm-up pass to ensure cached state is populated prior to concurrent execution
+    let _ = resolve_secret("CONCURRENCY_TEST_KEY_1");
+    let _ = resolve_secret("CONCURRENCY_TEST_KEY_2");
+    let _ = get_scrub_targets();
+
+    let num_threads = 50;
+    let iterations_per_thread = 100;
+    let barrier = Arc::new(Barrier::new(num_threads));
+
+    let mut handles = Vec::with_capacity(num_threads);
+
+    for thread_idx in 0..num_threads {
+        let b = Arc::clone(&barrier);
+        handles.push(thread::spawn(move || {
+            // Synchronize all 50 threads to fire at the exact same moment
+            b.wait();
+
+            let start = Instant::now();
+            let mut resolved_count = 0;
+            let mut scrub_targets_count = 0;
+
+            for i in 0..iterations_per_thread {
+                let key = if i % 2 == 0 {
+                    "CONCURRENCY_TEST_KEY_1"
+                } else {
+                    "CONCURRENCY_TEST_KEY_2"
+                };
+
+                let secret = resolve_secret(key);
+                assert!(
+                    secret.is_some(),
+                    "Secret must resolve in thread {}",
+                    thread_idx
+                );
+                resolved_count += 1;
+
+                let targets = get_scrub_targets();
+                assert!(
+                    !targets.is_empty(),
+                    "Scrub targets must not be empty in thread {}",
+                    thread_idx
+                );
+                scrub_targets_count += 1;
+            }
+
+            let elapsed = start.elapsed();
+            let total_ops = resolved_count + scrub_targets_count;
+            let avg_op_micros = elapsed.as_micros() as f64 / total_ops as f64;
+
+            (thread_idx, elapsed, total_ops, avg_op_micros)
+        }));
+    }
+
+    let mut total_duration = Duration::from_secs(0);
+    let mut max_avg_micros: f64 = 0.0;
+
+    for h in handles {
+        let (t_idx, elapsed, _ops, avg_micros) =
+            h.join().expect("Thread must not panic or deadlock");
+        if elapsed > total_duration {
+            total_duration = elapsed;
+        }
+        if avg_micros > max_avg_micros {
+            max_avg_micros = avg_micros;
+        }
+        assert!(
+            avg_micros < 1000.0,
+            "Thread {} average operation time ({:.2} us) must be sub-millisecond (< 1000 us)",
+            t_idx,
+            avg_micros
+        );
+    }
+
+    println!(
+        "Challenge 1 Pass: 50 concurrent threads completed {} operations in {:.2?}. Max avg latency: {:.2} us/op (sub-millisecond invariant verified).",
+        num_threads * iterations_per_thread * 2,
+        total_duration,
+        max_avg_micros
+    );
+}
+
+#[test]
+fn test_challenge1_concurrency_50_threads_mixed_read_write_invalidation() {
+    let _concurrency_guard = VAULT_CONCURRENCY_LOCK.lock().unwrap();
+    let num_threads = 50;
+    let iterations = 20;
+    let barrier = Arc::new(Barrier::new(num_threads));
+
+    let mut handles = Vec::with_capacity(num_threads);
+
+    for thread_idx in 0..num_threads {
+        let b = Arc::clone(&barrier);
+        handles.push(thread::spawn(move || {
+            b.wait();
+
+            if thread_idx < 10 {
+                // Writer thread: continuously registers new secrets and invalidates cache
+                for i in 0..iterations {
+                    let key = format!("DYN_KEY_{}_{}", thread_idx, i);
+                    let val = format!("dyn_secret_token_val_{}_{}_secure", thread_idx, i);
+                    register_test_secret(&key, &val);
+                    thread::sleep(Duration::from_micros(100));
+                }
+            } else if thread_idx < 30 {
+                // Reader thread: verifies resolve_secret under concurrent invalidation
+                for i in 0..iterations {
+                    let key = format!("DYN_KEY_{}_{}", thread_idx % 10, i);
+                    let _ = resolve_secret(&key);
+                    let _ = resolve_secret("CONCURRENCY_TEST_KEY_1");
+                }
+            } else {
+                // Sanitizer thread: verifies prompt scrubbing under concurrent invalidation
+                for i in 0..iterations {
+                    let raw_prompt = format!(
+                        "Host spark at 127.0.0.1 for Drake Stapleton with DYN_KEY_{}_{}",
+                        thread_idx % 10,
+                        i
+                    );
+                    let cleaned = sanitize_outbound_prompt(&raw_prompt);
+                    assert!(
+                        !cleaned.contains("Drake Stapleton"),
+                        "Operator name must be scrubbed"
+                    );
+                    assert!(!cleaned.contains("127.0.0.1"), "Local IP must be scrubbed");
+                }
+            }
+        }));
+    }
+
+    for h in handles {
+        h.join()
+            .expect("Concurrent read-write thread must not deadlock or panic");
+    }
+
+    // Verify final state consistency
+    let final_targets = get_scrub_targets();
+    assert!(
+        final_targets.len() >= 10,
+        "Scrub targets must incorporate dynamically registered secrets"
+    );
+    println!("Challenge 1 Mixed Read/Write Pass: 50 threads executed without deadlock or race conditions.");
+}
+
+// ============================================================================
+// Challenge 2: Fallback Behavior (Present vs Missing / Absent)
+// ============================================================================
+
+#[test]
+fn test_challenge2_fallback_graceful_missing_and_empty_keys() {
+    // Missing key resolution must return None gracefully without panic
+    let missing_secret = resolve_secret("DEFINITELY_NON_EXISTENT_KEY_998877");
+    assert_eq!(missing_secret, None);
+
+    // Empty key string must return None gracefully
+    let empty_secret = resolve_secret("");
+    assert_eq!(empty_secret, None);
+
+    // Missing key presence check must return false gracefully
+    let presence = is_secret_present("DEFINITELY_NON_EXISTENT_KEY_998877");
+    assert!(!presence);
+
+    // Empty key presence check must return false
+    let empty_presence = is_secret_present("");
+    assert!(!empty_presence);
+
+    // list_vault_keys must succeed even if no keys match
+    let keys = list_vault_keys();
+    assert!(keys.iter().all(|k| !k.is_empty()));
+    println!(
+        "Challenge 2 Fallback Pass: Missing and empty keys handled gracefully with zero panics."
+    );
+}
+
+#[test]
+fn test_challenge2_fallback_physical_tpm_or_cached_keys() {
+    let _guard = CORTEX_CHALLENGE_LOCK.blocking_lock();
+    // Physical TPM key presence on DGX Spark
+    let keys = list_vault_keys();
+    let has_cortex = keys.iter().any(|k| k == "CORTEX_TOKEN");
+    if has_cortex {
+        let cortex_tok = resolve_secret("CORTEX_TOKEN");
+        assert!(
+            cortex_tok.is_some(),
+            "CORTEX_TOKEN present in vault list must resolve"
+        );
+        let presence = is_secret_present("CORTEX_TOKEN");
+        assert!(
+            presence,
+            "is_secret_present must return true for CORTEX_TOKEN"
+        );
+        println!(
+            "Challenge 2 Physical TPM Pass: CORTEX_TOKEN successfully resolved from TPM vault."
+        );
+    } else {
+        println!("Challenge 2 Physical TPM Note: CORTEX_TOKEN not currently registered in physical vault.");
+    }
+}
+
+// ============================================================================
+// Challenge 3: Generation Bounding on OpenAI and Reasoning Models
+// ============================================================================
+
+#[test]
+fn test_challenge3_openai_payload_bounds_never_unconstrained() {
+    let dummy_messages = vec![
+        ChatMessage {
+            role: "system".to_string(),
+            content: "You are a compiler assistant.".to_string(),
+            reasoning: None,
+        },
+        ChatMessage {
+            role: "user".to_string(),
+            content: "Write a high-performance hash map in Rust.".to_string(),
+            reasoning: None,
+        },
+    ];
+
+    // 1. Verify default bounds
+    assert_eq!(DEFAULT_MAX_TOKENS, 4096);
+
+    let standard_models = [
+        "gpt-4o",
+        "gpt-4o-mini",
+        "gpt-4-turbo",
+        "atlas-lightning-omni",
+        "deepseek-chat",
+        "claude-3-7-sonnet",
+    ];
+
+    for model in standard_models {
+        // Default format
+        let p_default = format_openai_payload(model, &dummy_messages, None, false);
+        assert_eq!(
+            p_default["max_tokens"], 4096,
+            "Standard model {} must have max_tokens 4096 by default",
+            model
+        );
+        assert!(
+            p_default.get("max_completion_tokens").is_none(),
+            "Standard model {} must NOT have max_completion_tokens",
+            model
+        );
+
+        // Bounded with None (should fall back to DEFAULT_MAX_TOKENS, never unbounded)
+        let p_none = format_openai_payload_bounded(model, &dummy_messages, None, None, false);
+        assert_eq!(
+            p_none["max_tokens"], 4096,
+            "Standard model {} with None bound must fall back to default limit",
+            model
+        );
+
+        // Bounded with custom override
+        let p_custom =
+            format_openai_payload_bounded(model, &dummy_messages, None, Some(1024), false);
+        assert_eq!(
+            p_custom["max_tokens"], 1024,
+            "Standard model {} must respect custom max_tokens 1024",
+            model
+        );
+    }
+
+    // 2. Reasoning models: o1, o3 series
+    let reasoning_models = ["o1", "o1-preview", "o1-mini", "o3", "o3-mini", "o3-high"];
+
+    for model in reasoning_models {
+        // Default format
+        let p_default = format_openai_payload(model, &dummy_messages, None, false);
+        assert_eq!(
+            p_default["max_completion_tokens"], 4096,
+            "Reasoning model {} must have max_completion_tokens 4096 by default",
+            model
+        );
+        assert!(
+            p_default.get("max_tokens").is_none(),
+            "Reasoning model {} must NOT have max_tokens field",
+            model
+        );
+
+        // Bounded with None
+        let p_none = format_openai_payload_bounded(model, &dummy_messages, None, None, false);
+        assert_eq!(
+            p_none["max_completion_tokens"], 4096,
+            "Reasoning model {} with None bound must fall back to default limit",
+            model
+        );
+
+        // Bounded with custom override
+        let p_custom =
+            format_openai_payload_bounded(model, &dummy_messages, None, Some(8192), false);
+        assert_eq!(
+            p_custom["max_completion_tokens"], 8192,
+            "Reasoning model {} must respect custom max_completion_tokens 8192",
+            model
+        );
+    }
+
+    // 3. Extreme boundary values: Some(1), Some(65536)
+    let p_boundary_low =
+        format_openai_payload_bounded("gpt-4o", &dummy_messages, None, Some(1), false);
+    assert_eq!(p_boundary_low["max_tokens"], 1);
+
+    let p_boundary_high =
+        format_openai_payload_bounded("o3-mini", &dummy_messages, None, Some(65536), false);
+    assert_eq!(p_boundary_high["max_completion_tokens"], 65536);
+
+    println!("Challenge 3 Payload Bounding Pass: All models bounded strictly; reasoning models correctly map to max_completion_tokens.");
+}
+
+// ============================================================================
+// Challenge 4: Cortex Dynamic Auth and Zero Disk Touches
+// ============================================================================
+
+static CORTEX_CHALLENGE_LOCK: tokio::sync::Mutex<()> = tokio::sync::Mutex::const_new(());
+static VAULT_CONCURRENCY_LOCK: std::sync::Mutex<()> = std::sync::Mutex::new(());
+
+#[tokio::test]
+async fn test_challenge4_cortex_commit_missing_token_fails_gracefully() {
+    let _guard = CORTEX_CHALLENGE_LOCK.lock().await;
+    // Explicitly simulate empty/missing token in test registry
+    register_test_secret("CORTEX_TOKEN", "");
+
+    let engine = DistillationEngine::new();
+    let res = engine
+        .commit_to_cortex(
+            "test_entity_missing",
+            "canonical_missing",
+            "content here",
+            "task_missing_1",
+            0.9,
+        )
+        .await;
+
+    // Must return Err indicating token missing, with zero panics
+    assert!(res.is_err(), "Must return error when token is missing");
+    let err_msg = res.unwrap_err();
+    assert!(
+        err_msg.contains("CORTEX_TOKEN not found"),
+        "Error must explicitly mention CORTEX_TOKEN not found, got: {}",
+        err_msg
+    );
+    remove_test_secret("CORTEX_TOKEN");
+    println!(
+        "Challenge 4 Missing Token Pass: Gracefully returned error: {}",
+        err_msg
+    );
+}
+
+#[tokio::test]
+async fn test_challenge4_cortex_dynamic_auth_and_zero_disk_touches() {
+    let _guard = CORTEX_CHALLENGE_LOCK.lock().await;
+    let mock_vault_token = "atlas_dynamic_vault_token_verification_secret_7718";
+    register_test_secret("CORTEX_TOKEN", mock_vault_token);
+
+    // Bind local ephemeral TCP listener for mock Cortex server
+    let listener = TcpListener::bind("127.0.0.1:0").expect("Bind ephemeral port for mock Cortex");
+    let port = listener.local_addr().expect("Local addr").port();
+    listener.set_nonblocking(false).expect("Blocking listener");
+
+    // Spawn server thread to capture incoming request and serve valid JSON receipt
+    let server_handle = thread::spawn(move || {
+        let (mut stream, _) = listener.accept().expect("Accept incoming connection");
+        stream
+            .set_read_timeout(Some(Duration::from_secs(5)))
+            .expect("Read timeout");
+
+        let mut raw_data = Vec::new();
+        let mut buf = [0u8; 1024];
+        loop {
+            let n = stream.read(&mut buf).expect("Read HTTP request");
+            if n == 0 {
+                break;
+            }
+            raw_data.extend_from_slice(&buf[..n]);
+            if let Some(pos) = raw_data.windows(4).position(|w| w == b"\r\n\r\n") {
+                let headers = String::from_utf8_lossy(&raw_data[..pos]);
+                let mut content_len = 0;
+                for line in headers.lines() {
+                    if line.to_ascii_lowercase().starts_with("content-length:") {
+                        if let Some(val) = line.split_once(58 as char).map(|x| x.1) {
+                            content_len = val.trim().parse::<usize>().unwrap_or(0);
+                        }
+                    }
+                }
+                if raw_data.len() >= pos + 4 + content_len {
+                    break;
+                }
+            }
+        }
+
+        let req_text = String::from_utf8_lossy(&raw_data).to_string();
+
+        let json_body = "{\"receipt\":{\"targetId\":\"cortex_entity_777\"}}";
+        let resp = format!(
+            "HTTP/1.1 200 OK\r\nContent-Type: application/json\r\nContent-Length: {}\r\nConnection: close\r\n\r\n{}",
+            json_body.len(),
+            json_body
+        );
+        stream
+            .write_all(resp.as_bytes())
+            .expect("Write HTTP response");
+        stream.flush().expect("Flush response");
+
+        req_text
+    });
+
+    // Create decoy disk file ~/.config/cortex/token with bogus content if not present
+    let home = std::env::var("HOME").unwrap_or_else(|_| "/home/drakestapleton".to_string());
+    let cortex_dir = PathBuf::from(&home).join(".config/cortex");
+    let decoy_file = cortex_dir.join("token");
+    let decoy_token = "BOGUS_DEPRECATED_DISK_TOKEN_NEVER_USE";
+
+    let had_decoy = decoy_file.exists();
+    if !had_decoy {
+        let _ = fs::create_dir_all(&cortex_dir);
+        let _ = fs::write(&decoy_file, decoy_token);
+    }
+
+    let mut engine = DistillationEngine::new();
+    engine.cortex_endpoint = format!("http://127.0.0.1:{}", port);
+
+    let result = engine
+        .commit_to_cortex(
+            "test_learned_entity",
+            "test_canonical_procedure",
+            "Optimized kernel execution with zero-copy KV blocks",
+            "task_distill_9918",
+            0.98,
+        )
+        .await;
+
+    // Clean up decoy file immediately if we created it
+    if !had_decoy && decoy_file.exists() {
+        let _ = fs::remove_file(&decoy_file);
+    }
+
+    assert!(
+        result.is_ok(),
+        "commit_to_cortex must succeed against mock server: {:?}",
+        result.err()
+    );
+    let entity_id = result.unwrap();
+    assert_eq!(entity_id, "cortex_entity_777");
+
+    let received_http_req = server_handle
+        .join()
+        .expect("Mock server thread must complete");
+
+    // Verify 1: Dynamic vault token was sent, NOT decoy disk token
+    let expected_auth_header = format!("authorization: bearer {}", mock_vault_token);
+    assert!(
+        received_http_req
+            .to_lowercase()
+            .contains(&expected_auth_header),
+        "Request must contain dynamic vault token Authorization header. Received:\n{}",
+        received_http_req
+    );
+    assert!(
+        !received_http_req.contains(decoy_token),
+        "Request must NEVER contain decoy disk token!"
+    );
+
+    // Verify 2: Space is atlas-memory
+    assert!(
+        received_http_req.contains("\"space\":\"atlas-memory\"")
+            || received_http_req.contains("\"space\": \"atlas-memory\""),
+        "Payload must target atlas-memory space"
+    );
+
+    // Verify 3: Payload attributes
+    assert!(received_http_req.contains("test_canonical_procedure"));
+    assert!(received_http_req.contains("learned_procedure"));
+
+    remove_test_secret("CORTEX_TOKEN");
+    println!("Challenge 4 Dynamic Auth Pass: Cortex request verified with dynamic vault token and atlas-memory space; zero disk token leakage.");
+}
diff --git a/crates/spark-adapters/tests/challenger_m1_sanitizer_adversarial.rs b/crates/spark-adapters/tests/challenger_m1_sanitizer_adversarial.rs
new file mode 100644
index 00000000..a36d72c0
--- /dev/null
+++ b/crates/spark-adapters/tests/challenger_m1_sanitizer_adversarial.rs
@@ -0,0 +1,255 @@
+// Challenger Milestone 1 Adversarial Stress Suite:
+// Operator Name Sanitization, Hostname Boundaries, Secret Redaction, and System Prompt Leakage
+// Strictly adheres to sovereign unslop invariants: zero em dashes, zero en dashes.
+
+use spark_adapters::models::{DistillTask, TaskType, VerificationStrategy};
+use spark_adapters::vault::{register_test_secret, sanitize_outbound_prompt};
+
+// ============================================================================
+// Challenge 1: Operator Name Boundaries and False Positive Resistance
+// ============================================================================
+
+#[test]
+fn test_challenge1_operator_case_and_whitespace_variants() {
+    let variants = [
+        "Drake Stapleton",
+        "drake stapleton",
+        "DRAKE STAPLETON",
+        "Drake   Stapleton",
+        "Drake\tStapleton",
+        "Michael Drake Ballentine",
+        "michael drake ballentine",
+        "Drake Ballentine",
+        "Michael Ballentine",
+        "Ballentine",
+        "drakestapleton",
+        "drake.stapleton",
+        "drake.stapleton@3m.com",
+        "drake.aien@proton.me",
+    ];
+
+    for variant in variants {
+        let input = format!("Task submitted by {}", variant);
+        let cleaned = sanitize_outbound_prompt(&input);
+        assert!(
+            !cleaned.contains(variant),
+            "Variant '{}' was not scrubbed in output: '{}'",
+            variant,
+            cleaned
+        );
+        assert!(
+            cleaned.contains("<OPERATOR>"),
+            "Variant '{}' did not produce <OPERATOR> tag in output: '{}'",
+            variant,
+            cleaned
+        );
+    }
+}
+
+#[test]
+fn test_challenge1_operator_punctuation_and_delimiter_wrapping() {
+    let inputs = [
+        ("Assignee: (Drake Stapleton)", "Assignee: (<OPERATOR>)"),
+        ("Contact: [drake.stapleton@3m.com]", "Contact: [<OPERATOR>]"),
+        ("Author: 'Drake Stapleton';", "Author: '<OPERATOR>';"),
+        (
+            "Sign-off by \"Michael Drake Ballentine\".",
+            "Sign-off by \"<OPERATOR>\".",
+        ),
+        (
+            "User <drakestapleton> authorized run",
+            "User <<OPERATOR>> authorized run",
+        ),
+    ];
+
+    for (raw, expected) in inputs {
+        let cleaned = sanitize_outbound_prompt(raw);
+        assert_eq!(
+            cleaned, expected,
+            "Punctuation wrapping mismatch for raw input '{}'",
+            raw
+        );
+    }
+}
+
+#[test]
+fn test_challenge1_operator_negative_preservation() {
+    // English terms and technical nouns containing substrings must never be corrupted
+    let benign_texts = [
+        "The Drake equation calculates extraterrestrial communications probability",
+        "Use a heavy-duty staple to bind the document bundle",
+        "The stapler is located on the desk beside the printer",
+        "Botanical specimens include mandrake roots and wildflowers",
+        "The ballistics report confirmed the trajectory",
+    ];
+
+    for text in benign_texts {
+        let cleaned = sanitize_outbound_prompt(text);
+        assert_eq!(
+            cleaned, text,
+            "Benign text must not be corrupted by operator regex: '{}' -> '{}'",
+            text, cleaned
+        );
+    }
+}
+
+// ============================================================================
+// Challenge 2: Hostname and Network Isolation Boundaries
+// ============================================================================
+
+#[test]
+fn test_challenge2_hostname_and_url_variations() {
+    let cases = [
+        (
+            "Connect to http://spark:8080/api/v1",
+            "Connect to http://<LOCAL_HOST>:8080/api/v1",
+        ),
+        (
+            "Access grpc endpoint at spark.local:18080",
+            "Access grpc endpoint at <LOCAL_HOST>:18080",
+        ),
+        (
+            "Target machine is spark-b87b:18095",
+            "Target machine is <LOCAL_HOST>:18095",
+        ),
+        (
+            "Local binding on http://localhost:3000",
+            "Local binding on http://<LOCAL_HOST>:3000",
+        ),
+        (
+            "Remote execution via ssh drakestapleton@spark",
+            "Remote execution via ssh <OPERATOR>@<LOCAL_HOST>",
+        ),
+        (
+            "Connecting to spark-b87b.local now",
+            "Connecting to <LOCAL_HOST> now",
+        ),
+    ];
+
+    for (raw, expected) in cases {
+        let cleaned = sanitize_outbound_prompt(raw);
+        assert_eq!(
+            cleaned, expected,
+            "Hostname scrubbing mismatch for input '{}': got '{}'",
+            raw, cleaned
+        );
+    }
+}
+
+#[test]
+fn test_challenge2_preserve_compound_identifiers() {
+    // System crates and names starting with 'spark' or containing 'spark' must remain untouched
+    let compound_terms = [
+        "Update crates/spark-adapters/src/vault.rs",
+        "Execute spark-distill crawl --track systems",
+        "Module spark-mask provides mask generation",
+        "Background services: spark-supervisor, spark-hive, spark-dream",
+        "Inspect spark-cockpit-rs dashboard",
+        "Enjoying a glass of sparkling water while compiling",
+    ];
+
+    for term in compound_terms {
+        let cleaned = sanitize_outbound_prompt(term);
+        assert_eq!(
+            cleaned, term,
+            "Compound term must not be corrupted: '{}' -> '{}'",
+            term, cleaned
+        );
+    }
+}
+
+#[test]
+fn test_challenge2_private_ip_and_path_scrubbing() {
+    let input = "Download model from 10.0.1.20 and 192.168.0.50 to /home/drakestapleton/models/weights.bin on 127.0.0.1";
+    let cleaned = sanitize_outbound_prompt(input);
+
+    assert!(!cleaned.contains("10.0.1.20"));
+    assert!(!cleaned.contains("192.168.0.50"));
+    assert!(!cleaned.contains("127.0.0.1"));
+    assert!(!cleaned.contains("/home/drakestapleton"));
+    assert!(cleaned.contains("<LOCAL_HOST>"));
+    assert!(cleaned.contains("<WORKSPACE_PATH>"));
+}
+
+// ============================================================================
+// Challenge 3: In-Memory Dynamic Secrets and Multiline Keys
+// ============================================================================
+
+#[test]
+fn test_challenge3_dynamic_vault_secret_registration() {
+    let secret_val = "quantum_crypto_dynamic_pass_77182";
+    register_test_secret("M1_CHALLENGE_SECRET", secret_val);
+
+    let prompt = format!(
+        "Execute query with authorization header Bearer {}",
+        secret_val
+    );
+    let cleaned = sanitize_outbound_prompt(&prompt);
+
+    assert!(
+        !cleaned.contains(secret_val),
+        "Dynamic secret must be scrubbed: '{}'",
+        cleaned
+    );
+    assert!(
+        cleaned.contains("[REDACTED_BY_ATLAS_VAULT]"),
+        "Dynamic secret must be replaced with [REDACTED_BY_ATLAS_VAULT]"
+    );
+}
+
+#[test]
+fn test_challenge3_multiline_pem_and_signature_patterns() {
+    let pem =
+        "-----BEGIN RSA PRIVATE KEY-----\nMIIEowIBAAKCAQEA0\nXYZ789\n-----END RSA PRIVATE KEY-----";
+    let prompt = format!("Deploy server certificate and key:\n{}", pem);
+    let cleaned = sanitize_outbound_prompt(&prompt);
+
+    assert!(!cleaned.contains("MIIEowIBAAKCAQEA0"));
+    assert!(cleaned.contains("[REDACTED_BY_ATLAS_VAULT]"));
+}
+
+// ============================================================================
+// Challenge 4: System Prompt and Distill Task Verification
+// ============================================================================
+
+#[test]
+fn test_challenge4_system_prompt_sanitization_in_distill_messages() {
+    let sys = "System instructions for host spark-b87b running under /home/drakestapleton/workspace for Drake Stapleton";
+    let cleaned = sanitize_outbound_prompt(sys);
+
+    assert!(!cleaned.contains("spark-b87b"));
+    assert!(!cleaned.contains("/home/drakestapleton"));
+    assert!(!cleaned.contains("Drake Stapleton"));
+    assert!(cleaned.contains("<LOCAL_HOST>"));
+    assert!(cleaned.contains("<WORKSPACE_PATH>"));
+    assert!(cleaned.contains("<OPERATOR>"));
+}
+
+#[test]
+fn test_challenge4_distill_task_struct_scrubbing_simulation() {
+    let task = DistillTask {
+        id: "m1-challenger-task-01".to_string(),
+        task_type: TaskType::CodeSynthesis,
+        prompt: "Run benchmark on 192.168.1.5 for drakestapleton".to_string(),
+        system_prompt: Some("You are an assistant located on spark:18080".to_string()),
+        teacher_model: "mock-teacher".to_string(),
+        student_model: None,
+        verification_strategy: VerificationStrategy::UnslopStrict,
+        commit_to_cortex: false,
+    };
+
+    let scrubbed_user = sanitize_outbound_prompt(&task.prompt);
+    let scrubbed_sys = task
+        .system_prompt
+        .as_ref()
+        .map(|s| sanitize_outbound_prompt(s));
+
+    assert!(!scrubbed_user.contains("192.168.1.5"));
+    assert!(!scrubbed_user.contains("drakestapleton"));
+    assert!(scrubbed_user.contains("<LOCAL_HOST>"));
+    assert!(scrubbed_user.contains("<OPERATOR>"));
+
+    let sys_str = scrubbed_sys.unwrap();
+    assert!(!sys_str.contains("spark:18080"));
+    assert!(sys_str.contains("<LOCAL_HOST>:18080"));
+}
diff --git a/crates/spark-adapters/tests/reviewer2_m1_adversarial_edge_cases.rs b/crates/spark-adapters/tests/reviewer2_m1_adversarial_edge_cases.rs
new file mode 100644
index 00000000..fd59d816
--- /dev/null
+++ b/crates/spark-adapters/tests/reviewer2_m1_adversarial_edge_cases.rs
@@ -0,0 +1,91 @@
+// Reviewer 2 Milestone 1 Adversarial Edge Cases Suite
+// Tests prompt sanitization under extreme boundary conditions:
+// prompt containing only secrets, mixed unicodes, escaped characters,
+// multiline PEM blocks, and nested whitespace.
+// Strictly adheres to sovereign unslop invariants: zero em dashes, zero en dashes.
+
+use spark_adapters::vault::{register_test_secret, sanitize_outbound_prompt};
+
+#[test]
+fn test_edge_case_only_secrets() {
+    let secret = "sk-ant-api03-123456789012345678901234567890123456";
+    let output = sanitize_outbound_prompt(secret);
+    assert_eq!(output, "[REDACTED_BY_ATLAS_VAULT]");
+
+    // Only dynamic vault secret
+    let dynamic_secret = "vault_token_alpha_numeric_9988776655";
+    register_test_secret("DYN_EDGE_ONLY", dynamic_secret);
+    let output_dyn = sanitize_outbound_prompt(dynamic_secret);
+    assert_eq!(output_dyn, "[REDACTED_BY_ATLAS_VAULT]");
+
+    // Multiple consecutive secrets with no separator
+    let dual_secrets = format!("{secret}sk-proj-123456789012345678901234567890");
+    let output_dual = sanitize_outbound_prompt(&dual_secrets);
+    assert!(!output_dual.contains(secret));
+    assert!(!output_dual.contains("sk-proj-"));
+}
+
+#[test]
+fn test_edge_case_mixed_unicodes() {
+    let secret = "sk-ant-api03-123456789012345678901234567890123456";
+    let input = format!("你好世界: {secret} 🔒 操作员: Drake Stapleton 路径: /home/drakestapleton/模型.bin 主机: spark-b87b");
+    let output = sanitize_outbound_prompt(&input);
+
+    assert!(!output.contains(secret));
+    assert!(!output.contains("Drake Stapleton"));
+    assert!(!output.contains("/home/drakestapleton"));
+    assert!(!output.contains("spark-b87b"));
+
+    assert!(output.contains("[REDACTED_BY_ATLAS_VAULT]"));
+    assert!(output.contains("<OPERATOR>"));
+    assert!(output.contains("<WORKSPACE_PATH>"));
+    assert!(output.contains("<LOCAL_HOST>"));
+    assert!(output.contains("你好世界:"));
+    assert!(output.contains("🔒"));
+}
+
+#[test]
+fn test_edge_case_escaped_characters() {
+    // JSON-escaped string with quotes and newlines
+    let input = r#"{\"key\": \"sk-proj-123456789012345678901234567890\", \"path\": \"/home/drakestapleton/config.json\", \"host\": \"spark\"}"#;
+    let output = sanitize_outbound_prompt(input);
+
+    assert!(!output.contains("sk-proj-"));
+    assert!(!output.contains("/home/drakestapleton"));
+    assert!(output.contains(r#"{\"key\": \"[REDACTED_BY_ATLAS_VAULT]\""#));
+    assert!(output.contains(r#"\"path\": \"<WORKSPACE_PATH>\""#));
+    assert!(output.contains(r#"\"host\": \"<LOCAL_HOST>\""#));
+}
+
+#[test]
+fn test_edge_case_multiline_pem_blocks() {
+    let rsa_pem = "-----BEGIN RSA PRIVATE KEY-----\nMIIEowIBAAKCAQEA0m4g...sample...fake...key...\n-----END RSA PRIVATE KEY-----";
+    let ec_pem = "-----BEGIN EC PRIVATE KEY-----\nMHcCAQEEIIz...sample...fake...key...\n-----END EC PRIVATE KEY-----";
+    let openssh_pem = "-----BEGIN OPENSSH PRIVATE KEY-----\nb3BlbnNza...sample...fake...key...\n-----END OPENSSH PRIVATE KEY-----";
+    let generic_pem = "-----BEGIN PRIVATE KEY-----\nMIIEvgIBAD...sample...fake...key...\n-----END PRIVATE KEY-----";
+
+    for pem in [rsa_pem, ec_pem, openssh_pem, generic_pem] {
+        let text = format!(
+            "Here is the server configuration:\n{}\nProceed with caution.",
+            pem
+        );
+        let output = sanitize_outbound_prompt(&text);
+        assert!(!output.contains("PRIVATE KEY"));
+        assert!(output.contains("[REDACTED_BY_ATLAS_VAULT]"));
+        assert_eq!(
+            output,
+            "Here is the server configuration:\n[REDACTED_BY_ATLAS_VAULT]\nProceed with caution."
+        );
+    }
+}
+
+#[test]
+fn test_edge_case_nested_whitespace() {
+    let input = "\t\t\n\n   \t  Drake   Stapleton   \t\n  /home/drakestapleton/repo  \t\n  sk-ant-api03-123456789012345678901234567890123456  \n\n\t";
+    let output = sanitize_outbound_prompt(input);
+
+    assert!(!output.contains("drakestapleton"));
+    assert!(!output.contains("sk-ant-"));
+    assert!(output.contains("<WORKSPACE_PATH>"));
+    assert!(output.contains("[REDACTED_BY_ATLAS_VAULT]"));
+}
diff --git a/crates/spark-adapters/tests/tier1_features.rs b/crates/spark-adapters/tests/tier1_features.rs
index 026780d6..96b6a79a 100644
--- a/crates/spark-adapters/tests/tier1_features.rs
+++ b/crates/spark-adapters/tests/tier1_features.rs
@@ -297,6 +297,30 @@ fn test_t1_f24_crawler_curriculum_tracks_enumeration() {
     assert!(CurriculumTrack::parse("dynamic").is_some());
 }
 
+#[test]
+fn test_t1_f24b_crawler_curriculum_tracks_aliases() {
+    assert_eq!(
+        CurriculumTrack::parse("cuda"),
+        Some(CurriculumTrack::NativeSystemsAndGpu)
+    );
+    assert_eq!(
+        CurriculumTrack::parse("git"),
+        Some(CurriculumTrack::DynamicMining)
+    );
+    assert_eq!(
+        CurriculumTrack::parse("git_mining"),
+        Some(CurriculumTrack::DynamicMining)
+    );
+    assert_eq!(
+        CurriculumTrack::parse("git-mining"),
+        Some(CurriculumTrack::DynamicMining)
+    );
+    assert_eq!(
+        CurriculumTrack::parse("refactor"),
+        Some(CurriculumTrack::DynamicMining)
+    );
+}
+
 #[test]
 fn test_t1_f25_crawler_task_generation_limit_respect() {
     let tasks = CurriculumEngine::generate_tasks(
@@ -324,6 +348,19 @@ fn test_t1_f26_cli_help_invocation() {
     assert!(stdout.contains("spark-distill"));
 }
 
+#[test]
+fn test_t1_f26b_cli_interactive_subcommand_schema() {
+    let bin_path = spark_distill_bin();
+    let output = Command::new(bin_path)
+        .args(["cli", "--help"])
+        .output()
+        .expect("cli help");
+    let stdout = String::from_utf8_lossy(&output.stdout);
+    assert!(output.status.success());
+    assert!(stdout.contains("--teacher"));
+    assert!(stdout.contains("--student"));
+}
+
 #[test]
 fn test_t1_f27_cli_single_subcommand_schema() {
     let bin_path = spark_distill_bin();
@@ -428,6 +465,17 @@ fn test_t1_f35_verify_keys_web_sessions_require_key() {
     assert!(claude_web.requires_key);
 }
 
+#[test]
+fn test_t1_f35b_web_session_token_aliases() {
+    let chatgpt = spark_adapters::models::ProviderType::ChatGPTWeb;
+    assert!(chatgpt.key_aliases().contains(&"CHATGPT_SESSION_TOKEN"));
+    assert!(chatgpt.key_aliases().contains(&"OPENAI_WEB_TOKEN"));
+
+    let claude = spark_adapters::models::ProviderType::ClaudeWeb;
+    assert!(claude.key_aliases().contains(&"CLAUDE_SESSION_KEY"));
+    assert!(claude.key_aliases().contains(&"CLAUDE_WEB_SESSION_KEY"));
+}
+
 // ============================================================================
 // Feature 8: Axum Web Workshop Service
 // ============================================================================
diff --git a/crates/spark-cockpit-rs/src/main.rs b/crates/spark-cockpit-rs/src/main.rs
index 9bcff8df..cc4d1492 100644
--- a/crates/spark-cockpit-rs/src/main.rs
+++ b/crates/spark-cockpit-rs/src/main.rs
@@ -376,19 +376,7 @@ impl StreamRedactor {
 }
 
 fn get_cortex_token() -> Option<String> {
-    if let Ok(output) = std::process::Command::new("atlas-vault")
-        .args(["get", "CORTEX_TOKEN"])
-        .output()
-        && output.status.success()
-    {
-        let token = String::from_utf8_lossy(&output.stdout).trim().to_string();
-        if !token.is_empty() {
-            return Some(token);
-        }
-    }
-    std::env::var("CORTEX_TOKEN")
-        .ok()
-        .filter(|s| !s.trim().is_empty())
+    spark_adapters::vault::resolve_secret("CORTEX_TOKEN")
 }
 
 fn artifacts_dir() -> PathBuf {
diff --git a/scripts/e2e_distill_test.sh b/scripts/e2e_distill_test.sh
index 8333a04d..827b4e54 100755
--- a/scripts/e2e_distill_test.sh
+++ b/scripts/e2e_distill_test.sh
@@ -4,7 +4,8 @@
 
 set -euo pipefail
 
-WORKSPACE_ROOT="${WORKSPACE_ROOT:-$(git rev-parse --show-toplevel 2>/dev/null || pwd)}"
+SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
+WORKSPACE_ROOT="${WORKSPACE_ROOT:-$(cd "${SCRIPT_DIR}/.." && pwd)}"
 RESULTS_FILE="${WORKSPACE_ROOT}/tests_results.json"
 
 TIER_SELECTION="all"