Skip to content

fix(artifacts): retain deep comparison source chains - #15191

Merged
vincentkoc merged 2 commits into
morluto:mainfrom
ShuaixinHuang:fix/artifact-source-depth
Nov 30, 2026
Merged

vincentkoc merged 2 commits into
morluto:mainfrom
ShuaixinHuang:fix/artifact-source-depth

Conversation

@ShuaixinHuang

@ShuaixinHuang ShuaixinHuang commented Nov 30, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Collect retained artifact-comparison source Evidence without using the JavaScript call stack for traversal.

Problem and expected behavior

Source collection recursively follows each record's evidence links before emitting it. A deep retained history can exhaust the call stack before compare_artifacts produces a result. Source collection should preserve every reachable record in dependency order.

Change and scope

Use an explicit stack with one link iterator per active record. It preserves dependency-first order, exact-ID deduplication, retained lookup precedence, and the fallback to embedded inventory records. This is a read-only change in the shared artifact comparison source resolver. #8457 covers the separate investigation closure resolver.

Evidence and regression coverage

A local directory inventory links to a synthetic 10,000-record retained chain. Both comparison sides select that inventory. The regression fails on the base revision with Maximum call stack size exceeded and checks that the fixed resolver returns every record exactly once in dependency order. The contributor's earlier focused MCP run exercises the public tool with existing fixtures; the deep fixture is verified at the application boundary.

Validation performed

  • Current-head CI passed 30 tests across three application suites, including the 10,000-record chain and comparison source/identity controls.
  • Compilation, static checks, documentation, portable tests and the Linux package baseline passed. Canonical review reported no actionable findings.

Author readiness

Human owner: @ShuaixinHuang

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

@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-30T09:15:31.012842Z
We couldn’t complete this review. Comment @codex review to try again.
605a828 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

Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits.
Credits must be used to enable repository wide code reviews.

@greptile-apps

greptile-apps Bot commented Nov 30, 2026 •

Copy link
Copy Markdown
Contributor

Confidence Score: 5/5 · The PR appears safe to merge; no blocking issue was found.RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge; no blocking issue was found.

Summary

Replaces recursive source collection with an explicit stack so deep retained histories do not exhaust the JavaScript call stack.

  • Artifact comparisons collect deep source chains without recursive calls.

Reviews (2) · Last reviewed commit: "Merge main into comparison depth review" · Reviewed by Greptile

* commit 'ba90eb225510c1342c7513754e62d1139d73f472':
  perf(evidence): bound link inspection frontier by records (morluto#15189)
  perf(evidence): retain snapshots across duplicate imports (morluto#15186)
  fix(nro): exclude ASET header bytes from asset ranges (morluto#15185)
  fix(bflt): reject relocation tables overlapping image segments (morluto#15188)
@vincentkoc
vincentkoc merged commit ad7d590 into morluto:main Nov 30, 2026
41 checks passed
@vincentkoc

Copy link
Copy Markdown
Collaborator

Thanks! The iterative traversal preserves dependency order and passes the deep-chain regression, 30 focused tests and all required CI checks. Squash-merged.

vincentkoc added a commit to DeryFerd/rea that referenced this pull request Nov 30, 2026
* commit '31cec30f51fb59b28a1849a67d09ab79b1c40094': (803 commits)
  fix(android): declare Android mapping and JNI fixed allowances (morluto#15183)
  fix(artifacts): retain deep comparison source chains (morluto#15191)
  perf(evidence): bound link inspection frontier by records (morluto#15189)
  perf(evidence): retain snapshots across duplicate imports (morluto#15186)
  fix(nro): exclude ASET header bytes from asset ranges (morluto#15185)
  fix(bflt): reject relocation tables overlapping image segments (morluto#15188)
  docs(artifacts): document Kubernetes audit log inventory (morluto#15187)
  fix(dtbo): keep coverage unknown beyond the declared image (morluto#15182)
  perf(n64): stream ROM byte-order normalization (morluto#15179)
  fix(oci)!: keep unobserved directory identity unknown (morluto#15164)
  fix(nds): bind file names to disjoint FNT subtables (morluto#15178)
  fix(glb): preserve JSON chunk read failures (morluto#15181)
  fix(ci): run npm lifecycle hooks in selected host lanes (morluto#15169)
  fix(artifacts): retain stored files in Godot PCK patches (morluto#15180)
  fix(setup): do not persist versioned launcher paths (morluto#15123)
  fix(devicetree): read later FDT versions backwards compatible with v17 (morluto#14136)
  fix(json): classify JSON input heap headroom and string-ceiling refusals (morluto#14949)
  fix(macos-pkg): retain cpio hard-link contents (morluto#15157)
  fix(artifacts): report macOS package bundle release versions (morluto#14860)
  test(asar): verify cleanup on the original file handle (morluto#15155)
  ...
vincentkoc added a commit to DeryFerd/rea that referenced this pull request Nov 30, 2026
* commit '31cec30f51fb59b28a1849a67d09ab79b1c40094': (803 commits)
  fix(android): declare Android mapping and JNI fixed allowances (morluto#15183)
  fix(artifacts): retain deep comparison source chains (morluto#15191)
  perf(evidence): bound link inspection frontier by records (morluto#15189)
  perf(evidence): retain snapshots across duplicate imports (morluto#15186)
  fix(nro): exclude ASET header bytes from asset ranges (morluto#15185)
  fix(bflt): reject relocation tables overlapping image segments (morluto#15188)
  docs(artifacts): document Kubernetes audit log inventory (morluto#15187)
  fix(dtbo): keep coverage unknown beyond the declared image (morluto#15182)
  perf(n64): stream ROM byte-order normalization (morluto#15179)
  fix(oci)!: keep unobserved directory identity unknown (morluto#15164)
  fix(nds): bind file names to disjoint FNT subtables (morluto#15178)
  fix(glb): preserve JSON chunk read failures (morluto#15181)
  fix(ci): run npm lifecycle hooks in selected host lanes (morluto#15169)
  fix(artifacts): retain stored files in Godot PCK patches (morluto#15180)
  fix(setup): do not persist versioned launcher paths (morluto#15123)
  fix(devicetree): read later FDT versions backwards compatible with v17 (morluto#14136)
  fix(json): classify JSON input heap headroom and string-ceiling refusals (morluto#14949)
  fix(macos-pkg): retain cpio hard-link contents (morluto#15157)
  fix(artifacts): report macOS package bundle release versions (morluto#14860)
  test(asar): verify cleanup on the original file handle (morluto#15155)
  ...
vincentkoc added a commit to ShuaixinHuang/rea that referenced this pull request Nov 30, 2026
* commit '31cec30f51fb59b28a1849a67d09ab79b1c40094':
  fix(android): declare Android mapping and JNI fixed allowances (morluto#15183)
  fix(artifacts): retain deep comparison source chains (morluto#15191)
vincentkoc added a commit to WoWHellgarve-HolyDeeW/rea that referenced this pull request Nov 30, 2026
* commit '7f7d34ad7c30a5fe015b642118dd40e8e9ac093d': (167 commits)
  fix(artifacts): classify member presence from the absent side coverage (morluto#15200)
  fix(tar): account for retained pax owner names (morluto#15195)
  fix(conformance): validate paired fixture count expectations (morluto#14125)
  fix(nds): report unreachable file name directories (morluto#15192)
  refactor(firmware): share admitted-file decoder buffering (morluto#15198)
  fix(binary): carry the runtime refusal's repair instruction in remediation (morluto#14123)
  fix(agentenv): reject COM0 and LPT0 bundle names (morluto#14971)
  test(environment): share the loopback capture fixture (morluto#15196)
  perf(png): reconstruct scanlines with one filter dispatch (morluto#11818)
  feat(iso9660): stream files across separated extents (morluto#15190)
  perf(apple): build only the requested asset catalog page (morluto#14032)
  perf(artifacts): isolate offline session composition from deep providers (morluto#15194)
  perf(evidence): bound investigation closure worklist by depth (morluto#15193)
  perf(audit): avoid copying complete log lines (morluto#15184)
  test(mcp): share server result readers (morluto#15174)
  fix(android): declare Android mapping and JNI fixed allowances (morluto#15183)
  fix(artifacts): retain deep comparison source chains (morluto#15191)
  perf(evidence): bound link inspection frontier by records (morluto#15189)
  perf(evidence): retain snapshots across duplicate imports (morluto#15186)
  fix(nro): exclude ASET header bytes from asset ranges (morluto#15185)
  ...
vincentkoc added a commit to XiaoBinGan/rea that referenced this pull request Nov 30, 2026
* commit '4ca43e2cb20f0edd86cdbf315a9c99c7b9b87468': (173 commits)
  fix(paths): reject Windows console device names (morluto#14972)
  fix(artifacts): classify member presence from the absent side coverage (morluto#15200)
  fix(tar): account for retained pax owner names (morluto#15195)
  fix(conformance): validate paired fixture count expectations (morluto#14125)
  fix(nds): report unreachable file name directories (morluto#15192)
  refactor(firmware): share admitted-file decoder buffering (morluto#15198)
  fix(binary): carry the runtime refusal's repair instruction in remediation (morluto#14123)
  fix(agentenv): reject COM0 and LPT0 bundle names (morluto#14971)
  test(environment): share the loopback capture fixture (morluto#15196)
  perf(png): reconstruct scanlines with one filter dispatch (morluto#11818)
  feat(iso9660): stream files across separated extents (morluto#15190)
  perf(apple): build only the requested asset catalog page (morluto#14032)
  perf(artifacts): isolate offline session composition from deep providers (morluto#15194)
  perf(evidence): bound investigation closure worklist by depth (morluto#15193)
  perf(audit): avoid copying complete log lines (morluto#15184)
  test(mcp): share server result readers (morluto#15174)
  fix(android): declare Android mapping and JNI fixed allowances (morluto#15183)
  fix(artifacts): retain deep comparison source chains (morluto#15191)
  perf(evidence): bound link inspection frontier by records (morluto#15189)
  perf(evidence): retain snapshots across duplicate imports (morluto#15186)
  ...
vincentkoc added a commit to ShuaixinHuang/rea that referenced this pull request Nov 30, 2026
* commit '4ca43e2cb20f0edd86cdbf315a9c99c7b9b87468': (34 commits)
  fix(paths): reject Windows console device names (morluto#14972)
  fix(artifacts): classify member presence from the absent side coverage (morluto#15200)
  fix(tar): account for retained pax owner names (morluto#15195)
  fix(conformance): validate paired fixture count expectations (morluto#14125)
  fix(nds): report unreachable file name directories (morluto#15192)
  refactor(firmware): share admitted-file decoder buffering (morluto#15198)
  fix(binary): carry the runtime refusal's repair instruction in remediation (morluto#14123)
  fix(agentenv): reject COM0 and LPT0 bundle names (morluto#14971)
  test(environment): share the loopback capture fixture (morluto#15196)
  perf(png): reconstruct scanlines with one filter dispatch (morluto#11818)
  feat(iso9660): stream files across separated extents (morluto#15190)
  perf(apple): build only the requested asset catalog page (morluto#14032)
  perf(artifacts): isolate offline session composition from deep providers (morluto#15194)
  perf(evidence): bound investigation closure worklist by depth (morluto#15193)
  perf(audit): avoid copying complete log lines (morluto#15184)
  test(mcp): share server result readers (morluto#15174)
  fix(android): declare Android mapping and JNI fixed allowances (morluto#15183)
  fix(artifacts): retain deep comparison source chains (morluto#15191)
  perf(evidence): bound link inspection frontier by records (morluto#15189)
  perf(evidence): retain snapshots across duplicate imports (morluto#15186)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants