Repository navigation
Conversation
Remove archive prefilter arrays and per-archive ordering variants while preserving profile-reference resolution, facets, pagination, and viewer disclosure. Return unscoped row values directly. Extend the owner benchmark with archive/viewer golden comparisons.
|
🦞👀 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 SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Codex review: needs maintainer review before merge. What this changesThis PR moves archive filtering into the existing session-list pass and removes archive-specific ordering variants and intermediate arrays. Example: Request 25 open sessions from a roster of 5,000 sessions with archived: false.
Review scores
ProductKind: Performance · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review Keep this PR open: it makes a focused simplification to session selection, and no actionable correctness or security defect was identified. Priority: P2 Before mergeNone. FindingsNone. Tests
Agent review detailsHow this fits togetherThe Gateway selects resident session metadata, resolves visible person references, applies archive and access filters, and presents paginated session rows to clients. flowchart LR
A[Session metadata publications] --> B[Resident row projection]
B --> C[Shared session selection]
C --> D[Visible person references]
D --> E[Archive and list filters]
E --> F[Facets and pagination]
F --> G[Authorized session response]
Technical reviewBest possible solution: Keep archive matching in the existing filter owner and retain the simpler ordering representation if the declared Gateway acceptance criteria pass. Do we have a high-confidence way to reproduce the issue? The base source directly shows intermediate archive-filtered arrays and separate archive orders; reported owner-probe results support the allocation premise, but no target code was executed during this read-only review. Is this the best way to solve the issue? This is a small, coherent simplification using the existing selection and filter owners, with full-roster callers migrated and the distinct child-row archive contract retained. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 4a5d689c1a74. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
PR surfaceSource -14, Tests 0, Docs +7, Other +33. Total +26 across 11 files. Added test files: 0. View PR surface stats
Review metrics
LabelsLabel changes: No label changes. Label justifications:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
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 Reviewed October 21, 2026, 6:00 PM ET / 22:00 UTC. |
|
Closing under measurement rule v5. Both requested interleaved pairs completed under the current shared guard, with 240 measured turns and 30 resets per side. Mean promotion was +22.57%; mean sessions.list p99 was +23.01% (pair 1 n=2,391/2,454; pair 2 n=2,270/2,315). Both exceed the +20% rejection threshold. All forty captured Gateway responses matched after documented timestamp/path normalization, and the owner cold-allocation result remains −22.39%, but those do not override the whole-flow gates. The four-abort/no-valid-pair fallback did not trigger. Full results and the unrelated baseline-reproduced CI failure are recorded in the body; no CI rerun or merge was attempted. |
What Problem This Solves
Session-list reads allocate intermediate archive-filtered arrays before traversing the same rows again for other filters.
User Impact
List results, archive semantics, pagination, facets, and viewer-specific disclosure are preserved. Archive matching moves into the existing filter loop after visible-roster person-reference resolution. Dirty partitions expose their iterators, ordering retains one sequence per sort mode, and unscoped selection copies the map values directly. All internal callers migrate together. Production delta: −14 lines, with no new cache, schema, configuration, or public API.
Decision: rejected by measurement rule v5
Not merged. Two complete interleaved baseline/candidate pairs ran under the current shared production guard (default loop maximum 2,500 ms, abort after three consecutive bad checks), with no threshold override or additional watcher. Both pairs completed on their first attempt under this policy. The authorized fallback for four consecutive guard-aborted attempts with no valid pair therefore does not apply.
The mean of the paired deltas is +22.57% promotion MB/turn and +23.01% sessions.list p99. Both exceed v5's +20% rejection threshold. The second pair reverses the sessions.list sign, but the required mean still fails. No causal performance-regression claim is made from this noisy host; these are failed acceptance measurements, so the simplification is not landing on this evidence.
Gateway measurements
Baseline
399a360fdfbb15546498a97886cef41fd8cac66b; candidate95ddfd4b793b3e43e4f6774b8ca5417fa4498bba. The PR head5beb78c164ae91f355484431a1a4007d70aee56ais a patch-identical rebase over unrelated UI-only changes; the measured owners and lockfile are unchanged. Both revisions ran their verifiedqaRuntimebuilds throughdist/entry.js.Pair 1 used slot B: baseline on even CPUs 64–94, candidate on odd CPUs 65–95. Pair 2 used slot A with the placement swapped: baseline on odd CPUs 97–127, candidate on even CPUs 96–126. Each pair acquired its own slot through
acquire-slot.shand used the shared guard wait/watch, CPUWeight=10, IOWeight=10, and MemoryMax=64G. Synthetic fixture: 5,000 sessions, one project, no retained runs/approvals/cron. Each side completed 240 measured turns, 24 measured cohorts, 8 warmup cohorts, and 30 session resets. The equal reset/work counts exclude the known reset-boundary artifact.Each scored window was approximately 480 seconds after 120 seconds of warmup. Percentile counts are given separately for every side below. Turn p99 is context only (n=240); turn p95 is valid. Event-loop and sessions.list p99 are valid (n≥1,000). Every side has fewer than 50 major collections, so major GC alone is context only; total GC carries the gate.
Major collection counts, baseline/candidate: 47/44 in pair 1 and 44/39 in pair 2. Context-only turn p99, baseline/candidate: 7,142.156/10,998.878 ms (n=240/240) in pair 1 and 5,419.030/5,511.264 ms (n=240/240) in pair 2.
Pair-specific failing-metric deltas: promotion +45.69% / −0.56%; sessions.list p99 +58.02% / −12.00%. The decision uses their arithmetic means, as required by v5.
The shared guard logged two isolated dirty-page violations in pair 1 (
dirty_kb=2747092,dirty_kb=2225480) and one isolated load violation in pair 2 (load=61.93). Neither reached three consecutive failures, and neither pair was aborted. Earlier attempts under the superseded 500 ms/two-check policy are excluded entirely. The host was known to have production swap stalls; that context does not convert a completed failed acceptance pair into a passing one.Measured polling uses
archived: "all". After each window, all 20 captured Gateway requests matched between revisions, including archive on/off, pagination, sorting, and other filters. Normalization is limited to exact synthetic sandbox prefixes, the responsets, andsessions[].snapshotAt, which is the documented presentation clock assigned bypresentSessionRowinsession-utils-row.ts. No content, ordering, count, facet, or identity field was removed from comparison.Owner measurements and correctness
Five interleaved baseline/candidate processes per side, 5,000 sessions, 96 warmup calls and 480 measured calls per process. All 48 complete archive/person/facet/viewer golden results matched in each process pair. Allocation sampling includes objects collected by minor and major GC. Cold measurement covers the first request. Each p95 below has only n=5 process observations per side and is context only.
Warm allocation is effectively neutral. No timing improvement is claimed. The cold owner-allocation improvement does not override the failed whole-flow gates.
66 focused tests passed across nine files covering archive/rematerialization ordering, scope/federation, profile/owner facets, viewer sharing, projects, usage, catalog snapshots, and retired-row collection. Changed-file formatting/lint and the core typecheck lane passed. Independent review found no actionable P0–P2 defects. ClawSweeper's exact-head review also found no actionable defect.
CI attribution
Exact-head CI run 39681041351 completed with one failed non-aggregate job: checks-node-changed.
x-publication-owner-composition.e2e.test.ts:949intermittently returned HTTP 503 instead of 200 for the anonymous public read. The unchanged baseline and candidate each passed twice, then reproduced the identical failure on their third focused invocation. The failing public-read admission/representation code and test are byte-identical between baseline and PR head. The real-auth public-entry sibling passed all seven cases in the same CI job. All other non-aggregate exact-head CI jobs passed or were intentionally skipped. No CI rerun was requested.Focused attribution used the supported CI
qaRuntimebuild followed by:This inherited CI failure would qualify for the authorized inherited-failure route; the failed performance gates prevent landing independently of CI.