Skip to content

Dispatch resolves by identity; a catalog miss refuses #609

Closed

Description

@David-Noble-at-work

Phase 4, PR 1 of resource-construction.md. Phase task: #586.

Design: 4-resource-management.md §2 (the dispatch bullet) and §5.6 — a string is a key, never a constructor.

Steps 1–4 of the phase draft:

  1. Dispatch resolves by identity. A resource-typed slot value — captured object or rehydrated URI string — resolves through the run catalog (Current/Lookup) so the dispatched object IS the run clone's entry. First discovery: where the seam lives (slot-fill vs a step-6 refinement) and how the environment names run-vs-session mode.
  2. The miss becomes a refusal. A graph-dispatch catalog miss is a typed error naming the URI; the fall-through to fresh construction gates on immediate mode only.
  3. Rehydration splits from conversion. LoadGraph re-interns through the provider's rehydration path; the catch-all TrimPrefix at buildCandidateAs retires with the dispatch string path.
  4. Clone's sharing is decided, not inherited. The pointer-aliasing between planning catalog and run clone stops being load-bearing; the pristine-planning-catalog pin extends to cover location.

Also decided here: the plan-time mirror — checkPromiseTypes/typesAreInterconvertible are documented as agreeing with dispatch (pkg/op/validate.go), and step 2 changes dispatch's side. Leaning: graph-context narrowing so a declared-string producer into a resource-typed slot refuses at ValidateGraph, with the step-2 refusal as the backstop for undeclared producers.

Acceptance: explicit-conversion suite items 1–3 (save-reload-run identity; the doctored miss refuses; the string-promise refusal) — statuses tracked in the plan's judgment-scenarios section.

Activity

  1. David-Noble-at-work commented on Aug 22, 2026

    @David-Noble-at-work
    ContributorAuthor

    First discovery resolved (design session, 2026-08-22): the seam is slot-fill at Method.Invoke, keyed off the activation — ActivationRecord.Graph is documented as non-nil exactly during graph dispatch (Stack/CallerID agree), so dispatch kind lives on the per-dispatch frame. NOT an environment bit (a first cut added GraphDispatch to RuntimeEnvironment and was reverted — the environment stays orthogonal ambient capability) and NOT a Convert-cascade refinement (Convert stays context-blind for planning and immediate mode). WithCatalog → WithResourceCatalog in passing. Details in the plan's phase-4 step 1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

No labels
No labels

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions