Repository navigation
fix(sessions): skip disabled dashboard expiry queries - #191967
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: blocked before merge. What this changesThis PR skips dashboard-expiry queries when that expiry policy is disabled while preserving recent-session protection. Example: Dashboard expiry and pruning are disabled, with recent-session protection set to seven days.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Merge readiness⛔ Blocked before merge - 1 item remains Keep open: this maintainer-authored PR fixes a current unnecessary database scan with a focused change and no actionable source findings; the explicit review hold and unresolved CI gate remain. Priority: P2 Before merge
FindingsNone. Tests
Agent review detailsHow this fits togetherSession-maintenance planning passes resolved retention settings and a database snapshot to the age-fact owner, which reads relevant timestamps and returns the next scheduling deadline. flowchart LR
A[Maintenance planner] --> B[Age fact owner]
B --> C[Enabled dashboard expiry]
B --> D[Recent activity protection]
C --> E[Database timestamp queries]
D --> E
E --> F[Next maintenance deadline]
Technical reviewBest possible solution: Retain the existing owner's positive-age guard and independent recent-protection scan, then land after the explicit review hold and CI gate are resolved. Do we have a high-confidence way to reproduce the issue? Current-main source directly shows the unconditional scan and disabled-age Infinity result; the PR also reports intended base/head regression failures and passes, which this read-only review did not rerun. Is this the best way to solve the issue? The smallest complete fix is to apply the existing disabled-age condition before the query in the existing age-fact owner; this diff does that without a parallel path, new state, or changed retention semantics. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against eee9925e84f3. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceSource 0, Tests +42, Other +1. Total +43 across 3 files. Added test files: 0. View PR surface stats
LabelsLabel changes:
Label justifications:
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment HistoryReview history (1 earlier review cycle)
Reviewed November 3, 2026, 7:17 PM ET / November 4, 2026, 00:17 UTC (Revision 2). |
|
@clawsweeper re-review Please review current head |
|
🦞👀 Re-review progress:
|
|
Merged via explicitly authorized admin squash with attributed pre-existing CI failures.
|
What Problem This Solves
Session maintenance scans dashboard expiry rows even when dashboard expiry is disabled. PostgreSQL materializes that unused query result before the caller discards it.
User Impact
Disabled dashboard expiry no longer performs that scan. Existing expiry deadlines and recent-session protection are preserved; database schemas and stored values are unchanged.
Why This Change Was Made
The existing deadline calculation always returns Infinity for a disabled dashboard age. Skip that query at its owner instead of loading rows that cannot affect the deadline. Keep the separate recent-protection scan intact.
Evidence
Regression replay
All four disabled-dashboard cases failed on the unpatched frozen base: the unchanged deadline was correct, but one dashboard query ran instead of zero. They pass at this PR head. Replayed with test-only overlays and unchanged production on the recorded base through Blacksmith Testbox.
Landing refresh — 2026-11-04
Current head:
539d7bbc27b2430aa7a611c487b8ece1993ebaa2. Integrated frozen maind27139b2b220327d6f65b659c6fba0b0110fad97; independent integration review found no new source defect. Earlier exact-head evidence above remains explicitly attributed and is reused only for unchanged inputs. Maintainer landing is now authorized; GitHub checks and native landing guards remain enforced.Combined Track A candidate tree
6059134c361ed8602271261ddb940c9b9d1b413e: 1,183 tests passed, 12 intentional skips across tooling, sessions, plugin workers and Matrix. The repository transaction-boundary guard passed. Test-line total and ceiling both equal 6,447,876; allocations credit only each change’s literal added test lines. Real PostgreSQL integration recheck is in progress and is not counted as passed here.No DDL, schema-version/fingerprint, persisted representation, retention/durability, identity, or recovery-authority changes are introduced by this PR. This is scoped functional proof, not a global PostgreSQL or performance qualification.
Current merged-base CI has an inherited test-line ceiling deficit: main toast commit
1be3b6d2a1a786a325724faf9126010b7195087fadded 46 test lines without credit (+44 inui/src/lib/toast.browser.test.ts, +2 inui/src/e2e/chat-attachment-toast.test-support.ts). This PR’s own added lines are fully allocated. Exact failed-run attribution remains a separate native landing requirement.Completed integration qualification
Targeted real PostgreSQL qualification completed: 50 tests passed across 13 files, including the five newly registered inventory suites, public recovery paths and session-bound/cold-selection regressions. Schema parity checks found zero unexplained differences. The real cold maintenance workload also passed its0/0 full-batch scan and2/2 mixed-batch scan expectations, with admission checks retained.
Seven relevant type configurations and four scoped lint groups completed without diagnostics. The one README separator-format failure was corrected and the repository formatter check passed. Runtime tests remain tied to tree
6059134c361ed8602271261ddb940c9b9d1b413e; tree338bef659fad31f557af06c4930cf4ce6a628733differs only by that Markdown blank line.The remaining test-line red is attributed to unchanged main toast inputs; this PR’s exact failed run and two-parent merge are recorded in native landing evidence. That red is not called a passing check.