Repository navigation
Conversation
`retireKernelObjects` deletes a kernel object once every importer `getImporters` names has a `retireImport` queued. It enumerated `vatConfig` rows, so it missed remotes entirely and missed a terminated vat whose config `deleteVat` had already dropped while its c-list waited for `nextTerminatedVatCleanup`. Either one is left holding an entry that names a kref the kernel no longer has, which nothing tears down and the refcount audit reports as dangling. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
`getImporters` now returns remotes and vats together and nothing asserted the sort survived the deduplication. Adds a direct `getRemoteIDs` test, and drops a cast that was suppressing the check on a `RemoteInfo` literal. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 892c00b. Configure here.
This was referenced Sep 15, 2026
# Conflicts: # packages/ocap-kernel/CHANGELOG.md
Contributor
Coverage Report
File Coverage
|
||||||||||||||||||||||||||||||||||||||||||||||||||
This branch has not been deployed
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.

retireKernelObjectsdeletes a kernel object once every importer fromgetImportershas aretireImportqueued.getImportersonly readvatConfigrows, so it missed remotes and terminated vats whose c-list cleanup had not run yet. Those importers kept c-list entries for deleted krefs, which the refcount audit reports as dangling.getImportersnow returns the union of vat IDs, terminated vats and remote IDs, deduplicated, asEndpointId[].getRemoteIDson the kernel store.importsKernelSlottakes anEndpointId.Merge order: land after #1099. This PR queues
retireImportsto remotes, and onmaina GC action for a remote with no handle, which is every remote untilinitRemoteComms, still kills the run loop at boot. #1099 holds those back.Testing
gc.test.ts: a remote importer alongside a vat importer, and a terminated vat whose c-list outlived its config.remote.test.ts:getRemoteIDs.Fixes #1015
🤖 Generated with Claude Code
Note
Medium Risk
Changes kernel GC importer discovery, which affects when objects are deleted and which endpoints receive retireImport; should land with the run-loop fix that tolerates GC to inactive endpoints (#1098).
Overview
Fixes incomplete
retireImportnotifications when kernel objects are collected by wideninggetImportersso it no longer scans only active vat configs.getImportersnow deduplicates across live vat IDs, terminated vats whose c-lists still exist, and remote IDs (via new store helpergetRemoteIDs), and treats importers as generic **EndpointId**s.retireKernelObjectstherefore queuesretireImportfor remote peers and not-yet-cleaned terminated vats as well, avoiding c-list entries that point at deleted krefs and refcount-audit failures.Changelog documents the fix and the new
getRemoteIDsAPI; tests cover remote importers, terminated-vat importers, and remote ID listing.Reviewed by Cursor Bugbot for commit 5b286f5. Bugbot is set up for automated code reviews on this repo. Configure here.