Skip to content

feat(sdk): add CheckContext.repoRoot for zoned runs (TV2.3) - #26

Merged
yan-vidal merged 1 commit into
mainfrom
task/TV2.3-checkcontext-reporoot
Jun 18, 2026
Merged

feat(sdk): add CheckContext.repoRoot for zoned runs (TV2.3)#26
yan-vidal merged 1 commit into
mainfrom
task/TV2.3-checkcontext-reporoot

Conversation

@yan-vidal

Copy link
Copy Markdown
Contributor

TV2.3 — SDK `CheckContext.repoRoot`

Additive SDK field that unblocks Phase V2 per-zone execution (TV2.2) and the Phase V3 cross-language proof (`check-clippy`, TV3.2). First step of the v2 multi-language work toward running Sentiness on non-JS projects (e.g. Rust).

Change

  • `CheckContext` now carries `readonly repoRoot: string` alongside `cwd`:
    • `cwd` is the zone root (per-zone in a polyglot monorepo).
    • `repoRoot` is the repository root for the rare check that needs repo-level context.
  • Single-zone today, so the runner and `doctor` set `repoRoot = cwd`. TV2.2 will set `cwd = zone.absRoot` while keeping `repoRoot` at the repo root.
  • All check `makeContext` test helpers mirror it (`repoRoot = cwd`), so existing suites pass unchanged.

Scope

Strictly additive (OCP). No behavior change for single-zone projects — it only threads a new field that future zoned execution will populate differently.

Validation

  • `pnpm -r typecheck` ✅
  • `pnpm -r test` ✅ (core 209, SDK 13 incl. the new `repoRoot` type test, all checks + cli)
  • `pnpm lint` ✅ (219 files)
  • `pnpm build` ✅
  • Dogfood `pnpm sentiness check --tier=fast` → `status: ok`, non-blocking

Deviations from spec

The TV2.3 spec mentions updating a shared `_test-utils` `makeContext`; in practice each check test owns a local `makeContext` helper (no shared one exists), so each was updated individually. End state is equivalent.

Additive SDK field that unblocks per-zone execution (TV2.2) and the
cross-language proof check-clippy (TV3.2). cwd is the zone root; repoRoot
is the repository root for checks that need repo-level context. Single-zone
today, so the runner and doctor set repoRoot = cwd. All check makeContext
test helpers mirror it (repoRoot = cwd) so existing suites pass unchanged.
@yan-vidal
yan-vidal merged commit 9b15d1c into main Jun 18, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant