Repository navigation
fix(update): defer database diagnostics until gateway readiness - #184527
Conversation
Classify read-only database-engine diagnostics with the existing agent inspection policy so update Doctor records them for the owned post-readiness lint pass. Ordinary Doctor and missing-receipt callers retain existing admission behavior. Validation: scoped autoreview P0-P2 clean; pinned formatter and diff checks passed. Focused tests and line-cap guard remain pending exact-head CI because local tooling dependencies are stale. Normal commit hook refused the formatter donor; separate pinned formatting proof completed before the scoped hook bypass.
|
🦞👀 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: needs maintainer review before merge. What this changesClassifies database-engine diagnostics as inspections so the existing updater can defer them until Gateway readiness. Example: An owned update records deferred Doctor checks before restarting the Gateway.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review Keep open: this maintainer-authored PR fixes a current scheduling omission with a minimal production change; no introduced correctness or security defect was found. Priority: P2 Before mergeNone. FindingsNone. Tests
Agent review detailsHow this fits togetherDoctor contributions supply work classifications and health checks to the scheduler, which executes required work or records selectors for the updater's post-readiness lint pass and report. flowchart TD
A[Update Doctor] --> B[Contribution scheduler]
B --> C[Required repairs]
B --> D[Deferred inspection receipt]
C --> E[Gateway readiness]
D --> F[Target Doctor lint]
E --> F
F --> G[Update report]
Technical reviewBest possible solution: Keep the one-line classification repair and its focused scheduling regression within the existing updater ownership. Do we have a high-confidence way to reproduce the issue? Current-main source shows the unclassified contribution bypassing inspection deferral; this review ran no target code and establishes no measured downtime improvement. Is this the best way to solve the issue? The metadata repair uses the existing scheduler and shared finding collector, preserving repair and readiness owners without adding a parallel mechanism. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 7b95dbd3fdfe. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
PR surfaceSource +1, Tests +9. Total +10 across 2 files. Added test files: 0. View PR surface stats
LabelsLabel changes: No label 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 October 26, 2026, 7:21 AM ET / 11:21 UTC (Revision 2). |
Remove the redundant manually seeded subprocess case identified during review. The real contribution scheduling regression and existing generic post-activation runner coverage remain. Validation: pinned formatter and diff checks passed; this removes only the added test and restores the file to the frozen base. Normal hook refused the stale formatter donor; scoped bypass follows separate formatting proof. Exact-head CI and published-driver upgrade proof remain required.
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
|
Merged via squash.
|
…claw#184527) * fix(update): defer database diagnostics until gateway readiness Classify read-only database-engine diagnostics with the existing agent inspection policy so update Doctor records them for the owned post-readiness lint pass. Ordinary Doctor and missing-receipt callers retain existing admission behavior. Validation: scoped autoreview P0-P2 clean; pinned formatter and diff checks passed. Focused tests and line-cap guard remain pending exact-head CI because local tooling dependencies are stale. Normal commit hook refused the formatter donor; separate pinned formatting proof completed before the scoped hook bypass. * test(update): keep database deferral proof at scheduling owner Remove the redundant manually seeded subprocess case identified during review. The real contribution scheduling regression and existing generic post-activation runner coverage remain. Validation: pinned formatter and diff checks passed; this removes only the added test and restores the file to the frozen base. Normal hook refused the stale formatter donor; scoped bypass follows separate formatting proof. Exact-head CI and published-driver upgrade proof remain required.
What Problem This Solves
Updates run advisory database-engine diagnostics while the Gateway is stopped, even when the updater owns a post-readiness lint pass. Large stores can make that avoidable downtime expensive.
User Impact
The owned update flow runs these diagnostics after verified Gateway readiness and retains their findings in the update report. Ordinary Doctor still runs them; callers without the owned receipt retain existing inspection-budget behavior.
Why This Change Was Made
The diagnostic contribution was missing its inspection classification. Its normal and lint paths already use the same read-only finding collector, so the existing scheduler and selector receipt can carry it after restart. Required migrations, integrity checks, and readiness checks stay under their current owners. Production change: one metadata line; no new scheduler or cache.
Evidence
git diff --checkpassed.89c02954831c80cfbb78bd79db40930a260955d5: 35 successful jobs, 29 skipped, no failures. The actual contribution-budget suite passed 11/11 tests. Existing generic post-activation coverage also passed on the preceding head; its implementation is unchanged.legacy-operator-state: baseline[email protected], release commit157d8c2bc3ea2fa183afdc11088e69690bf8e64e, candidate89c02954831c80cfbb78bd79db40930a260955d5. Candidate Doctor passed in 75.262 seconds; candidate lint failed in 11.582 seconds oncore/doctor/heartbeat-cadence-migration/heartbeat-retirement-inspectionbecause default cron partition selection was unresolved. This was a product-check failure, not a timeout. The earlier dispatch stopped before testing on a workflow-identity mismatch.[email protected],legacy-operator-state, and candidate881caa4fd1945dc1d642165eceaed282b5922123. Its terminal receipt reproduces the same primary failure: step 4/5candidate-doctor-lint, exit 1,core/doctor/heartbeat-cadence-migration,doctor-failed,heartbeat-retirement-inspection, unresolved default cron selection. This is matching baseline failure evidence, not a successful upgrade. The touched scheduling owners do not change cron transport or migration.Inherited Compatibility Failure / Follow-up
Preserve the pre-relocation cron selector through the updater/candidate snapshot owner, with explicit compatibility for older published drivers. Reuse authoritative selector facts; do not infer a binding from a physical path or partition count, change selection policy, write live state, or bump the schema. This requires separate contract work and is not included in this scheduling change. The matching frozen-base proof establishes that this failure is inherited and independent of this scheduling change. Maintainer landing assessment retains the failed upgrade result and uses green exact-head required CI; it does not waive cron selection policy or claim upgrade compatibility. No deployment, elapsed-time improvement, or live latency result is claimed.