Skip to content

test(kin): add upstream contract tests (TRIG-18) - #25

Merged
GLDRoger merged 4 commits into
kinfrom
kin-trig-18-contract-tests
Nov 7, 2026
Merged

GLDRoger merged 4 commits into
kinfrom
kin-trig-18-contract-tests

Conversation

@GLDRoger

@GLDRoger GLDRoger commented Nov 7, 2026 •

Copy link
Copy Markdown
Owner

Why

  • Stop upstream syncs when the contracts Kin actually consumes drift, including persisted webhook values and delivery visibility at dispatch time.

How

  • Capture KinTriggerSink's exact task/delivery join inside mocked launch; assert that the matching delivery already exists and its receivedAt decodes as CanonicalUtcTimestamp.
  • Keep Kin's positional schedule-member reuse unchanged and explicitly decode interval, fixed_time, and once through members 0–2.
  • Build projections with upstream emptyProjection; minimize nullable delegate-result values (all 18 result fields are required), and remove startup-immediacy and blocked-delivery-log assertions beyond Kin's spec.
  • Run the KIN.md sync check in a subshell. Merge current kin (b60de83) into this branch; no runtime changes beyond that base merge.

Tests

  • (cd apps/server && vp test run kin-contract): 5 files, 12 tests passed.
  • (cd apps/server && TMPDIR=/private/tmp vp test run src/kin): 15 files, 101 tests passed.
  • (cd apps/server && vp run typecheck): passed.
  • TMPDIR=/private/tmp vp run check:changed upstream/main: passed (format, lint, both knip checks, GraphQL, typecheck across 40 packages, and 948 tests across 23 files). The known macOS GitVcsDriverCore failure did not occur.
  • Mutation demo: temporarily persisted thread_mode as continue instead of new_thread in upstream ScheduledTaskService. The dispatch contract failed at the launch-time row-count assertion (expected 1, got 0; exit 1).
  • Mutation demo: temporarily swapped interval and once in upstream ScheduledTaskUpsertSchedule.members. The positional contract failed immediately with SchemaError: Expected "once" (exit 1).
  • Both mutations were reverted, the upstream files have no diff, and the passing focused checks above ran after restoration.
  • Optional span-timeout improvement deferred: no name-independent completion hook was added; the existing named-span milestone remains.

Implemented with GPT-6.1 Sol (medium) through the Codex harness in T3 Code.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 7, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-07T19:25:56.547598Z 1ab08b3 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@github-actions github-actions Bot added the size:L label Nov 7, 2026
GLDRoger and others added 3 commits November 8, 2026 01:08
The contract fixture copied KinTriggerSink's SQL, so a sink change could
leave the tripwire green. Both now call findLaunchDelivery. The
delegate_task pin now covers only childThreadId, the field Kin reads.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@GLDRoger
GLDRoger merged commit 1834dff into kin Nov 7, 2026
22 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant