[BUG] Internal socket and serving-test scopes exclude their callers #37

Closed
opened 2026-10-03 00:18:45 +02:00 by erikinkinen · 0 comments
Owner

Summary

Internal socket selection is called from sibling modules but its methods are private to channel::socket_control. The ordinary-call lifetime work adds the same mismatch for held-source selection. These declarations prevent the callers from composing under Rust privacy rules.

Reproduction

Inspect Posixd revision 8df50a15e22a5231edd1cdc9f759d4a798db1f90: src/realm_io/channel/socket_control.rs declares socket and socket_from without a visibility modifier. channel/named.rs calls socket; channel/wait.rs and channel/named/publication.rs call socket_from. These are sibling modules, not descendants of socket_control.

This report is based on source review. No compiler, unit test, image or CI execution was performed and no diagnostic or exit status is claimed.

Expected and actual behavior

Expected: the internal selectors are accessible within their owning channel implementation, including its sibling submodules, while staying outside the public API.

Actual: the declared private scope excludes those callers. The intended repair is pub(super) on both methods; it changes no native authority, source selection or runtime effect.

Environment and identity

  • Component repository/revision and Integration source graph: Posixd 8df50a15e22a5231edd1cdc9f759d4a798db1f90; Integration 1871eff2e83ddb5cc3de81132603d4193dbd520a.
  • Image profile, digest and build/runtime configuration: source review only; no image built.
  • Hardware or VM, architecture, firmware and toolchain versions: no execution; Rust module visibility applies independently of runtime.
  • Input/session route and granted authority relevant to reproduction: internal original socket selection; no changed endpoint or capability.
  • Last known working revision, if known: not established by execution. The live-selector mismatch predates the held-selector addition.

Evidence and prior checks

The declarations and callers above are direct source evidence. The Rust Reference documents private-module access and parent-scoped visibility. Existing socket, listener, accept and held-call controls consume these paths; compilation and execution remain deferred under the workflow waiver.

A related source audit found that realm_io::tests accesses private RealmIo ownership fields declared in realm_io::serving. Move that existing test module beneath serving with an explicit source path. This preserves the production field visibility while making the original ownership controls descendants of their owner. No compiler or test execution is claimed.

Resolved at source level by signed socket helper visibility and serving ownership test placement. The final Integration selection retains both repairs. Compiler, unit, image and CI execution remain deferred; closure claims source repair only.

Tracking

Whole socket work: #34. Implementation: #5. Phase completion: erix/integration#65.

## Summary Internal socket selection is called from sibling modules but its methods are private to `channel::socket_control`. The ordinary-call lifetime work adds the same mismatch for held-source selection. These declarations prevent the callers from composing under Rust privacy rules. ## Reproduction Inspect Posixd revision `8df50a15e22a5231edd1cdc9f759d4a798db1f90`: `src/realm_io/channel/socket_control.rs` declares `socket` and `socket_from` without a visibility modifier. `channel/named.rs` calls `socket`; `channel/wait.rs` and `channel/named/publication.rs` call `socket_from`. These are sibling modules, not descendants of `socket_control`. This report is based on source review. No compiler, unit test, image or CI execution was performed and no diagnostic or exit status is claimed. ## Expected and actual behavior Expected: the internal selectors are accessible within their owning channel implementation, including its sibling submodules, while staying outside the public API. Actual: the declared private scope excludes those callers. The intended repair is `pub(super)` on both methods; it changes no native authority, source selection or runtime effect. ## Environment and identity - Component repository/revision and Integration source graph: Posixd `8df50a15e22a5231edd1cdc9f759d4a798db1f90`; Integration `1871eff2e83ddb5cc3de81132603d4193dbd520a`. - Image profile, digest and build/runtime configuration: source review only; no image built. - Hardware or VM, architecture, firmware and toolchain versions: no execution; Rust module visibility applies independently of runtime. - Input/session route and granted authority relevant to reproduction: internal original socket selection; no changed endpoint or capability. - Last known working revision, if known: not established by execution. The live-selector mismatch predates the held-selector addition. ## Evidence and prior checks The declarations and callers above are direct source evidence. The [Rust Reference](https://doc.rust-lang.org/reference/visibility-and-privacy.html) documents private-module access and parent-scoped visibility. Existing socket, listener, accept and held-call controls consume these paths; compilation and execution remain deferred under the workflow waiver. A related source audit found that `realm_io::tests` accesses private `RealmIo` ownership fields declared in `realm_io::serving`. Move that existing test module beneath `serving` with an explicit source path. This preserves the production field visibility while making the original ownership controls descendants of their owner. No compiler or test execution is claimed. Resolved at source level by signed [socket helper visibility](https://git.erikinkinen.fi/erix/posixd/commit/b43ec5a77b6bd87a92b3c6e9fed8aaf9fd78e635) and [serving ownership test placement](https://git.erikinkinen.fi/erix/posixd/commit/3b3cd82e3fc7cac920118c12aec3e85190a10e30). The final [Integration selection](https://git.erikinkinen.fi/erix/integration/commit/ef86e3faeba9456c01882dfec31b5ea0d4b58fcf) retains both repairs. Compiler, unit, image and CI execution remain deferred; closure claims source repair only. ## Tracking Whole socket work: https://git.erikinkinen.fi/erix/posixd/issues/34. Implementation: https://git.erikinkinen.fi/erix/posixd/pulls/5. Phase completion: https://git.erikinkinen.fi/erix/integration/issues/65.
erikinkinen changed title from [BUG] Socket selectors are inaccessible to sibling modules to [BUG] Internal socket and serving-test scopes exclude their callers 2026-10-03 00:21:14 +02:00
erikinkinen added this to the Alpha 1 milestone 2026-10-30 09:35:08 +01:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
erix/posixd#37
No description provided.