land-ts-mono

Coordinates cross-repo PR landing for ts-mono submodule changes in inspect_ai.

2.7k|685|Updated Nov 14, 2023
One-click install
npx skills add https://github.com/UKGovernmentBEIS/inspect_ai --skill land-ts-mono
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: land-ts-mono
Source: https://github.com/UKGovernmentBEIS/inspect_ai/tree/main/.claude/skills/land-ts-mono
Command: npx skills add https://github.com/UKGovernmentBEIS/inspect_ai --skill land-ts-mono

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Landing a change in inspect_ai that requires a matching change in the ts-mono submodule involves a fragile cross-repo dance: a ts-mono PR, a gitlink bump, regenerated OpenAPI/TypeScript artifacts, and a strict merge order. This Skill guides an agent through that two-phase landing procedure so CI gates like check-schema-and-types and submodule-on-main pass without blocking other contributors.

Core Features & Use Cases

  • State assessment and resumption: Detects where an in-flight landing stands (no branch, stale regeneration, open PRs, merged ts-mono) and enters the procedure at the right step.
  • Regeneration workflow: Runs the schema/type regeneration command, syncs the sibling inspect_scout consumer's duplicated types when structural changes break it, and validates with pnpm typecheck and tests.
  • Two-phase merge orchestration: Opens cross-linked PRs with a branch-pinned gitlink, waits for provisional approval, then coordinates the ts-mono merge, gitlink re-bump, dist rebuild, and auto-merge of the main PR.
  • Use Case: A Python model change to EvalLog causes the check-schema-and-types CI job to fail; the Skill regenerates the OpenAPI spec and TypeScript types, opens the paired ts-mono PR, and lands both PRs in the correct order.

Quick Start

Use the land-ts-mono skill to land my PR whose check-schema-and-types CI job is failing after I changed a Python model.

Frequently Asked Questions about land-ts-mono

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I land a PR that requires a ts-mono submodule change?

Create a ts-mono branch from origin/main, regenerate the OpenAPI spec and TypeScript types, open a ts-mono PR, and bump the gitlink in the inspect_ai PR pointing at the branch head. Once both PRs are green except submodule-on-main and approved, merge ts-mono first, then re-bump the gitlink to the merged SHA and enable auto-merge.

Why is the check-schema-and-types CI job failing on my PR?

The job fails when the checked-in inspect-openapi.json or the submodule's generated.ts no longer matches the Python source models. Regenerate by running python src/inspect_ai/_view/schema.py from the repo root with pnpm install completed in the submodule; docstring-only drift is tolerated.

What does the submodule-on-main CI failure mean?

It means the gitlink SHA is not reachable from ts-mono main, which is expected during phase one of a coordinated landing. It clears after the ts-mono PR merges and the gitlink is re-bumped to the merged main commit.

When do I need to sync the inspect_scout sibling types?

Sync is needed when a change breaks a strict TypeScript consumer: widening an enum or literal union, adding a required field, or renaming, removing, or retyping a field. Adding an optional field or a new type requires no action.

How do I resolve a submodule gitlink conflict after main moves?

Merge origin/main into your branch, verify main's new gitlink pointer is an ancestor of your ts-mono branch head with git merge-base --is-ancestor, then keep your pointer and push. If it is not an ancestor, merge ts-mono origin/main into your ts-mono branch first.

Can I enable auto-merge on the ts-mono PR?

No. The ts-mono merge is a deliberate human-timed action that opens the blocking window where ts-mono main depends on unmerged Python changes. Auto-merge should only be enabled on the inspect_ai PR after ts-mono has merged.