[PR #6913] [MERGED] test(reference): preserve optional resolver identity regressions #7447

Closed
opened 2026-11-01 21:47:55 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/morluto/rea/pull/6913
Author: @Plastic-time
Created: 10/23/2026
Status: ✅ Merged
Merged: 10/23/2026
Merged by: @gensokyo-dev

Base: main ← Head: codex/rea-optional-resolve-20261023


📝 Commits (3)

  • b7a1fbd fix(reference): retain optional CommonJS resolver dependencies
  • 8f35cf0 test(reference): consolidate optional resolver regressions
  • 93c8c01 test(reference): reconcile regressions with current main

📊 Changes

3 files changed (+276 additions, -85 deletions)

View changed files

📝 src/domain/javascript/javascriptStaticAnalysisLoaderInvocations.test.ts (+102 -64)
➕ tests/boundary/cli/referenceSourceOptionalRequire.test.ts (+150 -0)
📝 tests/boundary/filesystem/referenceSourceComputedRequire.test.ts (+24 -21)

📄 Description

Summary

Fixes #6892. Preserve public CLI regression coverage for optional CommonJS resolver dependencies, and keep canonical member-fixture identities in one shared inventory.

Problem and expected behavior

Optional require.resolve spellings previously disappeared from historical source graphs. Main now fixes both collection gates and consumes the shared loader operation, so the original production patch is superseded. The member fixture also generates its padded path independently for source files and expectations. Share that identity once while retaining strict canonical-order assertions.

Change and scope

Keep the author’s CLI/Node resolver controls and source-hash checks. Parameterize existing source tests for distinct invocation-versus-association facts, search-path uncertainty and mutated loaders. Remove six new lower-level cases already covered by the public workflow. Build one fixture inventory with width-derived padded member paths, reused by source creation and strict expected relationships. Production sources and their ownership stay exactly as on main.

Follow the contribution scope.
Unresolved scope, authority, side effects, or required verification block
integration. Link the required maintainer scope decision for new providers or
capabilities involving target execution, injection, mutation, or protection
recovery; ordinary fixes within existing boundaries may state "not applicable".
Draft PRs may leave the scope decision pending and the readiness and merge checklists
unchecked. Maintainers can help resolve open questions.

Contract and boundary impact

  • Semantic owner and earliest changed stage: Existing shared JavaScript loader facts and historical-source collectors; this final diff changes tests only.
  • Contribution scope fit and linked maintainer decision: Ordinary regression coverage within existing static read authority; separate capability decision not applicable.
  • CLI and MCP/tool-catalog contract: Existing CLI graph schema and MCP contracts unchanged.
  • Provider, bridge, target-format, or platform compatibility: No production/provider change. The new CLI regression retains its existing Windows skip.
  • Evidence, artifact, provenance, or reconstruction contract: Exact source SHA-256 and parsed/internal versus partial/unknown relationships are asserted; no schema change.
  • Target selection, authority, upstream behavior, and cleanup details (if applicable): REA reads owned fixtures. Separate Node controls resolve without loading throwing dependencies; temporary directories use the existing cleanup harness.
  • Generated metadata (docs/public/product-catalog.json), package, or installation impact (CI generates and validates ignored catalogs and skills/; edit authored instructions in .agents/skills/reverse-engineer-anything/ and never commit build outputs): None.

Expected effects (check known effects; use documentation-only on its own).
Unchecked items do not establish absence; leave uncertainties visible.

  • 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: Public CLI optional resolver graph, existing loader semantics, and canonical member fixture. No timeout increases or weaker unordered assertions.
  • Base reproduction or other evidence: On clean main 9dde3fd6, the author’s CLI regression and 45 source tests passed; the filesystem test failed solely because member-10/11/12 sort before member-2. New main fixed that order failure during review; the final follow-up retains its behavior through one fixture inventory. All 57 tests and the full check passed again integrated with newer main 0b1af48a. Upstream production fixes: f2e5fd148 and 5a7bddb3a.
  • User-visible CLI/MCP output (if applicable): The executed import-reference-source regression retains an internal requires edge to dep.cjs for each optional spelling; overwritten/deleted resolvers and unknown search paths retain partial/unknown edges, and source-relative createRequire selects sub/dep.cjs.
  • Remaining proof gaps: Linux source/compiled CLI and self-authored Node controls only; MCP transport, Windows, macOS and installed-release workflows were not executed in this follow-up. No production performance claim; model tokens and task CPU/peak memory were not measured.

For evidence-bearing changes:

Assertions preserve provenance and uncertainty in existing output; no Evidence contract 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

Head 93c8c013e1896de335e8311ee639030f710fe396, integrated with main 0b1af48a; Linux, Node 24.22.1/npm 11.16.0, two allowed CPUs:

  • npm run test:focused -- tests/boundary/cli/referenceSourceOptionalRequire.test.ts tests/boundary/filesystem/referenceSourceComputedRequire.test.ts src/domain/javascript/javascriptStaticAnalysisLoaderInvocations.test.ts — 57 passed, three files, default budgets; includes six resolve-only Node controls plus distinct module invocation checks.
  • npm run check — passed (typecheck, lint/module boundaries, full formatting, knip, metadata and architecture guards).
  • CI 40034259688 failed: all 200 source failures (197 unique titles) match the exact 0b1af48a main CI and clean local control; all 21 portable shard-1 failures reproduce on that clean base. No PR-only failure title was found. Seven other portable shards were cancelled; provider/platform lanes skipped by test-only classification. Build/static/title/readiness passed, and all 55 changed source tests explicitly passed in CI. Full attribution and exact job links. Authorized bypass is used only for proven baseline failures.

Compatibility, safety, and release

  • Breaking changes or migration steps: None.

  • Real Hopper/Ghidra, browser, or OS coverage: Linux Node controls only; no native provider/browser work required for this test-only diff.

  • Package or release metadata impact: None.

  • Security, privacy, process, or containment review: No production authority change. Controls execute self-authored resolver fixtures or the built-in node:path module; throwing dependencies never execute.

Author readiness

AI-assisted implementation and validation.

Human owner: @Plastic-time

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

Post-merge verification at f8ff1579: all 57 focused tests passed again against the actual merged runtime.


🔄 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/6913 **Author:** [@Plastic-time](https://github.com/Plastic-time) **Created:** 10/23/2026 **Status:** ✅ Merged **Merged:** 10/23/2026 **Merged by:** [@gensokyo-dev](https://github.com/gensokyo-dev) **Base:** `main` ← **Head:** `codex/rea-optional-resolve-20261023` --- ### 📝 Commits (3) - [`b7a1fbd`](https://github.com/morluto/rea/commit/b7a1fbd3a6f4537285583ec26e06b818f4bb967c) fix(reference): retain optional CommonJS resolver dependencies - [`8f35cf0`](https://github.com/morluto/rea/commit/8f35cf0dbd9dce64fcda7e0942c163df4946f5fa) test(reference): consolidate optional resolver regressions - [`93c8c01`](https://github.com/morluto/rea/commit/93c8c013e1896de335e8311ee639030f710fe396) test(reference): reconcile regressions with current main ### 📊 Changes **3 files changed** (+276 additions, -85 deletions) <details> <summary>View changed files</summary> 📝 `src/domain/javascript/javascriptStaticAnalysisLoaderInvocations.test.ts` (+102 -64) ➕ `tests/boundary/cli/referenceSourceOptionalRequire.test.ts` (+150 -0) 📝 `tests/boundary/filesystem/referenceSourceComputedRequire.test.ts` (+24 -21) </details> ### 📄 Description ## Summary Fixes #6892. Preserve public CLI regression coverage for optional CommonJS resolver dependencies, and keep canonical member-fixture identities in one shared inventory. ## Problem and expected behavior Optional `require.resolve` spellings previously disappeared from historical source graphs. Main now fixes both collection gates and consumes the shared loader operation, so the original production patch is superseded. The member fixture also generates its padded path independently for source files and expectations. Share that identity once while retaining strict canonical-order assertions. ## Change and scope Keep the author’s CLI/Node resolver controls and source-hash checks. Parameterize existing source tests for distinct invocation-versus-association facts, search-path uncertainty and mutated loaders. Remove six new lower-level cases already covered by the public workflow. Build one fixture inventory with width-derived padded member paths, reused by source creation and strict expected relationships. Production sources and their ownership stay exactly as on main. Follow the [contribution scope](https://github.com/morluto/rea/blob/main/CONTRIBUTING.md#contribution-scope). Unresolved scope, authority, side effects, or required verification block integration. Link the required maintainer scope decision for new providers or capabilities involving target execution, injection, mutation, or protection recovery; ordinary fixes within existing boundaries may state "not applicable". Draft PRs may leave the scope decision pending and the readiness and merge checklists unchecked. Maintainers can help resolve open questions. ## Contract and boundary impact - Semantic owner and earliest changed stage: Existing shared JavaScript loader facts and historical-source collectors; this final diff changes tests only. - Contribution scope fit and linked maintainer decision: Ordinary regression coverage within existing static read authority; separate capability decision not applicable. - CLI and MCP/tool-catalog contract: Existing CLI graph schema and MCP contracts unchanged. - Provider, bridge, target-format, or platform compatibility: No production/provider change. The new CLI regression retains its existing Windows skip. - Evidence, artifact, provenance, or reconstruction contract: Exact source SHA-256 and parsed/internal versus partial/unknown relationships are asserted; no schema change. - Target selection, authority, upstream behavior, and cleanup details (if applicable): REA reads owned fixtures. Separate Node controls resolve without loading throwing dependencies; temporary directories use the existing cleanup harness. - Generated metadata (`docs/public/product-catalog.json`), package, or installation impact (CI generates and validates ignored catalogs and `skills/`; edit authored instructions in `.agents/skills/reverse-engineer-anything/` and never commit build outputs): None. Expected effects (check known effects; use documentation-only on its own). Unchecked items do not establish absence; leave uncertainties visible. - [x] Read existing files or captured data. - [x] Launch or attach to a process. - [x] 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: Public CLI optional resolver graph, existing loader semantics, and canonical member fixture. No timeout increases or weaker unordered assertions. - Base reproduction or other evidence: On clean main `9dde3fd6`, the author’s CLI regression and 45 source tests passed; the filesystem test failed solely because member-10/11/12 sort before member-2. New main fixed that order failure during review; the final follow-up retains its behavior through one fixture inventory. All 57 tests and the full check passed again integrated with newer main `0b1af48a`. Upstream production fixes: [f2e5fd148](https://github.com/morluto/rea/commit/f2e5fd148a85fa737302dd194a33172c4561093e) and [5a7bddb3a](https://github.com/morluto/rea/commit/5a7bddb3aeb0345854e76b79d529aed1c40e2054). - User-visible CLI/MCP output (if applicable): The executed `import-reference-source` regression retains an internal `requires` edge to dep.cjs for each optional spelling; overwritten/deleted resolvers and unknown search paths retain partial/unknown edges, and source-relative createRequire selects sub/dep.cjs. - Remaining proof gaps: Linux source/compiled CLI and self-authored Node controls only; MCP transport, Windows, macOS and installed-release workflows were not executed in this follow-up. No production performance claim; model tokens and task CPU/peak memory were not measured. For evidence-bearing changes: Assertions preserve provenance and uncertainty in existing output; no Evidence contract changes. - [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 Head `93c8c013e1896de335e8311ee639030f710fe396`, integrated with main `0b1af48a`; Linux, Node 24.22.1/npm 11.16.0, two allowed CPUs: - `npm run test:focused -- tests/boundary/cli/referenceSourceOptionalRequire.test.ts tests/boundary/filesystem/referenceSourceComputedRequire.test.ts src/domain/javascript/javascriptStaticAnalysisLoaderInvocations.test.ts` — **57 passed**, three files, default budgets; includes six resolve-only Node controls plus distinct module invocation checks. - `npm run check` — passed (typecheck, lint/module boundaries, full formatting, knip, metadata and architecture guards). - [CI 40034259688](https://github.com/morluto/rea/actions/runs/40034259688) failed: all 200 source failures (197 unique titles) match the exact `0b1af48a` main CI and clean local control; all 21 portable shard-1 failures reproduce on that clean base. No PR-only failure title was found. Seven other portable shards were cancelled; provider/platform lanes skipped by test-only classification. Build/static/title/readiness passed, and all 55 changed source tests explicitly passed in CI. [Full attribution and exact job links](https://github.com/morluto/rea/pull/6913#issuecomment-6376240915). Authorized bypass is used only for proven baseline failures. ## Compatibility, safety, and release - Breaking changes or migration steps: None. - Real Hopper/Ghidra, browser, or OS coverage: Linux Node controls only; no native provider/browser work required for this test-only diff. - Package or release metadata impact: None. - Security, privacy, process, or containment review: No production authority change. Controls execute self-authored resolver fixtures or the built-in node:path module; throwing dependencies never execute. ## Author readiness AI-assisted implementation and validation. Human owner: @Plastic-time - [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. Post-merge verification at `f8ff1579`: all **57** focused tests passed again against the actual merged runtime. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-01 21:47:55 +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#7447
No description provided.