Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
14 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .claude/agents/issue-creator.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ Output the issue URL and type.
- Use issue **types**, not labels, for categorization.
- Every issue should have clear done-when / acceptance criteria.
- Use the affected area dropdown values from the templates:
- Core (synthetic IDs, cookies, GDPR)
- Core (Edge Cookies, GDPR)
- Integrations (prebid, lockr, permutive, etc.)
- HTML processing / JS injection
- Ad serving (Equativ)
Expand Down
2 changes: 1 addition & 1 deletion .claude/agents/repo-explorer.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ implementation details.

This is a Rust workspace with three crates:

- `crates/trusted-server-core/` — core library (integrations, HTML processing, synthetic IDs, GDPR)
- `crates/trusted-server-core/` — core library (integrations, HTML processing, Edge Cookies, GDPR)
- `crates/trusted-server-adapter-fastly/` — Fastly Compute entry point
- `crates/js/` — TypeScript/JS build pipeline (per-integration IIFE bundles)

Expand Down
2 changes: 1 addition & 1 deletion .github/actions/setup-integration-test-env/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ runs:
env:
TRUSTED_SERVER__PUBLISHER__ORIGIN_URL: http://127.0.0.1:${{ inputs.origin-port }}
TRUSTED_SERVER__PUBLISHER__PROXY_SECRET: integration-test-proxy-secret
TRUSTED_SERVER__SYNTHETIC__SECRET_KEY: integration-test-secret-key
TRUSTED_SERVER__EDGE_COOKIE__SECRET_KEY: integration-test-secret-key
TRUSTED_SERVER__PROXY__CERTIFICATE_CHECK: "false"
run: cargo build --package trusted-server-adapter-fastly --release --target wasm32-wasip1

Expand Down
4 changes: 2 additions & 2 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
## Project Overview

Rust-based edge computing application targeting **Fastly Compute**. Handles
privacy-preserving synthetic ID generation, ad serving with GDPR compliance,
privacy-preserving Edge Cookie (EC) ID generation, ad serving with GDPR compliance,
real-time bidding integration, and publisher-side JavaScript injection.

## Workspace Layout
Expand Down Expand Up @@ -366,7 +366,7 @@ both runtime behavior and build/tooling changes.
| `crates/trusted-server-core/src/tsjs.rs` | Script tag generation with module IDs |
| `crates/trusted-server-core/src/html_processor.rs` | Injects `<script>` at `<head>` start |
| `crates/trusted-server-core/src/publisher.rs` | `/static/tsjs=` handler, concatenates modules |
| `crates/trusted-server-core/src/synthetic.rs` | Synthetic ID generation |
| `crates/trusted-server-core/src/ec/` | EC identity subsystem (generation, consent, cookies) |
| `crates/trusted-server-core/src/cookies.rs` | Cookie handling |
| `crates/trusted-server-core/src/consent/mod.rs` | GDPR and broader consent management |
| `crates/trusted-server-core/src/http_util.rs` | HTTP abstractions and request utilities |
Expand Down
63 changes: 0 additions & 63 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions OPTIMIZATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ This document presents a performance analysis and optimization plan for the Trus
| ~2% | `IntegrationRegistry` | Route lookup + attribute rewriting + initialization |
| ~0.8% | Memory allocation (`RawVec::reserve`) | Buffer growth during processing |
| ~0.5% | Logging (`fern` / `log_fastly`) | Minimal overhead |
| ~0.5% | Synthetic ID generation | HMAC computation |
| ~0.5% | EC ID generation | HMAC computation |
| ~0.5% | Header extraction | `fastly::http::handle::get_header_values` |

### Key Takeaways
Expand Down Expand Up @@ -271,7 +271,6 @@ let settings: Settings = postcard::from_bytes(SETTINGS_DATA)
| `eq_ignore_ascii_case` for compression detection | `streaming_processor.rs:47` | 5 |
| `Cow<str>` for string replacements | `streaming_replacer.rs:120-125` | 5-10 |
| Remove base64 roundtrip in token computation | `http_util.rs:286-294` | 10-15 |
| Replace Handlebars with manual interpolation | `synthetic.rs:82-99` | ~20 |
| Cache `origin_host()` result per-request | `settings.rs` | 5-10 |

---
Expand Down
2 changes: 1 addition & 1 deletion PUBLISHER_IDS_AUDIT.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ This document lists all publisher-specific IDs and configurations found in the c
- `server_url = "https://securepubads.g.doubleclick.net/gampad/ads"` (line 15)

**Equativ Configuration:**
- `sync_url = "https://adapi-srv-eu.smartadserver.com/ac?pgid=2040327&fmtid=137675&synthetic_id={{synthetic_id}}"` (line 8)
- `sync_url = "https://adapi-srv-eu.smartadserver.com/ac?pgid=2040327&fmtid=137675&ec_id={{ec_id}}"` (line 8)
- Page ID: `2040327`
- Format ID: `137675`

Expand Down
76 changes: 46 additions & 30 deletions crates/integration-tests/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions crates/js/lib/src/integrations/gpt/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import { installGptGuard } from './script_guard';
* signals before the real GPT processes the command.
*
* Future enhancements (driven by config or tsjs API):
* - Inject synthetic ID as page-level key-value targeting.
* - Inject EC ID as page-level key-value targeting.
* - Gate ad requests on consent status.
* - Rewrite ad-unit paths for A/B testing.
*/
Expand Down Expand Up @@ -80,7 +80,7 @@ function ensureGoogleTagStub(win: GptWindow): Partial<GoogleTag> {
* Wrap a queued GPT callback to add instrumentation and future hook points.
*
* Today the wrapper only logs; as the integration matures it will inject
* synthetic ID targeting and consent gates.
* EC ID targeting and consent gates.
*/
function wrapCommand(fn: () => void): () => void {
return () => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"synthetic_id": 10
"ec_counter": 10
}
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"synthetic_id": 10
"ec_counter": 10
}
Loading
Loading