Collect()
Collect a GRAPH's own findings -- the graph checks ITSELF (CheckRules) and the report ingests. This is the Softanza-oriented gate: each graph owns its rules and reports itself; the report just gathers them across domains. oRep.Collect(oCodeGraph).Collect(oAgentGraph).Collect(oSecurityGraph) Any object answering CheckRules() qualifies (stzGraph, stzAgentGraph, stzSecurityGraph, stzOrgChart, stzCodeGraph).
Exemples de base (2)
oRep = new stzRuleReport("sev")
oSG = new stzSecurityGraph("s")
oSG.AddSecret("inline")
oSG.AddSite("prod")
oSG.References("prod", "inline") # unstored-secret -> WARNING only
oRep.Collect(oSG)
# there is a warning
? len(oRep.Warnings()) >= 1
# ...no error
? len(oRep.Errors())
# ...so the gate is SOUND (warnings advise)
? oRep.IsSound()1 0 1
exécuté le 2026-10-02 04:22 dans la bibliothèque au commit 0e72e2e2c ; tiré de rulereport_narrated.ring(s'ouvre dans un nouvel onglet)
oOrg = new stzOrgChart("acme")
oOrg.AddExecutivePosition("ceo")
oOrg.AddStaffPosition("rogue")
oOrg.ReportsTo("rogue", "rogue")
oRep = new stzRuleReport("acme")
oRep.Collect(oOrg) # the org chart checks itself into the gate
# the gate collected orgchart findings
? len(oRep.FindingsOfSubject("orgchart")) >= 1
# ...tagged with :subject = orgchart
? oRep.Findings()[1][:subject]
# ...and the gate is unsound
? oRep.IsSound()1 orgchart 0
exécuté le 2026-10-02 04:22 dans la bibliothèque au commit 0e72e2e2c ; tiré de orgrule_narrated.ring(s'ouvre dans un nouvel onglet)
Portée (1)
oRep = new stzRuleReport("clean")
oAG = new stzAgentGraph("ok")
oAG.AddLLMActor("writer")
oAG.AddGuardian("gate")
oAG.AddEffect("send")
oAG.AddTraceSink("audit")
oAG.Proposes("writer", "gate")
oAG.Guards("gate", "send")
oAG.Feeds("gate", "send")
oAG.Traces("send", "audit")
oRep.Collect(oAG)
oCG = new stzRingCodeGraph("")
oCG.ScanSource("class Bag" + nl + "def Count()" + nl + " return 1" + nl, "s")
oRep.Collect(oCG)
# no findings
? oRep.NumberOfFindings()
# ...the gate is sound
? oRep.IsSound()0 1
exécuté le 2026-10-02 04:22 dans la bibliothèque au commit 0e72e2e2c ; tiré de rulereport_narrated.ring(s'ouvre dans un nouvel onglet)
Les extensions de cette méthode
Chaque extension, et si elle existe pour cette méthode ; une extension qui existe se compose avec les autres (FindSTCS).
Chaque exemple est un fichier de test de la bibliothèque, exécuté dans la bibliothèque pour cette page ; seuls ceux dont la sortie a tenu toutes les promesses écrites par leur fichier sont montrés. Les explications, les titres et le code sont ceux de la bibliothèque, en anglais.
Voir aussi
- La classe stzRuleReport
- La référence du domaine : Diagrammes et graphes
- Les autres méthodes de ces exemples : stzAgentGraph.AddEffect · stzAgentGraph.AddGuardian · stzAgentGraph.AddLLMActor · stzAgentGraph.AddTraceSink · stzAgentGraph.Feeds · stzAgentGraph.Guards · stzAgentGraph.Proposes · stzAgentGraph.Traces · stzOrgChart.AddExecutivePosition · stzOrgChart.AddStaffPosition · stzOrgChart.ReportsTo · stzRingCodeGraph.ScanSource

