Skip to content

Umbrella: test-strength, gate-tightening, and code-observatory tracks #1412

Description

@thymikee

Why

Agents now write most code and most tests here. Two consequences drive this effort:

  1. Test strength: agent-written tests are example-based and optimized to pass — we need tests-of-tests (properties, fuzz, mutation score) and deliberately provoked failure modes (races, compat breaks) so weak tests can't hide.
  2. Observatory, not dashboard: we run 24+ CI checks whose signals are scattered. feat(scripts): interactive dependency-graph viewer, with when-to-use guidance #1409 (graph viewer) was closed because a rendered picture drew no conclusions; feat(scripts): dependency-graph report over the layering gate's model #1410 (analysis over the gate's own model) survived. The observatory is therefore agent-queryable data + quiet PR deltas, never a UI.

Design principles for every chunk (the patterns that already work in this repo):

  • Something enumerates N — coverage claims derive from a registry (PUBLIC_COMMANDS, help topics, error codes), never a hand-picked list.
  • Ratchets over absolutes — new metrics start non-gating, then only tighten.
  • Quiet by default — PR surfacing shows only thresholded deltas in one sticky comment (evolve scripts/size-report.mjs, no new bots).
  • Guards explain the fix — every new failure message names the command or file that resolves it.

Descope (2026-07-28)

A scope review split these tracks into two kinds of gate: PR-time, deterministic, self-explanatory failures (they replace the reviewer and make agents productive) and scheduled telemetry someone must read (it consumes the one maintainer). The first kind stays; the second is cut or deferred until a concrete consumer exists. Decisions:

Track A — test strength

Track B — gate tightening

Track C — observatory (descoped 2026-07-28)

Track D — parity + scheduled benches

Worker coordination rules (added after the first PR wave, 2026-08-01)

The first wave (#1436, #1437 merged, #1438, #1439, #1441) validated the direction — real Stryker, real fast-check, real producers, and two real production bugs already found (#1433 excess positionals; the replay quoted-token SyntaxError leak). It also produced one systemic failure worth a standing rule:

  1. One issue per PR. Three PRs each shipped their own parallel implementation of obs: scheduled-lane health, freshness telemetry, and standard artifact envelope #1430's health watcher as a rider (three directory names, two identical workflow filenames, two undisclosed issues: write grants). If your lane needs a sibling issue's deliverable, implement only the minimal interface your lane consumes and link the sibling — never the sibling's feature.
  2. Rebase before building. Two branches were cut minutes before test: property-based testing foundation (fast-check) over parse/print and geometry kernels #1437 merged and duplicated its fast-check foundation (parallel PRNGs/hazard lists, lost shrinking). Workers start from current main and reuse src/__tests__/test-utils/property-arbitraries.ts and scripts/lib/lane-envelope.ts.
  3. CI-scope changes are decisions, not side effects. Anything that adds work to the PR gate (a fast sweep, a path-triggered mutation run) is disclosed in the PR body with its measured cost.
  4. Subprocess-spawning tests go in the subprocess-stub project. Never unit-core.

Track E — gate integrity (added from external review, 2026-07-27; narrowed 2026-07-28)

The original tracks assumed the gates keep running. Nothing proved it — the most dangerous failure mode is a perfectly designed gate that silently stops running (verified instances: CHECK_CATALOG.ciJobs are unchecked manual strings; ci.yml ignores website/**, unreachable for the docs gate as first scoped).

The remaining platform manifests (macOS, web, Linux, tvOS, visionOS) are tracked as checkboxes on #1426 rather than as stub issues.

Architecture direction (written down)

The rule → gate → ledger mapping behind these tracks lives in CONTEXT.md § "Principles and their gates" (#1428): Dependency Rule → layering R1–R3/spine + the R6 TYPE_INVERSION_BASELINE ratchet (long-term target: zero), acyclicity → R4 + depgraph's tolerated-cycle report, policy×detail → the two registries + leak guard + transport seam, information hiding → R7, and the boundaries-are-earned norm (#1409 evidence). Component metrics (instability/abstractness/main-sequence per zone) were headed for #1423 as observatory data; with the descope they stay out until a consumer exists, and must never become CI thresholds. Standing direction alongside these tracks: shrink R6, then the deferred client-types narrowing and legacy alias drops (CONTEXT.md § Deferred).

Sequencing notes

(2026-07-28: entries referencing descoped issues — the #1423#1424#1425 chain and "#1430 before the scheduled lanes" — no longer apply.)

Pointers: docs/agents/testing.md (gate matrix + traps), scripts/check-affected/ (gate router), scripts/layering/ (R1–R8 + ratchets), scripts/depgraph/ (#1410), test/integration/ios-simulator-e2e/coverage-manifest.ts (#1408), scripts/help-conformance-*.mjs + scripts/tests/ (renderer-pinned bench gates, #1411).

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions