Repository navigation
feat(positron): ModelCatalog → ForgeViewState projection (brick 1) - #1761
Merged
Merged
Conversation
The projection half of foundry: a pure fold from the live catalogue's `CatalogSnapshot` (#78's watch-published model state) to the neutral `ForgeViewState` — the foundry room's right-hand model `Listing`. Each catalogue entry becomes a `ForgeModelView` (id, name→id fallback, provider as source, parameter_count→billions with 0→None honest-unknown, never a fabricated 0.0). REPLACE-on-change like chat/wall; models come out in the snapshot's deterministic BTreeMap order. Pure by design (snapshot in → view out, no I/O) so it unit-tests without a running catalogue — the live wiring that subscribes to the catalogue watch and publishes per foundry room lands with structured room-purpose tagging (#6), which is what gives a foundry room to project *for*. 3 tests: empty catalogue → empty view, rows → model Listing (name fallback + params), unknown param count → None. Co-Authored-By: Claude Opus 4.8 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
…ojection (review #1761) Compression fix from the #1761 review: the 0-is-unknown → None param logic was a byte-for-byte duplicate of the canonical Model::parameter_count_billions() helper. Read the one source of truth instead of restating the sentinel — if it ever changes, these can't drift. Co-Authored-By: Claude Opus 4.8 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
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.
The projection half of foundry: a pure fold from the live
CatalogSnapshot(#78) to the neutralForgeViewState— the foundry room's right-hand modelListing. Each entry →ForgeModelView(id, name→id fallback, provider as source, parameter_count→billions with 0→None honest-unknown). REPLACE-on-change, deterministic BTreeMap order.Pure (snapshot in → view out, no I/O) so it unit-tests without a running catalogue; the live watch-subscribe + per-room publish lands with structured room-purpose (#6). 3 tests: empty→empty, rows→Listing (name fallback + params), unknown params→None.
🤖 Generated with Claude Code