|
12 | 12 |
|
13 | 13 | ## File Structure |
14 | 14 |
|
15 | | -| File | Responsibility | |
16 | | -|------|---------------| |
17 | | -| `crates/trusted-server-core/src/ec/fp_signals.rs` | **New.** Types (`FpSignalPartnerConfig`, `FpSignal`, `FpSignalError`), extraction logic, JSON path walker, batched CAS write, all unit tests. | |
18 | | -| `crates/trusted-server-core/src/ec/mod.rs` | Declare `pub mod fp_signals`. Add `cookie_jar` field to `EcContext`, store it during `read_from_request_with_geo`, expose via `cookie_jar()` accessor. | |
19 | | -| `crates/trusted-server-core/src/ec/partner.rs` | Add 3 FP signal fields to `PartnerRecord`. Add `FP_SIGNAL_INDEX_KEY` constant. Add `fp_signal_configs()` accessor. Add `update_fp_signal_index()` and call it from `upsert()`. Skip new index key in `list_registered()`. Add validation function. | |
20 | | -| `crates/trusted-server-core/src/ec/admin.rs` | Add 3 FP signal fields to `RegisterPartnerRequest`. Wire them into `PartnerRecord` construction and validation. | |
21 | | -| `crates/trusted-server-adapter-fastly/src/main.rs` | Expand `RouteOutcome` to carry `fp_signals` and `fp_signal_configs`. Extract signals pre-send. Write signals post-send via `run_fp_signal_collection_after_send()`. | |
| 15 | +| File | Responsibility | |
| 16 | +| -------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | |
| 17 | +| `crates/trusted-server-core/src/ec/fp_signals.rs` | **New.** Types (`FpSignalPartnerConfig`, `FpSignal`, `FpSignalError`), extraction logic, JSON path walker, batched CAS write, all unit tests. | |
| 18 | +| `crates/trusted-server-core/src/ec/mod.rs` | Declare `pub mod fp_signals`. Add `cookie_jar` field to `EcContext`, store it during `read_from_request_with_geo`, expose via `cookie_jar()` accessor. | |
| 19 | +| `crates/trusted-server-core/src/ec/partner.rs` | Add 3 FP signal fields to `PartnerRecord`. Add `FP_SIGNAL_INDEX_KEY` constant. Add `fp_signal_configs()` accessor. Add `update_fp_signal_index()` and call it from `upsert()`. Skip new index key in `list_registered()`. Add validation function. | |
| 20 | +| `crates/trusted-server-core/src/ec/admin.rs` | Add 3 FP signal fields to `RegisterPartnerRequest`. Wire them into `PartnerRecord` construction and validation. | |
| 21 | +| `crates/trusted-server-adapter-fastly/src/main.rs` | Expand `RouteOutcome` to carry `fp_signals` and `fp_signal_configs`. Extract signals pre-send. Write signals post-send via `run_fp_signal_collection_after_send()`. | |
22 | 22 |
|
23 | 23 | --- |
24 | 24 |
|
25 | 25 | ### Task 1: Add `FpSignalPartnerConfig` and `FpSignal` types |
26 | 26 |
|
27 | 27 | **Files:** |
| 28 | + |
28 | 29 | - Create: `crates/trusted-server-core/src/ec/fp_signals.rs` |
29 | 30 | - Modify: `crates/trusted-server-core/src/ec/mod.rs:30-43` |
30 | 31 |
|
@@ -108,6 +109,7 @@ git commit -m "Add FpSignalPartnerConfig, FpSignal, and FpSignalError types" |
108 | 109 | ### Task 2: Implement JSON path extraction with tests |
109 | 110 |
|
110 | 111 | **Files:** |
| 112 | + |
111 | 113 | - Modify: `crates/trusted-server-core/src/ec/fp_signals.rs` |
112 | 114 | - Test: `crates/trusted-server-core/src/ec/fp_signals.rs` (inline `#[cfg(test)]`) |
113 | 115 |
|
@@ -236,6 +238,7 @@ git commit -m "Implement JSON path extraction for first-party signal cookies" |
236 | 238 | ### Task 3: Implement `extract_fp_signals` with tests |
237 | 239 |
|
238 | 240 | **Files:** |
| 241 | + |
239 | 242 | - Modify: `crates/trusted-server-core/src/ec/fp_signals.rs` |
240 | 243 |
|
241 | 244 | - [ ] **Step 1: Write failing tests for cookie extraction** |
@@ -518,6 +521,7 @@ git commit -m "Implement first-party signal extraction from cookie jar" |
518 | 521 | ### Task 4: Add UID2 expiry tests |
519 | 522 |
|
520 | 523 | **Files:** |
| 524 | + |
521 | 525 | - Modify: `crates/trusted-server-core/src/ec/fp_signals.rs` |
522 | 526 |
|
523 | 527 | - [ ] **Step 1: Write UID2 expiry tests** |
@@ -603,6 +607,7 @@ git commit -m "Add UID2 expiry check tests for first-party signal extraction" |
603 | 607 | ### Task 5: Expose `CookieJar` from `EcContext` |
604 | 608 |
|
605 | 609 | **Files:** |
| 610 | + |
606 | 611 | - Modify: `crates/trusted-server-core/src/ec/mod.rs:139-161` (struct), `193-238` (read_from_request_with_geo), `407-464` (test helpers) |
607 | 612 |
|
608 | 613 | - [ ] **Step 1: Add `cookie_jar` field to `EcContext` struct** |
@@ -659,6 +664,7 @@ git commit -m "Expose parsed CookieJar from EcContext for signal extraction" |
659 | 664 | ### Task 6: Add FP signal fields to `PartnerRecord` |
660 | 665 |
|
661 | 666 | **Files:** |
| 667 | + |
662 | 668 | - Modify: `crates/trusted-server-core/src/ec/partner.rs:62-115` (struct), `707-984` (tests) |
663 | 669 |
|
664 | 670 | - [ ] **Step 1: Add 3 fields to `PartnerRecord`** |
@@ -721,6 +727,7 @@ git commit -m "Add first-party signal fields to PartnerRecord" |
721 | 727 | ### Task 7: Add FP signal validation |
722 | 728 |
|
723 | 729 | **Files:** |
| 730 | + |
724 | 731 | - Modify: `crates/trusted-server-core/src/ec/partner.rs` |
725 | 732 |
|
726 | 733 | - [ ] **Step 1: Write failing validation tests** |
@@ -1012,6 +1019,7 @@ git commit -m "Add first-party signal validation for PartnerRecord" |
1012 | 1019 | ### Task 8: Add `_fp_signal_enabled` index to `PartnerStore` |
1013 | 1020 |
|
1014 | 1021 | **Files:** |
| 1022 | + |
1015 | 1023 | - Modify: `crates/trusted-server-core/src/ec/partner.rs` |
1016 | 1024 |
|
1017 | 1025 | - [ ] **Step 1: Add the index constant and skip it in `list_registered`** |
@@ -1162,6 +1170,7 @@ git commit -m "Add _fp_signal_enabled index to PartnerStore" |
1162 | 1170 | ### Task 9: Add FP signal fields to admin registration endpoint |
1163 | 1171 |
|
1164 | 1172 | **Files:** |
| 1173 | + |
1165 | 1174 | - Modify: `crates/trusted-server-core/src/ec/admin.rs` |
1166 | 1175 |
|
1167 | 1176 | - [ ] **Step 1: Add fields to `RegisterPartnerRequest`** |
@@ -1261,6 +1270,7 @@ git commit -m "Add first-party signal fields to partner registration endpoint" |
1261 | 1270 | ### Task 10: Implement `write_fp_signals` with tests |
1262 | 1271 |
|
1263 | 1272 | **Files:** |
| 1273 | + |
1264 | 1274 | - Modify: `crates/trusted-server-core/src/ec/fp_signals.rs` |
1265 | 1275 |
|
1266 | 1276 | - [ ] **Step 1: Write batched write tests** |
@@ -1628,6 +1638,7 @@ git commit -m "Implement batched CAS write for first-party signals" |
1628 | 1638 | ### Task 11: Wire extraction and writing into the adapter |
1629 | 1639 |
|
1630 | 1640 | **Files:** |
| 1641 | + |
1631 | 1642 | - Modify: `crates/trusted-server-adapter-fastly/src/main.rs` |
1632 | 1643 |
|
1633 | 1644 | - [ ] **Step 1: Update imports** |
|
0 commit comments