Repository navigation
refactor: remove redundant private freezes and checks - #176838
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review in progressClawSweeper is reviewing this revision. This supersedes any previous blocked status. |
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. |
|
Remove freezes from fresh private requester, admission, channel lookup, container staging and voice-session values. Reuse parsed provider choices and remove one duplicate synchronous policy assertion. Preserve caller-owned snapshots, public frozen carriers, input parsing and final security-effect checks. Shrink the retired channel assertion allowance. No intended user-visible behavior change. Two independent scoped reviews completed cleanly. Production change: +47/-54 lines. Validation and inherited or unresolved CI diagnostics are documented in the PR.
What Problem This Solves
Private admission payloads, requester tuples and channel lookup tables pay for runtime freezing despite staying inside their owner and having no mutation path.
User Impact
No intended behavior change. Public admission/requester snapshots remain frozen, caller-owned input remains copied, and credential admission, voice-session ownership and final-effect checks remain intact.
Design
Remove private freezes. Model Setup reuses its parsed provider choice and dispatches saved authentication before the generic role check it already bypasses. Keep readonly types and narrow projections. The Talk projection still copies six primitive fields from the parsed record; its sole production consumer reads it synchronously.
Production: +47/-54, net -7 lines across eight files. The assertion-safety baseline also drops the retired one-assertion allowance for
src/channels/ids.ts. No test additions or deletions. The simplification pass retained owner-held values and existing parsers, without new helpers, public exports or compatibility paths.No SQL, requests, transactions, schema, SDK surface or service lifecycle changes. SQL/request/MAIN impact for this diff is estimated 0/0/0, unmeasured. The lane comparison for the first two cleanup commits measured identical warm medians: 54 [54–57] SQL, 16 [16–17] requests, 0 [0–0] MAIN, with no normalized statement-shape change. That pair does not include this diff. Its candidate completed all turns but failed final restart teardown with Darwin process-inspection unavailable in spawn-broker cleanup; no full-workload or latency claim.
Evidence
Changed-file formatting, type-aware lint and
git diff --checkpass. Independent Codex source review and the second/final baseline-correction review both completed scoped-clean with final source verification. Frozen install passed.All owner shards passed on reviewed production head
9418d918c1cin ordinary CI. Final head1bba74d6892changes only the obsolete assertion allowance; all eight production blobs are identical. Final CI confirms the corrected assertion-safety, database-worker and dialect ratchets pass. Production/core types, lint and source-contract checks passed; the unrelated failures are recorded below. Knip evidence is reused because the correction changes none of its inputs.The final skill-library worker test failed at
bob-worker-firstwith an unavailable selected skill revision. The same test already fails on scheduled main, but at the earlier advertised-skill-count assertion. This different-step symptom remains an unresolved CI signal, not an identical-failure or fixed-test claim. No blind rerun was requested.Inherited diagnostics: the unchanged Codex
completionDeliveryRetryDelaysMsTS2353 matches main. The missing Swedish translation catalog matches main i18n. Chat boot gzip exceeds its existing budget on main; this candidate's own comparison reports 1,491,439 → 1,491,439 bytes, zero growth. The generated credentials-matrix mismatch also matches main: the sameplugins.entries.subq.config.apiKeyentry is absent. No budget was raised and no test assertion was weakened.Knip on the unchanged production head adds zero findings versus current main:
settleInterruptedRestartRecoveryand the two unused files are inherited. The supplemental run was cancelled after its required evidence completed. No new main-baseline or supplemental run was dispatched for the one-line baseline correction.The final aggregate ratchet failure is independently reproduced on fetched main
8e2ea72d83acceb73a9b5876dc31cd29807fc37a:test/scripts/ci-node-test-plan.test.ts:3285lacks real-export pass-through in itsci-test-timingsmock. The unchanged native checker ran through the proof semaphore against an isolated index of that exact main, exiting 1 with the identical rule/file/line. The actual PR correction passes assertion-safety. All inherited failures and the distinct worker signal were routed to the main-repair queue. Landing uses the authorized relaxed policy; aggregate CI is not claimed green.Candidate Ledger
Keep caller-input copies, public carrier/result freezes, one-use/scope/live-owner checks, and all untrusted-input parsing. There is no support added for callers mutating private implementation values.
src/system-agent/setup-inference-activate.tsSaved-auth retains its existing generic-role-validation bypass and delegates role and credential ownership to the same staging owner. Malformed saved-auth choices keep their current error.
Accepted edge: an already revoked plugin command may report a policy error before the final revoked-authority error. It still cannot execute. Container daemon selection, target pinning, ownership verification and lifecycle behavior are unchanged.