Skip to content

Verify what x-edge-result-type holds for a CloudFront Function response #119

Description

@hughgrigg

Problem

cacheHitRatio counts only rows where x_edge_result_type is Hit, RefreshHit or Miss, and its own description states that a response generated by a CloudFront Function is one of the things that excludes. Nobody has checked. The CloudFront documentation enumerates no x-edge-result-type value for a function-generated response, and AGENTS.md has carried this as an open measurement since #99. If the real value turns out to be Hit, every beacon event counts as a cache hit, and the ratio climbs with beacon traffic rather than with caching.

Current behaviour

status-codes excludes beacon rows by path, through outsideTheBeaconPath in src/beacon-rows.ts, which #107 added. cache-hit-ratio excludes nothing by path and relies entirely on the value in that column. Simulated CloudFront cannot settle this, because the value is whatever the real service writes.

Desired behaviour

The value is read off a real delivery, written down in docs/beacon-path/, and the rollups are correct given whatever it turns out to be.

Acceptance criteria

  • A deployment with BeaconPath has served beacon events and delivered the logs.
  • The x-edge-result-type value those rows carry is recorded in docs/beacon-path/.
  • cache-hit-ratio is checked against that value, and gains a beacon-row filter if it needs one.
  • AGENTS.md stops describing this as an open measurement.

Blocked on

A site deploying BeaconPath. That is possible from v0.2.0 onward, which is the first release carrying the construct.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestquestionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions