Skip to content

refactor(domain): encode comparison and lifecycle states exactly - #473

Merged
morluto merged 7 commits into
mainfrom
agent/encode-domain-states
Aug 11, 2026
Merged

refactor(domain): encode comparison and lifecycle states exactly#473
morluto merged 7 commits into
mainfrom
agent/encode-domain-states

Conversation

@morluto

@morluto morluto commented Aug 11, 2026

Copy link
Copy Markdown
Owner

Description

Replace loosely correlated status, nullable, candidate, coverage, and count fields with boundary-parsed discriminated values across comparison, evidence, lifecycle, and browser-capture workflows. Contradictory states now fail at the owning schema instead of surviving into downstream logic and requiring repeated checks.

The refactor covers:

  • call-path, changed-behavior, function, and JavaScript application-version comparisons;
  • conformance replay/trust gates, investigation runs, process traces, reconstruction verification, and reference-source graphs;
  • web source-map collection and browser capture diffs.

Schema-only concerns are separated from traversal and comparison logic where that gives each concept one owner. Tests assert rejected impossible states and observable lifecycle behavior, including MCP notifications, provider capability mutation resistance, request cleanup, and Hopper rename-cache invalidation.

No tools or provider authorities are added or removed. Storage formats retain their legacy migration branches, the 116-tool inventory remains stable, and valid caller behavior is unchanged. The caller-visible schema projection is narrower only for combinations that contradicted their own status, coverage, evidence, or lifecycle fields.

Suggested review order:

  1. Comparison state owners: c07a7c28.
  2. Evidence and lifecycle owners: f5230054.
  3. Browser source-map and capture boundaries: 715af808.
  4. Behavior-focused test cleanup and lifecycle coverage: 8a401fa4, 33bb8b45, 2cf98dee.
  5. Generated catalog and provenance refresh: 21fd5e3c.

Type of Change

  • Bug fix
  • New feature
  • Documentation update
  • Performance improvement
  • Refactoring (valid behavior preserved)
  • Tool contract change (MCP schema narrowing)

Testing Performed

  • Unit and boundary tests added or updated
  • npm run check:pr — typecheck, lint, formatting, Knip, metadata, 338 test files / 1,699 tests, TypeDoc, and generated-document checks passed
  • Focused post-review lifecycle suites — 53 tests passed
  • Focused Hopper cache-dispatch suite — 10 tests passed
  • npm pack --dry-run — 739 files, 1.1 MB package
  • Pre-push npm run check:fast — typecheck and lint passed
  • npm run verify:package — reached the packaged Linux Hopper platform check, then stopped because Xvfb is unavailable on this host
  • Real Hopper, Ghidra, browser, replay, and managed-provider verification performed

Tool Contract Impact

The canonical 116-tool inventory is unchanged. Output schemas now reject mismatched comparison endpoints, invalid match basis/confidence pairs, contradictory coverage and pagination counts, impossible lifecycle checkpoints, inconsistent conformance aggregates, invalid reference-source content states, and source-map/capture statuses that do not match retained evidence.

Generated MCP catalog, product catalog, bundled skill identity, and managed conformance provenance were refreshed and pass the repository drift checks.

Related Issues

No linked issue.

@morluto
morluto marked this pull request as ready for review August 11, 2026 09:58
@cursor

cursor Bot commented Aug 11, 2026

Copy link
Copy Markdown

Bugbot is not enabled for your account, so this pull request was not reviewed.

Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs.

@morluto

morluto commented Aug 11, 2026

Copy link
Copy Markdown
Owner Author

@codex

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Keep them coming!

Reviewed commit: 2cf98deec0

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@morluto
morluto merged commit d65730c into main Aug 11, 2026
17 checks passed
@morluto
morluto deleted the agent/encode-domain-states branch August 11, 2026 10:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant