-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathTaskfile.yml
More file actions
283 lines (273 loc) · 11.3 KB
/
Copy pathTaskfile.yml
File metadata and controls
283 lines (273 loc) · 11.3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
version: '3'
tasks:
# Source code quality
fmt:
desc: Format the source code using rustfmt
silent: true
dir: ./v0.1/rust-prototyping
cmds:
- cargo fmt --all
# Crates
v0-1-codegen:
dir: ./v0.1/rust-prototyping
cmds:
- cargo run -p workload-identity-gen
silent: true
v0-1-core-test:
dir: ./v0.1/rust-prototyping
cmds:
- cargo test -p core
silent: true
v0-1-core-bench:
dir: ./v0.1/rust-prototyping
cmds:
- cargo bench -p core
silent: true
v0-1-wk-run:
dir: ./v0.1/rust-prototyping
cmds:
- cargo run -p workload-runner --release
silent: true
v0-1-wk-bench:
dir: ./v0.1/rust-prototyping
cmds:
- cargo bench -p workload-runner
silent: true
# v0.2 — Go prototype (Snapshot Hash Chain profile)
v0-2-go-demo:
desc: Run the PIC v0.2 Go demo (why-pic, confused-deputy, snapshot, revocation; pass one with -- <name>)
dir: ./v0.2/golang
cmds:
- go run ./cmd/picdemo {{.CLI_ARGS}}
silent: true
v0-2-go-flow:
desc: Show the full execution flow hop by hop (colored ASCII; authority narrowing + rejected rogue)
dir: ./v0.2/golang
cmds:
- go run ./cmd/picdemo flow {{.CLI_ARGS}}
silent: true
v0-2-go-dump:
desc: Dump real signed PCAs/envelope as JSON, with a live tamper proof
dir: ./v0.2/golang
cmds:
- go run ./cmd/picdemo dump -- --only-json
silent: true
v0-2-go-test:
desc: Run the PIC v0.2 Go unit tests
dir: ./v0.2/golang
cmds:
- go test ./...
silent: true
v0-2-go-benchmark:
desc: Run the PIC v0.2 Go benchmarks
dir: ./v0.2/golang
cmds:
- go test -run '^$' -bench . -benchmem ./...
silent: true
v0-2-go-bench:
desc: Pretty colored benchmark report (latency, throughput, snapshot vs full-chain)
dir: ./v0.2/golang
cmds:
- go run ./cmd/picdemo bench {{.CLI_ARGS}}
silent: true
v0-2-go-fmt:
desc: Format the PIC v0.2 Go source
dir: ./v0.2/golang
cmds:
- go fmt ./...
silent: true
v0-2-go-fixtures:
desc: Regenerate the PIC v0.2 fixtures (DID identities + signed attestations)
dir: ./v0.2/golang
cmds:
- go run ./cmd/genfixtures
silent: true
v0-2-go-exec:
desc: 'Sandboxed Execution viewer (PIC of PIC). Pass args: -- A | -- outer | -- all --pca | -- --no-guardrail'
dir: ./v0.2/golang
cmds:
- go run ./cmd/picdemo exec {{.CLI_ARGS}}
silent: true
v0-2-go-sandboxed:
desc: Showcase the new Sandboxed Execution (PIC of PIC) end to end — exec views + guardrail + artifacts, in series
dir: ./v0.2/golang
silent: true
cmds:
- echo "==== 1 exec — compact Sandboxed Execution (outer ENFORCE lineage carrying A + B) ===="
- go run ./cmd/picdemo exec
- echo "==== 2 exec A — drill into one carried (inner) lineage ===="
- go run ./cmd/picdemo exec A
- echo "==== 3 exec outer — the outer ENFORCE lineage (PCA0-G, PCA1-G) ===="
- go run ./cmd/picdemo exec outer
- echo "==== 4 exec all --pca — every lineage, full signed PCAs (see multiLineage) ===="
- go run ./cmd/picdemo exec all --pca
- echo "==== 5 exec --no-guardrail — inner lineages only (debug) ===="
- go run ./cmd/picdemo exec --no-guardrail
- echo "==== 6 guardrail scenario — permit / deny / invalid carried lineage / enforced acceptance ===="
- go run ./cmd/picdemo guardrail
- echo "==== 7 dump --guardrail — real signed artifacts (outer PCA, multiLineage, accept checks) ===="
- go run ./cmd/picdemo dump --guardrail outer multilineage accept
v0-2-go-tour:
desc: Full guided tour of the PIC v0.2 Go prototype — every scenario, the flow, and the Sandboxed Execution, in series
dir: ./v0.2/golang
silent: true
cmds:
- echo "########## 1 why-pic — authority mixing / cross-lineage composition ##########"
- go run ./cmd/picdemo why-pic
- echo "########## 2 confused-deputy — cross-service prevention ##########"
- go run ./cmd/picdemo confused-deputy
- echo "########## 3 snapshot — O(hops since snapshot) vs O(n) ##########"
- go run ./cmd/picdemo snapshot
- echo "########## 4 revocation — LINEAGE-SUFFIX causal cutoff ##########"
- go run ./cmd/picdemo revocation
- echo "########## 5 flow — authority narrowing hop by hop (+ rejected rogue) ##########"
- go run ./cmd/picdemo flow
- echo "########## 6 exec — Sandboxed Execution, compact (PIC carrying PIC) ##########"
- go run ./cmd/picdemo exec
- echo "########## 7 guardrail — the canonical Sandboxed Execution, full ##########"
- go run ./cmd/picdemo guardrail
- echo "########## 8 bench --guardrail — timings, decomposed per phase ##########"
- go run ./cmd/picdemo bench --guardrail
v0-2-go-check:
desc: Build, vet, and test the PIC v0.2 Go prototype (green check)
dir: ./v0.2/golang
silent: true
cmds:
- go build ./...
- go vet ./...
- go test ./...
# v0.2 — Rust prototype (Snapshot Hash Chain profile; shares v0.2/fixtures with Go)
v0-2-rust-demo:
desc: Run the PIC v0.2 Rust demo (why-pic, confused-deputy, snapshot, revocation; pass one with -- <name>)
dir: ./v0.2/rust
cmds:
- cargo run --bin picdemo -- {{.CLI_ARGS}}
silent: true
v0-2-rust-flow:
desc: Show the full execution flow hop by hop (colored ASCII; authority narrowing + rejected rogue)
dir: ./v0.2/rust
cmds:
- cargo run --bin picdemo -- flow {{.CLI_ARGS}}
silent: true
v0-2-rust-dump:
desc: Dump real signed PCAs/envelope as JSON, with a live tamper proof
dir: ./v0.2/rust
cmds:
- cargo run --bin picdemo -- dump --only-json
silent: true
v0-2-rust-test:
desc: Run the PIC v0.2 Rust unit tests
dir: ./v0.2/rust
cmds:
- cargo test
silent: true
v0-2-rust-bench:
desc: Pretty colored benchmark report (release build, for a fair compare with Go)
dir: ./v0.2/rust
cmds:
- cargo run --release --bin picdemo -- bench
silent: true
v0-2-rust-fmt:
desc: Format the PIC v0.2 Rust source
dir: ./v0.2/rust
cmds:
- cargo fmt
silent: true
v0-2-rust-fixtures:
desc: Regenerate the PIC v0.2 fixtures (DID identities + signed attestations)
dir: ./v0.2/rust
cmds:
- cargo run --bin genfixtures
silent: true
v0-2-rust-exec:
desc: 'Sandboxed Execution viewer (PIC of PIC). Pass args: -- A | -- outer | -- all --pca | -- --no-guardrail'
dir: ./v0.2/rust
cmds:
- cargo run -q --bin picdemo -- exec {{.CLI_ARGS}}
silent: true
v0-2-rust-sandboxed:
desc: Showcase the new Sandboxed Execution (PIC of PIC) end to end — exec views + guardrail + artifacts, in series
dir: ./v0.2/rust
silent: true
cmds:
- echo "==== 1 exec — compact Sandboxed Execution (outer ENFORCE lineage carrying A + B) ===="
- cargo run -q --bin picdemo -- exec
- echo "==== 2 exec A — drill into one carried (inner) lineage ===="
- cargo run -q --bin picdemo -- exec A
- echo "==== 3 exec outer — the outer ENFORCE lineage (PCA0-G, PCA1-G) ===="
- cargo run -q --bin picdemo -- exec outer
- echo "==== 4 exec all --pca — every lineage, full signed PCAs (see multiLineage) ===="
- cargo run -q --bin picdemo -- exec all --pca
- echo "==== 5 exec --no-guardrail — inner lineages only (debug) ===="
- cargo run -q --bin picdemo -- exec --no-guardrail
- echo "==== 6 guardrail scenario — permit / deny / invalid carried lineage / enforced acceptance ===="
- cargo run -q --bin picdemo -- guardrail
- echo "==== 7 dump --guardrail — real signed artifacts (outer PCA, multiLineage, accept checks) ===="
- cargo run -q --bin picdemo -- dump --guardrail outer multilineage accept
v0-2-rust-tour:
desc: Full guided tour of the PIC v0.2 Rust prototype — every scenario, the flow, and the Sandboxed Execution, in series
dir: ./v0.2/rust
silent: true
cmds:
- echo "########## 1 why-pic — authority mixing / cross-lineage composition ##########"
- cargo run -q --bin picdemo -- why-pic
- echo "########## 2 confused-deputy — cross-service prevention ##########"
- cargo run -q --bin picdemo -- confused-deputy
- echo "########## 3 snapshot — O(hops since snapshot) vs O(n) ##########"
- cargo run -q --bin picdemo -- snapshot
- echo "########## 4 revocation — LINEAGE-SUFFIX causal cutoff ##########"
- cargo run -q --bin picdemo -- revocation
- echo "########## 5 flow — authority narrowing hop by hop (+ rejected rogue) ##########"
- cargo run -q --bin picdemo -- flow
- echo "########## 6 exec — Sandboxed Execution, compact (PIC carrying PIC) ##########"
- cargo run -q --bin picdemo -- exec
- echo "########## 7 guardrail — the canonical Sandboxed Execution, full ##########"
- cargo run -q --bin picdemo -- guardrail
- echo "########## 8 bench --guardrail — timings, decomposed per phase ##########"
- cargo run -q --release --bin picdemo -- bench --guardrail
v0-2-rust-check:
desc: Build and test the PIC v0.2 Rust prototype (green check)
dir: ./v0.2/rust
silent: true
cmds:
- cargo build
- cargo test
# v0.2 — combined (Go + Rust)
v0-2-sandboxed:
desc: Showcase the new Sandboxed Execution (PIC of PIC) in BOTH languages, in series
silent: true
cmds:
- echo "@@@@@@@@@@@@@@@@@@@@ GO @@@@@@@@@@@@@@@@@@@@"
- task: v0-2-go-sandboxed
- echo "@@@@@@@@@@@@@@@@@@@@ RUST @@@@@@@@@@@@@@@@@@@@"
- task: v0-2-rust-sandboxed
v0-2-check:
desc: Build + test BOTH v0.2 prototypes (Go and Rust), in series
silent: true
cmds:
- task: v0-2-go-check
- task: v0-2-rust-check
v0-2-parity:
desc: Cross-language JSON parity — the outer PCA (PCA1-G) + multiLineage key structure must be identical in Go and Rust
dir: ./v0.2
silent: true
cmds:
- |
keys() { python3 -c 'import sys,json
d=json.load(sys.stdin); pca=d["outerChain"][1]
def paths(o,p=""):
out=[]
if isinstance(o,dict):
for k in sorted(o): out+=paths(o[k],p+"/"+k)
elif isinstance(o,list):
out+=(paths(o[0],p+"[]") if o else [p+"[]"])
else: out.append(p)
return out
print("\n".join(paths(pca)))'; }
(cd golang && go run ./cmd/picdemo exec --only-json) | keys > /tmp/pic-go-keys.txt
(cd rust && cargo run -q --bin picdemo -- exec --only-json) | keys > /tmp/pic-rs-keys.txt
if diff -u /tmp/pic-go-keys.txt /tmp/pic-rs-keys.txt; then
echo "IDENTICAL ✔ ($(wc -l < /tmp/pic-go-keys.txt | tr -d ' ') key paths in PCA1-G + multiLineage)"
else
echo "MISMATCH ✗"; exit 1
fi