[PR #6184] [CLOSED] fix(analysis-view): attribute unsupported artifact view kinds to view #7191

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

📋 Pull Request Information

Original PR: https://github.com/morluto/rea/pull/6184
Author: @freddyuniverse
Created: 10/21/2026
Status: ❌ Closed

Base: main ← Head: fix/artifact-view-kind-path


📝 Commits (2)

  • 8801ffc fix(analysis-view): attribute unsupported artifact view kinds to view
  • f895604 test(analysis-view): cover inspect_artifact unsupported view

📊 Changes

2 files changed (+57 additions, -4 deletions)

View changed files

📝 src/domain/analysisView/artifactInventoryView.test.ts (+48 -1)
📝 src/domain/analysisView/artifactInventoryView.ts (+9 -3)

📄 Description

Summary

Fixes #6001. When inspect_analysis_view receives valid inventory_artifact or
inspect_artifact Evidence with a view kind other than summary or inventory,
the refusal now points to ["view"] instead of ["source"]. The source was
valid, so callers can keep it and change only the view.

Problem and expected behavior

Smallest trigger: valid artifact Evidence plus { kind: "page", collection: "sections", offset: 0, limit: 1 }.
Before: invalid_request with issues[0].path = ["source"]. The same source with
{ kind: "summary" } succeeds, so the rejected input is the view. Expected (and
now actual): same refusal, reason and message, with path = ["view"]. This matches
the binary-layout (layoutIncompatible), Mach-O and Interface Builder projectors.

Change and scope

inputError in src/domain/analysisView/artifactInventoryView.ts takes an optional
field ("source" by default). The incompatible-view branch passes "view". Every
other refusal in the projector, including the wrong-parent-operation branch and
parent parse failures, still reports ["source"]. Structured parent-schema issue
projection (#6034) is intentionally not included.

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.

Scope decision: not applicable (an ordinary diagnostic fix within existing boundaries).

Contract and boundary impact

  • Semantic owner and earliest changed stage: artifact inventory view projector (domain), request validation.
  • Contribution scope fit and linked maintainer decision: not applicable; ordinary fix.
  • CLI and MCP/tool-catalog contract: no schema change. Only the issue path of an already rejected request changes (["source"] → ["view"]). Code, category, retryable, recovery and message are unchanged.
  • Provider, bridge, target-format, or platform compatibility: none.
  • Evidence, artifact, provenance, or reconstruction contract: none.
  • Target selection, authority, upstream behavior, and cleanup details (if applicable): not applicable.
  • 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.

No expected effect applies: the change only moves the issue path of an existing refusal in the view projector. It adds no target interaction, file access, process, or network effect.

Evidence and regression coverage

  • Tests added or updated: src/domain/analysisView/artifactInventoryView.test.ts: two tests, one with an inventory_artifact parent and one with an inspect_artifact parent (built with createArtifactInspection). Each asserts the page view-kind refusal at ["view"] with the unchanged reason and message, plus a summary control on the same source. They share one assertion helper.
  • Base reproduction or other evidence: with the source change reverted, both new tests fail (Expected ["view"], received ["source"]). They pass with the fix.
  • User-visible CLI/MCP output (if applicable): the issue's built-CLI reproduction (one-entry ZIP → inspect-artifact → inline inspect-analysis-view) now returns exit 1 with
    {"code":"invalid_request","issues":[{"path":["view"],"reason":"invalid_value","message":"Artifact Evidence supports summary and inventory views."}]}.
    The summary control exits 0 with normalized_result.kind: "summary".
  • Remaining proof gaps: MCP was not separately exercised. It shares the production service by source inspection. Only Linux x64 was used. CI has not run on this PR yet (it is waiting for maintainer approval), so the results below are local only.

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

Node 24.18.0, npm 11.16.0, Linux x64:

  • npm run test:local -- src/domain/analysisView/artifactInventoryView.test.ts on the base revision with only the tests added: 2 failed, 10 passed (expected failures).
  • npm run test:local -- src/domain/analysisView/artifactInventoryView.test.ts with the fix: 12 passed.
  • npm run test:local -- src/domain/analysisView/*.test.ts with the fix: 20 files, 305 tests passed.
  • npm run test:focused -- tests/boundary/cli/analysisViewCli.test.ts: 17 passed.
  • npm run check:fast (typecheck and lint): 2/2 tasks successful.
  • npm run jscpd: no clones reported in artifactInventoryView.test.ts.
  • node scripts/rea.mjs inspect-analysis-view reproduction from #6001: path is now ["view"], and the summary control succeeds.

Compatibility, safety, and release

  • Breaking changes or migration steps: none. Only a correction path on an existing refusal changes.
  • Real Hopper/Ghidra, browser, or OS coverage: not applicable; no provider involved.
  • Package or release metadata impact: none.
  • Security, privacy, process, or containment review: none; no new effects.

Author readiness

Human owner: @freddyuniverse

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

AI-assisted: this change was prepared with an AI assistant. @freddyuniverse is the human owner.


🔄 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/6184 **Author:** [@freddyuniverse](https://github.com/freddyuniverse) **Created:** 10/21/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `fix/artifact-view-kind-path` --- ### 📝 Commits (2) - [`8801ffc`](https://github.com/morluto/rea/commit/8801ffc689d711205c43947b7560a8a5325fb259) fix(analysis-view): attribute unsupported artifact view kinds to view - [`f895604`](https://github.com/morluto/rea/commit/f8956045e32ab7c967b15ba1ab9227eab702d2d2) test(analysis-view): cover inspect_artifact unsupported view ### 📊 Changes **2 files changed** (+57 additions, -4 deletions) <details> <summary>View changed files</summary> 📝 `src/domain/analysisView/artifactInventoryView.test.ts` (+48 -1) 📝 `src/domain/analysisView/artifactInventoryView.ts` (+9 -3) </details> ### 📄 Description ## Summary Fixes #6001. When `inspect_analysis_view` receives valid `inventory_artifact` or `inspect_artifact` Evidence with a view kind other than `summary` or `inventory`, the refusal now points to `["view"]` instead of `["source"]`. The source was valid, so callers can keep it and change only the view. ## Problem and expected behavior Smallest trigger: valid artifact Evidence plus `{ kind: "page", collection: "sections", offset: 0, limit: 1 }`. Before: `invalid_request` with `issues[0].path = ["source"]`. The same source with `{ kind: "summary" }` succeeds, so the rejected input is the view. Expected (and now actual): same refusal, reason and message, with `path = ["view"]`. This matches the binary-layout (`layoutIncompatible`), Mach-O and Interface Builder projectors. ## Change and scope `inputError` in `src/domain/analysisView/artifactInventoryView.ts` takes an optional field (`"source"` by default). The incompatible-view branch passes `"view"`. Every other refusal in the projector, including the wrong-parent-operation branch and parent parse failures, still reports `["source"]`. Structured parent-schema issue projection (#6034) is intentionally not included. 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. Scope decision: not applicable (an ordinary diagnostic fix within existing boundaries). ## Contract and boundary impact - Semantic owner and earliest changed stage: artifact inventory view projector (domain), request validation. - Contribution scope fit and linked maintainer decision: not applicable; ordinary fix. - CLI and MCP/tool-catalog contract: no schema change. Only the issue path of an already rejected request changes (`["source"]` → `["view"]`). Code, category, retryable, recovery and message are unchanged. - Provider, bridge, target-format, or platform compatibility: none. - Evidence, artifact, provenance, or reconstruction contract: none. - Target selection, authority, upstream behavior, and cleanup details (if applicable): not applicable. - 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. No expected effect applies: the change only moves the issue path of an existing refusal in the view projector. It adds no target interaction, file access, process, or network effect. ## Evidence and regression coverage - Tests added or updated: `src/domain/analysisView/artifactInventoryView.test.ts`: two tests, one with an `inventory_artifact` parent and one with an `inspect_artifact` parent (built with `createArtifactInspection`). Each asserts the `page` view-kind refusal at `["view"]` with the unchanged reason and message, plus a `summary` control on the same source. They share one assertion helper. - Base reproduction or other evidence: with the source change reverted, both new tests fail (`Expected ["view"], received ["source"]`). They pass with the fix. - User-visible CLI/MCP output (if applicable): the issue's built-CLI reproduction (one-entry ZIP → `inspect-artifact` → inline `inspect-analysis-view`) now returns exit 1 with `{"code":"invalid_request","issues":[{"path":["view"],"reason":"invalid_value","message":"Artifact Evidence supports summary and inventory views."}]}`. The `summary` control exits 0 with `normalized_result.kind: "summary"`. - Remaining proof gaps: MCP was not separately exercised. It shares the production service by source inspection. Only Linux x64 was used. CI has not run on this PR yet (it is waiting for maintainer approval), so the results below are local only. For evidence-bearing 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 Node 24.18.0, npm 11.16.0, Linux x64: - `npm run test:local -- src/domain/analysisView/artifactInventoryView.test.ts` on the base revision with only the tests added: 2 failed, 10 passed (expected failures). - `npm run test:local -- src/domain/analysisView/artifactInventoryView.test.ts` with the fix: 12 passed. - `npm run test:local -- src/domain/analysisView/*.test.ts` with the fix: 20 files, 305 tests passed. - `npm run test:focused -- tests/boundary/cli/analysisViewCli.test.ts`: 17 passed. - `npm run check:fast` (typecheck and lint): 2/2 tasks successful. - `npm run jscpd`: no clones reported in `artifactInventoryView.test.ts`. - `node scripts/rea.mjs inspect-analysis-view` reproduction from #6001: path is now `["view"]`, and the summary control succeeds. ## Compatibility, safety, and release - Breaking changes or migration steps: none. Only a correction path on an existing refusal changes. - Real Hopper/Ghidra, browser, or OS coverage: not applicable; no provider involved. - Package or release metadata impact: none. - Security, privacy, process, or containment review: none; no new effects. ## Author readiness Human owner: @freddyuniverse - [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 - [x] This PR addresses a concrete problem or an agreed enhancement. - [x] Material scope and authority questions are resolved, and any required maintainer scope decision covers the final diff. - [x] The PR has one focused outcome and the title follows `type(scope): outcome`. - [x] Related issue is linked, or the reason for not linking one is stated above. - [x] Tests cover changed observable behavior and meaningful failure paths. - [x] Owning docs, contracts, and generated metadata are updated where needed. - [x] User-visible CLI/MCP changes include representative output. - [x] I checked the final diff for secrets, unrelated cleanup, and unsupported claims. AI-assisted: this change was prepared with an AI assistant. @freddyuniverse is the human owner. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-01 21:46:02 +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#7191
No description provided.