Repository navigation
Commit caf12a8
committed
T1.28w: the L0 guards read the parser crate's name from the checked tree
The gate runs its checkpoint's copies of l0_deps.py and l0_scan.py over
a candidate's tree, and their data named the parser crate as it stood
(PARSER, CLASSES and ALLOWED; PARSER_CRATE and CORE_CRATES). A package
that renames the crate therefore could not pass its own gate: the
checkpoint's l0_deps.py refused sdm-pql as a crate with no class and an
edge outside the graph, its l0_scan.py the allowlist's paths outside the
old crate (T1.6b, E69(e), found by the gate at 51c387b and fed8174).
Each guard now reads the parser crate's name from the checked tree's own
copy of itself (l0_scan.tree_name: the last top-level assignment of
PARSER, or PARSER_CRATE, as a string literal, never run), and takes its
own classes, edges and core crates with the parser's entries under that
name (l0_deps.tree_crates, l0_scan.parser_crates). A copy missing,
unparsed, not a literal, or naming another crate the data hold is
refused. Only the parser's name moves: the classes, the edges and every
other list stay the running copy's, so a candidate's own copy cannot
re-class a crate or grant an edge. l0_deps.py is a protected path a
landing must name, and reviewers check it.
selftest.py seeds it on a fixture of the crates, the bridge files and
both guards' copies: the fixture as it is and the parser renamed in its
crates and the guard data pass; renamed in its crates only, in the data
only, the copies missing, the name not a literal and the name of another
crate fail, each in both guards. With the fix undone (each guard reading
its own name) the rename seed and the five refusals fail. The vocabulary
fixtures now carry l0_scan.py's copy.
A bug fix to a frozen guard shown by an integration failure (E56(a));
it adds no check.
Refs: T1.6b, T1.24b
Signed-off-by: Adi Wadaskar <awadaskar@nvidia.com>1 parent a732611 commit caf12a8
3 files changed
Lines changed: 336 additions & 33 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
23 | | - | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
24 | 30 | | |
25 | 31 | | |
26 | 32 | | |
| |||
65 | 71 | | |
66 | 72 | | |
67 | 73 | | |
| 74 | + | |
68 | 75 | | |
69 | 76 | | |
70 | 77 | | |
71 | 78 | | |
72 | 79 | | |
73 | 80 | | |
74 | 81 | | |
75 | | - | |
| 82 | + | |
76 | 83 | | |
77 | 84 | | |
| 85 | + | |
78 | 86 | | |
79 | 87 | | |
80 | 88 | | |
| |||
280 | 288 | | |
281 | 289 | | |
282 | 290 | | |
283 | | - | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
284 | 331 | | |
285 | 332 | | |
286 | 333 | | |
287 | | - | |
| 334 | + | |
288 | 335 | | |
289 | 336 | | |
290 | 337 | | |
291 | | - | |
| 338 | + | |
292 | 339 | | |
293 | 340 | | |
294 | 341 | | |
295 | 342 | | |
296 | 343 | | |
297 | | - | |
| 344 | + | |
298 | 345 | | |
299 | 346 | | |
300 | 347 | | |
301 | | - | |
| 348 | + | |
302 | 349 | | |
303 | 350 | | |
304 | 351 | | |
| |||
312 | 359 | | |
313 | 360 | | |
314 | 361 | | |
315 | | - | |
| 362 | + | |
316 | 363 | | |
317 | | - | |
| 364 | + | |
| 365 | + | |
318 | 366 | | |
319 | 367 | | |
320 | 368 | | |
321 | 369 | | |
322 | | - | |
| 370 | + | |
323 | 371 | | |
324 | 372 | | |
325 | | - | |
| 373 | + | |
326 | 374 | | |
327 | 375 | | |
328 | 376 | | |
329 | | - | |
| 377 | + | |
330 | 378 | | |
331 | 379 | | |
332 | 380 | | |
| |||
349 | 397 | | |
350 | 398 | | |
351 | 399 | | |
352 | | - | |
| 400 | + | |
353 | 401 | | |
354 | 402 | | |
355 | 403 | | |
356 | 404 | | |
357 | | - | |
358 | | - | |
| 405 | + | |
| 406 | + | |
359 | 407 | | |
360 | 408 | | |
361 | 409 | | |
| |||
380 | 428 | | |
381 | 429 | | |
382 | 430 | | |
383 | | - | |
| 431 | + | |
384 | 432 | | |
385 | 433 | | |
386 | 434 | | |
| |||
391 | 439 | | |
392 | 440 | | |
393 | 441 | | |
394 | | - | |
| 442 | + | |
395 | 443 | | |
396 | 444 | | |
397 | 445 | | |
| |||
482 | 530 | | |
483 | 531 | | |
484 | 532 | | |
| 533 | + | |
| 534 | + | |
| 535 | + | |
| 536 | + | |
485 | 537 | | |
486 | | - | |
487 | | - | |
488 | | - | |
| 538 | + | |
| 539 | + | |
| 540 | + | |
489 | 541 | | |
490 | 542 | | |
491 | | - | |
492 | | - | |
493 | | - | |
494 | | - | |
495 | | - | |
| 543 | + | |
| 544 | + | |
| 545 | + | |
| 546 | + | |
| 547 | + | |
496 | 548 | | |
497 | 549 | | |
498 | 550 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
20 | | - | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
21 | 27 | | |
22 | 28 | | |
23 | 29 | | |
| |||
122 | 128 | | |
123 | 129 | | |
124 | 130 | | |
| 131 | + | |
125 | 132 | | |
126 | 133 | | |
127 | 134 | | |
| |||
341 | 348 | | |
342 | 349 | | |
343 | 350 | | |
344 | | - | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
345 | 404 | | |
346 | 405 | | |
347 | 406 | | |
| |||
355 | 414 | | |
356 | 415 | | |
357 | 416 | | |
358 | | - | |
| 417 | + | |
359 | 418 | | |
360 | 419 | | |
361 | 420 | | |
| |||
376 | 435 | | |
377 | 436 | | |
378 | 437 | | |
379 | | - | |
| 438 | + | |
| 439 | + | |
| 440 | + | |
| 441 | + | |
380 | 442 | | |
381 | 443 | | |
382 | 444 | | |
| |||
385 | 447 | | |
386 | 448 | | |
387 | 449 | | |
388 | | - | |
| 450 | + | |
389 | 451 | | |
390 | 452 | | |
391 | 453 | | |
| |||
394 | 456 | | |
395 | 457 | | |
396 | 458 | | |
397 | | - | |
| 459 | + | |
398 | 460 | | |
399 | 461 | | |
400 | 462 | | |
| |||
0 commit comments