[PR #4217] [MERGED] fix(javascript): include response carriers in endpoint traces #6129

Closed
opened 2026-10-31 01:12:05 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/morluto/rea/pull/4217
Author: @JNTMTMTM
Created: 10/15/2026
Status: ✅ Merged
Merged: 10/16/2026
Merged by: @N0zoM1z0

Base: main ← Head: codex/fix-4213-endpoint-response-seeds


📝 Commits (1)

  • 2b7a965 fix(javascript): include response carriers in endpoint traces

📊 Changes

3 files changed (+147 additions, -2 deletions)

View changed files

📝 src/domain/javascript/javascriptSemanticGraphQuery.test.ts (+36 -0)
📝 src/domain/javascript/javascriptSemanticQueryIdentity.ts (+4 -1)
📝 tests/acceptance/applications/applicationWorkflowCli.test.ts (+107 -1)

📄 Description

Summary

Fixes #4213. Endpoint semantic traces now select both request and response nodes carrying the exact endpoint, retaining the response's resolved consumed-by edge and call site.

Problem and expected behavior

For an inert source fixture that fetches an endpoint and consumes response.json(), endpoint selection previously returned only the request. Selecting both existing endpoint carriers must produce the union of their exact-node traces: two seeds, three nodes, and one resolved relation.

Change and scope

Extend the shared domain seed matcher to include response nodes. The producer already owns and supplies endpoint metadata; no adapter-specific interpretation is added. This is an ordinary fix within existing static-analysis boundaries; a new maintainer scope decision is not applicable.

Contract and boundary impact

  • Semantic owner and earliest changed stage: domain semantic query seed identity.
  • Contribution scope fit and linked maintainer decision: existing static query correctness; not applicable.
  • CLI and MCP/tool-catalog contract: shared behavior corrected; schemas and documented exact endpoint contract unchanged.
  • Provider, bridge, target-format, or platform compatibility: no provider protocol changes; validated locally on macOS with Node 24.18.0.
  • Evidence, artifact, provenance, or reconstruction contract: retain original node/relation identities, source Evidence, graph identity, and incomplete coverage. Existing multiple-seed ambiguous status remains.
  • Target selection, authority, upstream behavior, and cleanup: no new target execution or mutation authority.
  • Generated metadata, package, or installation impact: none; ignored build outputs are excluded.

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.

The regression launches owned CLI/MCP test processes; the analyzed fixture remains inert and unchanged.

Evidence and regression coverage

  • Domain regression checks exact endpoint properties, mismatches, malformed/missing metadata, display labels, and unrelated node kinds.

  • Compiled CLI/stdio MCP regression compares complete Evidence, checks endpoint traces against exact-node controls, preserves response consumers, and covers absent endpoints and uncertain source coverage.

  • Both new regressions failed before the matcher fix because only the request was selected.

  • Observed output: two endpoint seeds, three nodes, one resolved relation; trace coverage remains partial from the source graph's unknown coverage.

  • Remaining proof gaps: no full suite, installed-package, other-OS, or real-provider run.

  • 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

  • npm run test:local -- src/domain/javascript/javascriptSemanticGraphQuery.test.ts src/domain/javascript/javascriptSemanticAnalysis.response_endpoints.test.ts src/domain/javascript/javascriptSemanticGraphTraversal.test.ts — 44 passed.
  • npm run build:cached — passed.
  • npx vitest run --project acceptance tests/acceptance/applications/applicationWorkflowCli.test.ts -t 'traces all endpoint carriers and their response consumers' — passed; 34 unrelated tests skipped.
  • npm run check — passed (existing lint warnings remain).
  • npm run verify:test-discovery — all 1,357 test files discovered exactly once.
  • git diff --check — passed.

Compatibility, safety, and release

  • Breaking changes or migration steps: none; fulfills the existing endpoint seed contract.
  • Real Hopper/Ghidra, browser, or OS coverage: no provider execution; macOS only.
  • Package or release metadata impact: none.
  • Security, privacy, process, or containment review: static source analysis; no fixture execution or network requests.

Author readiness

Human owner: @JNTMTMTM

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

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/morluto/rea/pull/4217 **Author:** [@JNTMTMTM](https://github.com/JNTMTMTM) **Created:** 10/15/2026 **Status:** ✅ Merged **Merged:** 10/16/2026 **Merged by:** [@N0zoM1z0](https://github.com/N0zoM1z0) **Base:** `main` ← **Head:** `codex/fix-4213-endpoint-response-seeds` --- ### 📝 Commits (1) - [`2b7a965`](https://github.com/morluto/rea/commit/2b7a965d6e677d87c5885b32917135c35921f346) fix(javascript): include response carriers in endpoint traces ### 📊 Changes **3 files changed** (+147 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `src/domain/javascript/javascriptSemanticGraphQuery.test.ts` (+36 -0) 📝 `src/domain/javascript/javascriptSemanticQueryIdentity.ts` (+4 -1) 📝 `tests/acceptance/applications/applicationWorkflowCli.test.ts` (+107 -1) </details> ### 📄 Description ## Summary Fixes #4213. Endpoint semantic traces now select both request and response nodes carrying the exact endpoint, retaining the response's resolved `consumed-by` edge and call site. ## Problem and expected behavior For an inert source fixture that fetches an endpoint and consumes `response.json()`, endpoint selection previously returned only the request. Selecting both existing endpoint carriers must produce the union of their exact-node traces: two seeds, three nodes, and one resolved relation. ## Change and scope Extend the shared domain seed matcher to include response nodes. The producer already owns and supplies endpoint metadata; no adapter-specific interpretation is added. This is an ordinary fix within existing static-analysis boundaries; a new maintainer scope decision is not applicable. ## Contract and boundary impact - Semantic owner and earliest changed stage: domain semantic query seed identity. - Contribution scope fit and linked maintainer decision: existing static query correctness; not applicable. - CLI and MCP/tool-catalog contract: shared behavior corrected; schemas and documented exact endpoint contract unchanged. - Provider, bridge, target-format, or platform compatibility: no provider protocol changes; validated locally on macOS with Node 24.18.0. - Evidence, artifact, provenance, or reconstruction contract: retain original node/relation identities, source Evidence, graph identity, and incomplete coverage. Existing multiple-seed `ambiguous` status remains. - Target selection, authority, upstream behavior, and cleanup: no new target execution or mutation authority. - Generated metadata, package, or installation impact: none; ignored build outputs are excluded. Expected effects: - [x] 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. The regression launches owned CLI/MCP test processes; the analyzed fixture remains inert and unchanged. ## Evidence and regression coverage - Domain regression checks exact endpoint properties, mismatches, malformed/missing metadata, display labels, and unrelated node kinds. - Compiled CLI/stdio MCP regression compares complete Evidence, checks endpoint traces against exact-node controls, preserves response consumers, and covers absent endpoints and uncertain source coverage. - Both new regressions failed before the matcher fix because only the request was selected. - Observed output: two endpoint seeds, three nodes, one resolved relation; trace coverage remains `partial` from the source graph's `unknown` coverage. - Remaining proof gaps: no full suite, installed-package, other-OS, or real-provider run. - [x] Observed, derived, and inferred claims remain distinguishable. - [x] Artifact identity, source provenance, and failed attempts remain preserved. - [x] Unsupported, incomplete, unavailable, or uncertain outcomes remain visible. ## Validation performed - `npm run test:local -- src/domain/javascript/javascriptSemanticGraphQuery.test.ts src/domain/javascript/javascriptSemanticAnalysis.response_endpoints.test.ts src/domain/javascript/javascriptSemanticGraphTraversal.test.ts` — 44 passed. - `npm run build:cached` — passed. - `npx vitest run --project acceptance tests/acceptance/applications/applicationWorkflowCli.test.ts -t 'traces all endpoint carriers and their response consumers'` — passed; 34 unrelated tests skipped. - `npm run check` — passed (existing lint warnings remain). - `npm run verify:test-discovery` — all 1,357 test files discovered exactly once. - `git diff --check` — passed. ## Compatibility, safety, and release - Breaking changes or migration steps: none; fulfills the existing endpoint seed contract. - Real Hopper/Ghidra, browser, or OS coverage: no provider execution; macOS only. - Package or release metadata impact: none. - Security, privacy, process, or containment review: static source analysis; no fixture execution or network requests. ## Author readiness Human owner: @JNTMTMTM - [x] 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. - [x] I checked the evidence above, confirmed it supports the current change, and recorded meaningful validation gaps. - [x] 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. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-31 01:12:05 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
morluto/rea#6129
No description provided.