feat(venue): admit the logging capability to the venue-adapter world - #37
Open
mfw78 wants to merge 4 commits into
Open
feat(venue): admit the logging capability to the venue-adapter world#37mfw78 wants to merge 4 commits into
mfw78 wants to merge 4 commits into
Conversation
2 tasks
Contributor
Author
|
Adoption blocker filed upstream: nullislabs/nexum-runtime#77. The pinned runtime rejects |
Contributor
Author
|
Correction: the canonical upstream issue for the provider logging capability is nullislabs/nexum-runtime#76 (filed during implementation; also covers declaration enforcement). nexum-runtime#77 was a duplicate and is closed. |
mfw78
force-pushed
the
feat/venue-logging-capability
branch
from
August 4, 2026 23:26
b50f7b8 to
d6074fd
Compare
mfw78
force-pushed
the
feat/denial-classification-seam
branch
from
August 4, 2026 23:26
c757661 to
0256e81
Compare
This was referenced Aug 6, 2026
mfw78
force-pushed
the
feat/denial-classification-seam
branch
from
August 6, 2026 15:30
0256e81 to
3d53f31
Compare
The venue world refused logging at compile time, so adapter-interior events could only surface through captured stderr as unstructured WARN records. Add logging to VENUE_CAPABILITIES: the synthesis mirrors the module loop and passes the core adapter idents through, and the venue macro rides the logging ident to emit install_tracing, binding the standard nexum-sdk tracing facade to the crate's own nexum:host/logging import. Without the declaration the function does not exist, so the facade cannot bind to an undeclared import. Host side, the venue provider linker binds the module-world logging implementation beside chain and messaging: unconditional in the linker, gated per adapter by the declared world. videre-sdk re-exports nexum_sdk so the emitted glue needs no direct dependency in the adapter crate. The logging-venue fixture declares logging alone; the platform tests assert the declared import is present (and absent otherwise) and that guest tracing reaches the host log pipeline as host-interface records with per-event levels and structured fields intact. The runtime pin carries no logging row in its provider capability registry yet, so the E2E boots with the declaration omitted from the boot manifest. AI Assistance: Claude Code used for implementation and tests.
…manifest gap The emitted level mapping has five arms; only INFO and WARN were covered, so an ERROR or TRACE transposition passed. Emit one bare probe per level in init and assert exactly one host-interface record per level, which catches a collapsed arm as well as a missing one. Record the provider capability-registry gap where it bites: booting the fixture's own module.toml fails with `unknown capability "logging"`, tracked as nullislabs/nexum-runtime#76. AI Assistance: Claude Fable used for the red-team review and these fixes.
…ndeclared import The bumped runtime pin admits logging to the provider capability registry and enforces a component import against its declaration (nexum-runtime#95), and rejects the all-zero digest sentinel at parse (nexum-runtime#79). Retire the tempdir workaround manifest and its nexum-runtime#76 anchor: the positive E2E boots the fixture from its own module.toml, logging declared, and the old workaround shape (logging imported, nothing declared) becomes the negative case, a boot refusal naming the capability violation. Drop the placeholder component digest the runtime now refuses.
mfw78
force-pushed
the
feat/venue-logging-capability
branch
from
August 6, 2026 16:11
d6074fd to
9e64639
Compare
The level ladder counted host-interface records per level, which any permutation of the emitted mapping preserves: transposing the ERROR and TRACE arms of the venue macro's sink kept every count at one and the suite stayed green. Name each probe after its own level and hold the record's level to the message that produced it, so a transposed arm fails. Cover the motivating case as well: adapter-interior facts are reported from a dispatched verb, not only from init, so submit one intent through the registry and read the verb's record back with its fields intact. The fixture already emitted that event; nothing asserted on it. List the fixture in the README layout table beside flaky-venue.
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
Admits the
loggingcapability to thevenue-adapterworld:VENUE_CAPABILITIESincrates/videre-macros/src/world.rsnow includesloggingalongsidechain,messaging, andhttp, andsynthesize_venuethreads the capability's adapter ident through so the#[venue]macro (crates/videre-macros/src/lib.rs) can emit aninstall_tracing()glue function whenloggingis declared, wiring the guestnexum_sdk::tracingfacade and panic hook onto the world'snexum:host/loggingimport via aLogSinkimpl - the function only exists when the capability is declared, so the facade cannot bind to an undeclared import.videre-sdkre-exportsnexum_sdk(crates/videre-sdk/src/lib.rs) so the macro-emitted glue reaches it without adding a direct dependency in adapter crates.VenueAdapterKind::linkincrates/videre-host/src/registry.rsbindsnexum::host::logging::add_to_linkerunconditionally alongside chain and messaging, gated per adapter by the declared world same as the other two. The new fixture cratemodules/fixtures/logging-venuedeclaresloggingalone inmodule.tomland exercisesinstall_tracing, an INFO/WARN event with structured fields, and a per-level probe frominit, plus one INFO event from a dispatched verb.crates/videre-host/tests/platform.rsaddse2e_logging_venue_component_imports_logging_when_declared(the component importsnexum:host/loggingand nothing else capability-bearing),e2e_logging_adapter_tracing_reaches_the_host_pipeline(host-interface records preserve each event's own level and its rendered fields, boot-time and verb-interior), ande2e_undeclared_logging_import_refuses_the_adapter_at_boot(an adapter manifest omittingloggingfromrequiredis refused at boot). The positive E2E now boots the fixture frommodules/fixtures/logging-venue/module.toml(logging already in[capabilities].required) instead of a tempdir synthetic manifest, and the placeholdercomponent = "sha256:0000..."line is gone frommodule.tomland the inline test manifests since the pin now rejects the all-zero digest sentinel at parse.Why
The venue-adapter world previously withheld
loggingalong with the store and identity capabilities, leaving venue adapters with no host-backed way to emit diagnostic records;logginggrants no authority beyond emitting records the host already accepts from every module world, so refusing it bought no isolation while forcing adapter authors toward ad hoc workarounds. Wiring the standardnexum_sdk::tracingfacade through the macro keeps venue adapters on the same guest-side logging idiom as core modules instead of a bespoke shim.Closes #26
Testing
All runs in the repo's pinned
nix developshell (rustc 1.94.0, cargo-nextest 0.9.127), on a fresh clone detached atfb3e434(identical toorigin/feat/venue-logging-capability);origin/feat/denial-classification-seamconfirmed an ancestor of HEAD.cargo clippy -p videre-host -p videre-macros -p videre-sdk --all-targets --all-features -- -D warnings- clean.cargo clippy --workspace --all-targets --all-features --locked -- -D warnings(CI's exact clippy job; covers the newlogging-venuemember on the native target) - clean.cargo fmt --all -- --check- clean.cargo test --doc -p videre-host -p videre-macros -p videre-sdk --all-features- ok (0 doctests in each of the three).videre-sdk/host/macros, no new dependency beyond the fixture'stracing(matching the upstream guest idiom and an existing workspace dep), no em-dashes and no new banner comments, the "unchanged when not declared" done-when is covered by the pre-existing echo-venue import test, and the wasm build is clean.AI Assistance
Implemented with claude-fable-5, red-teamed with claude-opus-5, PR description written with claude-sonnet-5.