Repository navigation
An instance can state what it runs — the combo reader - #1091
Merged
Merged
Conversation
The candidate-release gate's unit of verification is the COMBO: a candidate
image x the module versions THAT instance has installed. Nothing could state
that combo. InstanceComboReader now can: one reactive read returning every
module the instance carries, with its source and pinned ref.
Two recording shapes, folded — because a reader that handles only one LOOKS
healthy while returning nothing. Modules arrive via per-Space {Space}/_GitSync
entries (repositoryUrl + branch + subdirectory + lastSyncCommitSha) or via
Plugins/{id} install records (PackageManifest.ModuleVersion). Measured on memex
2026-08-10: 42 sync configs, ZERO install records — a Package-only reader
reports "nothing installed, all clear" on the portal with the most modules.
Honesty is in the type, not the docs:
- Every ref is PROVENANCE, never identity: it records what the module was
last materialised FROM. In-mesh editing is normal, so the honest claim is
"this content came from that ref", never "the mesh equals that ref".
- IsComplete distinguishes "carries nothing" from "could not find out" — a
failed source query becomes a named caveat, not a shorter list.
- RefFidelity separates a commit sha / content hash (Exact — two runs
resolve identically) from a branch (Moving) and from nothing (Unrecorded);
IsReproducible is the conjunction a gate can act on.
ModuleDiscovery records enrich with NotCarried (modules a configured repo ships
that this instance does not carry) but never define the carried set — their
GitRef can be a branch name, and a branch is not a coordinate.
Plain singleton, not a hosted service: a pull-on-demand reader that starts
nothing, subscribes to nothing, writes nothing. Reactive end-to-end; the three
set queries are the sanctioned Query use (sets, not single-node content), run
as System, zipped, with failure converted to an explicit caveat.
12 tests; Release -warnaserror clean.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CPQKMhQDpitUzsW1MqTVhH
Contributor
There was a problem hiding this comment.
Pull request overview
Implements the “instance combo” read for the Candidate Release Protocol gate: a single, pull-on-demand reader that reports which modules an instance carries, folding both GitSync ({Space}/_GitSync) and installer (Plugins/{id}) sources into one unified result with provenance/fidelity semantics.
Changes:
- Added
InstanceComboReaderto query GitSync configs, package install records, and (optionally) module-discovery records, then fold them into a singleInstanceCombo. - Introduced DTOs (
InstanceCombo,ModuleCoordinate, coordinate/fidelity enums) to express provenance vs reproducibility in a gate-friendly shape. - Added comprehensive integration tests covering GitSync-only, package installs, folding behavior, and “honesty”/fidelity rules; plus a WhatsNew entry.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| test/MeshWeaver.PluginCatalog.Test/InstanceComboReaderTest.cs | New integration tests validating folding behavior and provenance/fidelity semantics. |
| src/MeshWeaver.PluginCatalog/PluginCatalogConfigurationExtensions.cs | Registers InstanceComboReader as a DI singleton for on-demand reads. |
| src/MeshWeaver.PluginCatalog/InstanceComboReader.cs | New reader: system-impersonated set queries + fold into InstanceCombo with explicit caveats. |
| src/MeshWeaver.PluginCatalog/InstanceCombo.cs | New model types describing an instance’s carried modules, provenance refs, and reproducibility. |
| src/MeshWeaver.Documentation/Data/WhatsNew/2026-08-10-an-instance-can-state-what-it-runs.md | New release note documenting the capability and its honesty guarantees. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
+180
to
+181
| if (records.Count == 0) | ||
| caveats.Add(NoDiscoveryCaveat); |
| Modules = modules, | ||
| NotCarried = Gaps(records, syncByModule, packagesByModule), | ||
| Caveats = caveats.ToImmutable(), | ||
| IsComplete = sync.Failure is null && installs.Failure is null, |
Contributor
Contributor
Contributor
Contributor
Contributor
Contributor
Contributor
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.
Task 1 of the Candidate Release Protocol's instance gate: before anything is verified, the instance must be able to state its combo — every module it carries, with its source and pinned ref.
InstanceComboReaderis that read.Two shapes, folded
{Space}/_GitSyncrepositoryUrl+branch+subdirectory+lastSyncCommitShaPlugins/{id}PackageManifest.ModuleVersionA reader that handles only one looks healthy while returning nothing: measured on memex, 42 sync configs and zero install records — a Package-only reader reports "nothing installed, all clear" on the portal with the most modules. That failure mode is why the fold is the whole point.
Honesty is in the type
ProvenanceRef,MaterializedAt).IsCompletedistinguishes "carries nothing" from "could not find out" — a failed source query becomes a named caveat, not a silently shorter list.RefFidelityseparates a sha/content-hash (Exact) from a branch (Moving) from nothing (Unrecorded);IsReproducibleis the conjunction a gate can act on.ModuleDiscoveryrecords enrich (NotCarried) but never define the carried set — theirGitRefmay be a branch name, and a branch is not a coordinate.Shape
Plain singleton — a pull-on-demand reader that starts nothing, subscribes to nothing, writes nothing. Reactive end-to-end; three set queries (the sanctioned
Queryuse), run as System, zipped, failure → explicit caveat.12 tests ·
MeshWeaver.PluginCatalogbuilds clean under-c Release -p:CIRun=true -warnaserror.Groundwork by a prior session that hit its limit mid-flight; verified, committed and shipped here.
🤖 Generated with Claude Code
https://claude.ai/code/session_01CPQKMhQDpitUzsW1MqTVhH