Commit d1d85f0
restricted_paths: test read_only manifest-id recording
Summary:
## This stack
Decouple restricted_paths config from the manifest_id store (T277178795). Replace `path_acls` (path -> ACL) with per-path `PathRestrictionMetadata` carrying the REPO_REGION ACL and optional permission-request group, so a future `read_only` flag can freeze manifest-id-store growth without dropping enforcement. Thrift `path_acls` is retained as a parser fallback. The configerator thrift source is the separately-published D109697491.
## This diff (no-op)
Test-only: end-to-end coverage for the `read_only` behaviour introduced earlier in the stack (D109827082). No production code changes.
Two tests in the `restricted_paths` integration suite. First, that `read_only` stops new manifest-id-store recording: a contrast test runs the same fixture writable (derivation records one entry per manifest type -- Hg, HgAugmented, Fsnode, ContentManifest) and then with every config path `read_only` (records nothing), exercising all four per-entry derivation gates end-to-end. Second, that `read_only` paths still count as restricted: with all config paths `read_only`, both `may_have_restricted_paths()` and `has_restricted_paths()` stay true across every `AclManifestMode` (Disabled/Shadow/Both/Authoritative), since `read_only` gates recording only, never detection or enforcement.
Small test-infra additions support these: a `with_config_paths_read_only` builder toggle (default false, so existing tests are unchanged), `manifest_id_store_entries` exposed on the scenario result for structural assertions, and a `build_repo_only` helper for predicate-only tests.
Follow-up: the `mapping.rs` `track_all_restricted_paths` backfill `!read_only` filter is not covered here -- it is reachable only via the untopological `derive_from_predecessor` path. `AclManifest` derivation does not branch on `read_only`.
___
Differential Revision: D109838120
fbshipit-source-id: 31719d168a4b9c68e1a96112e78d4f2cbe975f911 parent 8ed22cb commit d1d85f0
2 files changed
Lines changed: 161 additions & 2 deletions
Lines changed: 115 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
8 | 9 | | |
9 | 10 | | |
10 | 11 | | |
| |||
1391 | 1392 | | |
1392 | 1393 | | |
1393 | 1394 | | |
| 1395 | + | |
| 1396 | + | |
| 1397 | + | |
| 1398 | + | |
| 1399 | + | |
| 1400 | + | |
| 1401 | + | |
| 1402 | + | |
| 1403 | + | |
| 1404 | + | |
| 1405 | + | |
| 1406 | + | |
| 1407 | + | |
| 1408 | + | |
| 1409 | + | |
| 1410 | + | |
| 1411 | + | |
| 1412 | + | |
| 1413 | + | |
| 1414 | + | |
| 1415 | + | |
| 1416 | + | |
| 1417 | + | |
| 1418 | + | |
| 1419 | + | |
| 1420 | + | |
| 1421 | + | |
| 1422 | + | |
| 1423 | + | |
| 1424 | + | |
| 1425 | + | |
| 1426 | + | |
| 1427 | + | |
| 1428 | + | |
| 1429 | + | |
| 1430 | + | |
| 1431 | + | |
| 1432 | + | |
| 1433 | + | |
| 1434 | + | |
| 1435 | + | |
| 1436 | + | |
| 1437 | + | |
| 1438 | + | |
| 1439 | + | |
| 1440 | + | |
| 1441 | + | |
| 1442 | + | |
| 1443 | + | |
| 1444 | + | |
| 1445 | + | |
| 1446 | + | |
| 1447 | + | |
| 1448 | + | |
| 1449 | + | |
| 1450 | + | |
| 1451 | + | |
| 1452 | + | |
| 1453 | + | |
| 1454 | + | |
| 1455 | + | |
| 1456 | + | |
| 1457 | + | |
| 1458 | + | |
| 1459 | + | |
| 1460 | + | |
| 1461 | + | |
| 1462 | + | |
| 1463 | + | |
| 1464 | + | |
| 1465 | + | |
| 1466 | + | |
| 1467 | + | |
| 1468 | + | |
| 1469 | + | |
| 1470 | + | |
| 1471 | + | |
| 1472 | + | |
| 1473 | + | |
| 1474 | + | |
| 1475 | + | |
| 1476 | + | |
| 1477 | + | |
| 1478 | + | |
| 1479 | + | |
| 1480 | + | |
| 1481 | + | |
| 1482 | + | |
| 1483 | + | |
| 1484 | + | |
| 1485 | + | |
| 1486 | + | |
| 1487 | + | |
| 1488 | + | |
| 1489 | + | |
| 1490 | + | |
| 1491 | + | |
| 1492 | + | |
| 1493 | + | |
| 1494 | + | |
| 1495 | + | |
| 1496 | + | |
| 1497 | + | |
| 1498 | + | |
| 1499 | + | |
| 1500 | + | |
| 1501 | + | |
| 1502 | + | |
| 1503 | + | |
| 1504 | + | |
| 1505 | + | |
| 1506 | + | |
| 1507 | + | |
| 1508 | + | |
1394 | 1509 | | |
1395 | 1510 | | |
1396 | 1511 | | |
| |||
Lines changed: 46 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
70 | 70 | | |
71 | 71 | | |
72 | 72 | | |
| 73 | + | |
| 74 | + | |
73 | 75 | | |
74 | 76 | | |
75 | 77 | | |
| |||
93 | 95 | | |
94 | 96 | | |
95 | 97 | | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
96 | 101 | | |
97 | 102 | | |
98 | 103 | | |
| |||
105 | 110 | | |
106 | 111 | | |
107 | 112 | | |
| 113 | + | |
108 | 114 | | |
109 | 115 | | |
110 | 116 | | |
| |||
341 | 347 | | |
342 | 348 | | |
343 | 349 | | |
| 350 | + | |
344 | 351 | | |
345 | 352 | | |
346 | 353 | | |
| |||
373 | 380 | | |
374 | 381 | | |
375 | 382 | | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
376 | 390 | | |
377 | 391 | | |
378 | 392 | | |
| |||
534 | 548 | | |
535 | 549 | | |
536 | 550 | | |
| 551 | + | |
537 | 552 | | |
538 | 553 | | |
539 | 554 | | |
| |||
589 | 604 | | |
590 | 605 | | |
591 | 606 | | |
| 607 | + | |
| 608 | + | |
| 609 | + | |
| 610 | + | |
| 611 | + | |
| 612 | + | |
| 613 | + | |
592 | 614 | | |
593 | 615 | | |
594 | 616 | | |
| |||
614 | 636 | | |
615 | 637 | | |
616 | 638 | | |
| 639 | + | |
| 640 | + | |
| 641 | + | |
| 642 | + | |
| 643 | + | |
| 644 | + | |
| 645 | + | |
617 | 646 | | |
618 | 647 | | |
| 648 | + | |
619 | 649 | | |
620 | 650 | | |
621 | 651 | | |
| |||
645 | 675 | | |
646 | 676 | | |
647 | 677 | | |
| 678 | + | |
| 679 | + | |
| 680 | + | |
| 681 | + | |
| 682 | + | |
| 683 | + | |
| 684 | + | |
648 | 685 | | |
649 | 686 | | |
| 687 | + | |
650 | 688 | | |
651 | 689 | | |
652 | 690 | | |
| |||
996 | 1034 | | |
997 | 1035 | | |
998 | 1036 | | |
| 1037 | + | |
999 | 1038 | | |
1000 | 1039 | | |
1001 | 1040 | | |
| |||
1018 | 1057 | | |
1019 | 1058 | | |
1020 | 1059 | | |
1021 | | - | |
| 1060 | + | |
| 1061 | + | |
| 1062 | + | |
| 1063 | + | |
1022 | 1064 | | |
1023 | 1065 | | |
1024 | 1066 | | |
| |||
1031 | 1073 | | |
1032 | 1074 | | |
1033 | 1075 | | |
| 1076 | + | |
1034 | 1077 | | |
1035 | 1078 | | |
1036 | 1079 | | |
| |||
1245 | 1288 | | |
1246 | 1289 | | |
1247 | 1290 | | |
| 1291 | + | |
1248 | 1292 | | |
1249 | 1293 | | |
1250 | 1294 | | |
| |||
1267 | 1311 | | |
1268 | 1312 | | |
1269 | 1313 | | |
1270 | | - | |
| 1314 | + | |
1271 | 1315 | | |
1272 | 1316 | | |
1273 | 1317 | | |
| |||
0 commit comments