Skip to content

RFC: External type definitions (J2) - #31

Merged
fabriceHategekimana merged 3 commits into
developfrom
rfc-external-type-definitions
Sep 12, 2026
Merged

fabriceHategekimana merged 3 commits into
developfrom
rfc-external-type-definitions

Conversation

@fabriceHategekimana

Copy link
Copy Markdown
Collaborator

Summary

Proposes the second milestone (J2) of the type-registry design in
typR/registry.md: a TypR project can pin a third-party .ty file as
the type description of an R package, at a configurable trust
threshold (T1/T2/T3), with a hard invariant — an untrusted or
wrong external definition can only make TypR check less (degrade to
Any), never turn a correct program into a build failure.

Turns registry.md §5 (definition format), §7 (resolution/locking)
and §8.3 (conflict order) into a committed contract:

  • typr-def.toml manifest, format_version-gated
  • since/until added to FunctionMeta (stdlib_meta.rs)
  • external .ty loading merged into standard_library.rs's context
    build, keyed by typr.lock
  • trust threshold + degrade-to-UnknownFunction at merge time
    (builds on the now-variadic UnknownFunction from RFC 0028)
  • typr types add|update|list|vendor, typr.lock, digest-verified
    cache
  • a hard [capabilities] gate for any definition shipping executable
    R (shims, extern r#"..."#)

Explicitly excludes the registry service itself (J3+) — this only
specifies what's needed to consume a definition via
typr types add <repo>.

Status

draft, per rfcs/README.md's process. Filename keeps the 0000
placeholder; it's the PR's own number once accepted.

Test plan

  • Design review / discussion on the RFC text itself
  • No code changes in this PR — implementation checklist is in the
    RFC's own "Implementation checklist" section, to follow after
    acceptance

🤖 Generated with Claude Code

https://claude.ai/code/session_01ETPqhgWqDMt7UaUQXdxJmN

fabriceHategekimana and others added 3 commits September 12, 2026 14:54
Turns registry.md §5 (definition format), §7 (resolution/locking) and
§8.3 (conflict order) into a committed contract: typr-def.toml
manifests, since/until on FunctionMeta, external .ty loading gated by
a project-configured trust threshold that degrades to Any (never a
hard error), typr.lock, and typr types add/update/list/vendor.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01ETPqhgWqDMt7UaUQXdxJmN
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01ETPqhgWqDMt7UaUQXdxJmN
Status: draft -> accepted, file renamed to its assigned PR number
(0031) per rfcs/README.md's process. Tracking issue to follow in a
separate commit once opened.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01ETPqhgWqDMt7UaUQXdxJmN
@fabriceHategekimana fabriceHategekimana added the rfc-accepted RFC acceptée, fusionnée dans rfcs/ label Sep 12, 2026
@fabriceHategekimana
fabriceHategekimana merged commit 3ada507 into develop Sep 12, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

rfc-accepted RFC acceptée, fusionnée dans rfcs/

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant