Commit 5160ab0
feat(adagents): publisher_domains compact form, revoked_publisher_domains, streaming fetch caps (#729)
Implements full scope of issue #729 plus the scope-expansion comment:
- publisher-property-selector schema gains optional publisher_domains[] compact
form (XOR with publisher_domain; by_id selectors excluded from compact form).
- adagents.json gains top-level revoked_publisher_domains[] with Reason enum.
- Resolver: _fanout_publisher_properties expands compact entries one-per-domain;
filter_revoked_selectors applies revocation precedence over both
publisher_properties[] selectors and top-level properties[].
- Fetch path rewritten onto httpx.AsyncClient.stream with two-tier size caps
(MAX_POINTER_BYTES=5MiB first hop, MAX_AUTHORITATIVE_BYTES=20MiB second hop)
and Content-Length pre-check. New fetch_adagents_with_cache sends
If-None-Match / If-Modified-Since; 304 treated as cache-lifetime refresh.
- Runtime validation: two XORs enforced on publisher_properties[] entries;
by_id rejects publisher_domains; validate_revoked_publisher_domain_entry
plumbed into validate_adagents.
- 24 new tests across four classes; 122 existing adagents tests ported onto
the new streaming mock helper.
Cached schemas under schemas/cache/3.0/ are hand-patched and will be
overwritten by the next \`make regenerate-schemas\` once upstream 3.0.10+
ships and ADCP_VERSION is bumped — that's fine; the runtime/test changes
are independent of the cached schema text.
Per-authorized_agents[] last_updated (also discussed in the spec PR thread)
is intentionally not included — the merged upstream spec PR does not carry
that field, confirmed against the latest schema.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent 12f8ffe commit 5160ab0
10 files changed
Lines changed: 1331 additions & 279 deletions
File tree
- schemas/cache/3.0
- core
- src/adcp
- types/generated_poc
- core
- validation
- tests
- fixtures
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
89 | 89 | | |
90 | 90 | | |
91 | 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 | + | |
92 | 126 | | |
93 | 127 | | |
94 | 128 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
| 4 | + | |
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
| 11 | + | |
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
| 15 | + | |
16 | 16 | | |
17 | 17 | | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
18 | 28 | | |
19 | 29 | | |
20 | 30 | | |
21 | | - | |
| 31 | + | |
22 | 32 | | |
23 | 33 | | |
24 | 34 | | |
25 | | - | |
26 | 35 | | |
27 | 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 | + | |
28 | 61 | | |
29 | 62 | | |
30 | 63 | | |
31 | 64 | | |
32 | | - | |
| 65 | + | |
33 | 66 | | |
34 | 67 | | |
35 | 68 | | |
36 | | - | |
| 69 | + | |
37 | 70 | | |
38 | 71 | | |
39 | 72 | | |
| |||
59 | 92 | | |
60 | 93 | | |
61 | 94 | | |
62 | | - | |
| 95 | + | |
63 | 96 | | |
64 | 97 | | |
65 | 98 | | |
66 | | - | |
| 99 | + | |
67 | 100 | | |
68 | 101 | | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
69 | 112 | | |
70 | 113 | | |
71 | 114 | | |
72 | 115 | | |
73 | 116 | | |
74 | 117 | | |
75 | 118 | | |
76 | | - | |
| 119 | + | |
77 | 120 | | |
78 | 121 | | |
79 | 122 | | |
80 | 123 | | |
81 | 124 | | |
82 | 125 | | |
83 | 126 | | |
84 | | - | |
85 | 127 | | |
86 | 128 | | |
87 | 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 | + | |
88 | 154 | | |
89 | 155 | | |
90 | 156 | | |
91 | | - | |
| 157 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| 14 | + | |
14 | 15 | | |
| 16 | + | |
15 | 17 | | |
16 | 18 | | |
17 | 19 | | |
18 | 20 | | |
19 | 21 | | |
20 | 22 | | |
21 | 23 | | |
| 24 | + | |
22 | 25 | | |
| 26 | + | |
23 | 27 | | |
24 | 28 | | |
25 | 29 | | |
| |||
813 | 817 | | |
814 | 818 | | |
815 | 819 | | |
| 820 | + | |
816 | 821 | | |
| 822 | + | |
817 | 823 | | |
818 | 824 | | |
819 | 825 | | |
820 | 826 | | |
821 | 827 | | |
| 828 | + | |
822 | 829 | | |
| 830 | + | |
823 | 831 | | |
824 | 832 | | |
825 | 833 | | |
| |||
0 commit comments