Skip to content

Bound cache-info snapshot IDs; add pagination - #4

Closed
EFrMG wants to merge 1 commit into
Univeracity:mainfrom
EFrMG:cache-indexing
Closed

EFrMG wants to merge 1 commit into
Univeracity:mainfrom
EFrMG:cache-indexing

Conversation

@EFrMG

@EFrMG EFrMG commented Oct 3, 2026

Copy link
Copy Markdown
Contributor

Why

General performance improvement.

On the 4,932-item Omarchy corpus, search-info returned about 332 KB because cache-info.v1 includes every indexed snapshot ID. Most metadata inspections need the count; callers that need IDs could retrieve them in pages.

What changed

• cache-info.v2 returns indexed_snapshot_count and omits indexed_snapshots by default.
• --snapshot-ids-limit and --snapshot-ids-offset return sorted ID pages, capped at 100 IDs each.
• The index manifest still retains the complete, checksummed ID list.
• Documentation and a synthetic 4,932-ID regression test cover the new response. A one-line Ruff cleanup is included.

Compatibility

This changes the response contract. Consumers that read the full indexed_snapshots list from cache-info.v1 must request pages under v2. No checked-in consumer relies on that default list, but external consumers may. The list comes from Reposition’s index manifest.

Validation

The full test suite passed (80 tests; 5 optional tests skipped), and ruff check . as well.

jeremydixon22 added a commit that referenced this pull request Oct 20, 2026
## Brief

Captured GitHub Actions failure logs live outside the normal `checks`
snapshot component, so existing cache searches could not find their
error text.

## Changes

This adds an offline `ci_logs` source with frozen capture selection and
verified citations.

- Discover saved captures for selected PR snapshots within explicit
limits.
- Freeze immutable capture references when indexing. Query and retrieval
verify source content, PR head, check/run/attempt/job identity and
original ranges.
- Preserve raw citation bytes while neutralizing ANSI escapes for
search. Keep partial captures, omitted regions and unsupported content
explicit.
- Support the `pr-checks` corpus profile.
- Return snapshot counts by default in `cache-info.v2`, with bounded ID
pages and checksum-bound continuations. This includes the metadata
pagination work from #4 and changes the previous default full-list
response.
- Remove obsolete proposal bridge/patch copies and point documentation
to triage-o-mator’s maintained bridge. Replace compatibility-script
rewriting with an explicit pre-index expectation.

## Validation

Reposition’s 89-test suite completed with five optional-extra skips;
Ruff passed.

All 77 parent tests passed with the exact wheel, including
capture-to-ranked-retrieval coverage.

Independent offline wheel rebuild and compatibility checks passed.

A disposable saved-CI trial verified exact citations, frozen selection
and corruption refusal with zero GitHub requests.

> The current version identifies the downstream build vendored by
triage-o-mator. Local-verification notes and reports remain outside this
change.

---------

Co-authored-by: Jeremy Dixon <jeremydixon22@users.noreply.github.com>
@jeremydixon22

Copy link
Copy Markdown
Member

Thanks for catching the unbounded metadata response. The complete pagination commit (5a6524a7) is included in #5, together with checksum-bound continuations that refuse a changed index. Closing this as included in #5 so the same work is merged once.

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