mirror of
https://github.com/morluto/rea
synced 2026-10-26 14:25:49 -04:00
254a8e7018
Correct the pinned HAR schema's missing object types and duration constraints at the shared decoder boundary. Preserve optional omission and the -1 sentinel without repairing producer measurements, and identify the owned corrections in decoder provenance. Keep unsupported or redacted response encodings unavailable to replay and state extraction. Empty-response classification now uses the same body owner, preserving known empty content separately from unavailable content. Regenerate contract examples from decoded fixture bytes and the shared view service. Validation: focused decoder, replay/state, CLI and MCP regressions, including unselected malformed records and confirmed write responses. Contract examples reproduce through MCP. Authored capture controls do not establish real-browser producer coverage. Fixes #6890 Fixes #6889
74 lines
2.3 KiB
TypeScript
74 lines
2.3 KiB
TypeScript
/** Generated from the two-request apiSurfaceHar fixture through the HAR decoder and view service. */
|
|
export const API_SURFACE_EXAMPLE = {
|
|
input: {
|
|
source: {
|
|
kind: "retained-evidence",
|
|
evidence_id:
|
|
"ev_1cfc841a51d771fb713db42cab9979d799226b4b88efab7d9616ca4ef9316ad6",
|
|
},
|
|
view: {
|
|
kind: "api-surface",
|
|
offset: 0,
|
|
limit: 50,
|
|
},
|
|
},
|
|
output: {
|
|
parent_evidence_id:
|
|
"ev_1cfc841a51d771fb713db42cab9979d799226b4b88efab7d9616ca4ef9316ad6",
|
|
parent_operation: "inspect_web_network_capture",
|
|
parent_digest:
|
|
"1cfc841a51d771fb713db42cab9979d799226b4b88efab7d9616ca4ef9316ad6",
|
|
view_digest:
|
|
"fea1ecf2d7c23f1a25f4f2e1ba6b538a8d6e9c6a8748dad3a756a44bad64e3c2",
|
|
artifact: {
|
|
path: "/fixtures/api-surface.har",
|
|
sha256:
|
|
"bf58e2c06e55bfe7e0628157c4ad027ce0aeb81a10e8edef8a7f95b8e5f14225",
|
|
},
|
|
coverage: {
|
|
status: "page",
|
|
examined: 1,
|
|
total: 1,
|
|
next_offset: null,
|
|
exhausted: true,
|
|
},
|
|
limitations: [
|
|
"Grouping does not establish handler identity, URL-space schemas or causality.",
|
|
"HAR text without an encoding declaration is producer-decoded Unicode. Unsupported declared body encodings remain opaque; original body bytes remain unknown unless content explicitly uses valid base64. Declared sizes are preserved independently of retained bytes. mitmproxy 12.2.3 SaveHar may report null optional postData.text; that null is retained and omitted only from the upstream validation copy.",
|
|
],
|
|
unknowns: [],
|
|
records: {
|
|
examined: 2,
|
|
total: 2,
|
|
excluded: 0,
|
|
},
|
|
templated_groups: 1,
|
|
groups: [
|
|
{
|
|
method: "GET",
|
|
origin: "https://api.example.test",
|
|
path_template: "/users/{numeric}",
|
|
templated_segments: [
|
|
{
|
|
segment_index: 1,
|
|
rule: "numeric",
|
|
basis: "inferred",
|
|
observed_values: ["8812", "9031"],
|
|
},
|
|
],
|
|
record_ordinals: [0, 1],
|
|
statuses: [200, 404],
|
|
content_types: ["application/json", "text/plain"],
|
|
flags: ["mixed-statuses", "mixed-content-types"],
|
|
},
|
|
],
|
|
excluded_records: [],
|
|
kind: "api-surface",
|
|
view: {
|
|
kind: "api-surface",
|
|
offset: 0,
|
|
limit: 50,
|
|
},
|
|
},
|
|
} as const;
|