Skip to content

fix(kernel): enumerate run-loop capsule tools via the describe fan-out (#1198) - #1382

Merged
joshuajbouw merged 1 commit into
astrid-runtime:mainfrom
jvsteiner:fix/1198-run-loop-tool-enumeration
Aug 13, 2026
Merged

fix(kernel): enumerate run-loop capsule tools via the describe fan-out (#1198)#1382
joshuajbouw merged 1 commit into
astrid-runtime:mainfrom
jvsteiner:fix/1198-run-loop-tool-enumeration

Conversation

@jvsteiner

@jvsteiner jvsteiner commented Jul 26, 2026

Copy link
Copy Markdown
Contributor

Linked Issue

Closes #1198.

Summary

A run-loop capsule's tools could remain invisible. Load-time interceptor discovery is unavailable for pool-less run-loop capsules, but persisted or injected tools: [] metadata suppressed the existing describe fan-out that should query the capsule's live responder.

Changes

  • Add fan-out-aware discovery status while preserving the existing public describe_loaded_capsule signature.
  • Leave tools absent when the interceptor path is unavailable so tool.v1.request.describe fan-out runs.
  • Treat tools as live-owned metadata and remove legacy or stale tool surfaces before each probe while preserving unrelated opaque metadata.
  • Cover every result-mapping branch plus legacy object metadata, absent metadata, and non-object metadata.

Verification

  • cargo fmt --all -- --check
  • Tool-discovery tests: 16 passed
  • cargo test -p astrid-kernel --lib -- --quiet: 304 passed
  • cargo clippy -p astrid-capsule -p astrid-kernel --all-features -- -D warnings
  • git diff --cached --check

AI / Tool Assistance

Assisted-by: Anthropic Claude: Opus 4.8
Assisted-by: OpenAI Codex: GPT-5

Claude assisted Jamie with the original implementation. Codex independently reviewed the live discovery and persisted-metadata behavior, fixed the stale metadata suppression path, added regressions, reconciled the patch onto current main, and validated the affected crates. I reviewed the final combined patch and created the GPG-signed, DCO-compliant commit. Jamie and Claude remain credited as co-authors.

Checklist

  • Linked to an issue
  • CHANGELOG.md updated
  • I understand every change in this PR and can explain its design, risks, and validation.
  • I reviewed and tested any meaningful tool-generated output included in this PR.
  • Every non-bot, non-merge commit has a matching Signed-off-by trailer.

@jvsteiner
jvsteiner marked this pull request as ready for review July 26, 2026 12:27
@jvsteiner
jvsteiner requested a review from joshuajbouw as a code owner July 26, 2026 12:27
@jvsteiner

Copy link
Copy Markdown
Contributor Author

@joshuajbouw ready for review — pool-less run-loop capsules now leave tools absent so the describe fan-out fires and their tools enumerate (#1198).

@joshuajbouw

Copy link
Copy Markdown
Member

Review outcome: useful fix, but not mergeable as posted. The public Rust API compatibility job fails because describe_loaded_capsule changes from Result<Vec<ToolDescriptor>> to Result<Option<Vec<ToolDescriptor>>>. Please preserve the existing public signature with an additive/internal API, or explicitly handle this as an intentional breaking change under the project’s release policy. The PR template and changelog also need updating.

Co-authored-by: Jamie Steiner <jvsteiner@gmail.com>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
Signed-off-by: Joshua J. Bouw <jjb@unicity-labs.com>
@joshuajbouw
joshuajbouw force-pushed the fix/1198-run-loop-tool-enumeration branch from ce7a0ef to 8e83737 Compare August 13, 2026 14:46
@joshuajbouw
joshuajbouw merged commit 59ea14f into astrid-runtime:main Aug 13, 2026
36 of 37 checks passed
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.

Run-loop capsule tools never appear in tools/list (load-time describe returns empty; fan-out fallback never fires)

2 participants