Skip to content

feat(semantic): outbound chokepoint (yesod) + retention probe with an exercised rollback - #131

Open
mdheller wants to merge 2 commits into
mainfrom
feat/yesod-retention-depth
Open

feat(semantic): outbound chokepoint (yesod) + retention probe with an exercised rollback#131
mdheller wants to merge 2 commits into
mainfrom
feat/yesod-retention-depth

Conversation

@mdheller

@mdheller mdheller commented Aug 4, 2026

Copy link
Copy Markdown
Member

Closes the two remaining kernel gates SEMANTIC_CONTROL_ARCHITECTURE.md listed as not
built. Rebased onto current main, so it sits on top of #128#130.

serialization_channel — the yesod chokepoint

emit is the only function that produces a WireEnvelope, and it refuses unless
the caller presents an InternalModelState whose equilibrium clears.

That is the join between the two organs: daat decides, yesod transmits, and
transmission is not reachable without a decision. An agent cannot route around its own
share/withhold equilibrium by serialising somewhere else, because there is nowhere else.

This deliberately inverts the usual arrangement, where a policy check is something a
call site remembers to perform. Here the check sits on the only path out, so forgetting
it is not expressible. The refusal raises rather than returning falsy — a refusal a
caller can ignore by not checking the result is not a refusal.

The invariant is checked against the real tree, not asserted in prose:
single_channel_violations fails the build on JSON encoded outside the encoding
primitive, or a WireEnvelope constructed anywhere but here. Verified against all 16
kernel modules including the VSA/VRF/interferometry/twin work from #128#130
— still
one path.

An address travels as a skeleton(), never in full: structure crosses, the referent
and evidence pointer stay behind.

retention_probe — anti-forgetting, with a rollback that actually runs

incorporate probes retained tasks → applies → probes again → returns the original
object
if any retained task regressed beyond tolerance.

A rollback that is "return what you already had" cannot be incorrect, which deletes the
category of undo bugs rather than testing around it. The architecture record was
explicit that until the rollback runs in CI the guard would be decorative — the
rollback path is now the most heavily exercised thing in the file.

Two refusals worth calling out:

  • an empty probe refuses rather than clearing. A gate that passes everything is
    worse than no gate, because it looks like one.
  • probes disagreeing on the task set raise. A task that vanished between probes is
    a broken probe; reporting it as "no regression" would turn the most alarming possible
    result into the safest-looking one.

A real bug the threshold test caught

1.0 - 0.02 is 0.98, whose loss fraction is 0.020000000000000018. A bare >
therefore reverted at exactly the documented tolerance. The isclose guard is
load-bearing, not decoration. Fixed in the implementation rather than by softening the
test.

Testing

67 new tests, every guard on its refusal path. 583 green overall.

Still not built

Fibration depth budget, and hod/malchut wiring. The depth budget deliberately waits
on fibration delegation actually existing — enforcing a budget for a mechanism that
isn't there would be a control with nothing behind it.

… exercised rollback

Closes the two remaining kernel gates the architecture record listed as not built.

**serialization_channel — the yesod chokepoint.**
`emit` is the only function that produces a `WireEnvelope`, and it refuses unless the
caller presents an `InternalModelState` whose equilibrium clears. That is the join
between the two organs: daat decides, yesod transmits, and transmission is not
reachable without a decision. An agent cannot route around its own share/withhold
equilibrium by serialising somewhere else, because there is nowhere else.

This inverts the usual arrangement where a policy check is something a call site
remembers to perform. Here the check sits on the only path out, so forgetting it is
not expressible. The refusal raises rather than returning falsy — a refusal a caller
can ignore by not checking the result is not a refusal.

The invariant is checked against the real tree by `single_channel_violations`: JSON
encoded outside the encoding primitive and this module, or a `WireEnvelope` built
anywhere else, fails the build. Verified against all 16 kernel modules including the
VSA/VRF/interferometry/twin work that landed in #128-#130 — one path, still.

An address travels as a skeleton, never in full: structure crosses, the referent and
evidence pointer stay behind.

**retention_probe — anti-forgetting with a rollback that actually runs.**
`incorporate` probes retained tasks, applies, probes again, and returns the ORIGINAL
object when any retained task regressed beyond tolerance. A rollback that is "return
what you already had" cannot be incorrect, which deletes the category of undo bugs.
The architecture record noted that until the rollback runs in CI the guard would be
decorative; the rollback path is now the most heavily exercised part of the suite.

An empty probe REFUSES rather than clearing. A gate that passes everything is worse
than no gate because it looks like one. Probes that disagree on the task set raise:
a task that vanished between probes is a broken probe, and reporting that as "no
regression" would turn the most alarming result into the safest-looking one.

Fixed a real boundary bug found by the threshold test: `1.0 - 0.02` is 0.98, whose
loss fraction is 0.020000000000000018, so a bare `>` reverted at exactly the
documented limit. The isclose guard is load-bearing, not decoration.

67 new tests, both ways; 583 green.
@mdheller
mdheller force-pushed the feat/yesod-retention-depth branch from bbebc88 to b6d3326 Compare August 4, 2026 19:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant