Repository navigation
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 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 changes before merge. What this changesThis PR refreshes session-row presentation only for affected parents and swarm requesters and preserves callers’ diagnostic task labels. Example: One collector completes while a session list displays 100 parent rows.
Review scores
ProductKind: Performance · Worth it: Yes · Fix scope: Complete Merge readiness⛔ Needs changes before merge - 1 item remains This PR provides a focused performance improvement using existing owners, but its added regression triggers the enforced test-line ratchet; no runtime or security defect was found. Priority: P2 Before merge
Findings
Tests
Agent review detailsHow this fits togetherThe Gateway session-row projection consumes committed registry publications and stored session metadata, maintains relationships and presentation facts, and supplies session lists and exact-event responses. flowchart TD
A[Registry publications] --> B[Resident subagent index]
B --> C[Changed children and requesters]
C --> D[Session row context]
E[Stored session metadata] --> D
D --> F[Row presentation]
F --> G[Lists and exact events]
Technical reviewBest possible solution: Keep the scoped invalidation fix and reconcile its regression coverage with the enforced test-line budget. Do we have a high-confidence way to reproduce the issue? The base advances the presentation revision for every relevant keyed registry change, causing unrelated presented rows to rebuild child links and swarm summaries; the supplied benchmark and red/green regression corroborate this path without a reviewer-run reproduction. Is this the best way to solve the issue? The change follows the existing publication and projection owners, retains broad invalidation and replacement handling, and removes redundant recomputation without adding another cache or scheduler. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against a3fee9204353. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceAcceptance criteria:
What I checked:
PR surfaceSource +27, Tests +137, Docs 0, Other +375. Total +539 across 8 files. Added test files: 0. View PR surface stats
Review metrics
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 Reviewed October 27, 2026, 9:55 AM ET / 13:55 UTC. |
e693b15 to
e93ab93
Compare
What Problem This Solves
A keyed subagent update advances a global presentation revision, so the next read rebuilds child links and swarm summaries for unrelated resident session rows. A large session list pays for every parent on the page even when only one collector changed.
User Impact
Session lists and session-event consumers reuse unaffected row facts. Session-row stall diagnostics retain their actual
session-rows:select/session-rows:consumeoperation instead of attributing the whole callback toagent-roster. Wire payloads, ordering, sharing checks, and persistence are unchanged.Why This Change Was Made
The resident registry index already records changed child keys. It now also records old/new swarm requesters. The row context dirties only those requester rows and the old/new parents when a relationship changes, using the existing row revision marker. Broad config/source invalidations retain their broad revision, and replacements retain former child keys while reconciling relationships. No new cache or scheduler is introduced.
Runtime production delta: +27 lines across three owners. The extra code carries exact old/new ownership needed to preserve parent moves, collector transfer, deletion, and replacement; the global per-run invalidation and the misleading roster wrapper are removed. The standalone benchmark and its Knip entry are separate proof tooling.
Evidence
Baseline owner sources:
a4a8f632da0a9a2f5ab8ffc2e66fe2b46693ff6a(main at investigation start). The committedscripts/perf/session-row-consume-measure.tsuses 10,000 synthetic resident rows across 100 agents, real registry indexing, relationship reads, materialization, and presentation. List calls consume 100 parent rows; exact-event calls consume the changed child and its parent. Setup, warmup, and byte checks are outside timing. Allocation is sampled separately with collected objects included.Acceptance, written before measurements: identical row bytes across keyed updates, requester/controller moves, deletion, and replacement; fewer unrelated refreshes and lower CPU/allocation per call. Wall-clock tails are interpreted with host load and counterbalanced arms, not as standalone adverse evidence on this shared host.
All 16 measurement arms match at all 16 intermediate verification states and final row-byte digests. Page refresh work falls from approximately 100 rows to one affected owner per call. Exact events were already scoped to their requested rows: their CPU remains effectively unchanged and allocation improves slightly. Their first visits also include lazy settlement after the broad replacement in verification; no samples were trimmed.
Untraced synchronous slice measurements (3,000 samples per arm, every pair):
The page tails had mixed signs, so the extra pair was declared before it ran. Signed paired-mean p99 delta is −73.80 ms (177.29 → 103.49); mean maximum delta is −42.53 ms (520.18 → 477.65). This shared-host wall spread is context, not a production latency claim or an adverse verdict. The CPU reduction holds in every page pair. Event CPU's initial +19 µs reverses in BA, leaving +0.82 µs in the paired mean.
Allocation uses separate 32 KiB sampling passes with minor/major collected objects included; traced timings are not gates. Both page allocation pairs agree at −64.79%. Host loads for page allocation pairs were 45.21/45.43 and 30.09/37.13 (base/candidate), and 28.27/25.91 for event allocation.
The scoped-refresh regression extends the existing resident-projection observer matrix: keyed requester changes rebuild only the two affected parents, and collector completion rebuilds only its swarm owner while parent membership stays unchanged. Both new work-count cases fail against the unmodified base owners: requester movement rebuilds four rows instead of two, and collector completion rebuilds four instead of one. Existing broad publication, registry clearing, persistence, and observer-ordering checks remain. The attribution regression independently fails on main's incorrect
agent-rosterlabel. The benchmark separately verifies byte equivalence through controller movement, retirement, and broad replacement.Focused owner/consumer verification: 65 tests across session-row context, subagent projection/index, exact events, activity-summary publication, placement lifecycle, and subagent memory; 22 roster tests; 32 eager-import/PR-wrapper closure tests. Core targeted typecheck, changed-file format/lint, export collision guard, and
git diff --checkpass. Test wall time: 150 s for the six owner/consumer files (including worker preparation); 132 s for closure tooling. The final two changed test files pass all 16 cases in 73.51 s including compiler preparation; both keyed regressions fail on the base for the intended work counts. CI supplies broad proof.Review: independent subagent review (autoreview route unavailable), P0/P1/P2 scope, no accepted findings remaining. The shared Codex autoreview helper refused before inference because its requested provider route did not match operator configuration; no configuration was changed.
Scope of measurement: this is owner-level proof, not a whole-Gateway or live-server result. The fast-path protocol applies to removal of redundant recomputation; no Team access, production load, or long Gateway A/A campaign was performed. Existing synchronous publication and authority checks remain in place. Host-load-related tail variation and exact-event residual cost are reported separately above.
CI follow-up: the first head passed runtime/test/lint checks but failed the test-line ratchet (base already 895 lines over its ceiling; the original custom regression added 137). The regression now extends the existing production-projection matrix, with existing disposable fixtures replacing repeated cleanup. Final test-line delta is −2. No baseline ceiling increase and no existing contract deletion. Independent follow-up review is clean; its swarm-only coverage finding was addressed before this update.