Skip to content

refactor(cron): share runtime feedback schema fields - #140408

Merged
steipete merged 1 commit into
mainfrom
steipete/deletion-cron-feedback-fields
Sep 6, 2026
Merged

steipete merged 1 commit into
mainfrom
steipete/deletion-cron-feedback-fields

Conversation

@steipete

@steipete steipete commented Sep 6, 2026 •

Copy link
Copy Markdown
Contributor

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.ts now use the private CronJobRuntimeFeedbackProperties definition. Property order is preserved for generated clients. git log -S streamSourceIdentity identifies 98742bc2c7f (#112387), and schedule-activation ownership traces to 82af1bf7d40 (#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

  • Production: +26/−42 = −16 lines. Tests/support, tooling, and docs unchanged.
  • Complete order-sensitive serialized read-state and update schemas are byte-identical before and after.
  • All 40 existing cases across cron-validators.test.ts and cron-protocol-schema.test.ts pass before and after.
  • Retained executable coverage: cron-validators.test.ts:73 rejects report-only auto-disable state in updates, and :200 enforces timestamp bounds. The existing cron-protocol-schema.test.ts:32 and :43 retain 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.
  • Swift and Kotlin generation checks pass with no generated-file changes.
  • Independent Codex review: scoped-clean, no actionable P0–P2 findings.
  • Full pnpm build passed (6m 24s).
  • Full node scripts/check-changed.mjs passed, 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-change item 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-256 f4c3d2645eb9366ccc5b13bba74d5fbd5a2f58a5b3b9b0dda5be812c81e03013 before 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.

@clawsweeper

clawsweeper Bot commented Sep 6, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@openclaw-barnacle openclaw-barnacle Bot added app: web-ui App: web-ui gateway Gateway runtime size: S maintainer Maintainer-authored PR labels Sep 6, 2026
@steipete
steipete marked this pull request as ready for review September 6, 2026 20:03
@clawsweeper clawsweeper Bot added P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Sep 6, 2026
@clawsweeper

clawsweeper Bot commented Sep 6, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: blocked before merge. Reviewed September 6, 2026, 4:17 PM ET / 20:17 UTC.

ClawSweeper review

What this changes

Shares 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
Reviewed head: 41bfab08402853e12efd1e31fc2700cb8f6bb58e

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused, maintainable refactor with no actionable correctness findings and proportionate reported validation.
Proof confidence 🌊 off-meta tidepool Not applicable: The supplied MEMBER author association exempts this internal refactor from external-contributor runtime proof; unchanged schema declarations and separately constructed closed objects establish no material authority change. Reported serialization and generation checks support compatibility without requiring a migration exercise.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: The supplied MEMBER author association exempts this internal refactor from external-contributor runtime proof; unchanged schema declarations and separately constructed closed objects establish no material authority change. Reported serialization and generation checks support compatibility without requiring a migration exercise.
Evidence reviewed 7 items Pinned refactor preserves the complete source declarations: Read the introduced diff and both schema definitions. A read-only text comparison expanded the two shared-block spreads and removed the extracted declaration; the resulting entire file exactly matched the pinned base. All 12 shared fields retain their order, constraints, and optionality. No target code was executed.
Separate schema identities and writable boundary remain intact: Both schemas still call closedObject separately, which creates a fresh nominal identity and forbids additional properties. Schedule activation, diagnostics, auto-disable facts, delivery suppression, and stream source identity remain outside the writable schema.
Current main still contains the duplicated declarations: The affected file has no changes between the pinned base and fetched main, where the two repeated blocks remain. Neither supplied related merged PR implements this extraction. Release-source inspection could not complete because the required blob was unavailable and GitHub DNS resolution failed; no shipped-fix claim is made.
Findings None None.
Security None None.

How this fits together

The 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]
Loading

Before merge

  • Add data-model compatibility proof - Confirm migration or upgrade compatibility proof before merge.
Agent review details

Security

None.

PR surface

Source -16. Total -16 across 1 file.

View PR surface stats
Area Files Added Removed Net
Source 1 26 42 -16
Tests 0 0 0 0
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 1 26 42 -16

Review metrics

None.

Stored data model

Persistent data-model change detected: unknown-data-model-change: packages/gateway-protocol/src/schema/cron.ts. Confirm migration or upgrade compatibility proof before merge.

Technical review

Best 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.

Labels

Label justifications:

  • P3: This is a bounded internal cleanup that preserves existing cron protocol behavior.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: The supplied MEMBER author association exempts this internal refactor from external-contributor runtime proof; unchanged schema declarations and separately constructed closed objects establish no material authority change. Reported serialization and generation checks support compatibility without requiring a migration exercise.

Evidence

What I checked:

  • Pinned refactor preserves the complete source declarations: Read the introduced diff and both schema definitions. A read-only text comparison expanded the two shared-block spreads and removed the extracted declaration; the resulting entire file exactly matched the pinned base. All 12 shared fields retain their order, constraints, and optionality. No target code was executed. (packages/gateway-protocol/src/schema/cron.ts:424, 41bfab084028)
  • Separate schema identities and writable boundary remain intact: Both schemas still call closedObject separately, which creates a fresh nominal identity and forbids additional properties. Schedule activation, diagnostics, auto-disable facts, delivery suppression, and stream source identity remain outside the writable schema. (packages/gateway-protocol/src/schema/closed-object.ts:5, 41bfab084028)
  • Current main still contains the duplicated declarations: The affected file has no changes between the pinned base and fetched main, where the two repeated blocks remain. Neither supplied related merged PR implements this extraction. Release-source inspection could not complete because the required blob was unavailable and GitHub DNS resolution failed; no shipped-fix claim is made. (packages/gateway-protocol/src/schema/cron.ts:424, bc5e0f0933b2)
  • Existing validation coverage: Read both cited test files. The validator suite exercises rejection of report-only auto-disable state and out-of-range timestamps. The schema test's update-side inspection does not traverse the update union, as the PR body correctly acknowledges; it is not independent write-boundary proof. Tests were inspected, not run. (packages/gateway-protocol/src/cron-validators.test.ts:73, 41bfab084028)
  • Persistence is unchanged: Cron state serialization belongs to the unchanged row codec, which serializes runtime state into state_json. The introduced patch changes neither this producer nor its stored representation, schema installer, migration, or recovery behavior. (src/cron/store/row-codec.ts:52, 41bfab084028)
  • Re-review disposition and supplied compatibility evidence: The completed earlier review examined the same head and reported no findings, with migration compatibility as its next step. The captured full PR body now reports identical 24,307-byte serialized state/update schemas with SHA-256 f4c3d2645eb9366ccc5b13bba74d5fbd5a2f58a5b3b9b0dda5be812c81e03013, unchanged Swift/Kotlin outputs, 40 passing tests, and successful build/checks. These are contributor-reported results; source inspection independently supports contract preservation. No material data-model change triggers an additional migration scenario. (41bfab084028)

Likely related people:

  • steipete: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • OmerZeyveli: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

History

Review history (1 earlier review cycle)
  • reviewed 2026-09-06T20:10:24.839Z sha 41bfab0 :: blocked before merge. :: none

@steipete
steipete merged commit b8a1a6a into main Sep 6, 2026
223 checks passed
@steipete
steipete deleted the steipete/deletion-cron-feedback-fields branch September 6, 2026 20:19
@steipete

steipete commented Sep 6, 2026

Copy link
Copy Markdown
Contributor Author

Merged via squash.

vincentkoc added a commit that referenced this pull request Sep 6, 2026
…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
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

app: web-ui App: web-ui gateway Gateway runtime maintainer Maintainer-authored PR P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: S status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant