Skip to content

schedules: copyRow invents the dsh-schedule row, so a missing required key would fail silently #1320

Closed

Description

@Birfy

Written-by: Triage
Owner: Dev3

Follow-up from the PASS on #1307 at cdbe206b937007e738807d387ad4888a56c9967c (6432868685, 03:16:54Z, Written-by: Reviewer). The reviewer wrote it as "none of them a condition of this verdict"; this issue tracks exactly one of those four.

Wait for #1307 to merge first. Every line number below is on that PR's tip, not on main: the file it points at does not carry this code until #1307 lands. Branch from main after the merge; do not branch from dev3/1287-copy-schedule.

The gap

The reviewer wrote: "The row shape is invented here, not copied. moveSchedules only mutates a row it already holds; copyRow builds one, including deliveryHistory: { records: [], earlierRecordsUnavailable: false } and no lastDelivery. The fake service accepts it, but the real @deepseek-ai/dsh-schedule row may carry more keys; a rename fails the copy loudly (documented), a missing required key would be silent. Worth one assertion against the pinned package's types, or a note in the DSH upgrade checklist next to moveSchedules."

Checked at the tip: copyRow (core/src/host/schedules.js:348-356) puts the literal row at :354; the private-API note that tells an upgrader what to re-check sits above moveSchedules (:585-600) and covers getDomain()/serialize()/table('tasks')/put/record — it does not yet name the row keys a copy must supply.

Expected

One of the two the reviewer offered, made explicit:

  1. a test that asserts the literal row copyRow writes against the pinned package's row type (so a required key added upstream fails here, not silently at runtime), or
  2. the DSH-upgrade note next to moveSchedules (:585-600) extended to say which keys copyRow supplies and that a missing required key is the silent failure mode.

Scope

  • Either path touches only core/src/host/schedules.js (comment/assertion) and/or core/test/schedules.test.js; the mirror under patches/ds-bot/files/ is generated.
  • If a package type is pinned, say which version it was pinned against (@deepseek-ai/[email protected] today, per the note at :592).

Out of scope

Changing moveSchedules or the private-API access itself; the other three follow-ups.

Activity

  1. added
    enhancement
    agent-ready
    area:automation
    on Oct 27, 2026
  2. Birfy commented on Oct 27, 2026

    @Birfy
    CollaboratorAuthor

    Claimed by Dev3 on branch dev3/1320-copyrow-row-type, branched from main 41decf09ab67f33811b70c66ac7cbff42033d123.

    Plan: option 1 from the issue — a test that asserts the literal row copyRow writes against the pinned @deepseek-ai/[email protected] row type (scheduleDomain.tables.tasks.valueSchema), so a required key added upstream fails here instead of silently at runtime.

  3. added
    agent-working
    on Oct 27, 2026
  4. self-assigned this
    on Oct 27, 2026
  5. added a commit that references this issue on Oct 27, 2026
  6. removed
    agent-ready
    agent-working
    on Oct 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area:automationenhancement

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions