compute_file_key
SHA256(schema ∥ encoder ∥ byte_length ∥ content_SHA)Path is provenance metadata, never an identity input. Identical bytes at two paths reuse one immutable payload.
A representation. A router. A receipt. The collapse, the recovery, and the small slice that has to survive contact with a real task.
Three altitudes: mathematical validity · forensic repeatability · useful delivery.
A successful score can be the first sign that the instrument measures the wrong thing. Freeze the trace before changing the model.
A larger corpus does not repair a mathematically impossible objective, nor does a commit certify an accepted delivery.
Explore four recorded regimes through a deliberately illustrative projection. The coordinates below are generated teaching geometry, not checkpoint embeddings.
Hover or focus the canvas for coordinates and eigenvalue readouts. Rank is entropy effective rank, exp(−Σpᵢ log pᵢ). Reconstructed spectra illustrate the stated rank; they are not extracted eigenvalues. ADR dead-dimension thresholds and active-dimension thresholds differ.
The benchmark bars are fixed receipt values. Your controls explore routing signals, not a newly measured benchmark.
A: zero-overlap N=40 · B: counterfactual same-state N=60 · C: code/test/blueprint N=60 · D: standard lexical N=100. Three-seed mean R@1; 97.08% is the macro mean, not pooled accuracy. Same-file checkbox approximates high shared-state evidence; real source also checks intent, scope groups, lexical top1, word overlap and topology. Here ρ<0.08 is a zero-overlap proxy. The standard-lexical tanh rule is bounded, not a universal zero-harm guarantee.
Keep source identity, caching identity and independent delivery quality separate. Capacity illustrations are not throughput promises.
Brief anchors: r35 2.8K in / 2.2K out / 56.0s; r36b 1,089.79 in / 514.62 out / 14.98s. Model assumes 850 prefill tok/s, decode calibrated to each anchor, warm/cold slice 2/80ms and contention 1+0.035(c−1). Source budget is not total prompt size: 849.79 tokens of wrapper/seed/aid overhead are modeled. These are inspectable assumptions; linear scaling and accepted-delivery throughput are unverified.
SHA256(schema ∥ encoder ∥ byte_length ∥ content_SHA)Path is provenance metadata, never an identity input. Identical bytes at two paths reuse one immutable payload.
SHA1(name ∥ kind ∥ full symbol body)Normalize structural identity without erasing distinctions the downstream task needs. Preserve line references separately.
SHA256(exact served source bytes)Resolve quotes against the delivered version. A cached vector is not permission to reuse stale locations.
These are educational adapter blueprints, not literal deployed files or a one-click production installer. Dataset, model, parser and service interfaces require a pinned local contract. Copying never executes code.
Select a phase to inspect its contract.
Use a fresh output/cache namespace. Never clear or repurpose the live /dev/shm arena. Deployment, training and restarts need their own reviewed lease and receipt.
Open each receipt to inspect the pinned source digest. A code example in this atlas is not a claim that every interface is present in the current service.
| Boundary / case | What could fool the instrument | Tripwire / reconstruction | Evidence state |
|---|
SHA-256 digests below were computed from existing local files at build time. They establish byte identity, not scientific validity or a fresh benchmark rerun. Local path links work in a local-file environment; hosted copies may not resolve them.
Complete verbatim text, mathematical proofs, failure forensics, and implementation blueprints from JEPA-HYBRID-CHRONICLE-AND-CONTEXT-SLICER-MONOGRAPH.md. Collapsed by default; the interactive atlas above is the reading path.
Research interval: September 22–October 29, 2026. Recovery addendum: October 30 UTC, explicitly separated from the historical interval. Owner: Derek's lab. Goal: G-bench27, within G-lab. Audience: Future Derek, independent experimenters, and operators rebuilding the machinery.
The durable contribution is a method for making useful work small enough to verify. It starts with an apparent retrieval breakthrough that did not survive controls. It proceeds through transition learning, collapse diagnosis, intent harvesting, hybrid routing, and a hardware-isolated NPU context packer. It ends with a useful small-call apparatus whose remaining canvas failures are visible, classified, and preserved rather than hidden behind a passing marker detector.
This document is a reconstruction from local records, not a new benchmark campaign. No training, fleet changes, or deployment commands below were executed to write it. Cookbook commands are instructions for an authorized future rebuild in a new workspace. They do not authorize changes to frozen runs or the current serving fleet.
| Label | Meaning | What it does not establish |
|---|---|---|
| Receipt | A local result or execution record inspected for this reconstruction | Universal replication across machines |
| Source | Behavior visible in implementation at the reading snapshot | That every historical process loaded those bytes |
| Historical report | An author's recorded interpretation and measurements | Independent qualification of every claim |
| Brief-specified | A requested historical figure retained with provenance to the brief | A raw-data recomputation performed here |
| Cookbook | An executable reconstruction or a wrapper around the authoritative implementation | Byte-for-byte identity to every old experiment |
| Recovery addendum | A later, dated repair receipt | A retroactive correction to earlier experimental observations |
Every major act cites its evidence family. The reference register at the end provides artifact basename references. Mutable source paths should be paired with hashes when rebuilding. A table entry marked brief-specified is deliberately not upgraded to an independently audited result. Source disagreement is evidence to retain, not a reason to invent a reconciled number.
These are authored explanatory voices, not claims that three external people reviewed the work.
flowchart LR
A[Windows retrieval experiments] --> B[Shortcut and collapse audit]
B --> C[State plus intent training]
C --> D[Calibrated lexical latent graph router]
D --> E[NPU AST source selection]
E --> F[Bounded local code candidates]
F --> G[Independent runtime and seed review]
G -->|misses retained| B
The Windows workspaces under jepa-archive are the origin of this lineage. Their Linux archival access is jepa-archive when that mount exists. Do not treat the availability of the mount as guaranteed after reboot. The historical master document records a small transformer campaign on the B70s, using a 128-dimensional representation and separate prediction machinery. [S01]
The WI-09 marker, 2026-09-22 05:50, anchors the requested chronology. Its exact timestamp is brief-specified here; the monograph does not infer a timezone from it. A timezone-free local timestamp must not be ordered to the second against UTC receipts. The first question was whether engineering artifacts could predict their successors, rather than merely retrieve documents with similar words.
| Event | Recorded result | Correct interpretation |
|---|---|---|
| WI-09 | September 22, 05:50 | Historical anchor; timestamp supplied by brief |
| Initial experiment | 70 revision pairs; MRR 0.7072 → 0.6978 | Loss improvement did not imply retrieval improvement |
| Screening | 16 paired runs | Lexical baseline remained difficult to beat |
| Corpus expansion | 4 repositories, 209 artifacts, 516 revisions | More data and longer files exposed capacity constraints |
| OT001 | 61.4% → 25.0% R@1 | Apparent single-document role penalty on the old instrument |
| OT002 | 44/44, MRR 1.000; 6.70 s | Apparent breakthrough; 6.70 s is brief-specified timing |
the-jepa-breakthrough.html | Presentation artifact named in the brief | Historical enthusiasm, not an acceptance gate |
hybrid-context-trial | JEPA 0/12 versus BM25 8/12 | Downstream usefulness did not follow the earlier score |
The original comparison placed a real target passage against synthetic, short distractors. The historical reconstruction gives approximately 400 characters for targets and a median of approximately 107 characters for the one-line negatives. [S01], [S02] Candidate length was therefore predictive of the label before any learned transition was used.
The important correction is not “neural retrieval never works.” It is that the apparatus had not distinguished learned transition information from a shortcut. OT001's role penalty shares this qualification: it is not clean proof that all encoder-side conditioning is harmful, even though predictor-side conditioning became a productive design rule.
The trace-audit-20260924 lineage made intermediate geometry visible. The requested layer trace runs from 0.531033 at Layer 0 to 0.999988 at Layer 6. The unconditioned predictor produced pairwise cosine 1.000000. Those layer values are historical figures from the audit lineage, not a fresh checkpoint replay here. The strategy register independently records the collapsed unconditioned output and the shortcut controls. [S02], [S03]
| Control on the old pool | Result | Consequence |
|---|---|---|
| Longest candidate | 44/44 | Length is sufficient to solve the benchmark |
| Conditioned old predictor | 44/44 | Cannot attribute success to conditioning |
| Unconditioned old predictor | 44/44 | Intent is unnecessary on this pool |
| Source through target encoder | 44/44 | The predictor is unnecessary on this pool |
| Cyclic wrong query | 43/44 | Strong source insensitivity |
| Fixed first query | 42/44 in the strategy register | Distinguish this control from generic “fixed query” summaries |
| Real-target pool | Old predictor 1/44 | No transferable gain established |
| Real-target BM25 | 5/44 | Same-pool baseline is essential |
Some narrative summaries say a fixed dummy query also reached 44/44. The inspected X0 register specifically gives 42/44 for fixed first and 44/44 for longest. Both show a broken instrument; they are not interchangeable measurements. [S02]
🎓 Mathematician: Similarity is symmetric: $\cos(u,v)=\cos(v,u)$. A causal transition need not be: incident → decision does not imply decision → incident. Cosine can still rank a predicted successor against candidates. What fails is using similarity alone as a substitute for learning the directional map.
🚀 Forensic Engineer: A weight file, tokenizer, candidate pool, truncation policy, and scoring rule form one instrument. Hash all five before celebrating a result. If changing the negative-pool generator reverses the conclusion, inspect that generator first.
⚡ AI CTO: The useful product of this act was not the 100% screenshot. It was the cheap ability to discover that the screenshot was misleading. A lab that can reject its own flattering result spends less operator attention on false capability.
For a batch of representations $Z\in\mathbb{R}^{n\times d}$, define normalized rows $\bar z_i$. The off-diagonal cosine statistic is
$$ C_{\mathrm{off}}= \frac{1}{n(n-1)}\sum_{i\ne j}\bar z_i^\top\bar z_j. $$
A value near one means almost every example points in the same direction. That is compatible with low regression loss if the target representation also collapses. It is not evidence that examples have been semantically aligned in a useful way. A healthy audit also measures variance, rank, margins, and changes under counterfactual intent. An encoder can have respectable average geometry while still ignoring the action that matters.
Inputs: immutable query rows, real candidate texts, target IDs, and an explicit scorer. Outputs: per-query rankings, five self-gates, layer statistics, source hashes. Isolation: build a new workspace; never modify the historical experiment directory.
The fifth gate here is shuffled-label/random expectation calibration. The first four are the named controls Derek requested. Do not choose a threshold after inspecting the held-out result.
from dataclasses import dataclass
import hashlib
import random
@dataclass(frozen=True)
class Case:
query: str
source_id: str
positive_id: str
candidates: tuple[tuple[str, str], ...]
def rank_case(case, scorer, query=None, mask_source=False):
candidates = [c for c in case.candidates
if not mask_source or c[0] != case.source_id]
assert any(c[0] == case.positive_id for c in candidates)
scores = scorer(case.query if query is None else query,
[text for _, text in candidates])
assert len(scores) == len(candidates)
order = sorted(range(len(candidates)),
key=lambda i: (-float(scores[i]), candidates[i][0]))
return [candidates[i][0] for i in order]
def recall_one(rankings, cases):
return sum(r[0] == c.positive_id for r, c in zip(rankings, cases)) / len(cases)
def shortcut_audit(cases, scorer, seed=20260924):
assert len(cases) > 1
fixed = [rank_case(c, scorer, query=cases[0].query) for c in cases]
swapped = [rank_case(c, scorer, query=cases[(i+1) % len(cases)].query)
for i, c in enumerate(cases)]
longest = [rank_case(c, lambda q, texts: list(map(len, texts)))
for c in cases]
masked = [rank_case(c, scorer, mask_source=True) for c in cases]
shuffled = list(cases)
random.Random(seed).shuffle(shuffled)
natural = [rank_case(c, scorer) for c in cases]
return {
'natural': recall_one(natural, cases),
'fixed_query': recall_one(fixed, cases),
'longest_candidate': recall_one(longest, cases),
'swapped_query': recall_one(swapped, cases),
'own_source_masked': recall_one(masked, cases),
'shuffled_labels': recall_one(natural, shuffled),
'case_digest': hashlib.sha256(repr(cases).encode()).hexdigest(),
}
The shuffled-label row is a null diagnostic, not an exact significance test. For unequal candidate pools, compute the random expectation per case rather than assuming one $K$. A target absent after source masking is a dataset error, not a model miss. Length-match real candidates and retain hard negatives from the same operational neighborhood. Use deterministic tie handling and publish it; favorable ties can create another shortcut.
import torch
import torch.nn.functional as F
class CollapseTracker:
def __init__(self):
self.rows = []
self.handles = []
def attach(self, layers):
for name, layer in layers:
def hook(module, inputs, output, label=name):
h = output[0] if isinstance(output, tuple) else output
if not torch.is_tensor(h):
return
h = h.detach().float()
# For padded sequences use the real attention mask in production.
if h.ndim == 3:
h = h.mean(dim=1)
if h.ndim != 2 or h.shape[0] < 2:
return
z = F.normalize(h, dim=-1)
sim = z @ z.T
keep = ~torch.eye(len(z), dtype=torch.bool, device=z.device)
self.rows.append({
'layer': label,
'off_diagonal_cosine': sim[keep].mean().item(),
'mean_coordinate_variance': h.var(0).mean().item(),
'n': len(z), 'd': z.shape[1],
})
self.handles.append(layer.register_forward_hook(hook))
def close(self):
for handle in self.handles:
handle.remove()
self.handles.clear()
Falsification gate: if fixed, swapped, or longest controls approach the natural score, stop interpreting the natural score as transition skill. If the deepest layers converge toward cosine one, inspect normalization, target dynamics, and loss placement before adding another prediction head. Retain the failed checkpoint and its negative-pool generator for future regression checks.
STRATEGY.md describes nineteen overnight experiments in eight hours. [S03] The later living master matrix enumerates twenty-two experimental/audit workspaces plus the strategy workspace itself. [S01] Those inventories have different counting conventions. Rather than silently omit evidence to force nineteen rows, the table below preserves every named workspace from semantic-predictor through recorded-actions. The historical 19-slice label is retained as a campaign name, not asserted as an exact count of the later expanded directory inventory.
| Workspace suffix | Intervention or question | Recorded outcome / retained value |
|---|---|---|
jepa-semantic-predictor-20260924 | Frozen MiniLM plus residual prediction | 13/16 vs 12/16; development result only |
jepa-confirmation-20260924 | Sealed confirmation questions | 42/62 vs lexical 49/62; citation work retained |
jepa-project-holdout-20260925 | Transfer to unseen projects | 18/24 vs lexical 18/24; reader evidence improved |
jepa-evidence-units-20260925 | Immutable byte-span evidence | 24/24 byte matches; a reusable contract |
jepa-owner-methodology-20260925 | ADD as transition-data method | Framework rather than a model win |
jepa-broader-training-20260925 | Larger fitting cohort | 144/144 train, 8/16 holdout; memorization exposed |
jepa-internal-validation-20260925 | Training-duration sweep | 43/56 at 32 steps vs 36/56 at 512 |
jepa-temporal-lineage-20260925 | Recover file/commit chronology | 529 March and 251 May files mapped |
jepa-work-episodes-20260925 | State/request episode packets | 2/2 true vs 0/2 swapped on a tiny probe |
jepa-context-binding-20260925 | Structural role binding | 11/12 vs 6/12 concatenation |
jepa-family-conditioning-20260925 | Family/role-conditioned heads | 26/32 vs BM25 27/32; gate not met |
jepa-same-role-actions-20260925 | Scope within the same role | 10/12 with scope context |
jepa-state-action-predictor-20260925 | Separate state/action inputs | Joint 11/16 vs single 7/16 |
jepa-operation-representations-20260925 | Descriptions versus raw code | Description 11/16 vs code 6/16 |
jepa-target-space-learning-20260925 | Predict in description space | Trained and frozen both 25/32 |
jepa-near-miss-audit-20260925 | Review negative labels | 48 clean negatives from 94 pairs |
jepa-reviewed-supervision-20260925 | Reviewed-negative retraining | Separate 7/8 vs fused 4/8 |
jepa-action-signal-20260925 | Trace hidden-layer action signal | Zero replay score error; diagnostic infrastructure |
jepa-factor-supervision-20260925 | Separate factor supervision | 34/40 vs 32/40, with family regression |
jepa-uniform-factors-20260925 | Uniform-positive geometry | Compatibility gap down; no general head victory |
jepa-episode-availability-20260925 | Audit cutoff availability | 36 prefixes, 20 transitions, 35 outcomes |
jepa-recorded-actions-20260925 | Recover actual operator instructions | Eight historical messages; hindsight gap exposed |
These are not twenty-two independent replications of one hypothesis. They include data work, instrumentation, reader contracts, and small model probes. The reusable engineering results were byte citations, source maps, cutoff packets, and a clear separation between a correct quote and a correct answer.
| Rule | Operational commitment | What it prevents |
|---|---|---|
| R1 | Learn operational relationships, not merely similarity | Topic-match success substituting for causal relevance |
| R2 | Predict the next durable state from state plus intent | Calling static lookup a transition model |
| R3 | Condition the predictor, keep target artifacts clean | Polluting the target with request metadata |
| R4 | Capture the known state, actual request, successor, and outcome | Hindsight masquerading as pre-action information |
| R5 | Trace retrieval → answer → citation; acceptance is the unit | Token throughput replacing useful work |
| R6 | Small decisive probes, frozen evidence, bounded downside | Endless head tuning against exposed cases |
| Strategy | Status in the inspected register | Result or remaining question |
|---|---|---|
| X0 | Complete | OT002 at chance against real competitors |
| X1 | Controls complete | Curator request alone leaks target information |
| X2 | Complete, gate unmet | Conditioning locus does not rescue tiny-data transfer |
| X3 | Complete, gate unmet overall | Two near-zero-overlap jumps solved repeatedly |
| X4 | Rebuilt benchmark | 81 full-text artifacts; all-real pool passes self-gates |
| X5 | Tool built | Authoring-time request convention still requires adoption |
| X6 | Designed | Accepted work per operator-minute not yet measured |
| X7 | Dataset/floors complete | Recorded-intent records await curation |
X3 and X4 put the near-zero-overlap subset at the center. BM25 and MiniLM were 0/18 at R@1 there. Predictor-side checkpoints solved trans_prob_031 and trans_prob_038 in 6/9 runs each. That is a narrow repeated signal, not a blanket win across eighteen tasks. [S02], [S03] X7 recovered 5,556 user messages from chatGPT_parser, with a 5.9-minute median message/commit gap in the studied alignment cohort. The register distinguishes 61 constructed records from 51 with real intent; do not merge those counts.
MIT-PR-2026-JEPA-ADD-001 organized the program into a preregistered protocol. The constellation graph covered 12 constellations and 103 repositories in its historical inventory. A repository count is a data-source inventory, not a number of independent held-out tasks. The curriculum hierarchy was Single → Narrow → Small → Medium → Large. [S04]
| Tier | Unit of transition | Example scope | Leakage-safe split |
|---|---|---|---|
| Single | One artifact or function | A local edit and its verification | Blob/version-aware |
| Narrow | Closely related artifacts | Handler, schema, endpoint test | Episode-grouped |
| Small | Repository feature | A bounded vertical slice | Repository/time-held-out |
| Medium | Constellation workflow | Contract change across cooperating repos | Constellation-aware |
| Large | Fleet behavior | Routing, delivery, and governance change | Frozen cross-fleet qualification |
ADR-0001 stopped the first run: near-zero R@1 0/18, cosine 0.9756, and 127/128 collapsed dimensions in the historical diagnosis. ADR-0002 moved variance/covariance regularization to unnormalized vectors: 0/128 dead dimensions, 126/128 active under its stated threshold, zero-overlap R@1 3/18, R@3 8/18, and curriculum 547/82 = 6.67×. [S05], [S06] Those are useful results under a specific instrument; the original 72% target was not met. Calling the amendment “confirmed” does not erase the preregistered run's falsification.
🎓 Mathematician: The historical phrase “every coordinate has maximum standard deviation $1/\sqrt{128}$” is too strong without isotropy. A unit vector distribution supported on $+e_1$ and $-e_1$ has first-coordinate standard deviation one. The valid general bound is on the sum, hence the average, of coordinate variances.
For $\|z\|_2=1$ and population covariance,
$$ \sum_{j=1}^{d}\operatorname{Var}(z_j) =\mathbb E\|z\|_2^2-\|\mathbb Ez\|_2^2\le1. $$
Consequently,
$$ \frac1d\sum_j\operatorname{Var}(z_j)\le\frac1d, \qquad \frac1d\sum_j\operatorname{std}(z_j)\le\frac1{\sqrt d}. $$
For an isotropic distribution, each coordinate reaches the familiar scale $\sigma=1/\sqrt{128}\approx0.0884$. A target standard deviation of one in all normalized coordinates is impossible. That justifies removing the variance loss from the unit sphere. It does not prove that the variance gradient is identically zero, or that InfoNCE necessarily collapses in every implementation. The cone collapse is an observed training outcome; the unattainable simultaneous target is the theorem.
ADR-0004 reports temporal intent alignment: MRR 0.1698 within one hour versus 0.0639 beyond twelve hours, approximately 2.65×. These horizons are observational cohorts, not randomized timing interventions. [S07] A continuous harvesting program eventually assembled 14,825 transitions. The later audit records 11,834 training examples for one 15k-corpus experiment. Keep total corpus and train partition separate. [S08]
SovereignUnifiedJEPA v2's gated bilinear model reports 100% compositional R@1 on its specified assay; that is not a universal software-planning guarantee. Phase 3B then exposed the limit: a reported Lipschitz factor 1.0746 > 1 is not a contraction guarantee. A factor above one alone does not prove every trajectory expands, but it cannot establish the promised contractive bound. The recorded open-loop assay falls from 92% at hop one to 16% at hop two and 0% at hop three. The cand_delete_test pathology shows that a plausible successor can still be operationally harmful. Phase 4's Model E, 0.0% harmful recommendations is an assay result under its guardrails, not proof that all future actions are safe. Phase 5B's metadata self-audit is therefore part of the result, not an appendix to hide. For that audit, separate architecture declarations, default checkpoint metadata, loaded state, and measured qualification results. A default macro_r1_pct field is not a fresh measurement. The same applies to a source label claiming a GPU when the loaded runtime uses NPU plus CPU. Require the artifact that generated each displayed score and retain mismatches explicitly. [S01], [S08]
The separate game-jepa line made a similar distinction: v2 97.5%, v3 26.1% composition failure, and v5 cosine around 0.998 coexisted with large exact-state readout errors. The 18–22% off-manifold/readout gap is a historical shorthand, not an interchangeable metric with software retrieval R@1. The inspected v5 diagnosis reports roughly 80–83% nearest-catalog rank-one despite high cosine, and explicitly says a catalog diagnostic is not the deployed decoder. [S09]
🚀 Forensic Engineer: Separate a state vector's shape from its operational meaning. A checkpoint can load, a tensor can align, and a recommendation can still delete the test. Bind the recommendation to the actual versioned source and an independent action verifier.
⚡ AI CTO: The enabling ladder is the business model for capability accumulation. Right-size the brief; provide a source map; normalize form; review adversarially; choose the right seat; choose the right thinking regime. “Capable with rungs 2+3” is more useful than an undifferentiated pass/fail badge. [S10]
Use a new ledger directory with an explicit retention policy. Do not harvest credentials, private chat exports, or unrelated operator messages by default. Record an operator-approved request file before implementation. The hook captures immutable Git objects and a reference to that request. Outcome evidence is stored separately and never copied into pre-action input.
# In a NEW experimental repository, not an immutable historical workspace:
mkdir -p .git/hooks .lab-intent
cat > .git/hooks/post-commit <<'HOOK'
#!/bin/sh
set -eu
# Capture metadata only. A separate harvester resolves the immutable blobs.
repo=$(git rev-parse --show-toplevel)
rev=$(git rev-parse HEAD)
parent=$(git rev-parse HEAD^ 2>/dev/null || true)
python3 - "$repo" "$rev" "$parent" <<'PY'
import datetime, json, os, sys
from pathlib import Path
repo, rev, parent = sys.argv[1:]
p = Path(repo) / '.lab-intent' / 'commit-events.jsonl'
row = {'repo': repo, 'commit': rev, 'parent': parent,
'captured_utc': datetime.datetime.now(datetime.timezone.utc).isoformat()}
# One bounded append; use a ledger lock if multiple hook processes are possible.
fd = os.open(p, os.O_CREAT | os.O_APPEND | os.O_WRONLY, 0o600)
try:
os.write(fd, (json.dumps(row) + '\n').encode())
finally:
os.close(fd)
PY
HOOK
chmod +x .git/hooks/post-commit
The hook is deliberately small; it does not train or make model calls during git commit. Resolve git show <parent>:<path> and git show <commit>:<path> outside the hook. Hash the returned bytes and preserve missing paths as missing. Time-align requests only within the declared window:
from datetime import datetime
def align_request(commit_time, requests, horizon_seconds=3600):
eligible = [r for r in requests
if 0 <= (commit_time - r['timestamp']).total_seconds()
<= horizon_seconds]
if not eligible:
return {'intent': None, 'provenance': 'unknown'}
winner = max(eligible, key=lambda r: r['timestamp'])
return {'intent': winner['text'], 'request_id': winner['id'],
'provenance': 'recorded_before_commit'}
Temporal proximity is not proof that the message caused the commit. Manually review ambiguous alignments, preserve competing candidates, and exclude future messages. Assign curriculum tier from declared operational scope, not from the eventual success label. Split by repository/episode before generating same-file hard negatives. A near-duplicate successor from the held-out split must never leak into training negatives or metadata.
The exact combined historical loss lives in compute_arm3b_loss in hybrid_router.py, with compute_dual_head_vicreg_loss in predictor_models.py. [S13] The following standalone implementation preserves its weights, symmetric contrast, same-file hard-negative penalty, and counterfactual-group margin. The names “Arm3B loss” and “Arm3C router” refer to different components, not a contradiction.
import torch
import torch.nn.functional as F
def dual_head_vicreg(up, ut, lambda_std=2.5, lambda_cov=0.05):
assert up.ndim == ut.ndim == 2 and len(up) >= 2
sp = (up.var(0) + 1e-4).sqrt()
st = (ut.var(0) + 1e-4).sqrt()
std = 0.5 * (F.relu(1-sp).mean() + F.relu(1-st).mean())
def off_cov(u):
u = u - u.mean(0, keepdim=True)
cov = u.T @ u / max(1, len(u)-1)
return (cov.square().sum() - cov.diagonal().square().sum()) / u.shape[1]
cov = 0.5 * (off_cov(up) + off_cov(ut))
return lambda_std * std + lambda_cov * cov
def transition_loss(up, ut, hard_negatives=None, groups=None):
zp, zt = F.normalize(up, dim=-1), F.normalize(ut, dim=-1)
tau = 0.07
sim = zp @ zt.T / tau
labels = torch.arange(len(zp), device=zp.device)
nce = 0.5 * (F.cross_entropy(sim, labels)
+ F.cross_entropy(sim.T, labels))
hn = zp.new_zeros(())
if hard_negatives is not None and hard_negatives.numel():
zn = F.normalize(hard_negatives, dim=-1)
if zn.ndim == 2:
zn = zn.unsqueeze(1)
positive = (zp * zt).sum(-1, keepdim=True)
negative = torch.bmm(zn, zp.unsqueeze(-1)).squeeze(-1)
margin = F.relu(negative-positive+0.20).mean()
lse = torch.log1p(torch.exp((negative-positive)/tau).sum(-1)).mean()*tau
hn = 0.5 * (margin + lse)
cf = zp.new_zeros(())
if groups is not None and len(zp) >= 2:
pair = groups[:, None].eq(groups[None, :])
pair &= ~torch.eye(len(zp), dtype=torch.bool, device=zp.device)
i, j = pair.nonzero(as_tuple=True)
different = 1 - (zt[i] * zt[j]).sum(-1) > 1e-3
i, j = i[different], j[different]
if len(i):
cos = zp @ zt.T
pos = cos.diagonal()
cf = (F.relu(cos[i,j]-pos[i]+0.25)
+ F.relu(cos[j,i]-pos[j]+0.25)).mean()
return nce + 0.65*hn + 1.25*cf + dual_head_vicreg(up, ut)
For exact historical replay, import the pinned functions rather than copying this listing. The listing normalizes supplied hard negatives defensively; historical callers supply normalized tensors. Use batch size at least two because unbiased sample variance is undefined at one. Do not remove normalization from contrast; remove it only from the variance/covariance branch. Do not claim a zero-loss or healthy-geometry run has passed held-out retrieval.
Falsification gate: retain the frozen same-pool BM25 floor, shuffle intent, report every curriculum tier, and measure counterfactual flips separately from average R@1.
The sovereign-jepa-rnd implementation carries the next stage. [S11], [S12], [S13], [S14], [S15] The hydration receipt reports 2,072 transitions. Its benchmark has N=260, K=20, and four deliberately different slices. Latin-square balancing is part of the benchmark design, not a guarantee of population representativeness. Five shortcut self-gates accompany the model metrics. The final campaign receipt records fixed-query and longest-candidate floors of 0.05, consistent with chance at twenty candidates, and source masking at 100%. [S12]
| Slice | Intended difficulty | Why it must remain separate |
|---|---|---|
| A | Low lexical overlap / operational successor | Tests the reason to learn a transition |
| B | Counterfactual intent on a shared state | Tests whether action changes the answer |
| C | Code-to-test and structural linkage | Tests cross-artifact operational association |
| D | Lexically explicit retrieval | Tests whether hybridization damages an easy regime |
| Loop | Arms and intervention | Historical receipt |
|---|---|---|
| IV-1 | Arm_1A/1B/1C; disentangle state and action | Slice B CF flip 0% → 50% |
| IV-2 | Arm_2A..2D; adapted top layer and EMA teacher | Arm_2D macro R@1 71.24% |
| IV-2, Slice A | True-JEPA predictor | R@1 55.83%, R@3 95.83% |
| IV-2 geometry | Unnormalized healthy representation | Effective rank 225.36/384 |
| IV-3 fixed blend | Arm_3A, nominal fixed 80/20 | Slice A R@1 0.0% |
| IV-3 router | Arm_3C calibrated lexical/latent/graph | Macro R@1 97.08% |
| IV-3, Slice A | Calibrated router | R@1 88.33%, R@3 99.17% |
| IV-3, B/C/D | Separate slice receipts | 100% each |
| IV-4 local paired work | Context-packed 27B prompts | −84.28% tokens; −78.07% wall |
| IV-4 frontier packing | Exploratory file-pack instrument | −92.90% tokens |
The macro R@1 is a macro average, not necessarily a micro task-weighted average. The campaign summary also records an effective rank of 225.53 in its final gate, while the Loop 2/3 arm receipt gives 225.36. Keep those checkpoints/aggregations distinct instead of averaging them into an invented number. [S12] The mathematical notation $s\perp a$ is used here for separate channels; it must not be read as a proved statistical independence assumption. State and requested action can be correlated in real engineering data.
A fixed mixture can let large lexical scores dominate where lexical overlap is uninformative. It can also let a weaker learned signal reorder an already certain exact identifier match. The router estimates a regime using lexical confidence, identifiers, latent uncertainty, and structural evidence, then chooses how much latent influence to allow. [S13]
A conceptual score is
$$ S(c\mid s,a)= (1-\lambda(s,a,C))\,\widetilde S_{\mathrm{lex}}(c) +\lambda(s,a,C)\,\widetilde S_{\mathrm{latent+graph}}(c). $$
The tilde matters: incompatible score scales cannot safely be mixed by arbitrary weights. The inspected router includes identifier-aware BM25, candidate normalization, AST/call-graph and blueprint structure, regime-specific weights, and a bounded lexical tie-breaking path. Some branches use latent weight around 0.85–0.91; a confident lexical branch constrains it near 0.12–0.22. These are implementation choices, not probabilities that a recommendation is correct.
🎓 Mathematician: Calibrated regime selection is a mixture-of-experts argument. It does not prove the latent model has become a universal retriever. It preserves a strong lexical expert when appropriate and invokes learned transition evidence when the query regime justifies it. Audit the selector as carefully as either expert.
A retrieval router should also abstain when its necessary source evidence is missing. “Uncertainty-calibrated” is the arm name; verify calibration curves before promising numerical reliability. Counterfactual intent tests are particularly useful because they hold the state fixed. A model that retrieves the same artifact for opposing actions has not passed that test, even if its average score looks good.
⚡ AI CTO: The hybrid earns its place by preserving cheap exact matches while improving hard operational jumps. Sell that measured regime advantage; do not replace it with a universal neural-search claim.
flowchart TB
FS[Versioned source files] --> CPU[CPU parsing and hash validation]
CPU --> SHM[Shared host RAM: /dev/shm AST arena]
CPU --> TOK[WordPiece tokenization]
TOK --> NPU[Arrow Lake NPU /dev/accel/accel0]
NPU --> V[384-dimensional vectors in host memory]
V --> ROUTER[CPU lexical / latent / graph selector]
SHM --> ROUTER
ROUTER --> PACK[Verbatim bounded source packet]
PACK --> B0[B70 A: local 27B]
PACK --> B1[B70 B: local 27B]
PACK --> AM4[AM4: local 27B]
The Arrow Lake NPU appears at PCI 0000:00:0b.0 and /dev/accel/accel0. The host driver path is distinct from the B70 render-device path /dev/dri/renderD*. The NPU uses shared host memory and on-device working storage; “0.0 MiB B70 VRAM” means the router does not allocate its embeddings on those discrete GPUs. It does not mean zero memory, zero CPU work, or that unrelated vLLM processes consume no VRAM.
The historical throughput is 303.74 embeddings/s, approximately 3.29 ms/item, with 89.85% CPU saved as the requested historical comparison. The former is in the NPU source/readme lineage; the CPU-saving percentage is brief-specified here. Do not extend either number to arbitrary batch sizes, text lengths, or cold compilation. The 4 MB CMX SRAM figure is a hardware working-storage characterization, not the total process footprint or a claim that an entire transformer checkpoint fits in SRAM. The recovery receipt later records approximately 193.62 MiB NPU memory utilization. [S14], [S24]
The source class is named NPUMiniLMEncoder and describes MiniLM-L6-v2. The README says bge-small-en-v1.5 in one architecture bullet. Both use 384-dimensional vectors, so dimension alone cannot resolve that disagreement. For a rebuild, trust the actual model IR, tokenizer, hashes, and model fingerprint, not a class name or a copied README bullet. [S14]
🚀 Forensic Engineer: Read a loaded process, not just a unit file. A process with zero
/dev/dri/renderD*descriptors and an open/dev/accel/accel0supplies strong device-binding evidence. Pair that with independent memory telemetry; descriptor absence alone does not measure MiB.
The October 23 shared-memory work made source parsing and embeddings reusable. Three tiers solve different invalidation problems:
| Tier | Object | Required identity | Mutable coordinates? |
|---|---|---|---|
| 1 | Whole-file AST metadata and vectors | Full file bytes + parser schema + model fingerprint | Stored metadata, not semantic identity |
| 2 | Individual symbol representation | Full symbol body + name/kind + embedding configuration | Ignore unrelated preceding-line shifts |
| 3 | Candidate/source-map vector bundles | Ordered candidate contents + topology + model configuration | Coordinates normalized only when semantically volatile |
/dev/shm/mechsuit-ast-arena is the source/embedding arena. /dev/shm/mechsuit-ov-cache holds compiled OpenVINO artifacts. Neither is a durable evidence ledger. A reboot may remove the arenas; it must not remove the experiment's source hashes or verdicts. The persistent record belongs on disk, outside the expendable cache.
The repair brief dates four regressions to October 28, 17:33–17:37 PDT. [S23] That date and attribution are the recovery investigation's record, not a claim that this author independently recovered those editor events.
| Regression | Mechanism | Why “it still runs” concealed the defect |
|---|---|---|
| Path-coupled file key | Absolute resolved path included in digest | Identical content at every new temp path missed |
| Inverted hit/miss handling | Manual metadata HIT skipped get_file_entry | Counters, LRU touch, tensor hydration were bypassed |
| Parse before lookup | _extract_symbols() ran before arena lookup | Warm cache still paid parser cost |
| Tensor alias/accounting split | Candidate key diverged from file-SHA alias; warmup/request counters misleading | SourceMap and daemon disagreed about available vectors |
Pure content addressing repairs the first problem. It does not by itself repair lookup order, hydration, aliases, or telemetry. A high hit rate can also be meaningless if the wrong vectors are returned. Candidate order, not merely candidate count, belongs in a vector-cache key. Identical bytes with different grammar interpretations must not share an incompatible parser entry; include parser language/configuration in the schema when supporting ambiguous extensions.
Start with the authoritative source modules rather than inventing another architecture. The classes below are in predictor_models.py; the calibrated policy is in hybrid_router.py. Importing a model is not a checkpoint verification. Pin the checkpoint SHA, source SHA, tokenizer files, and benchmark manifest together.
# Read-only inventory before choosing a rebuild environment:
rg '^class Arm' jepa/predictor_models.py
rg '^class UncertaintyCalibratedRouter' jepa/hybrid_router.py
sha256sum jepa/predictor_models.py
sha256sum jepa/hybrid_router.py
An Arm_1C-style interface keeps the state and action representations separate. Arm_2D's EMA teacher provides slowly moving targets. Arm_3C combines that learned signal with lexical/graph evidence. Use the pinned constructor signatures in the source; historical arm labels are not interchangeable APIs. A minimal EMA update, independent of architecture, is:
import copy
import torch
teacher = copy.deepcopy(student).eval()
for parameter in teacher.parameters():
parameter.requires_grad_(False)
@torch.no_grad()
def update_teacher(student, teacher, momentum=0.996):
for target, online in zip(teacher.parameters(), student.parameters()):
target.mul_(momentum).add_(online, alpha=1-momentum)
for target, online in zip(teacher.buffers(), student.buffers()):
target.copy_(online)
This is an EMA construction recipe, not a claim that 0.996 was every historical run's coefficient. Teacher evaluation must not accidentally update dropout or normalization state. Do not send outcome-derived metadata to the target encoder during held-out qualification.
For the NPU rebuild, provision the same local model snapshot and compatible OpenVINO runtime. Install dependencies in a dedicated environment; record resolved versions rather than promising that an unpinned future pip install reproduces a 2026 binary stack. The following compiles an existing local IR with dual static shapes.
from pathlib import Path
import openvino as ov
ir_xml = Path('minilm-openvino/model.xml')
assert ir_xml.is_file(), 'Choose the verified local IR snapshot first'
core = ov.Core()
assert 'NPU' in core.available_devices
compiled = {}
queues = {}
for length in (128, 256):
model = core.read_model(str(ir_xml))
model.reshape({port.any_name: [1, length] for port in model.inputs})
compiled[length] = core.compile_model(
model, 'NPU',
{'PERFORMANCE_HINT': 'THROUGHPUT',
'CACHE_DIR': '/dev/shm/mechsuit-ov-cache'})
queues[length] = ov.AsyncInferQueue(compiled[length], jobs=2)
The example IR path is a chosen rebuild destination, not an assertion of an existing lab path. Export a local Hugging Face snapshot to IR if it is absent; retain tokenizer and IR hashes. Map inputs by actual port names and element types; not every export has token_type_ids. Keep input arrays alive until asynchronous requests finish. Copy outputs before request reuse, and correlate each callback with its item ID. Use separate locks for each queue if callers share request state. Do CPU tokenization outside the embedding-cache critical section.
The static WordPiece vocabulary has 30,522 IDs in the requested MiniLM configuration. The actual table length must be asserted against the loaded tokenizer. Static token-specificity pooling avoids encoding a query differently because its batch companions changed. The implementation calls this an IDF table; it is a deterministic vocabulary-specificity heuristic, not necessarily corpus-measured inverse document frequency. [S14]
import torch
import torch.nn.functional as F
def pool_tokens(hidden, input_ids, attention_mask, static_idf):
assert len(static_idf) == 30522
mask = attention_mask.float()
weights = static_idf[input_ids].float() * mask
pooled = (hidden.float() * weights[..., None]).sum(1)
pooled /= weights.sum(1, keepdim=True).clamp_min(1e-8)
return F.normalize(pooled, dim=-1)
For exact parity, use the production encoder's multiple pooling branches, focal-mask rules, IDF version and normalization rather than this single-branch illustration. Test encode([q]) == encode([q, unrelated])[0] within a registered tolerance. Persist the IDF version inside every model/cache fingerprint.
The restored v3 file key omits absolute paths:
import hashlib
import json
import os
from pathlib import Path
import tempfile
def compute_file_key(file_path, raw_bytes, schema, model_fingerprint):
file_sha256 = hashlib.sha256(raw_bytes).hexdigest()
composite = f'{schema}:{model_fingerprint}:{len(raw_bytes)}:{file_sha256}'
return hashlib.sha256(composite.encode()).hexdigest()[:24], file_sha256
def _sym_body_key(symbol, lines):
start = max(0, int(symbol['start']) - 1)
stop = min(len(lines), max(int(symbol['end']), start + 38))
body = '\n'.join(lines[start:stop])
return hashlib.sha1(
f"{symbol['name']}:{symbol.get('kind','sym')}:{body}".encode()
).hexdigest()
def _normalize_cand_for_key(text):
# Use the exact production regex for historical key parity.
import re
return re.sub(r'(\[SYMBOL:.*?\))\s+\d+-\d+(\])', r'\1\2', text[:1200])
def candidate_key(candidates, topo_id, fingerprint):
doc = {'candidates': [_normalize_cand_for_key(c) for c in candidates],
'topo_id': topo_id, 'fingerprint': fingerprint}
return hashlib.sha256(json.dumps(doc, sort_keys=True).encode()).hexdigest()
def atomic_json(path, payload):
path = Path(path)
path.parent.mkdir(parents=True, exist_ok=True)
name = None
try:
with tempfile.NamedTemporaryFile(mode='w', dir=path.parent,
delete=False, encoding='utf-8') as out:
name = out.name
json.dump(payload, out)
out.flush()
os.fsync(out.fileno())
os.replace(name, path)
finally:
if name and os.path.exists(name):
os.unlink(name)
The production candidate normalization uses a 1,200-character encoding domain. That truncation is safe only if the representation being cached uses exactly the same domain. If the downstream encoder starts consuming more text, revise the fingerprint and key together. A full-body symbol digest must change for an edit on line 60 of a 75-line function, and on line 180 of a 200-line function. A preceding-line insertion should not change an otherwise unchanged symbol representation.
Metadata and tensor bundles require a publication protocol, not just a fast filename. Write tensors to a temporary path, publish with os.replace, then publish metadata last. Readers validate schema, model fingerprint, full content hash, tensor shape, and candidate ordering. Treat missing/corrupt halves as misses and count them. Use np.load(..., allow_pickle=False) for untrusted or mutable cache bundles. LRU touches and hit counters belong in the validated read path. An external cache hit should hydrate the process-local symbol/target caches before returning.
Falsification gate: two differently named files with identical bytes must share a v3 entry; a same-length content edit must miss; a reordered candidate list must not reuse the wrong matrix; a warm hit must not invoke the parser; and telemetry must reflect actual index/pack requests.
The Context Slicer is not a miniature generative code model. It maps a task to relevant, line-numbered source spans before the expensive decoder runs. HEARTH's sourcemap.py integrates that selection into delivery evidence. [S16] AMUX-249 turns the resulting packet into a bounded patch, staged repair, and independent verdict. The product boundary is evidence delivery, not a claim that a vector predicts every correct implementation.
🎓 Mathematician: Treat the slice $T=f(X,Q)$ as an information bottleneck before self-attention. We want low irrelevant information $I(T;X)$ while retaining task-relevant information $I(T;Y\mid Q)$. A useful design objective is $\min I(T;X)-\beta I(T;Y\mid Q)$ under exact-source constraints. This is an explanatory objective, not a measured mutual-information estimator in the deployed service.
For a conventional dense attention layer, the attention matrix scales quadratically with input length. The actual 27B fleet includes hybrid state-space/GDN machinery, so quadratic attention is not a complete cost model for every layer. Nevertheless, fewer irrelevant input tokens and a smaller requested output reduce real prefill, decode, queue residence, and opportunities for unsupported synthesis. A compression percentage without retained-source recall remains an incomplete result.
⚡ AI CTO: “Long-Context Delusion” is the strategic foil, not a claim that long context is useless. Sending 50K tokens can be appropriate when the dependency really spans 50K tokens. The asymmetry appears when a local NPU can prove that a bounded edit needs hundreds instead, leaving the GPUs to generate the edit and the operator to judge its evidence.
ADR-0075/0076 describe a historical heterogeneous fleet and its prefix-reuse engineering. [S17] The Mamba-2 llama.cpp path cloned the retained Turn-1 checkpoint with prompt.clone() instead of consuming the one cache state when a follower loaded it. LRU promotion retained the reusable checkpoint for other concurrent slots. The recorded B70 comparison is >165 s → 11.25 s, 99.70% cache hit. This was the historical 74B path; it is not the current THREE-DENSE 27B serving implementation.
For AM4, vLLM APC depended on identical tokens from position zero and aligned cache blocks. The ADR records 105.54 s → 2.99 s follower wall and 94.92% hit rate, with KV preemptions dropping from 3.0 to 0.0 on that test wave. Those warm shared-prefix waves do not predict hit rates for continually changing micro-slices. The operating manual later records low B70 hit rates on a different 27B workload. [S18]
| Mechanism | Identity requirement | What not to infer |
|---|---|---|
| Mamba Turn-1 checkpoint clone | Same retained context/state | Present 27B vLLM behaves like old llama.cpp |
| vLLM aligned APC | Exact leading tokens and eligible block boundaries | Similar-looking text shares a cache block |
| AST arena | Same content/schema/model identity | Prefix reuse and AST reuse are the same cache |
| Static prefix ordering | Rules/seed before mutable task spans | Padding prompts improves useful throughput |
The current plan is THREE-DENSE: three Qwen3.8-27B replicas, eight slots each, for 24 nominal concurrent local 27B slots. Slots are an admission/capacity setting, not 24 proven simultaneous successful deliveries. Callers should follow the door and approved operating plan, not revive the 74B as a fallback.
| Phase | Requested milestone | Interpretation and provenance |
|---|---|---|
| 1, PILE-3 S4 | 29/29 = 100% union | Cross-pass independently credited tasks, not one pass |
| 1, PILE-2 S4 | 45/46 = 97.8% union | Closed-pile rerun; separate from PILE-3 |
| 1, throughput | 47.4 credits/GPU-hour | Historical cumulative sampler instrument |
| 2, PILE-G8 | 25/63 union | Later historical union; never pooled with S4 |
| 2, non-canvas | 22/24 = 91.7% | A subgroup, not overall G8 success |
| 2, r28 | 58 context-cap refusals | Brief-specified diagnostic cohort |
| 3, integration | 914/914 packets <3,400 estimated tokens | Offline complete-pile packet-fit receipt |
| 4, micro-slicing | 409/409 ≤1,648 estimated tokens | Offline scheduled packet sweep, not all future repairs |
The first two union milestones and 25/63 G8 figure are retained as brief-specified historical milestones; a publication should freeze their exact per-task union exports before external comparison. The older capability record reports 22/63 at an earlier cutoff. [S19] The rolling sampler later records 699 / 14.595 = 47.9 in its stored counters; that does not invalidate the earlier 47.4 snapshot. A flat GPU-wall counter makes a trailing credit/GPU-hour delta undefined, not zero. Neither sampler ratio is a pooled success probability.
The audit numbers are bug IDs, not chronological experiment arm numbers. [S20] The r32..r35b lineage changed both caller and serving components; run labels alone do not prove which bytes a process loaded.
| Bug | Actual failure | Repair and durable invariant |
|---|---|---|
| #3 | New random temp path per packet | Stable slug/content paths; v3 ultimately removes path from semantic file identity |
| #4 | HTTP/1.1 clients pinned sockets under FD limit 1024 | Close connections, bound lifetimes, raise justified limit, measure descriptors |
| #5 | Slicer ignored budget; caller added aids after static allocation | Enforce source budget and reserve total prompt headroom before packing |
| #14 | </section><section...> line fusion hid DOM sections from regex | Newline-safe splice plus depth-aware HTMLParser |
| #21 | Child div/script tags shattered parent section symbols; data-module-only sections were ignored | Depth-aware HTMLParser; preserve complete section identity using id or data-module |
For #4, the audit reports 1,018 ESTAB sockets, 2,071 threads, and Errno 24. A high NOFILE limit alone is not the repair; it merely delays exhaustion if sockets remain pinned. For #5, the failed combined JEPA/renderer cohort had 0/117 fitting packets. The later 914/914 fit receipt demonstrates repaired packet construction, not independent success on the feature tasks those packets describe. For #14, an HTML parser schema change must invalidate cached parser results; re-parsing every warm hit is not a legitimate substitute for schema versioning.
The r35 audit finds full-section synthesis driven by the prompt contract itself: large seed projection, stacked source maps, remaining-ceiling source allocation, and an instruction to emit a whole section with inline code. [S21] A smaller max_tokens alone would truncate that task rather than make it small. r36/r36b instead scopes the source, seed, scaffold descriptor, and requested output together.
| Instrument | Before | Micro-slice figure | Reduction / qualification |
|---|---|---|---|
| Mean input tokens | 2,800 | 1,089.79 | −61.1%, brief-specified paired summary |
| Mean output tokens | 2,200 | 514.62 | −76.6%, brief-specified paired summary |
| Wall seconds | 56.0 | 14.98 | −73.3%, compare identical timing definitions |
| FULL SYNTHESIS display | 100% | 7.69% | Dashboard/cohort-specific label |
| r35 full-synthesis figure | 95.7% | Historical headline | Do not substitute for the broader audit cohort |
| r35 broad source audit | 102/104 ≥800 output tokens | 98.1% | Different denominator from dashboard headline |
| Offline r36 source sweep | 409/409 | ≤1,648 estimated tokens | Not actual tokenizer counts |
The independent architecture audit deliberately distinguishes those denominators. The later r36b live smoke gives eight actual per-call rows with inputs 413–1,647, outputs 344–785, and generation 6.867–16.145 s. [S22] It labels the smoke as frozen-contract replay, not buyer-usability credit. Our independent CT shard replay later reproduced all frozen passes but withheld all five for identical unseeded canvas geometry. That is the expected separation of form and substance. [S25]
🚀 Forensic Engineer:
PILOT_JEPA_SLICE_BUDGET=240is the source-slice contract. It is not the complete prompt length or an output limit. Log source bytes, estimated prompt tokens, actual model tokens, generation time, request wall time, and accepted work separately.
Python extraction uses ast and real source coordinates. Decompose classes into method symbols rather than making every class one enormous candidate. Retain imports, const_table references, one-hop callees, decorators, and signature dependencies. For long functions, select intent-anchored windows plus required return/assignment context. A window that omits the constant defining a validator's boundary is not a fair repair setup.
HTML uses HTMLParser start/end events and depth-aware section closure. data-module identifies the module boundary, not its functionality. CSS/JS/Rust/C# need language-appropriate symbols and conservative dependency closure; regex scaffolds must be labelled heuristic when no grammar parser is used.
| Language | Extraction contract | Mandatory companion evidence |
|---|---|---|
| Python | ast nodes with end_lineno; methods separate from containers | imports, decorators, constants, one-hop callees |
| HTML | depth-aware sections retaining id/data-module | linked script ownership, unique splice anchor |
| CSS | rule blocks preserving selectors and declarations | referenced class/ID rules and relevant media queries |
| JavaScript | function/class boundaries with script ownership | event registration, referenced DOM IDs, closure scope |
| Rust | function/impl/module items; preserve macro context | use paths, types, cfg attributes and called helpers |
| C# | type/method/property boundaries | using directives, attributes, event handlers and referenced types |
For a new language, add its extractor behind the same symbol record schema: {name, kind, start, end, dependencies, parser_version}. Resolve symbols from immutable bytes, then construct the same ranked source-window packet. A grammar-backed extractor should preserve comments/docstrings needed to explain contracts. A regex extractor must refuse ambiguous brace/string nesting rather than invent boundaries. Keep source rendering independent from ranking so a ranking change cannot mutate quoted code. Qualification fixtures must include nested blocks, strings containing braces, and same-line tags. Unbalanced syntax or missing mandatory evidence is SETUP:needs-split, never a fabricated excerpt.
import ast
from html.parser import HTMLParser
class Sections(HTMLParser):
def __init__(self):
super().__init__(convert_charrefs=False)
self.depth = 0
self.open_sections = []
self.sections = []
def handle_starttag(self, tag, attrs):
if tag == 'section':
meta = dict(attrs)
self.open_sections.append((self.depth, self.getpos()[0], meta))
self.depth += 1
def handle_endtag(self, tag):
if tag == 'section' and self.open_sections:
depth, start, meta = self.open_sections.pop()
self.depth = depth
self.sections.append({'start': start, 'end': self.getpos()[0],
'module': meta.get('data-module')})
def python_symbols(source):
tree = ast.parse(source)
return [{'name': n.name, 'start': min([n.lineno] +
[d.lineno for d in n.decorator_list]), 'end': n.end_lineno}
for n in ast.walk(tree)
if isinstance(n, (ast.FunctionDef, ast.AsyncFunctionDef, ast.ClassDef))]
The miniature HTML example tracks nested sections, not every HTML implicit-closing rule. Use the production extractor and its fixtures for full historical parity. The Python example enumerates nested symbols; the production ranker must avoid charging both a whole class and all its methods as independent budget-free context.
import json
from urllib.request import Request, urlopen
BASE = 'http://loopback:npu-slicer'
def post(path, payload):
req = Request(BASE + path, data=json.dumps(payload).encode(),
headers={'Content-Type': 'application/json',
'Connection': 'close'})
with urlopen(req, timeout=15) as response:
return json.load(response)
# Set this to a file in your new rebuild workspace.
paths = ['/absolute/path/to/rebuild/app/main.py']
for path in paths:
indexed = post('/index_file', {'file_path': path})
assert indexed['ok'] and 'NPU' in indexed['encoder_device']
pack = post('/pack_context', {
'intent': 'Reject invalid input with 422; preserve valid behavior',
'files': paths, 'token_budget': 240})
assert pack['ok']
assert all(s['jepa_mode'] == 'live_18097' for s in pack['file_slices'])
Do not dispatch the returned wrapper blindly: it may contain a blueprint prescription. The generation packet must set prescription_excluded=True and retain source evidence only. Verify every numbered line against the original bytes and its file SHA. A truncated final line must be rejected rather than presented as verbatim source. Required endpoint handlers, imports, constants and splice anchors need explicit coverage assertions.
Construct the generation prompt in this order:
Invariant rules and deterministic seed projection
Stable source-map/scaffold metadata; no duplicate full seed arrays
<!-- SHARED_CONTEXT_END -->
Intent and bounded microtask acceptance criteria
Verified mutable source lines and exact splice anchor
Output: a small piece for the declared patch contract
The approved r36b contract uses source slice 240, prompt target 1,650, actual input cap 1,950, default output cap 1,280, canvas cap 1,536, and aims for 550–650 output tokens, always under 800 in the shape gate. [S18] Keep headroom for tokenizer differences and repair instructions. A cap is a refusal boundary; it is not a target to fill. The callback applies only an accepted exact patch, then validates the cumulative ratcheted candidate. A banked module must remain independently usable under the new floor.
Falsification gate: require live NPU provenance, exact source lines, bounded actual tokens, unchanged graders, fresh-copy replay, and runtime controls that change visible output.
The operating plan is the single-owner pickup document, not a transcript or dashboard. [S18] The plan specifies THREE-DENSE, the frozen r36b driver, mandatory live NPU slicing, and independent verdicts before accepting a candidate. This monograph makes no fresh fleet-status claim from that plan alone. The historical records were read; no service was restarted to produce this document.
| Surface | Recorded state | Meaning |
|---|---|---|
| THREE-DENSE | Three Qwen3.8-27B replicas | Plan of record; verify loaded models at operational use |
| Wave-2 Floor-v2 | 48 banked non-canvas modules across 23/30 repos | Partial capability bank, not 23 whole-task successes |
| CT39 canvas/toggle tasks | 0/39 at the requested cutoff | New residual denominator, not all G8 |
| Wave-2 canvas edge | 0/30 at the requested cutoff | Separate from cold Wave-2 and other floors |
| r36b CTSH1 batch | Frozen 5/5; independent 0/5 | Real rendering mechanics, unseeded demo geometry |
| Arena v3 | Later recovery receipt passed | Infrastructure recovery, not a model-gain claim |
The 48-module bank is recorded in the operating-manual ledger. [S26] A banked module changes the starting floor for a later task. Therefore Wave-2 Floor-v2 cannot be pooled with cold Wave-2 as if only the driver changed. The requested 0/39 and 0/30 are cutoff statements, not a recomputation of every possible later pass. Preserve task IDs, source hashes, floor version, and accepted candidate hashes in any union export.
The canvas edge is concrete: g8_renderer_aid.v3.js supplies two demo points near the start of the aid. The reviewed candidates copied generic points labelled unknown instead of binding buyer data. The independent runtime probe saw real WebGL contexts and draw calls, and a button genuinely switched visible canvases back and forth. That is retained usable mechanics, but the geometry/labels were not derived from each repository seed. All five task-level verdicts remained SUBSTANCE. [S25] This is not a missing marker, parse error, or reason to relax the grader. The next bounded problem is coordinate/data binding with a visible seed-grounded rendering contract.
🎓 Mathematician: A representation aid can demonstrate syntax and still contaminate the solution space. If every buyer gets the same two points, the model learned the example's shape rather than the buyer's state. A useful next assay changes the seed while holding the visual contract fixed, then tests whether geometry or labels change in the predicted way.
⚡ AI CTO: Bank the working primitive without selling the unfinished product. “Toggle mechanics usable; buyer-grounded canvas not yet demonstrated” is a capability record. It tells the next builder exactly what can be reused and what still needs evidence.
The recovery receipt is timestamped 2026-10-30T04:57:23.386271+00:00. [S24] That is after the requested October 29 UTC interval, although local calendar labels can differ. It is presented here as a later verification addendum, not silently moved into October 29.
| Recovery observation | Receipt value | Scope |
|---|---|---|
| Schema | mechsuit-shm-ast-arena.v3 | Live daemon at the receipt time |
| Hits / misses | 24 / 2 | Counter window after verification |
| Hit rate | 92.31% | Not a lifetime or arbitrary-workload hit rate |
| Arena entries | 20 | Verification population |
| Arena size | 4.487 MiB | Separate from NPU compiled/runtime memory |
| Successful requests counted | 10 | Index/pack accounting restored |
| NPU accel descriptors | 1 | /dev/accel/accel0 observed |
| DRI render descriptors | 0 | Checked process tree in the receipt |
| B70 VRAM | 0.0 MiB on each card | Router attribution, not whole-fleet memory |
| Offline targeted checks | 12 passed | Specific recovery fixtures |
| Cross-path first index | HIT | Identical bytes, different path/name |
| Cross-path first pack | HIT | Third identical copy |
| SourceMap file-SHA alias | Exists | Host namespace verification |
The receipt records that an initial probe could not see a host /dev/shm alias from its sandbox. It then repeated the alias check in the host namespace and retained both facts. This distinction prevents a namespace visibility problem from becoming a false cache diagnosis. The live restart, preflight, old/new PIDs, and source hashes are contained in that receipt. This author did not perform another restart or clear an arena.
🚀 Forensic Engineer: The restored hash is not “fast because RAM.” It is correct because equivalent content maps to the same validated object, different content invalidates it, and a warm hit avoids parsing and tensor recomputation. The hit counter is meaningful only after those equivalence properties have been tested.
Build in a fresh environment, retain a manifest of package/model/source versions, and deploy only when the owner holds the service lease and no work is in flight. The following unit is a rebuild template; compare it with the installed unit before using it. Do not overwrite the production unit by copying a documentation example blindly.
[Unit]
Description=Sovereign JEPA NPU context router
After=network.target
[Service]
Type=simple
WorkingDirectory=workspace
Environment=PYTHONPATH=workspace:workspace
Environment=HF_HUB_OFFLINE=1
Environment=TOKENIZERS_PARALLELISM=false
Environment=OV_CACHE_DIR=/dev/shm/mechsuit-ov-cache
Environment=MECHSUIT_AST_ARENA_DIR=/dev/shm/mechsuit-ast-arena
Environment=ZE_ENABLE_ALT_DRIVERS=libze_intel_npu.so.1
Environment=CUDA_VISIBLE_DEVICES=
LimitNOFILE=65536
ExecStart=python3 jepa/daemon_v3.py
Restart=on-failure
RestartSec=3
[Install]
WantedBy=default.target
LimitNOFILE=65536 is the systemd spelling for the requested RLIMIT_NOFILE. The inspected installed unit at one earlier snapshot omitted that line; verify effective process limits and drop-ins rather than assuming the template is deployed. Restart=on-failure is a cookbook policy choice; the historical unit used Restart=always. A user-service restart needs sole ownership and drain confirmation, not non-interactive sudo.
# Read-only preflight; these commands are examples, not run by this monograph.
systemctl --user show npu-slicer.service -p MainPID -p ActiveState -p LimitNOFILE
systemctl --user cat npu-slicer.service
ss -tnp '( sport = :npu-slicer or dport = :npu-slicer )'
pgrep -af 'pilot_variant_d|daemon_v3.py'
# Inspect effective /proc/<MainPID>/limits, not only the unit text.
# With sole lease, compatible binaries, and an empty in-flight set:
# systemctl --user daemon-reload
# systemctl --user restart npu-slicer.service
Keep /health read-only and parse the response instead of trusting a UI badge. A restart should wait for readiness, not just sleep a fixed number of seconds. Connection: close belongs on both the HTTP server response and client requests. The server must release request threads and sockets after completing a response. Do not reintroduce self-loopback HTTP from a resident engine when an in-process call is available.
import json
from urllib.request import Request, urlopen
req = Request('http://loopback:npu-slicer/health',
headers={'Connection': 'close'})
with urlopen(req, timeout=5) as response:
health = json.load(response)
assert health['encoder_device'] == 'NPU'
assert health.get('fallback_reason') is None
assert health['shm_arena']['schema'] == 'mechsuit-shm-ast-arena.v3'
assert health['b70_vram_telemetry']['open_dri_gpu_fds_count'] == 0
assert health['b70_vram_telemetry']['verified_zero_gpu_fd_binding']
assert health['vram_b70_xpu0_mib'] == 0
assert health['vram_b70_xpu1_mib'] == 0
# Only after controlled index/pack probes, not on a freshly reset counter:
assert health['requests_served'] > 0
assert health['shm_arena']['hit_rate_pct'] >= 80
The 80% criterion belongs to the controlled warm verification, not an idle service startup. To independently inspect descriptors without relying solely on /health:
from pathlib import Path
def device_descriptors(pid):
found = []
for descriptor in (Path('/proc') / str(pid) / 'fd').iterdir():
try:
target = str(descriptor.readlink())
except (FileNotFoundError, PermissionError):
continue
if target.startswith(('/dev/dri/', '/dev/accel/')):
found.append((descriptor.name, target))
return found
# Obtain PID from systemctl; include relevant child processes in a full audit.
# assert not any('/dev/dri/renderD' in target
# for _, target in device_descriptors(pid))
A permission-denied /proc read is missing evidence, not zero handles. Use the NPU sysfs busy counter at PCI 0000:00:0b.0 during a controlled embedding request. Do not infer sustained NPU clock speed from a configured maximum-frequency ceiling. Do not infer B70 memory use from the NPU's shared-memory allocation counter.
| Symptom | First discriminating check | Correct next action |
|---|---|---|
| Hit rate zero | Same bytes at two paths; inspect schema/key | Fix identity/lookup, not model weights |
| Warm latency high | Parser call count on HIT | Restore lookup-before-parse |
| HTTP Errno 24 | FD/thread counts and ESTAB sockets | Close lifecycle leak, then justify limit |
| Healthy process, wrong ranking | Candidate order/content digest | Reject stale vector alias |
| NPU unavailable | accel descriptor and encoder_device | SETUP; no silent CPU/cloud substitution |
| Source missing in packet | Mandatory IDs/spans and SHA | Split task or repair source map |
| Tokens under cap, whole module emitted | Task/output contract | Reduce requested scope, not just max_tokens |
| Frozen pass, unusable feature | Runtime event and buyer-seed binding | SUBSTANCE; preserve the candidate |
| Quote exists but answer wrong | Per-claim source/association review | Separate citation validity from correctness |
| Missing receipt after transport timeout | Backend, wall, terminal status | SETUP deadline, not model miss |
The boundary checklist is conservative: the monograph does not implement AMUX-245. It separates a context/evidence service from a control plane with authority to change the world.
The next edge is seed-grounded coordinate binding under the existing small-context contract. A decisive probe supplies two different seeds, checks visible labels or geometry differ correctly, counts real WebGL draws, switches contexts twice, and preserves earlier floor behavior. A success there would expand capability; a larger prompt alone would merely change the setup.
References below are local provenance, intentionally referenced by artifact basename. Historical media, corpus exports, and credentials are not bundled into this document. The three-expert voices are explanatory synthesis, not additional experimental observations.
For exact loss parity, read [hybrid_router.py][S13] and predictor_models.py. For parser parity, read context_packager.py. For claim-status disagreements, preserve the original [strategy register][S02], [mathematical audit][S08], and [requested brief][S27] together. The operationally valuable outcome is a recoverable evidence chain from intent to source, source to bounded candidate, and candidate to independent verdict.
Interactive atlas built : self-contained HTML5, Canvas2D only, no external fonts, libraries, network requests or persistent telemetry. Simulators are deterministic educational reconstructions. Personas are editorial lenses. Receipt metrics, brief-supplied claims and later corrections remain explicitly distinct.