Repository navigation
refactor(infra): trust prepared internal owner facts - #178563
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 removes redundant internal validation and forwarding, simplifies snapshot reads, and shares Windows socket and process inspection within each request. Example: Windows ports 18789 and 19001 each have IPv4 and IPv6 listeners owned by PID 4242.
Review scores
ProductKind: Refactor · Worth it: Yes · Fix scope: Complete Merge readiness⛔ Needs changes before merge - 1 item remains Keep this PR open: the maintainer-directed simplification is useful, but removing the background reply’s profileId leaves a PostgreSQL test consumer broken. Priority: P3 Before merge
Findings
Tests
Agent review detailsHow this fits togetherGateway and worker callers supply prepared routing, identity, and storage facts to infrastructure owners, which return diagnostic snapshots or perform admitted database operations. flowchart TD
A[Gateway and CLI callers] --> B[Prepared internal facts]
B --> C[Existing infrastructure owners]
C --> D[Database workers]
C --> E[Native socket collectors]
D --> F[Snapshots and admitted writes]
E --> F
Technical reviewBest possible solution: Keep the simplifications and migrate the PostgreSQL test to profile-specific snapshot results while preserving lock, merge, and rollback coverage. Do we have a high-confidence way to reproduce the issue? Exact-head CI reproduces the PostgreSQL assertion mismatch, and source confirms three additional accesses to the removed property; no current-main product bug is claimed. Is this the best way to solve the issue? The existing owners support the simplification, but the reply-contract cutover must include its PostgreSQL test consumer. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 5c1432f10bba. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceAcceptance criteria:
What I checked:
Likely related people:
PR surfaceSource -105, Tests +33, Docs 0. Total -72 across 25 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 20, 2026, 1:09 PM ET / 17:09 UTC. |
|
Exact-head CI attribution for
Attribution is bound to the actual tested merge The coordinator flake ledger and last six completed scheduled-main runs were checked. Their related cold-load title:false failures are not the observed duration:false signature and are not used as matching evidence. The automatic classifier correctly says unknown/no matching job; the additional causal evidence above supplies the scoped attribution. Every other selected job passed, including repaired PostgreSQL conformance and |
|
Merged via explicitly authorized admin squash with attributed pre-existing CI failures.
|
* refactor: trust prepared internal owner facts * refactor(infra): share inspection facts and trust presence invariants * refactor(infra): validate queue replacement at its kernel owner * refactor(cron): drop unused delivery target input members * test(postgres): assert background data across snapshots
What Problem This Solves
Internal read owners still reconstruct or revalidate facts they already own, forward through single-use wrappers, and repeat Windows process inspection for each socket row. This residue removes 105 net production lines across 21 production files, plus focused existing-owner test updates and one generated inventory line-number correction. It uses the campaign's 100-line residue waiver; it is not a LARGE PR.
What changed
Use normalized voice-wake targets and prepared pairing/requester payloads directly. Flatten single-use Goal/message-cut/conversation-selection wrappers and unused delivery callback plumbing. Return display preference snapshots without an inner replay loop, retaining the real HTTP/Web Push authority predicates and all writes/CAS/settlement. Remove redundant background owner fields, empty transaction callbacks, Doctor pre-delete checks and parser forwarding.
Validate queue replacement IDs once in the existing kernel rather than twice; make its assertion private after the adapter no longer needs it. Remove ignored cron helper input members left behind by #168996, without changing public CronJob types or any runtime routing branch.
Windows inspection now uses one request-local netstat snapshot and the existing bounded per-PID enrichment owner. Single-port and connection APIs use the same owner. Keep native collectors, tasklist/CIM/WMIC fallback, environment isolation, abort/deadline handling, bind probes and effect-time process identity checks. Presence retains its private non-evictable self row directly; malformed external text and numeric bounds still meet the existing boundary.
Best-effort tradeoffs accepted
All Phase E standalone memory backend/factory/registry/expiry/federation code and tests are unchanged. Security, FIFO, accepted native work settlement and public contracts stay.
Evidence
Focused proof: 132 passing cases across eight port/presence suites, plus 14 passing suppression cases (two shards, 227.81s wrapper; infra 173.11s including bounded native-worker compilation). Five existing platform/environment skips: native Windows tasklist, native Linux ss and three unavailable loopback-bind cases on this Mac. No skips, retries, timeouts or assertions were changed. The new ports fixture file is covered by that full-file run; hosted CI owns its CI-seconds/native-platform result.
Three-root targeted types, three-file typed lint/format and diff check passed. Earlier unchanged-input proof has 292 distinct passing cases across 25 files, including the same 14 suppression cases; canonical database-worker inventory passed. Runtime/Madge cycles were zero; the later cuts add no import edges, so they cannot introduce a new cycle component. Independent review of the 100-line base is scoped-clean P0–P2 with no actionable findings. Requester suites requiring broad runtime preparation remain hosted-CI gaps, not disabled tests.
The namespace append passed targeted types/typed lint/format, independent scoped-clean P0–P2 review, all 12 real migration cases and 14 suppression cases (124.23s wrapper; migration 98.58s including native worker preparation). The canonical inventory was regenerated; its only delta is the adapter's first-call position 26→24, without weakening counts or evidence. The cron append passed seven-root caller types, lint/format, independent scoped-clean P0–P2 review and all seven unchanged owner cases (2.36s Vitest, 12.38s wrapper). Final canonical inventory verification passed. The 100-line base and both later source increments each received independent review; all unchanged-input proof is retained rather than counted twice.
CI follow-up: PostgreSQL conformance (3/3), run 39460557343/job 118759613460, exposed one stale test expectation for the removed private snapshot
profileIdfield. That failure is ours, not inherited. The existing case now asserts real background data through the same lock and transaction boundaries: empty first profile, a distinct retained target image visible after an uncommitted canonical merge, and the empty result again after rollback. Advisory lock, 100ms lock timeout, read-only snapshot, enclosing transaction checks and cleanup remain. No production change, timeout increase, retry, skip or suppression was needed.That exact case passed with no skips against a task-owned PostgreSQL 18.6 Unix-socket database with TCP disabled: 1.835s test body, 84.86s Vitest including 76.619s canonical worker preparation, 103.63s wrapper. All 14 suppression cases passed separately in 27.08s wrapper. The single-test-root typecheck, typed lint and formatting passed; independent P0–P2 review is scoped-clean. This adds one distinct passing case/file to the retained proof, for 444 cases across 36 files. Hosted CI on the repaired exact head remains the broad proof; this is not a Linux or whole-suite local claim.
Deterministic Windows fixture: two ports, IPv4+IPv6 rows, one PID, duplicate requested port. Before: 10 native requests, or 14 with WMIC fallback. After: 3 / 4 with identical listener projections. Red control failed only those counts; final full-file run passed both fixtures. No latency, CPU or native-Windows claim.