[PR #5123] [CLOSED] fix(apple): report empty asset inventory as complete at any offset #6776

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

📋 Pull Request Information

Original PR: https://github.com/morluto/rea/pull/5123
Author: @vaidehi-snk
Created: 10/18/2026
Status: ❌ Closed

Base: main ← Head: fix/asset-catalog-empty-truncation


📝 Commits (3)

  • 0163bff fix(apple): report empty asset inventory as complete at any offset
  • b760038 Merge remote-tracking branch 'upstream/main' into fix/asset-catalog-empty-truncation
  • 34058a9 Merge branch 'main' into fix/asset-catalog-empty-truncation

📊 Changes

2 files changed (+41 additions, -1 deletions)

View changed files

📝 src/domain/apple/appleAssetCatalog.test.ts (+39 -0)
📝 src/domain/apple/appleAssetCatalog.ts (+2 -1)

📄 Description

Summary

Fixes #5111. An empty asset-catalog inventory was reported as truncated: true whenever a positive offset was requested, although no records exist to omit. AI-assisted (Claude, claude-opus-5-5); I reviewed, ran and verified the change.

Problem and expected behavior

projectAppleAssetCatalogPage computed truncated: input.offset > 0 || next < all.length. For an empty inventory at offset 1 this returns truncated: true with total_records: 0 and next_offset: null. Expected: truncated: false at any offset when the inventory is empty, keeping the requested offset and next_offset: null.

Change and scope

Records before a positive offset count as omitted only when the inventory is nonempty: (input.offset > 0 && all.length > 0) || next < all.length. One-line change in the projection; nonempty pagination is unchanged. Scope decision: not applicable (ordinary fix within existing boundaries).

Contract and boundary impact

  • Semantic owner and earliest changed stage: src/domain/apple/appleAssetCatalog.ts, result projection

  • Contribution scope fit and linked maintainer decision: ordinary fix; not applicable

  • CLI and MCP/tool-catalog contract: unchanged schema; truncated is now correct for empty inventories

  • Provider, bridge, target-format, or platform compatibility: none

  • Evidence, artifact, provenance, or reconstruction contract: truncated no longer signals false incompleteness

  • Target selection, authority, upstream behavior, and cleanup details: not applicable

  • Generated metadata, package, or installation impact: none

  • 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: appleAssetCatalog.test.ts — empty inventory at offsets 0, 1 and 5 is complete; a nonempty page past its first record stays truncated

  • Base reproduction or other evidence: with the source change reverted, the offset 1 and 5 cases fail (2 failed | 4 passed)

  • User-visible CLI/MCP output (if applicable): not exercised

  • Remaining proof gaps: not run through the CLI/MCP transport or on macOS with a real app; covered at the projection boundary

  • 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

  • npx vitest run src/domain/apple/appleAssetCatalog.test.ts — 6 passed
  • same with appleAssetCatalog.ts reverted to main — 2 failed | 4 passed
  • npx oxfmt --check and npx oxlint on changed files — clean
  • npx tsc --noEmit — clean
  • pre-push check:fast (typecheck, lint) — 2 tasks successful

Compatibility, safety, and release

  • Breaking changes or migration steps: none
  • Real Hopper/Ghidra, browser, or OS coverage: not needed; pure result projection
  • Package or release metadata impact: none
  • Security, privacy, process, or containment review: no change

Author readiness

Human owner: @vaidehi-snk

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

🔄 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/5123 **Author:** [@vaidehi-snk](https://github.com/vaidehi-snk) **Created:** 10/18/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `fix/asset-catalog-empty-truncation` --- ### 📝 Commits (3) - [`0163bff`](https://github.com/morluto/rea/commit/0163bff52cad9ed6589e38b61046a9e197396fb8) fix(apple): report empty asset inventory as complete at any offset - [`b760038`](https://github.com/morluto/rea/commit/b76003854ed8aabb490bd93b78c1a0b3ca5aec51) Merge remote-tracking branch 'upstream/main' into fix/asset-catalog-empty-truncation - [`34058a9`](https://github.com/morluto/rea/commit/34058a9806a5e415673f7b2e041d4369e0a3a1a8) Merge branch 'main' into fix/asset-catalog-empty-truncation ### 📊 Changes **2 files changed** (+41 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `src/domain/apple/appleAssetCatalog.test.ts` (+39 -0) 📝 `src/domain/apple/appleAssetCatalog.ts` (+2 -1) </details> ### 📄 Description ## Summary Fixes #5111. An empty asset-catalog inventory was reported as `truncated: true` whenever a positive offset was requested, although no records exist to omit. AI-assisted (Claude, claude-opus-5-5); I reviewed, ran and verified the change. ## Problem and expected behavior `projectAppleAssetCatalogPage` computed `truncated: input.offset > 0 || next < all.length`. For an empty inventory at offset 1 this returns `truncated: true` with `total_records: 0` and `next_offset: null`. Expected: `truncated: false` at any offset when the inventory is empty, keeping the requested offset and `next_offset: null`. ## Change and scope Records before a positive offset count as omitted only when the inventory is nonempty: `(input.offset > 0 && all.length > 0) || next < all.length`. One-line change in the projection; nonempty pagination is unchanged. Scope decision: not applicable (ordinary fix within existing boundaries). ## Contract and boundary impact - Semantic owner and earliest changed stage: `src/domain/apple/appleAssetCatalog.ts`, result projection - Contribution scope fit and linked maintainer decision: ordinary fix; not applicable - CLI and MCP/tool-catalog contract: unchanged schema; `truncated` is now correct for empty inventories - Provider, bridge, target-format, or platform compatibility: none - Evidence, artifact, provenance, or reconstruction contract: `truncated` no longer signals false incompleteness - Target selection, authority, upstream behavior, and cleanup details: not applicable - Generated metadata, package, or installation impact: none - [ ] 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: `appleAssetCatalog.test.ts` — empty inventory at offsets 0, 1 and 5 is complete; a nonempty page past its first record stays truncated - Base reproduction or other evidence: with the source change reverted, the offset 1 and 5 cases fail (2 failed | 4 passed) - User-visible CLI/MCP output (if applicable): not exercised - Remaining proof gaps: not run through the CLI/MCP transport or on macOS with a real app; covered at the projection boundary - [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 - `npx vitest run src/domain/apple/appleAssetCatalog.test.ts` — 6 passed - same with `appleAssetCatalog.ts` reverted to `main` — 2 failed | 4 passed - `npx oxfmt --check` and `npx oxlint` on changed files — clean - `npx tsc --noEmit` — clean - pre-push `check:fast` (typecheck, lint) — 2 tasks successful ## Compatibility, safety, and release - Breaking changes or migration steps: none - Real Hopper/Ghidra, browser, or OS coverage: not needed; pure result projection - Package or release metadata impact: none - Security, privacy, process, or containment review: no change ## Author readiness Human owner: @vaidehi-snk - [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. - [ ] User-visible CLI/MCP changes include representative output. - [x] I checked the final diff for secrets, unrelated cleanup, and unsupported claims. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-01 21:42:58 +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#6776
No description provided.