chore: sync current Moltnet state - #10
Merged
Merged
Conversation
…ntity
The control wake's `from` came from SenderName(), which returns Actor.Name in
preference to Actor.ID. Name is never validated by validateSenderIdentity, so
the server's own authenticated identity was discarded in favour of a string the
sender chose, and that string was rendered verbatim into another agent's prompt.
Measured against a real node configured like the tiny-football fixture (bearer
auth, public_read false, agent_registration disabled, per-agent bound tokens):
red token, from.id=blue -> 403 agent "blue" is not allowed
red token, from.id=operator -> 403 agent "operator" is not allowed
red token, from.id=red, from.name=operator -> 202 accepted
So the ownership check bites on from.id and was completely bypassed via
from.name. It survived the strictest configuration in the repo.
Control attribution is now Actor.ID, which the server credential-binds before
the stored event reaches the bridge. Protocol validation constrains it to
[A-Za-z0-9][A-Za-z0-9._:-]{0,127}, so the derived header value cannot contain a
newline, space, or bracket -- the envelope-forgery class dies structurally
rather than by escaping. SenderName still renders the display name in the
message body, which is untrusted by construction.
The sealed causal record already attributed the forgery correctly:
principal_id was operator:token:red-agent, not the claimed "operator", because
causalPrincipal() reads only authn.Claims.
internal/bridge/... 10/10 packages pass outside the sandbox.
…serting against it web.Files is //go:embed all:dist, so the Vite bundle is compiled INTO the test binary. TestConsoleBundleUsesRoomAccessForComposer asserts the bundle contains "can_write", "registered agents write" and "members write" — but go test never runs Vite, and an embedded stale bundle always exists and always looks valid. If web/src changed those authorization strings and nobody rebuilt, the assertions pass against last month's JavaScript with no signal anywhere. That is worse than a missing existence check. Compares the newest web source against the OLDEST file under web/dist and fails loudly with both timestamps and the rebuild command. Fails as vacuous on a zero-source or zero-output scan, with a test for the empty-output case so the instrument is known to report a positive. Proven both directions: touching web/src/App.tsx gives `web bundle stale: source .../web/src/App.tsx mtime ... is newer than oldest output .../web/dist/index.html mtime ...; run npm run build in ecosystem/moltnet/web`; restoring the output mtimes returns the whole transport package to ok.
The sealed run record carried no message text and no sender: the causal log
records only message_id, target, content_sha256 and policy_decision. With a
network on store.kind memory the bodies died at container teardown, so a run
could not show who said what to whom -- the evidence the memetics programme is
built to study.
transcript.json is now written into the causal directory, which the compiler
already mounts unconditionally for exactly this reason. It reuses the existing
simfile.moltnet.transcript.v1 shape so existing readers and golden fixtures are
unaffected, plus a machine-readable attestation block.
The volume's contract changes from hashes to bodies and the file says so at the
site, including why it stays an attestation:
- text is checkable -- sha256(json.Marshal(Parts)) equals the content_sha256
already recorded for that message_id
- attribution is stated, never assumed -- `from` is what the sender CLAIMED;
principal_id is what the server AUTHENTICATED
Three attestation states, not two. A network on auth.mode: none stamps
system:moltnet.anonymous, so attribution is `unattested` and must never be read
as `passed`.
Verified on a real node outside the sandbox: seven messages written, every one
matching its causal content_sha256, and a message posted by red's token with
from.name "operator" recorded against principal operator:token:red-agent.
internal/{observability,rooms,app} pass outside the sandbox.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed
Why
The GitHub default branch is 77 commits behind the Moltnet build pinned by the current ecosystem integration.
Impact
Validation
go test ./...— pass across all packagesReview notes