Skip to content

refactor(artifacts): move inventory and extraction into provider owners - #1032

Merged
N0zoM1z0 merged 1 commit into
mainfrom
refactor/artifact-inventory-owners
Oct 7, 2026
Merged

N0zoM1z0 merged 1 commit into
mainfrom
refactor/artifact-inventory-owners

Conversation

@N0zoM1z0

@N0zoM1z0 N0zoM1z0 commented Oct 7, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Artifact inventory and extraction currently live in the application layer even though they own format readers, archive acquisition and materialization. Move them beside their artifact producers so format extensions and lifecycle fixes have a clear owner. This is the next incremental migration in #740.

Problem and expected behavior

Keep shared CLI/MCP workflows in the application layer and format-specific acquisition in the artifact provider boundary. Analysts continue to open, inspect and extract the same targets with the same contracts.

Change and scope

  • Move inventory classification, policy, readers, canonical scanning and graph construction into src/artifacts/inventory/.
  • Move transactional extraction into src/artifacts/extraction/; keep default output-destination selection in src/application/artifacts/.
  • Update consumers and tests, document ownership, and extend the existing acquisition dependency guard.
  • Verify installed-package MCP extraction contents, inline Evidence and cleanup in the existing package lane.

Contract and boundary impact

  • Semantic owner and earliest changed stage: artifact acquisition ownership; producer implementations retain their bodies.
  • CLI and MCP/tool-catalog contract: unchanged named contracts and tool inventory.
  • Provider, bridge, target-format, or platform compatibility: existing readers and provider dispatch preserved.
  • Evidence, artifact, provenance, or reconstruction contract: existing identity, metadata and result semantics preserved.
  • Process execution, authorization, cleanup, or containment impact: existing cancellation, containment, reader cleanup and extraction rollback preserved; verification now also checks packaged MCP extraction cleanup.
  • Generated metadata, package, or installation impact: relocated emitted modules replace their old paths; generated-document checks pass; no dependency changes.

Evidence and regression coverage

  • AST comparison against c6dad932 confirms unchanged bodies, mapped import owners and file-URL roots across 31 affected modules.

  • Boundary cases cover forbidden application/composition/CLI/MCP imports and allowed domain/contracts/reader dependencies.

  • Actual isolated npm consumer verifies CLI/MCP ZIP and ASAR inventory/extraction, CLI JavaScript application analysis, complete inventory parity, unchanged input bytes and cleanup. All ten relocated runtime modules are packaged; old emitted paths and compiled tests are absent.

  • CLI/MCP result schemas and output are unchanged.

  • 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

  • Build, strict single-threaded typecheck, lint/module-boundaries and generated-document checks — passed.

  • Vitest with 33 exact files, one worker and file parallelism disabled — 275 passed, three host-specific skips.

  • npm run verify:test-discovery — all 535 test files discovered exactly once.

  • Isolated installed-package CLI/MCP artifact verification — passed; peak process-family RSS about 507 MiB; temporary installation and outputs removed.

  • npm run verify:package — complete isolated install, CLI/MCP catalog and Evidence checks, extraction and cleanup passed.

  • npm run knip, npm run format:check, final lint/module-boundaries — passed.

  • Complete CI run — all checks passed on 43cc65c5.

Compatibility, safety, and release

  • Breaking changes or migration steps: none.
  • Real coverage: Linux filesystem/archive producers and installed CLI/MCP executed locally. Real Apple artifact CLI/MCP CI passed, including the DMG lifecycle; Linux x64/arm64, macOS x64/arm64 and Windows package lanes passed. Hopper/Ghidra were not run for this ownership migration.
  • Package or release metadata impact: internal emitted paths change; public entrypoints and metadata remain stable.
  • Review: producer bodies, input identity, file-URL roots, output ownership and cleanup checked. Local work was limited to two CPUs with memory supervision; temporary consumers are cleaned after verification.

Review checklist

  • The PR has one focused outcome and the title follows type(scope): outcome.
  • Related issue is linked.
  • Tests cover changed observable behavior and meaningful failure paths.
  • Owning docs, contracts, and generated metadata are updated where needed.
  • User-visible CLI/MCP behavior remains unchanged.
  • I checked the final diff for secrets, unrelated cleanup, and unsupported claims.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 7, 2026 •

Copy link
Copy Markdown

Codex Review Summary

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

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-07T21:43:35.166356Z 43cc65c 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.

@N0zoM1z0
N0zoM1z0 merged commit 6e4535c into main Oct 7, 2026
23 checks passed
@N0zoM1z0
N0zoM1z0 deleted the refactor/artifact-inventory-owners branch October 7, 2026 21:51
kaoru0822-kitauji added a commit that referenced this pull request Oct 8, 2026
Resolve conflicts against main:
- Inventory moved to src/artifacts/inventory (#1032); point the xar and
  cpio reader imports at their new relative paths.
- README.md: take main's simplified English README, which no longer
  lists individual package formats. PKG coverage stays documented in
  the skill reference and docs/testing.md.
- Skill: the references gain the PKG paragraph, so the version moves to
  29 (main already uses 28).
- Regenerate the product catalog, conformance manifest, skill digest and
  package metadata. The MCP tool catalog is now built rather than
  committed (#997), so it is removed here.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
darsrc pushed a commit to darsrc/rea that referenced this pull request Oct 10, 2026
@morluto morluto added enhancement New feature or request area: evidence Evidence, artifacts, and reconstruction labels Oct 14, 2026
Iyanuoluwa007 pushed a commit to Iyanuoluwa007/rea that referenced this pull request Oct 21, 2026
Resolve conflicts against main:
- Inventory moved to src/artifacts/inventory (morluto#1032); point the xar and
  cpio reader imports at their new relative paths.
- README.md: take main's simplified English README, which no longer
  lists individual package formats. PKG coverage stays documented in
  the skill reference and docs/testing.md.
- Skill: the references gain the PKG paragraph, so the version moves to
  29 (main already uses 28).
- Regenerate the product catalog, conformance manifest, skill digest and
  package metadata. The MCP tool catalog is now built rather than
  committed (morluto#997), so it is removed here.
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 enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants