mirror of
https://github.com/morluto/rea.git
synced 2026-11-10 00:36:35 +00:00
fix(evidence): preserve subjects in derived workflows (#9492)
* fix(javascript): preserve verified trace evidence subjects Co-authored-by: Felix <3937061056@qq.com> * fix(evidence): preserve selected subject names in views * fix(evidence): preserve subjects across related workflows * fix(evidence): retain inventory projection subjects * fix(managed): validate projected graph root identity * style: format evidence and native command code * fix(javascript): validate static graph root identity * test(javascript): update feature trace graph expectations --------- Co-authored-by: Felix <3937061056@qq.com>
This commit is contained in:
1 parent
4d7c6efe9a
commit
52fe342c73
28 files changed
+615
-151
No files matched your search
@@ -2,6 +2,7 @@ import { createEvidence } from "../../domain/evidence.js";
|
||||
import {
|
||||
createJavaScriptApplicationGraph,
|
||||
createJavaScriptApplicationNode,
|
||||
createJavaScriptApplicationEdge,
|
||||
} from "../../domain/javascript/javascriptApplicationGraph.js";
|
||||
import { createWebTextArtifact } from "../../domain/webContentArtifact.js";
|
||||
import {
|
||||
@@ -63,11 +64,46 @@ const asset = createJavaScriptApplicationNode({
|
||||
},
|
||||
],
|
||||
});
|
||||
const root = createJavaScriptApplicationNode({
|
||||
kind: "artifact",
|
||||
identity: {
|
||||
strategy: "content-digest",
|
||||
stability: "global-exact",
|
||||
sha256: applicationSha256,
|
||||
},
|
||||
observations: [
|
||||
{
|
||||
label: "artifact root",
|
||||
properties: { format: "directory" },
|
||||
evidence: {
|
||||
...graphEvidence,
|
||||
artifact: {
|
||||
available: true,
|
||||
artifact_id: `art_${applicationSha256}`,
|
||||
sha256: applicationSha256,
|
||||
},
|
||||
location: {
|
||||
available: true,
|
||||
value: { kind: "artifact-path", path: "artifact-root" },
|
||||
},
|
||||
extractor: { ...graphEvidence.extractor, operation: "inventory-root" },
|
||||
},
|
||||
},
|
||||
],
|
||||
});
|
||||
const graph = createJavaScriptApplicationGraph({
|
||||
schema: "JavaScriptApplicationGraph",
|
||||
root_node_ids: [asset.node_id],
|
||||
nodes: [asset],
|
||||
edges: [],
|
||||
root_node_ids: [root.node_id],
|
||||
nodes: [asset, root],
|
||||
edges: [
|
||||
createJavaScriptApplicationEdge({
|
||||
source_node_id: root.node_id,
|
||||
target_node_id: asset.node_id,
|
||||
relation: "contains",
|
||||
properties: { path: "renderer.js" },
|
||||
evidence: graphEvidence,
|
||||
}),
|
||||
],
|
||||
coverage: completeCoverage,
|
||||
limitations: [],
|
||||
});
|
||||
|
||||
Reference in new issue
Block a user