Repository navigation
chore(failure-classes): record the second instance of FC-raw-page-limit-before-visibility-filter - #12780
Conversation
…it-before-visibility-filter Registry-only. One JSON file, no code and no behaviour change. The class was born in BasedHardware#12712 for chat get_messages and now has a second recorded instance in BasedHardware#12714 for the memories scoring_desc path, but the definition still described only the first. violated_contract now names both hidden-row kinds. "for example reported chat messages" reads as a chat-specific defect; the memories path hides rows on user_review is False and invalid_at, for the same reason -- the predicate cannot become a Firestore where without dropping legacy documents missing the field (BasedHardware#4498) -- and with the same consequence. canonical_prevention gains the two rules the second instance's review actually established, both non-obvious and both paid for twice: * Floor the budget at offset + limit and bound only the slack. Capping the total leaves a deep offset unreachable, so the page returns empty and the caller reads that as end-of-data -- the original defect at a deeper boundary. * Keep the slack flat rather than proportional. A proportional slack gives limit=2 a six-document allowance, too thin to cross a dense run of hidden rows. That was caught by a reviewer-requested multi-batch test only after the proportional version had already shipped to both PRs. A canonical prevention that omits them lets the third instance rediscover them. scope_hints adds the memories paths; evidence_prs goes from [] to [12712, 12714]. canonical_prevention_artifact is deliberately untouched -- BasedHardware#12714 appends the memories test there, which is the one field an instance fix owns. This PR exists because scripts/failure-class rejected folding these edits into that merge (instance_fix_mutates_registry), and routing around that rule would defeat it. Failure-Class: none Co-Authored-By: Claude Opus 5 <[email protected]>
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
Verified against the shipped code — this is the registry-only lifecycle change
Two notes against the PR description:
Keeping registry rewrites out of instance-fix PRs is exactly the boundary the validator enforces, and the recorded lessons are the kind a third instance would otherwise rediscover the hard way. Formal approval and merge stay with a human maintainer. Automated feedback, posted on behalf of the Omi maintainers. by AI on behalf of David — if you need David’s attention urgently, please @Git-on-my-level and escalate with |
BasedHardware#12714 merged at 14:39Z, producing exactly the conflict its review predicted: both PRs rewrite `canonical_prevention`, so the line collides even though the edits mean different things. Resolved by keeping this PR's text, which is a strict superset -- main's version is the original two sentences, this one adds the two lessons the second instance paid for (floor the budget at offset + limit; keep the slack flat) and widens `violated_contract` to name both hidden-row kinds. Two details the mechanical "keep ours" would have got wrong: - main re-encoded the em-dash as `—` and this branch had degraded it to a hyphen. Restored the em-dash, and kept this file's own escaped convention rather than switching it to a literal. - `canonical_prevention_artifact` now carries both tests, because BasedHardware#12714 added the memories one and this merge keeps it. That field was always BasedHardware#12714's to own; the boundary the validator draws held on its own. `evidence_prs` cites BasedHardware#12712 and BasedHardware#12714, and both are now merged -- the review's concern about citing an open PR resolved itself by merge order. Verified: JSON parses, `scripts/failure-class validate --pr-body-file` returns ok: true, and the diff against main is exactly the four fields this PR claims.
|
Pushed #12714 merged at 14:39Z, and the collision landed exactly where you said it would: both PRs rewrite the Resolved by keeping this PR's text, which is a strict superset — Two things a mechanical "keep ours" would have got wrong, and I only caught them by diffing the two sides decoded rather than as raw lines: The em-dash. #12714 re-encoded it as
Your second note resolved itself by merge order: Verified: JSON parses,
|
|
Verified on the new head
Registry text is a maintainer-owned gatekeeper surface, so the merge decision stays with a human — the approval on record covers the pre-merge commit, and this head only adds the predicted-conflict resolution, so a quick re-confirm on Automated feedback, posted on behalf of the Omi maintainers. by AI on behalf of David — if you need David’s attention urgently, please @Git-on-my-level and escalate with |
Registry-only lifecycle change. No code, no tests, no behaviour — one JSON file.
Why this is its own PR
FC-raw-page-limit-before-visibility-filterwas born in #12712 (chatget_messages) and now has a second recorded instance in #12714 (memoriesscoring_desc). The definition still describes only the first.I tried to fold these edits into #12714's merge resolution and
scripts/failure-classrejected it, correctly:That rule is worth respecting rather than routing around. An instance PR quietly rewriting shared contract text is how a registry stops meaning the same thing to everyone who greps it. So this is that separate PR.
What changes
violated_contract— names both hidden-row kinds. It currently says "for example reported chat messages", which reads as a chat-specific defect. The memories path hides rows onuser_review is Falseandinvalid_at, for the same reason (the predicate cannot be expressed as a Firestorewherewithout dropping legacy documents missing the field, #4498) and with the same consequence.canonical_prevention— adds what the second instance's review actually established, beyond "scan with a bounded budget":offset + limit, bound only the slack. Capping the total leaves a deep offset unreachable, so the page returns empty and the caller reads that as end-of-data — the original defect at a deeper boundary.limit=2a six-document allowance, too thin to cross a dense run of hidden rows. That one was caught by a reviewer-requested multi-batch test after the proportional version had already shipped to both PRs.Both are non-obvious and were paid for twice. A canonical prevention that omits them lets the third instance rediscover them.
scope_hints— addsbackend/database/memories.pyandbackend/utils/memory/memory_service.pyalongside the chat paths.evidence_prs—[]→[12712, 12714].What deliberately does not change
canonical_prevention_artifactstill lists only the chat test. #12714 appends the memories test, which is the one field an instance fix owns. Keeping it out of this PR avoids two PRs racing on the same key and leaves the ownership boundary exactly where the validator draws it.If #12714 merges first, this PR's diff still applies cleanly — the two touch disjoint fields.
Verification
python3 -c "import json; json.load(...)"— parsesscripts/failure-class validate --pr-body-file— passesstatusstaysopenFailure-Class: none