Skip to content

feat: expose canonical running-process capability aliases - #258

Closed
zackees wants to merge 9 commits into
mainfrom
feat/canonical-independent-spawn
Closed

zackees wants to merge 9 commits into
mainfrom
feat/canonical-independent-spawn

Conversation

@zackees

@zackees zackees commented Sep 14, 2026 •

Copy link
Copy Markdown
Collaborator

Implements the canonical kernal-api delegation layer for running-process.

  • exposes independently placed spawning and reviewed capability namespaces as direct aliases, preserving Rust type identity
  • pins published running-process =4.10.13 with kernel-substrate + independent-spawn; no local vendor checkout remains
  • records the coordinated temporary sub-git workflow in CLAUDE.md and adds policy/audit coverage for future duplicate aliases
  • rebased on current main

Validation:

  • cargo +1.95 fmt --check
  • focused canonical contract tests
  • ci/check_release_process_substrate.py
  • git diff --check

Merge-prep fixes (rebased on e0666e0)

  • Dependency isolation: running-process independent-spawn enables platform ipc + serde_json, so selecting it in the base dependency put interprocess/serde_json in the default graph (compilation-boundary-dependencies RED). It is again selected only through the facade independent-spawn feature; its root re-exports and tests/canonical_independent_spawn.rs are gated to match, and the policy test now asserts the opt-in wiring. foreground, SpawnMode-independent aliases, and the other reviewed namespaces are unchanged.
  • task_local!: in-crate tests invoked the #[macro_export] macro as crate::task_local!, which is the deny-by-default macro_expanded_macro_exports_accessed_by_absolute_paths error; they now use textual scope. External kernal_api::task_local! use is unaffected.

Local: ci/check_compilation_boundary_dependencies.py passes; lib tests, facade_policy (default and independent-spawn), canonical_independent_spawn, spawn_mode_facade pass; cargo fmt --check clean. (current_executable_exposes_a_gnu_build_id was skipped locally: it also exists on main and depends on the host linker emitting a GNU build ID.)

zackees and others added 9 commits September 14, 2026 11:34
The substrate's independent-spawn feature pulls IPC and serde_json into
the platform graph, which failed the dependency-isolation gate for the
default HAL. Select it only through the facade feature again and gate its
re-exports and identity contract test to match.

Inside the defining crate, #[macro_export] task_local! must be invoked by
textual scope; the crate:: path is a deny-by-default future-compat error.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01C9h9oBYzdNGAaLFouVpewr
@zackees

zackees commented Sep 14, 2026

Copy link
Copy Markdown
Collaborator Author

Closing: superseded by #263.

The decision is now final: running-process is a third-party backend, exactly like Tokio. kernal-api's public API may not re-export, alias, or name any running-process type, and there are no approved exceptions. A pub use running_process::X as Y rename changes only the spelling; the re-export still resolves to the backend definition, so clients receive the backend type and its versioning.

This PR exists to publish running-process items directly (independent spawn, async process, broker, daemon registration, observer, capture-stream aliases), so it can't be adjusted to comply. #263:

  • replaces main's last exposure (the feat: re-export canonical independent spawn contract #217 independent-spawn re-exports) with facade-owned types;
  • makes kernal_api_boundary reject exported re-exports of any backend crate, renamed or not, with a UI fixture for this PR's CaptureStream shape;
  • forbids pub use running_process in tests/facade_policy.rs.

Any of these capabilities that applications still need should come back as facade-owned wrappers.

@zackees zackees closed this Sep 14, 2026
zackees added a commit that referenced this pull request Sep 14, 2026
* fix!: treat running-process as a third-party backend

running-process now follows the same boundary rule as Tokio and every other
implementation crate: no kernal-api public API re-exports, aliases, or names
its types, and there are no approved exceptions. A `pub use ... as ...`
rename changes only the spelling; the re-export still resolves to the
backend definition, so clients received the backend type and its versioning.

- Replace the independent-spawn re-exports with facade-owned SpawnMode,
  SpawnLifetime, IndependentBackend, SpawnOptions, LaunchSpec, Readiness,
  SpawnExit, SpawnHandle, and spawn_with_options. Conversions are private;
  SpawnHandle keeps the substrate handle in a private field.
- kernal_api_boundary: reject exported `pub use` of any owned crate from
  the facade owner, including renames, globs, and braced lists, with a UI
  fixture covering the #258 alias shape.
- facade_policy: forbid `pub use running_process` like `pub use tokio` and
  drop the independent-spawn exception approvals.
- AGENTS, ARCHITECTURE, README, DYLINT: state the no-exceptions rule.

BREAKING CHANGE: kernal_api's independent-spawn types are no longer the
running_process types; callers that relied on type identity must use the
kernal_api types.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01C9h9oBYzdNGAaLFouVpewr

* test(dylint): record re-export fixture diagnostics

Seven exported re-exports are rejected (plain, renamed, renamed Tokio,
glob, each braced-list leaf, nested public module); private, pub(crate),
and unreachable re-exports produce none.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01C9h9oBYzdNGAaLFouVpewr

---------

Co-authored-by: Claude Opus 5 (1M context) <[email protected]>
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