Repository navigation
refactor(cron): share runtime feedback schema fields - #140408
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: blocked before merge. Reviewed September 6, 2026, 4:17 PM ET / 20:17 UTC. ClawSweeper reviewWhat this changesShares cron failure-notification, trigger, and stream-feedback field declarations between reporting and update schemas without changing accepted fields. Merge readiness⛔ Blocked before merge - 1 item remains The refactor is correct and remains useful on current main. The earlier migration-proof blocker is unsupported: the patch preserves the protocol contract and does not change persisted data or storage behavior. Priority: P3 Review scores
Verification
How this fits togetherThe Gateway protocol defines the cron job state returned to clients and validates their update requests. These schemas separate writable runtime feedback from scheduler-owned reporting fields. flowchart TD
A[Scheduler job state] --> B[Reporting schema]
C[Shared feedback fields] --> B
C --> D[Writable state schema]
E[Client update request] --> D
D --> F[Gateway validation]
F --> G[Cron update service]
B --> H[Client job reports]
Before merge
Agent review detailsSecurityNone. PR surfaceSource -16. Total -16 across 1 file. View PR surface stats
Review metricsNone. Stored data modelPersistent data-model change detected: Technical reviewBest possible solution: Keep the private shared feedback block while preserving independent closed schemas and the explicit writable whitelist. Do we have a high-confidence way to reproduce the issue? Not applicable: this removes duplicated declarations rather than repairing a reported runtime defect; the duplication remains visible on fetched main. Is this the best way to solve the issue? Yes. Extracting exactly the common contiguous fields is a narrow solution, and independent text expansion reproduces the complete pre-refactor source. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against bc5e0f0933b2. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (1 earlier review cycle)
|
|
Merged via squash.
|
…rol-ui * origin/main: docs: remove the empty release-sections nav group (#140427) fix(tooling): omit Codex machine squash credit (#140420) chore(ui): refresh control ui locales (#140384) refactor(plugin-sdk): reuse native approval input contracts (#140415) fix: silent model WebSocket streams hang past the idle timeout (#140335) perf(ai): avoid unused text extraction for image results (#140409) fix(ui): distinguish failed GitHub status checks from disconnected accounts (#140333) refactor(cron): share runtime feedback schema fields (#140408) fix: avoid duplicate cloud worker teardown during recovery (#140377) fix(cli): show executable approval scope (#138386) refactor(ui): reuse shared requirement records (#140407) test(gateway): table-drive device token lifecycle checks (#140403) fix(chat): fence delayed history at terminal retirement (#140379) test(skills): compare large upload bytes natively (#140402) refactor(delivery): reuse the canonical rendered batch plan type (#140386) docs(start): repair the first-run path from landing page to first channel (#140390) # Conflicts: # docs/.i18n/glossary.zh-CN.json
What Problem This Solves
Cron read-state and writable-state schemas repeated the same failure-notification, trigger, and stream-feedback field declarations. Keeping separate copies made this shared contract needlessly easy to drift.
Why This Change Was Made
Share one contiguous field block at its existing position in both schemas. The writable patch remains an explicit whitelist: scheduler-owned diagnostics, auto-disable facts, source identity, and schedule activation remain report-only. Both closed-object schemas retain their independent identity.
Deletion evidence: the identical blocks in
packages/gateway-protocol/src/schema/cron.tsnow use the privateCronJobRuntimeFeedbackPropertiesdefinition. Property order is preserved for generated clients.git log -S streamSourceIdentityidentifies98742bc2c7f(#112387), and schedule-activation ownership traces to82af1bf7d40(#115779); neither contract changes.User Impact
No behavior, protocol, schema, or stored-representation change. Cron clients receive and may patch exactly the same fields with the same constraints and optionality.
Evidence
cron-validators.test.tsandcron-protocol-schema.test.tspass before and after.cron-validators.test.ts:73rejects report-only auto-disable state in updates, and:200enforces timestamp bounds. The existingcron-protocol-schema.test.ts:32and:43retain read-state metadata checks. Their patch-side property inspection does not traverse the current update union, so it is not claimed as write-boundary proof; complete serialized update-schema identity preserves that boundary for this refactor.pnpm buildpassed (6m 24s).node scripts/check-changed.mjspassed, including core/test types, all three dead-export scans, zero runtime import cycles, and repository guards. Rebase preserved the schema owner and dependency lock exactly.ClawSweeper disposition: its technical review reports no findings and confirms unchanged optionality, constraints, field order, writable whitelist, and independent closed-object identities. The rendered
unknown-data-model-changeitem is a path-classification false positive. No database schema/version/table, migration, stored representation, retention, recovery, or protocol contract changes. The compatibility proof is exact representation identity: serializing the complete{ state: CronJobStateSchema, update: CronUpdateParamsSchema }yields the same 24,307 bytes and SHA-256f4c3d2645eb9366ccc5b13bba74d5fbd5a2f58a5b3b9b0dda5be812c81e03013before and after. Swift/Kotlin outputs also remain byte-identical. An additional migration scenario is therefore not applicable; no schema checkpoint exception or suppression is requested.