Skip to content

docs(adr): record one tagged target identity as the Evidence subject - #11328

Merged
morluto merged 1 commit into
mainfrom
docs/target-identity-adr
Nov 15, 2026
Merged

morluto merged 1 commit into
mainfrom
docs/target-identity-adr

Conversation

@morluto

@morluto morluto commented Nov 15, 2026

Copy link
Copy Markdown
Owner

Summary

This PR adds an architectural decision record, docs/adr/evidence/target-identity.md, before any implementation. It proposes one tagged TargetIdentity (file, url, process, session, unknown) as the Evidence subject, one canonical key for comparing targets, and Evidence format revision 2. Revision 2 carries the new subject and the per-record format marker that Phase 5 deferred. Documentation only. Refs #10510.

Problem and expected behavior

"The target" is defined three ways (Evidence subject identity, snapshot target, a JSON.stringify compare in the snapshot cache). 50 of 120 non-test createEvidence calls record no subject (re-measured on main at c56fffc: application 29, contracts 7, gdb 6, server 3, domain 3, rizin 1, cutter 1), including all gdb, rizin, live-browser and process-capture Evidence. The reason is that a subject can only be a hashed file. Changing the subject changes every Evidence ID, so the decision and its migration need to be recorded before the breaking slice.

Change and scope

  • The ADR records:
    • the identity kinds and their fields (file selection for entry point, slice and flash offsets; URL without userinfo; process with start time; session bound to its opened target; unknown with a closed reason set);
    • targetIdentityKey as the only comparison;
    • createEvidence requiring an identity;
    • Evidence format revision 2 with a per-record evidence_format marker that is not committed in the ID;
    • no rewriting of stored Evidence (revision 1 is refused with the existing recreate guidance);
    • three implementation slices, of which only the second is breaking.
  • Not included: any code. The first slice (identity type and key used for snapshot/cache comparison, no ID change) follows separately.

Contract and boundary impact

  • Semantic owner and earliest changed stage: proposed src/domain/targetIdentity.ts; no code changes here.
  • Contribution scope fit and linked maintainer decision: structural cleanup plan W12 step 3; the ADR is Proposed and needs the maintainer's acceptance before the breaking slice.
  • CLI and MCP/tool-catalog contract: none in this PR.
  • Provider, bridge, target-format, or platform compatibility: none in this PR.
  • Evidence, artifact, provenance, or reconstruction contract: none in this PR; the ADR describes the future breaking revision.
  • Target selection, authority, upstream behavior, and cleanup details: not applicable.
  • Generated metadata, package, or installation impact: none.

Expected effects:

  • Read existing files or captured data.
  • Launch or attach to a process.
  • Inject instrumentation or run scripts/code.
  • Change process memory, registers, files, or configuration.
  • Contact network services.
  • Recover protected code or work around protections.
  • Documentation or usability only; no target interaction.
  • Not sure yet; investigation or maintainer guidance needed.

Evidence and regression coverage

  • Tests added or updated: none (documentation only).
  • Base reproduction or other evidence: the subject-less count comes from a scan of createEvidence(undefined|null, …) calls in non-test, non-fixture src/ files on main. Field lists are read from evidence.ts, analysisSnapshot.ts and AnalysisSnapshotCache.ts.
  • Remaining proof gaps: the raw-binary entry-point collision is source-derived, not reproduced.

For evidence-bearing changes:

  • Observed, derived, and inferred claims remain distinguishable.
  • Artifact identity, source provenance, and failed attempts remain preserved.
  • Unsupported, incomplete, unavailable, or uncertain outcomes remain visible.

Validation performed

  • npx oxfmt docs/adr/evidence/target-identity.md: formatted
  • npm run docs:check: passed

Compatibility, safety, and release

  • Breaking changes or migration steps: none in this PR. The ADR records that the revision 2 slice changes every Evidence ID and will be marked ! with recreate-observations migration notes.
  • Real Hopper/Ghidra, browser, or OS coverage: not applicable.
  • Package or release metadata impact: none.
  • Security, privacy, process, or containment review: the URL identity excludes userinfo (a transport credential); the process identity does not treat a PID alone as identity.

Author readiness

Human owner:

  • I reviewed the final diff and relevant existing code, understand the change and its edge cases, and take responsibility for the complete PR, including AI-assisted work.
  • I checked the evidence above, confirmed it supports the current change, and recorded meaningful validation gaps.
  • I declare this PR ready for initial maintainer review.

Before merge

  • This PR addresses a concrete problem or an agreed enhancement.
  • Material scope and authority questions are resolved, and any required maintainer scope decision covers the final diff.
  • The PR has one focused outcome and the title follows type(scope): outcome.
  • Related issue is linked, or the reason for not linking one is stated above.
  • Tests cover changed observable behavior and meaningful failure paths.
  • Owning docs, contracts, and generated metadata are updated where needed.
  • User-visible CLI/MCP changes include representative output.
  • I checked the final diff for secrets, unrelated cleanup, and unsupported claims.

@chatgpt-codex-connector

Copy link
Copy Markdown
Codex Review Summary: ❌ Failed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ❌ Failed 2026-11-15T16:24:38.970288Z
We couldn’t complete this review. Comment @codex review to try again.
a89ac77 PR opened
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@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.

@greptile-apps

greptile-apps Bot commented Nov 15, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Low impact] This documentation-only proposal appears safe to merge.

Summary

Adds a proposed ADR for one tagged TargetIdentity shared by Evidence, snapshots, and caches.

  • The new ADR sets out one shared identity model for Evidence subjects.

Reviews (2) · Last reviewed commit: "docs(adr): record one tagged target iden..." · Reviewed by Greptile

@morluto
morluto merged commit 28e95f3 into main Nov 15, 2026
7 checks passed
@morluto
morluto deleted the docs/target-identity-adr branch November 15, 2026 16:27
@morluto morluto added area: evidence Evidence, artifacts, and reconstruction documentation Improvements or additions to documentation labels Nov 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: evidence Evidence, artifacts, and reconstruction documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant