Skip to content

The cron program ships in-tree though it is a third-party program on the public authoring API #9259

Description

@cansirin

Summary

apps/tuval/src/cron/ ships a scheduler program — a row that wakes on a timer, spawns a Claude
session as its job and reports the run — inside the repo that owns the kernel it is written on.
Since #9250 gave @kampus/tuval an exports map, a program written on @kampus/tuval/authoring
no longer needs to live here to be installable. cron is now published outside this repo as
@cansirin/tuval-cron, so the in-tree copy is a second source of the same program.

What I was doing

Reading apps/tuval/src/authoring/index.ts after #9250 landed. Its docblock says the public set was
read off "the two programs in this repo that are written the way a third party writes one" — the
worked pr-review example and ../cron/cron.ts — and then names packages/tuval-cron as the first
outside consumer that found each name by failing to compile without it.

What I observed

Why it matters

The repo that owns an API should not also own the products written on it — the example consumer and
the API cannot be graded against each other when they share a tree, and the default-off row is 700+
lines of test and source a reader has to walk past to reach the kernel. The kernel behaviours cron
drove are the valuable part; they belong to the kernel's own test files, where they are proved
against fixtures rather than against one product's cells.

Pointers

  • apps/tuval/src/cron/cron.ts, cron.unit.test.ts, cron-run.unit.test.ts
  • apps/tuval/src/features.ts — TuvalFeatures.cron, featuresDefault.cron
  • apps/tuval/.tuval/tuval.config.ts — the header comment, features.cron, cronNode, cronJob
  • apps/tuval/src/authoring/index.ts, src/authoring/public-surface.unit.test.ts,
    src/sessions.ts — docblocks that name cron
  • apps/tuval/README.md — "The public API"

Suggested next step

Delete apps/tuval/src/cron/ and its flag, move the kernel proofs its tests carried into the kernel
test files that own those behaviours, and name @cansirin/tuval-cron in the README as the
out-of-tree consumer of the authoring door.

Acceptance criteria

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions