Repository navigation
upgrading
your existing database will refuse to search until you convert it. vectors are now
normalised on write and similarity is derived as 1 - d^2/2, so a store written by 3.x holds
raw vectors that the new formula would read as confidently wrong similarities. search() throws
with an actionable message rather than answering. two ways out:
prism re-embed # re-embeds and stamps the new geometry
or call backfillVectorGeometry() to normalise in place without re-embedding, which is fast and
does not touch your provider.
cluster counts change enormously. on a 5285-item corpus at the same 0.85 threshold, 26
clusters became 501. that is the bug below being fixed, not a threshold change. anything
consuming the JSON, or acting on the counts, will see roughly 20x more clusters from the same
input. any cluster count you recorded from 3.x on a corpus of 5000+ items is not comparable.
breaking API changes for anyone importing the library rather than using the CLI:
RepoConfiggains requiredincidentsandclusterWeeklyDigestConfiglosessimilarityThresholdandautoClose(the first is now read per
repo, the second had no reader)itemMetadata()returns a namedItemMetadatatype instead ofRecord<string, unknown>VectorStore's fourth constructor argument is an options objectstatePriority()ranks four tiers instead of three
fixed
- duplicate detection was finding a fraction of the duplicates on any corpus of 5000+ items.
three compounding bugs. thevec0table is declared without a distance metric, so sqlite-vec
returns L2, butstore.searchfiltered1 - distance >= threshold, which is not cosine at any
scale. nothing normalised vectors on write, so that conversion was not valid to attempt anyway.
andcluster.tsrouted 5000+ items through a candidate-limited path that passed the clustering
threshold into that same wrong-scale filter, then truncated whatever survived to K=50. measured
on a real 5285-item corpus: 26 clusters found where exact pairwise finds 501, and the
"optimisation" was slower (20.6s against 9.3s). vectors are normalised on write, similarity is
derived, and the candidate-limited path is gone:vec0KNN is itself a full scan with aLIMIT,
so there was never an index to approximate with. closes #19 - the webhook path no longer overwrites what a scan learned.
server/triage.tswrote
metadata: { author, state }wholesale, and becauseupsertreplacesmetadata_jsonoutright,
apull_request.openedwebhook draining after a backlog scan dropped every other field the scan
had stored (labels, diff size, ci status, closing refs,authorIsBot). it now writes only the
fields the event can actually observe and leaves the rest of the row alone - the weekly digest reads per-repo settings instead of a global copy. it was passed
DEFAULT_REPO_CONFIG.similarityThresholdand clustered every repo at the default, ignoring
whatever that repo had configured, so its cluster counts disagreed with the backlog scan's for
the same repo - one unusable
config.jsonno longer aborts the whole installation loop. a repo whose config
cannot be honoured is skipped loudly and by name; the repos after it in the list still get
scanned
changed
- incident-closed PRs rank between open and closed rather than as fully open. an item closed by
a repository-wide event never got a maintainer verdict, so it outranks a deliberate close, but it
is not evidence of live work the way an open PR is. on the corpus this was built for the tiers
are 993 open / 1347 merged / 2945 closed, so promoting a ~900-item incident to open-equivalent
roughly doubled the tier the ranking exists to order - bot-authored items are excluded from clustering by default. automation reuses titles for
unrelated content, so consecutive bot PRs embed as near-identical and surfaced as duplicates
nobody could act on. setcluster.include_bot_authors: trueto restore the old behaviour, or
list repo-specific automation undercluster.bot_authors. applies to confirmed (identity)
clusters and to the App's webhook triage, which previously commented on a bot's PR telling it
the bot had duplicated itself - the server/GitHub-App path honours incident windows and the
clusterblock, declared per repo
in that repo'sconfig.json. key names follow each file's own convention: the CLI's yaml uses
cluster.bot_authors/cluster.include_bot_authors, the App's json usescluster.botAuthors/
cluster.includeBotAuthors. closes #27 - confirmed (identity) duplicate clusters pick canonical by earliest-created instead of quality
score: byte-identical duplicates are a which-was-first question, and a copied PR can outscore the
original it was lifted from. fuzzy clusters keep the state/CI/score rule
added
- incident-aware ranking.
prism.config.yamlaccepts anincidents:list of
{start, end, reason}windows. a repository-wide event (visibility flip, bulk close, migration)
closes items for reasons unrelated to their quality, and becauseselectCanonical()ranks
lifecycle state before score, those items sank below genuinely-closed siblings, inverting triage
order for exactly the backlog a maintainer needs.closedAtis captured from both API paths and
stored inmetadata_json(no schema migration);incidentClosedis derived at read time, so
correcting a window is a config edit rather than a rescan. window bounds require an explicit UTC
offset and are rejected at load if unparseable or inverted, because an offset-less timestamp
parses in the host timezone and would select different PRs on a laptop than in CI - starmap carries
incidentClosed: trueon items and on every reference to them (canonical,
runnerUp, partition, tracker ref and candidates), omitted when false. a consumer contract has to
accept it in all of those positions - starmap items carry
createdAtalongsideupdatedAt, so consumers can reason about
which-was-first without re-fetching from github - scans record
authorIsBotfrom github's own account type (graphql__typename, rest
user.type) rather than guessing. rows scanned before this field fall back to a login check, so
bot filtering works without a rescan prism benchmark --out <path>writes a run's results to a chosen file. every run previously
wrotedata/benchmark-results.json, so a second run silently destroyed the first one's numbersprism benchmark --include-bot-authorsclusters bot-authored items too, since the benchmark has
noprism.config.yamlin scope and could otherwise only ever measure the filtered default- benchmark results record
clusterMembershipper model per threshold. cluster counts cannot tell
you whether a model finding more clusters is catching real duplicates or chaining unrelated
items, and re-deriving membership means re-embedding the whole corpus - embedding models that expect an instruction prefix get one (
embeddinggemma).
EMBEDDING_TEXT_VERSIONbumps to 3 so prefixed and unprefixed vectors cannot be mixed. measured
effect on clustering for this workload: none, kept because it is what the model documents
for contributors
server/scheduler.tsbuilds stored metadata with the shareditemMetadata()instead of its own
literal, which had drifted behind by three fields- a backlog scan fetches closed items only for repos that declare an incident window, bounded by
the earliest window start. open and closed are fetched separately becausesinceaborts a fetch
at the first item older than it, so bounding a combinedstate:"all"call would drop untouched
open PRs - note for existing installs: rows scanned before this release carry no
closedAt, and a default
scan fetches open items only. runprism scan --state allafter an incident, or the window
matches nothing. this is per-incident, not a one-time backfill