Skip to content

Commit e9e9cde

Browse files
Finalize PR #80 follow-ups for fixed-pricing contract
Align remaining docs with fixed /bin/zsh.01 bidding and update Playwright /_/sizes assertions to match the cpm-free response, so review cleanups and CI checks reflect the current API behavior.
1 parent 3bbbbc7 commit e9e9cde

5 files changed

Lines changed: 52 additions & 39 deletions

File tree

docs/api/index.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,10 @@ Mocktioneer exposes several HTTP endpoints for bid requests, creative serving, a
3838

3939
### Utility Endpoints
4040

41-
| Method | Path | Description |
42-
| ------ | ---------- | -------------------- |
43-
| GET | `/` | Service info page |
44-
| GET | `/_/sizes` | Supported ad sizes |
41+
| Method | Path | Description |
42+
| ------ | ---------- | ------------------ |
43+
| GET | `/` | Service info page |
44+
| GET | `/_/sizes` | Supported ad sizes |
4545

4646
## Common Headers
4747

docs/api/openrtb-auction.md

Lines changed: 26 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ Content-Type: application/json
4747
{ "w": 300, "h": 250 },
4848
{ "w": 320, "h": 50 }
4949
]
50-
},
50+
}
5151
}
5252
],
5353
"ext": {
@@ -65,23 +65,23 @@ Content-Type: application/json
6565

6666
### Request Fields
6767

68-
| Field | Type | Required | Description |
69-
| ------------------------------ | ------- | -------- | ------------------------------------- |
70-
| `id` | string | Yes | Request ID |
71-
| `imp` | array | Yes | Array of impressions (min 1) |
72-
| `imp[].id` | string | Yes | Impression ID |
73-
| `imp[].banner` | object | Yes\* | Banner object (\*or other media type) |
74-
| `imp[].banner.w` | integer | No | Width in pixels |
75-
| `imp[].banner.h` | integer | No | Height in pixels |
76-
| `imp[].banner.format` | array | No | Array of size objects |
77-
| `ext.trusted_server.version` | string | No | Signing protocol version (`1.1`) |
78-
| `ext.trusted_server.signature` | string | No | Signature for canonical payload |
79-
| `ext.trusted_server.kid` | string | No | Key ID used for signature |
80-
| `ext.trusted_server.request_host` | string | No | Host included in signed payload |
81-
| `ext.trusted_server.request_scheme` | string | No | Scheme included in signed payload |
82-
| `ext.trusted_server.ts` | integer | No | Unix timestamp (milliseconds) |
83-
| `site` | object | No | Site information |
84-
| `site.domain` | string | No | Domain for signature verification |
68+
| Field | Type | Required | Description |
69+
| ----------------------------------- | ------- | -------- | ------------------------------------- |
70+
| `id` | string | Yes | Request ID |
71+
| `imp` | array | Yes | Array of impressions (min 1) |
72+
| `imp[].id` | string | Yes | Impression ID |
73+
| `imp[].banner` | object | Yes\* | Banner object (\*or other media type) |
74+
| `imp[].banner.w` | integer | No | Width in pixels |
75+
| `imp[].banner.h` | integer | No | Height in pixels |
76+
| `imp[].banner.format` | array | No | Array of size objects |
77+
| `ext.trusted_server.version` | string | No | Signing protocol version (`1.1`) |
78+
| `ext.trusted_server.signature` | string | No | Signature for canonical payload |
79+
| `ext.trusted_server.kid` | string | No | Key ID used for signature |
80+
| `ext.trusted_server.request_host` | string | No | Host included in signed payload |
81+
| `ext.trusted_server.request_scheme` | string | No | Scheme included in signed payload |
82+
| `ext.trusted_server.ts` | integer | No | Unix timestamp (milliseconds) |
83+
| `site` | object | No | Site information |
84+
| `site.domain` | string | No | Domain for signature verification |
8585

8686
### Size Resolution
8787

@@ -223,7 +223,14 @@ Mocktioneer supports optional request signature verification. When `site.domain`
223223
The signed payload is canonical JSON:
224224

225225
```json
226-
{"version":"1.1","kid":"...","host":"...","scheme":"https","id":"...","ts":1706900000000}
226+
{
227+
"version": "1.1",
228+
"kid": "...",
229+
"host": "...",
230+
"scheme": "https",
231+
"id": "...",
232+
"ts": 1706900000000
233+
}
227234
```
228235

229236
The JWKS is fetched from `https://{site.domain}/.well-known/trusted-server.json`. Verification failures are logged but don't reject the request.

docs/guide/what-is-mocktioneer.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ Mocktioneer provides:
3434

3535
- Build ad tech features without waiting for real bidders
3636
- Debug integration issues with predictable responses
37-
- Test edge cases with controlled bid prices
37+
- Test edge cases with fixed, deterministic bid pricing
3838

3939
### CI/CD
4040

@@ -44,14 +44,14 @@ Mocktioneer provides:
4444

4545
## Key Features
4646

47-
| Feature | Description |
48-
| --------------- | -------------------------------------------- |
49-
| Multi-platform | Runs on Fastly, Cloudflare, and native Axum |
50-
| Manifest-driven | Single `edgezero.toml` configures everything |
51-
| Price control | Override bid prices via request extensions |
52-
| Standard sizes | Supports common IAB ad sizes |
53-
| Cookie tracking | Optional pixel tracking with `mtkid` cookie |
54-
| CORS enabled | Works with browser-based clients |
47+
| Feature | Description |
48+
| --------------- | --------------------------------------------- |
49+
| Multi-platform | Runs on Fastly, Cloudflare, and native Axum |
50+
| Manifest-driven | Single `edgezero.toml` configures everything |
51+
| Fixed pricing | Always returns `$0.01` CPM for generated bids |
52+
| Standard sizes | Supports common IAB ad sizes |
53+
| Cookie tracking | Optional pixel tracking with `mtkid` cookie |
54+
| CORS enabled | Works with browser-based clients |
5555

5656
## How It Works
5757

docs/integrations/index.md

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ Mocktioneer acts as a drop-in replacement for real bidders during development an
4848

4949
- Same request always produces same response
5050
- No flaky tests due to bidder variability
51-
- Controlled bid prices for testing scenarios
51+
- Fixed $0.01 bids for predictable floor testing
5252

5353
### No External Dependencies
5454

@@ -136,13 +136,20 @@ Test creative rendering pipeline:
136136
137137
Test price handling and floor logic:
138138
139-
```javascript
140-
// Override bid price
141-
params: {
142-
bid: 5.0 // Force $5 CPM
139+
```json
140+
{
141+
"imp": [
142+
{
143+
"id": "1",
144+
"bidfloor": 1.0,
145+
"banner": { "w": 300, "h": 250 }
146+
}
147+
]
143148
}
144149
```
145150

151+
Mocktioneer always bids at `$0.01` CPM, so floors above that value should reject bids.
152+
146153
### Error Handling
147154

148155
Test error scenarios:

tests/playwright/creative-visibility.test.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ import { test, expect } from '@playwright/test';
1010
interface AdSize {
1111
width: number;
1212
height: number;
13-
cpm: number;
1413
}
1514

1615
// Fetched from /_/sizes endpoint before tests run
@@ -34,7 +33,7 @@ test.describe('Creative visibility tests', () => {
3433
for (const size of data.sizes) {
3534
expect(typeof size.width).toBe('number');
3635
expect(typeof size.height).toBe('number');
37-
expect(typeof size.cpm).toBe('number');
36+
expect(size).not.toHaveProperty('cpm');
3837
}
3938
});
4039

0 commit comments

Comments
 (0)