Discovery Mode — API-Tracking für Google Maps #16

Closed
opened 2026-06-17 14:01:50 +00:00 by Artur · 1 comment
Owner

Goal

Add a discovery mode to createIsolatedContext that logs every API access instead of throwing.

What to Build

  1. RuntimeMode type: 'strict' | 'discovery' | 'production'
  2. createIsolatedContext({ mode: 'discovery' }) — logs all missing APIs via apiLogger
  3. DiscoveryReport class — aggregates unique API paths with call counts
  4. CLI flag --discovery — runs page in discovery mode, prints report on exit

Tests (110% Coverage)

  • it('strict mode throws on unknown API')
  • it('discovery mode logs instead of throws')
  • it('discovery mode returns tolerant proxy for unknown access')
  • it('DiscoveryReport aggregates unique paths')
  • it('DiscoveryReport counts calls per path')
  • it('DiscoveryReport tracks receiver type: property, method, construct')
  • it('CLI --discovery outputs report')

Definition of Done

  • RuntimeMode integrated in createIsolatedContext
  • CLI --discovery flag functional
  • Tests pass with 100% line coverage
  • Can load a page in discovery mode and get API report
## Goal Add a `discovery` mode to createIsolatedContext that logs every API access instead of throwing. ## What to Build 1. `RuntimeMode` type: `'strict' | 'discovery' | 'production'` 2. `createIsolatedContext({ mode: 'discovery' })` — logs all missing APIs via apiLogger 3. `DiscoveryReport` class — aggregates unique API paths with call counts 4. CLI flag `--discovery` — runs page in discovery mode, prints report on exit ## Tests (110% Coverage) - `it('strict mode throws on unknown API')` - `it('discovery mode logs instead of throws')` - `it('discovery mode returns tolerant proxy for unknown access')` - `it('DiscoveryReport aggregates unique paths')` - `it('DiscoveryReport counts calls per path')` - `it('DiscoveryReport tracks receiver type: property, method, construct')` - `it('CLI --discovery outputs report')` ## Definition of Done - [ ] RuntimeMode integrated in createIsolatedContext - [ ] CLI --discovery flag functional - [ ] Tests pass with 100% line coverage - [ ] Can load a page in discovery mode and get API report
Author
Owner

Discovery Mode — API-Tracking for Google Maps. Implementiert in Page({mode:'discovery'}). Tests existieren.

Discovery Mode — API-Tracking for Google Maps. ✅ Implementiert in Page({mode:'discovery'}). Tests existieren.
Artur closed this issue 2026-06-18 06:28:04 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
glow-all/true-headless-browser#16
No description provided.