Skip to content

feat(process): compare declared concurrent traces - #419

Merged
morluto merged 8 commits into
mainfrom
codex/issue-403
Jul 22, 2026
Merged

morluto merged 8 commits into
mainfrom
codex/issue-403

Conversation

@morluto

@morluto morluto commented Jul 22, 2026

Copy link
Copy Markdown
Owner

Closes #403.

Problem

Process Capture compared independent observation arrays as total orders. That rejected valid concurrent schedules, while timestamp sorting or broad normalization could hide real ordering regressions. Captures also lacked a producer-time cross-source order that could support causal claims.

Changes

  • record and validate a complete monotonic event journal across terminal, interaction, lifecycle, process, filesystem, shim, protocol, and replay-transition producers
  • add a bounded versioned trace specification with exact predicates, explicit schedule-field exclusions, cardinalities, happens-before and not-before constraints, unordered groups, prefixes/suffixes, and finite trace variants
  • compare journaled traces without using timestamps as causality; return raw locations, complete satisfied constraints, and minimal deterministic diagnostics
  • preserve exact legacy differences when a trace is incomplete, source coverage is partial, or both captures are nonconforming
  • expose identical optional trace-spec behavior through the CLI and MCP, using comparison Evidence v4 while retaining v3 behavior when no spec is supplied
  • preserve source Evidence locations and accept older journal-free Process Capture v4 records as unknown rather than equivalent
  • update downstream comparison predicate compatibility and generated catalog/skill metadata

The matcher indexes canonical exact predicates by source and payload, so bounded captures do not rescan every declaration per event.

Compatibility

The trace specification is optional. Existing compare_process_captures calls and two-path CLI invocations keep the v3 comparison contract. Journal-free historical v4 captures still parse, but cannot prove trace equivalence.

Verification

  • npm run check
  • npm run docs:check
  • focused trace, adapter, downstream, and process-capture tests
  • npm test: 1307/1308 passed in the full-load run; the single interactive PTY integration failure passed immediately when rerun alone with its existing 20-second timeout

Real Hopper and Ghidra verification was not run because this change is confined to provider-neutral Process Capture comparison and adapters.

Suggested review order

  1. src/domain/processTraceSpecification.ts and src/domain/processTraceEvaluation.ts
  2. src/domain/processComparison.ts and src/domain/processTraceDimensionProjection.ts
  3. capture journal producers and validation
  4. CLI/MCP adapters, tests, and generated documentation

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@morluto
morluto merged commit f1cc485 into main Jul 22, 2026
10 checks passed
@morluto
morluto deleted the codex/issue-403 branch July 22, 2026 21:27
@morluto morluto added enhancement New feature or request area: runtime Process capture and runtime observation labels Oct 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: runtime Process capture and runtime observation enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add partial-order and finite-trace comparison for concurrent captures

1 participant