Skip to content

refactor(resources): move ArtifactReader to src/resources - #11262

Merged
morluto merged 2 commits into
refactor/resources-cleanup-leasefrom
refactor/resources-artifact-reader
Nov 15, 2026
Merged

morluto merged 2 commits into
refactor/resources-cleanup-leasefrom
refactor/resources-artifact-reader

Conversation

@morluto

@morluto morluto commented Nov 15, 2026

Copy link
Copy Markdown
Owner

Summary

Second src/resources/ slice (stacked on #11259): moves ArtifactReader (the artifact reader contract and ArtifactReaderFailure) from src/artifacts/ to src/resources/. src/windows/ no longer imports a provider unit. Part of plan W9 (layer enforcement).

Problem and expected behavior

src/process/ and src/windows/ (foundation) import ArtifactReader from src/artifacts/ (provider layer), which the layer check counts as upward imports. ArtifactReader depends only on domain types and the AnalysisCleanupLease type, which #11259 moved to src/resources/.

Expected: the shared reader contract lives in the foundation src/resources/ unit. Behaviour is unchanged.

Change and scope

  • Pure move commit: git mv src/artifacts/ArtifactReader{,.test}.ts src/resources/ plus import specifier rewrites (369 files, including the dist/... path scripts/verify/javascript/runtime-observation.mjs loads). No alias or re-export is left behind.
  • Separate commit: layer baseline process -> artifacts 11 -> 9, windows -> artifacts 1 -> 0 (entry removed). The sqlite, binary_layout, evm and web_network CI lanes that named src/artifacts/ArtifactReader.ts (or ArtifactReader*.ts) now name the new path; ArtifactReaderAdmission.ts and ArtifactReaderLimits.ts stay in src/artifacts/ and keep their glob.

Not included: ArtifactFileOperation, ArtifactResourceScope, readStableArtifact (next slices).

Contribution scope: maintainer-approved W9 approach. No new capability.

Contract and boundary impact

  • Semantic owner and earliest changed stage: ArtifactReader keeps its API; only its path changes.

  • Contribution scope fit and linked maintainer decision: W9 layer enforcement, approved.

  • CLI and MCP/tool-catalog contract: none.

  • 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): unchanged.

  • Generated metadata (docs/public/product-catalog.json), package, or installation impact: none; the built module moves from dist/artifacts/ to dist/resources/ (internal).

  • 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: tests/boundary/filesystem/ciChangeScope.test.ts pins src/resources/ArtifactReader.ts for sqlite, binary_layout, evm and web_network; with the previous scripts/ci/scopes.mjs they fail (observed: 4 failed, 382 passed). The moved unit tests run unchanged.
  • Base reproduction or other evidence: verify:module-boundaries after the move reported process -> artifacts: 9, baseline 11 and windows -> artifacts: 0, baseline 1.
  • User-visible CLI/MCP output (if applicable): none.
  • Remaining proof gaps: only the focused tests below ran locally; CI runs the remaining suites.

Validation performed

  • npm run check:fast (typecheck, lint, module boundaries, architecture guards) — passed.
  • node scripts/verify-module-boundaries.mjs --shrink-layer-baseline — lowered the two entries.
  • npm run test:focused -- tests/boundary/filesystem/ciChangeScope.test.ts — 386 passed (4 failed with the previous scopes).
  • npm run test:local -- src/resources/ArtifactReader.test.ts src/windows/WindowsPrivateRuntime.test.ts — 27 passed.

Compatibility, safety, and release

  • Breaking changes or migration steps: none (internal module path).
  • Real Hopper/Ghidra, browser, or OS coverage: not applicable.
  • Package or release metadata impact: none.
  • Security, privacy, process, or containment review: none; no behaviour change.

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.

Pure move: git mv plus import specifier rewrites (source, tests, and the dist path a verifier script loads).
windows no longer imports src/artifacts; process -> artifacts 11 -> 9. The CI lanes that selected src/artifacts/ArtifactReader.ts select its new path, pinned in the change-scope test.
@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-15T15:07:54.982550Z
We couldn’t complete this review. Comment @codex review to try again.
f9dd3cc 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 Tier: plus

[Low impact] The reviewed changes appear safe to merge.

Summary

Moves ArtifactReader, its error class, helpers, and tests into src/resources/ without changing their behavior.

  • Artifact readers and their callers now share a contract in the resources layer.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart TD
  P["src/process"] --> R["src/resources/ArtifactReader"]
  W["src/windows"] --> R
  A["Provider readers"] --> R
  R --> D["src/domain"]
  R -. "cleanup lease type" .-> L["src/resources/AnalysisCleanupLease"]
Loading

Reviews (2) · Last reviewed commit: "test(architecture): lower the layer base..." · Reviewed by Greptile

@morluto
morluto merged commit 58c631d into refactor/resources-cleanup-lease Nov 15, 2026
2 checks passed
@morluto
morluto deleted the refactor/resources-artifact-reader branch November 15, 2026 15:11
mvanhorn added a commit to mvanhorn/rea that referenced this pull request Nov 15, 2026
Main replaced the per-tool register files with the service binding table
(morluto#11264) and declares standalone availability on contracts (morluto#11262), so
inspect_deb_package now binds through serviceToolBindings, declares
availability "standalone", and registerDebPackageTool.ts is removed.

The default MCP profile no longer lists output schemas (morluto#10693), so the
deb MCP test validates the canonical contract output schema instead.
@morluto morluto added the area: evidence Evidence, artifacts, and reconstruction label 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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant