Skip to content

fix(artifacts): count a changed partial-inventory root once - #1854

Merged
morluto merged 1 commit into
mainfrom
fix/artifact-comparison-root-once
Oct 11, 2026
Merged

morluto merged 1 commit into
mainfrom
fix/artifact-comparison-root-once

Conversation

@kaoru0822-kitauji

Copy link
Copy Markdown
Collaborator

Summary

Fixes #1844.

compare_artifacts could report and count the root of two partial inventories twice. This happened when both inventories omitted node details but their manifest root digests differed. The root got two rows:

  • from classifyAvailability: unknown with availability
  • from rootHashChange: changed with content, because the fallback only stood down when an existing root row already carried content

So summary reported changed: 1, unknown: 1 for a single path.

Change

applyRootHashChange replaces rootHashChange. When the manifest root digests differ:

  • No root row yet (e.g. partial pages omit every occurrence): it appends the content row, as before.
  • Root row is unknown or changed without content: it upgrades that row in place to changed, adds content (dimensions stay in schema order: ["content", "availability"]), and keeps the row's occurrence and artifact IDs while merging citations.
  • Root row already has content, or is contradiction, added, or removed: it leaves the row unchanged, so contradiction precedence holds.

The overall truncated status and the incompleteness limitations are unchanged.

Validation

tests/boundary/filesystem/artifactComparisonSummary.test.ts runs real inventoryArtifact observations and derived partial Evidence through compareArtifacts:

  • Nodes omitted, digests differ: one root row, changed with ["content", "availability"], changed: 1, unknown: 0, still truncated. This test fails without the fix.
  • Nodes and occurrences omitted, digests differ: one content row, changed: 1.
  • Identical partial Evidence: no inferred content change; one unknown availability row.

npm run test:focused passes on the artifact comparison, artifact MCP, and analysis-session composition suites (14 files, 92 tests). npm run check:fast passes.

🤖 Generated with Claude Code

When partial inventories omitted node details, the root got an unknown
availability row and the differing manifest root digests appended a
second, changed content row, so one logical path was counted as both
changed and unknown. Fold the manifest content change into an existing
unknown or changed root row instead, keeping its dimensions, occurrence
and artifact identities, and citations; contradiction and presence rows
are left as they are.

Fixes #1844

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 11, 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-11T14:25:41.615371Z f68c520 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.

@morluto
morluto merged commit ee5275c into main Oct 11, 2026
31 checks passed
@morluto
morluto deleted the fix/artifact-comparison-root-once branch October 11, 2026 14:34
@github-actions github-actions Bot mentioned this pull request Oct 11, 2026
3 tasks done
@morluto morluto added bug Something isn't working area: evidence Evidence, artifacts, and reconstruction labels Oct 14, 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 bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] Partial artifact inventories count a changed root twice

2 participants