Skip to content

An instance can state what it runs — the combo reader - #1091

Merged
rbuergi merged 1 commit into
mainfrom
feat/instance-combo-reader
Aug 10, 2026
Merged

rbuergi merged 1 commit into
mainfrom
feat/instance-combo-reader

Conversation

@rbuergi

@rbuergi rbuergi commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

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. InstanceComboReader is that read.

Two shapes, folded

path node coordinate
GitSync / repo import {Space}/_GitSync repositoryUrl + branch + subdirectory + lastSyncCommitSha
PackageInstaller Plugins/{id} PackageManifest.ModuleVersion

A 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

  • 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 "came from that ref", never "equals that ref". The API says so (ProvenanceRef, MaterializedAt).
  • IsComplete distinguishes "carries nothing" from "could not find out" — a failed source query becomes a named caveat, not a silently shorter list.
  • RefFidelity separates a sha/content-hash (Exact) from a branch (Moving) from nothing (Unrecorded); IsReproducible is the conjunction a gate can act on.
  • ModuleDiscovery records enrich (NotCarried) but never define the carried set — their GitRef may 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 Query use), run as System, zipped, failure → explicit caveat.

12 tests · MeshWeaver.PluginCatalog builds 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

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
Copilot AI lite review requested due to automatic review settings August 10, 2026 09:41

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 InstanceComboReader to query GitSync configs, package install records, and (optionally) module-discovery records, then fold them into a single InstanceCombo.
  • 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,
@github-actions

Copy link
Copy Markdown
Contributor

Test Results (shard 0)

701 tests  ±0   701 ✅ ±0   14m 11s ⏱️ -55s
 10 suites ±0     0 💤 ±0 
 10 files   ±0     0 ❌ ±0 

Results for commit caa030c. ± Comparison against base commit eb1c81b.

@github-actions

Copy link
Copy Markdown
Contributor

Test Results (shard 4)

1 310 tests  +12   1 305 ✅ +12   5m 53s ⏱️ - 1m 5s
   11 suites ± 0       5 💤 ± 0 
   11 files   ± 0       0 ❌ ± 0 

Results for commit caa030c. ± Comparison against base commit eb1c81b.

@github-actions

Copy link
Copy Markdown
Contributor

Test Results (shard 1)

1 198 tests  ±0   1 198 ✅ ±0   5m 50s ⏱️ -25s
   11 suites ±0       0 💤 ±0 
   11 files   ±0       0 ❌ ±0 

Results for commit caa030c. ± Comparison against base commit eb1c81b.

@github-actions

Copy link
Copy Markdown
Contributor

Test Results (shard 5)

1 756 tests  ±0   1 564 ✅ ±0   5m 57s ⏱️ -15s
   11 suites ±0     192 💤 ±0 
   11 files   ±0       0 ❌ ±0 

Results for commit caa030c. ± Comparison against base commit eb1c81b.

@github-actions

Copy link
Copy Markdown
Contributor

Test Results (shard 2)

1 974 tests  ±0   1 972 ✅ ±0   6m 34s ⏱️ -15s
   11 suites ±0       2 💤 ±0 
   11 files   ±0       0 ❌ ±0 

Results for commit caa030c. ± Comparison against base commit eb1c81b.

@github-actions

Copy link
Copy Markdown
Contributor

Test Results (shard 3)

   11 files  ±0     11 suites  ±0   5m 45s ⏱️ -20s
1 971 tests ±0  1 863 ✅ ±0  108 💤 ±0  0 ❌ ±0 
2 128 runs  +1  2 020 ✅ +1  108 💤 ±0  0 ❌ ±0 

Results for commit caa030c. ± Comparison against base commit eb1c81b.

@github-actions

Copy link
Copy Markdown
Contributor

Test Results

   65 files  ± 0     65 suites  ±0   44m 13s ⏱️ - 3m 15s
8 910 tests +12  8 603 ✅ +12  307 💤 ±0  0 ❌ ±0 
9 067 runs  +13  8 760 ✅ +13  307 💤 ±0  0 ❌ ±0 

Results for commit caa030c. ± Comparison against base commit eb1c81b.

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.

2 participants