Files
reverse-engineering-anything/docs/specs/agent-environments/fidelity-compare/plan.md
T
edccb430c4 feat(environment): compare an environment with probe captures of its application (#5699)
* chore: restack environment fidelity onto main

Keep probe comparison, paging, and tied-create behavior on main after #5600. Capture parsing keeps field-path errors and records whether a probe kept request and response bodies.

Co-authored-by: morluto <morluto@users.noreply.github.com>

* fix(environment): keep served collection order with the fidelity checks

The tied-create collection order lives with the checks that match encoded parents. The write simulation reads field checks from that attribution, and taint uses the same segment match.

Co-authored-by: morluto <morluto@users.noreply.github.com>

* fix(environment): translate an object's keys only when it is keyed by learned ids

Differ.object mapped every key through the probe's id map, so a field named
like a learned id was compared with another field, and a real rename could
pass as a mapped key. Keys now translate only for an object keyed by
learned ids as learning reads one: a key both sides share needs every key
evidently an id, and otherwise each entry is an entity or each key evidently
an id. Any other object compares field by field.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: morluto <morluto@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: morluto <76467478+morluto@users.noreply.github.com>
2026-10-22 21:52:01 +08:00

938 B

Plan

  1. Export the capture parser from environmentSource.ts so a probe loads like a capture.
  2. environmentCompareMatch.ts: a probe request to a tool and its arguments.
  3. environmentCompareIds.ts: the id map, natural-key pairing, learning from two answers, translating arguments.
  4. environmentCompareDiff.ts: normalisation and categorised differences.
  5. environmentCompare.ts: per probe, reset the state, answer each request, compare and learn; the report.
  6. rea environment-compare in src/cli/environmentCommands.ts, documented in docs/agent-environments.md and docs/cli.md.
  7. Tests: matching, pairing, normalisation and categories as unit tests; the command over a fixture capture and probes.
  8. Verification on VMs: six applications brought up and seeded as for their capture, reset from a snapshot per sequence, driven by a script that records each sequence as a HAR; baseline reports per environment.