seam: implement decorated-fn boundary auto-emit; prove on clone

Will waived diff review -> build it for real. Add engram_boundary_beat() to the
runtime (afferent counter++ + engram_chrono_tick + engram_strengthen(self-anchor)
+ dharma_emit) and two act-stats counters (aff_boundary_ops, dharma_emits).
codegen cg_fn injects ONE engram_boundary_beat(op) at the entry of every
@manager/@accessor fn (fn_has_decorator, so it fires under @route @manager too) —
a decorated op self-reports with ZERO hand-written instrumentation. Rebuilt elc
self-host + the cognition engram in the worktree; ran it as the clone daemon on
:8900. Proof (/api/boundary-proof, @manager, empty body, 5x): aff_boundary_ops
0->5, dharma_emits 0->5, self activation_count 1510->1513, chrono stamp advanced.
Brought in feat/cognitive-architecture engram runtime+server for the build.
strengthen = activation bump (not content/edge write) -> identity protection
intact. Live :8742 untouched; no push, no cutover.
This commit is contained in:
bigmerge
2026-08-14 21:20:18 -05:00
parent d4f401de1c
commit 01826421c4
17 changed files with 26707 additions and 33 deletions
+24 -1
View File
@@ -1,4 +1,27 @@
# Decorator-as-seam — what's REAL vs STAGED (with the exact diff)
# Decorator-as-seam — IMPLEMENTED + PROVEN ON CLONE (2026-08-14)
> **UPDATE — no longer staged. The boundary auto-emit is BUILT and PROVEN on the
> clone.** Will waived the diff review. Implemented: `engram_boundary_beat()` in
> `lang/runtime/el_runtime.c` (afferent counter++, `engram_chrono_tick`,
> `engram_strengthen(self-anchor)`, `dharma_emit`) + two act-stats counters
> (`aff_boundary_ops`, `dharma_emits`); `cg_fn` in `lang/el-compiler/src/codegen.el`
> injects ONE `engram_boundary_beat(op)` at the entry of every `@manager`/`@accessor`
> fn (via `fn_has_decorator`, so it also fires under `@route @manager` stacking).
> Rebuilt `elc` self-host + the **cognition engram** in the worktree; ran it as the
> clone daemon on `:8900`.
>
> **Proof** — `/api/boundary-proof` (`@manager`, body = one `return`, ZERO
> instrumentation) called 5×:
> - afferent `aff_boundary_ops` 0→5 · dharma `dharma_emits` 0→5
> - strengthen: self `activation_count` 1510→1513, salience 0.9→1.0
> - chronoception: `chrono_last_tick` 1786760357885→1786760381676
>
> All four auto-fired from the decoration alone; daemon stayed alive; live `:8742`
> untouched. The original staged design is retained below for the record.
---
# Decorator-as-seam — what WAS staged (with the exact diff)
The reshape rests on one idea: **the decorator boundary is the single interception
seam.** Decorate a function with its `@route` + VBD role and the fabric gives, for