Skip to content

feat(model-registry): boot runtime from Rust catalog#1424

Merged
joelteply merged 1 commit into
canaryfrom
codex/lane-a-rust-catalog-sot
May 18, 2026
Merged

feat(model-registry): boot runtime from Rust catalog#1424
joelteply merged 1 commit into
canaryfrom
codex/lane-a-rust-catalog-sot

Conversation

@joelteply
Copy link
Copy Markdown
Contributor

Summary

  • add a curated Rust-owned model/provider catalog under continuum-core model_registry
  • make runtime model_registry::init_global() boot from the Rust catalog instead of models.toml
  • keep TOML loading only as a legacy/parser path while callers move to the Rust allocator boundary
  • make models/capabilities strict against canonical Rust catalog ids and remove the old 'add it to models.toml' guidance

Validation

  • cargo test --manifest-path src/workers/continuum-core/Cargo.toml model_registry --lib --features metal,accelerate
  • cargo test --manifest-path src/workers/continuum-core/Cargo.toml cognition::model_resolver --lib --features metal,accelerate
  • cargo check --manifest-path src/workers/continuum-core/Cargo.toml --features metal,accelerate
  • cd src/workers/continuum-core && cargo check --features metal,accelerate
  • cd src/workers/continuum-core && cargo test --lib --features metal,accelerate (2999 passed, 24 ignored)
  • precommit: TypeScript compilation PASSED
  • precommit: browser-ping PASSED
  • precommit: chat-roundtrip PASSED; live Teacher AI replied OK

@joelteply joelteply merged commit 4330aa7 into canary May 18, 2026
3 checks passed
@joelteply joelteply deleted the codex/lane-a-rust-catalog-sot branch May 18, 2026 20:02
joelteply added a commit that referenced this pull request May 18, 2026
…h owns gating now (#1428)

After #1421 + #1424 + the should-respond oxidizer wave, the
`AIShouldRespondCommand` parent class's protected helpers
(`buildGatingInstruction`, `parseGatingResponse`) became dead code.
The Server impl now delegates to `RustCoreIPCClient.cognitionShouldRespond`
which routes through the Rust `cognition/should_respond.rs::evaluate_gating`
path; nothing calls the TS helpers anymore.

Per Joel's zero-users no-migration-ceremony directive: delete now,
not "deprecate for follow-up." Single PR.

## Diff

- AIShouldRespondCommand.ts: -172 LOC (kept 7-LOC shell for inheritance)

## What gets deleted

- `protected buildGatingInstruction(params): string` (~95 LOC) — Rust
  `cognition/should_respond.rs::build_gating_prompt` is the prompt
  source of truth.
- `protected parseGatingResponse(aiText): Partial<...>` (~65 LOC) —
  Rust `cognition/should_respond.rs::parse_gating_response` is the
  parser source of truth.

## What stays

- Class shell (`AIShouldRespondCommand extends CommandBase`) — still
  the inheritance base for both `AIShouldRespondServerCommand` and
  `AIShouldRespondBrowserCommand`.
- `static readonly commandName = 'ai/should-respond'` — used by the
  command registry to discover the command name.

## Verification

- `npm run build:ts` — clean (no remaining references to deleted
  helpers).
- `grep` for callers of the deleted methods: zero (only the now-deleted
  definitions themselves matched in the prior wave).
- ESLint baseline check: no change (the deleted methods were lint-clean).

## Refs

- continuum#1421 (AIShouldRespondServerCommand delegation that
  orphaned these helpers)
- Joel 2026-05-18 19:44Z (zero-users, no migration ceremony →
  delete-loser-in-one-PR)

Co-authored-by: Test <test@test.com>
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
joelteply added a commit that referenced this pull request May 18, 2026
…el_registry/ (#1430)

Closes the audit smell codex flagged in #1414 / earlier scan:
'models/ AND model_registry/ separate dirs. models/mod.rs is the
only file in models/ but it's still actively imported ... Old
source-of-truth ghost that should be deleted but persists.'

Per Joel's "we are not in some maintenance mode — zero users,
FULLBLOWN rust driven dev" calibration: no transition period, no
deprecation shim. Move the file to its new home, fix the one
import site, delete the empty dir.

## What changed

- `src/models/mod.rs` (352 LOC, model-discovery HTTP layer) →
  `src/model_registry/discovery.rs` (single move, no content
  change — git rename detected)
- `src/lib.rs`: remove `pub mod models;` (one line)
- `src/model_registry/mod.rs`: add `pub mod discovery;`
- `src/modules/models.rs`:
  `use crate::models::{ProviderConfig, discover_all};` →
  `use crate::model_registry::discovery::{discover_all, ProviderConfig};`

## Why this is conceptually right

`models/` was the live-discovery layer (queries OpenAI / Groq /
Together API endpoints for available models). `model_registry/`
is the curated static catalog (Rust code post-#1424).

Both are model-metadata responsibilities; both belong under
ONE umbrella. The names diverged historically — `models/` predates
`model_registry/`. Lane A's #1424 made `model_registry/` the
canonical Rust-truth home; this PR closes the loop by pulling
discovery into the same module tree.

The discovery vs catalog distinction is preserved (it's two
sub-modules now, not two top-level dirs), so callers that need
"live API discovery" still get the explicit `discovery::`
namespace.

## Validation

  - `cargo build --features metal,accelerate --lib` clean (no
    errors, no new warnings)
  - `cargo test --features metal,accelerate --lib model_registry`
    16 tests pass

Co-authored-by: Test <test@test.com>
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant