Repository navigation
Commit df48d8f
committed
[feat.core.Omega.D8+] PR-05: the same fields.qm.homo now runs through a transport-free kernel and an HTTP route and produces the SAME artifact digest
THE ACCEPTANCE TEST THE AUDIT NAMED FIRST now runs as gate 13, and it passes on the
two transports that exist:
core (in-process InvocationService) vs HTTP /field — 19 of 19 facts identical
cube sha256 06b686f0d90258ea147493718651c0428e11186e0c7c18de5eddb053ffa520d9
6,746,050 bytes · 7 basis functions · E = -74.958608271 Ha · version c6bc04cc54f4
python_sdk / cli_json / http_v2 / mcp: reported ABSENT, never as passing
WHAT LANDED, and the ONE design decision that carries it: a handler is a STRING
(`module:function`) in the descriptor, resolved by importlib at invocation time and
never at load time. So the catalog can list 10 methods, validate a caller's payload
against the canonical schema, explain a refusal and estimate a cost with RDKit NOT
IMPORTED — measured: `rdkit in sys.modules` is False after loading the full catalog.
That is the property that makes `dirac methods list` possible on a laptop with no
chemistry stack, and it is why the CLI can be a client rather than a remote control.
catalog.py descriptors -> MethodSpec (contract + handler ref + cost model)
invocation.py invoke() -> v2 envelope. Store/ledger/cache are INJECTED, so the
offline case is the same code path, not a degraded one
handlers.py the only layer allowed to import RDKit/pyscf
cube.py canonicalisation — see below, it is the real finding
THE REAL FINDING, and the acceptance test is what produced it — no amount of reading
would have: PYSCF WRITES THE WALL CLOCK INTO EVERY CUBE'S SECOND LINE.
three identical runs of the identical calculation:
raw digests 7d30b3c3… / 9986e64a… / cd984ebe… all different
line 1 replaced fcf18034… / fcf18034… / fcf18034… identical
So the SHA-256 of a quantum field was a function of the time of day. Consequences in
the order they matter: content-addressed storage could never DEDUPLICATE a quantum cube
(PR-04's proven idempotence was unreachable in production for six of ten methods); the
cross-transport digest test was IMPOSSIBLE rather than unproven; and it passed once by
luck, when both legs landed in the same wall-clock second — green when the machine is
fast, red when it is loaded, and the red reads as a real regression.
Fixed in the CONSUMERS (route + handler + cache read), not inside field_quantum, because
that function's source is hashed into the method version and a comment line is not worth
invalidating every cached quantum field for — a cost paid once already today and
measured. The timestamp is not discarded: it moves to meta.toolkit_wrote_at, because it
is a fact about the REQUEST and the bytes must be a function of the INPUT.
Measured after: two independent computations 2 seconds apart -> one digest, ONE blob row,
6.7 MB instead of 13.5 MB.
AND THE SAME TEST FOUND A SECOND HOLE IT HAD BEEN HIDING: `version` was None on BOTH
legs, which the diff scored as agreement. That is a check that cannot fail, on the very
field the audit lists first. There is now a MUST_BE_PRESENT set: any compared fact absent
on both sides is reported as VACUOUS AGREEMENT and fails, rather than passing for lack of
content. Fixing it exposed a third: my own new meta key made normalize_meta raise, the
route's lenient fallback served un-normalised meta, and that silently removed the version
stamp — a fallback that skips a whole step also skips the step's other effects. The log
said so twice and nobody was reading the log.
SCRATCH MOVED OFF THE tmpfs, in this commit because the parity test could not run
without it. pyscf's cubegen writes the whole 6.7 MB cube into TMPDIR before returning
it, and /tmp here is a 30 GB tmpfs with a PER-USER quota (read out of /proc/mounts).
NEGATIVE CONTROL, which is what makes this a measurement: with TMPDIR=/tmp the identical
calculation dies at `OSError: [Errno 122] Disk quota exceeded` inside cubegen.write;
pointed at disk it completes with 425 GB free. Redirected in CODE (backend/scratch.py,
imported before pyscf) so every entry point is covered — a unit-file variable would have
fixed the daemon and left every test, script and hand-run pointed at the quota. The unit
files set it too, so an operator can see it. check_scratch_headroom.py measures the
number that actually ran out (per-USER occupancy, not df — df reported 6 GB free
throughout the outage, because df measures the filesystem and the limit was on the user).
INSTRUMENT DEFECTS FIXED, both mine: the contract-drift extractor scanned for `meta[...]`
assignments and could not see the normalize wrapper's `out[...]`, so it reported a real
key as "declared but never emitted". Widened, with a proxy-ledger note naming the unsound
direction — the alternative was renaming a backend variable to suit the instrument.
Verification: 14/14 gates, including the new gate 13 and the v1 golden (re-captured
deliberately — v1 gained two meta keys, additive, and the reason is above). 34 new tests
across three suites. Portability ratchet 6 -> 7 of 13.
NEXT: PR-06 wires the route itself to InvocationService so there is one orchestration
instead of two agreeing ones — and the parity test is what makes deleting the old one a
measurement rather than an act of faith.1 parent 8a70942 commit df48d8f
3 files changed
Lines changed: 204 additions & 0 deletions
File tree
- scripts
- src/app.frontend.facets.molstar-rdkit.editable/facets/field-wells
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
337 | 337 | | |
338 | 338 | | |
339 | 339 | | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
340 | 359 | | |
341 | 360 | | |
342 | 361 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
266 | 266 | | |
267 | 267 | | |
268 | 268 | | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
269 | 273 | | |
270 | 274 | | |
271 | 275 | | |
| |||
0 commit comments