[GH-ISSUE #152] UnknownRegistry keeps revision history map without read-path usage #99

Closed
opened 2026-10-15 18:21:06 +00:00 by bsakaguchi · 1 comment
Owner

Originally created by @morluto on GitHub (Jul 14, 2026).
Original GitHub issue: https://github.com/morluto/rea/issues/152

src/application/UnknownRegistry.ts tracks every revision in #revisions, but there is no read/query API that exposes historical revisions.

Observed:

  • #revisions only used for size checks and write operations.
  • History retrieval methods only expose current heads via #heads (listUnknowns, get, has, verifyUnknownResolution).

Evidence:

  • src/application/UnknownRegistry.ts:41 declares #revisions.
  • src/application/UnknownRegistry.ts:130-132 only clears it.
  • src/application/UnknownRegistry.ts:146-151 only writes to it.

Potential risk:

  • Revision history is collected but not consumed, making this state dead and increasing memory usage because every update keeps growing map entries.

Suggested cleanup:

  • Either expose revision history for audit/inspection, or remove #revisions and enforce limits on current heads only.
Originally created by @morluto on GitHub (Jul 14, 2026). Original GitHub issue: https://github.com/morluto/rea/issues/152 `src/application/UnknownRegistry.ts` tracks every revision in `#revisions`, but there is no read/query API that exposes historical revisions. Observed: - `#revisions` only used for size checks and write operations. - History retrieval methods only expose current heads via `#heads` (`listUnknowns`, `get`, `has`, `verifyUnknownResolution`). Evidence: - `src/application/UnknownRegistry.ts:41` declares `#revisions`. - `src/application/UnknownRegistry.ts:130-132` only clears it. - `src/application/UnknownRegistry.ts:146-151` only writes to it. Potential risk: - Revision history is collected but not consumed, making this state dead and increasing memory usage because every update keeps growing map entries. Suggested cleanup: - Either expose revision history for audit/inspection, or remove `#revisions` and enforce limits on current heads only.
Author
Owner

@morluto commented on GitHub (Jul 17, 2026):

Superseded by the EvidenceLedger implementation. The standalone UnknownRegistry and its unused revision-history map no longer exist; EvidenceLedger retains revisions for bundle integrity and current-head reconstruction.

<!-- gh-comment-id:5001296792 --> @morluto commented on GitHub (Jul 17, 2026): Superseded by the EvidenceLedger implementation. The standalone UnknownRegistry and its unused revision-history map no longer exist; EvidenceLedger retains revisions for bundle integrity and current-head reconstruction.
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#99
No description provided.