You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit e54e416
Browse filesBrowse the repository at this point in the historyBrowse files
David Noble
committed
Resource slots record the catalog id and the checksum covers the catalog rows
A declared resource slot writes the resource's catalog id and reloads the
catalog entry that id names (#735); dispatch resolves a Resource by id and a
run-time string by key, as before. CanonicalContent carries the catalog's
intent rows (#712 decision 11), so a doctored `resources` row is a checksum
mismatch at load rather than an entry the plan never claimed.
Refs #712, #735.
Claude-Session: https://claude.ai/code/session_01SqQVFZz7AdiLZkGoAcUqRW
// A Resource in the slot is the graph catalog's entry; the run clone holds the same ids, so it resolves by id
821
+
// (#712 decision 8, #735) -- never by URI, which would name whichever generation is current. A string is a
822
+
// run-time value -- a gather item, a variable -- that no plan-time claim saw: a key into the run catalog, never
823
+
// a constructor (4-resource-management.md §5.6). A miss is the catalog's verdict either way.
824
+
varidstring
821
825
switchv:=value.(type) {
822
826
caseResource:
823
-
key=v.URI()
827
+
id=v.ID()
828
+
ifid=="" {
829
+
returnnil, true, fmt.Errorf("graph dispatch: resource %q is not cataloged; nothing constructs at dispatch", v.URI())
830
+
}
824
831
casestring:
825
-
key=v
832
+
id=environment.ResourceCatalog.Current(v)
833
+
ifid=="" {
834
+
returnnil, true, fmt.Errorf("graph dispatch: resource %q is not in the run catalog", v)
835
+
}
826
836
casenil:
827
837
returnnil, false, nil
828
838
default:
829
839
returnnil, true, fmt.Errorf(
830
-
"graph dispatch: a %T cannot name a resource — a string is a key, never a constructor (4-resource-management.md §5.6)",
831
-
value)
832
-
}
833
-
834
-
catalog:=environment.ResourceCatalog
835
-
836
-
id:=catalog.Current(key)
837
-
ifid=="" {
838
-
returnnil, true, fmt.Errorf(
839
-
"graph dispatch: %q is not in the run catalog — a string is a key, never a constructor; nothing constructs at dispatch (4-resource-management.md §5.6)",
840
-
key)
840
+
"graph dispatch: a %T cannot name a resource — a string is a key, never a constructor "+
0 commit comments