Skip to content

[CI]: main is red — kernel-contracts mypy (3834 errors) and 6 Python shards; PR shards needs-gated so no PR gets a complete suite #9586

Backlog

Description

@BigDataDZ

Summary

main (811c1a1f6) is red in two independent ways, and together they mean no pull request on current main can obtain a complete Python suite result:

  1. kernel-contracts fails on main itself: 3,834 mypy errors across 395 files (python -m mypy --platform linux locally reproduces exactly 3,834 on pristine main).
  2. The six test-shard jobs on main's own push run fail: 17 failing assertions across ~13 distinct tests (counts below).
  3. The workflow gates test-shard and windows-powershell behind kernel-contracts (needs: in python-tests.yml), so on every pull request those jobs are skipped. Reviews and merges are currently proceeding with zero suite signal — PR-side shards have been skipped continuously for days (e.g. Suppress Windows console windows for console-subsystem children (#9430) #9435, test(quota): gate the capture-failure case on private capture support #9559, fix(agy): pin UTF-8 on the release-root probe subprocess #9584, fix(runtime): reject hard-linked JSONL append targets #9579, and others observed over 11-21 → 11-29).

Concrete fallout already observed: two of my reviews were completed without any suite result, and in one case (#9304) the PR merged before I noticed the shards had never run. This issue exists so that gap is visible to everyone instead of being rediscovered per review.

Evidence (main tip 811c1a1f6, push-event run)

kernel-contracts: Found 3834 errors in 395 files, step "Type-check kernel contracts", exit 1. The error mass comes from the zero-Any/modularization wave currently in flight (dozens of open refactor PRs each reducing Any in separate modules) plus newly added code that does not yet satisfy strict mode.

Python shards (each caps at the ~54-minute session deadline; per-shard results below are what completed):

Shard Result Distinct failures
1 5 failed / 6940 passed checkpoint provider fence (exact-source goal instance); quota authority settlement journey [file]; stride comparison followthrough [writeback-result-sqlite]; work yardstick receipt reentry [False-sqlite]; steward generic monitor todo
2 1 failed / 4275 passed stride comparison followthrough [manual-measurement-file]
3 7 failed / 6311 passed connected adapter status vocabulary owner; research execution loop sampled memory; stride comparison followthrough [writeback-result-file]; work yardstick receipt reentry [False-file]; host harness capabilities lookup; delegation turn context [64000-sqlite]; dashboard command stale recorded python
4 2 failed / 6046 passed long-chain projected closeout [grow-paged]; quota authority settlement journey [sqlite]
5 2 failed / 3670 passed integration branch legacy git bare record; long-chain projected closeout [switch-paged]
6 0 failed / 3787 passed (deadline hit before coverage completed)

~13 distinct failing tests total. Several of them (stride comparison followthrough, long-chain projected closeout, work yardstick, connected adapter vocabulary owner) are visible in main's own CI across multiple days, not a single-run flake cluster.

Impact

  • Pull-request authors, reviewers and merges have no suite evidence at all on current main; the red kernel-contracts also cascades into the checks and merge-gate jobs, so every PR shows three red checks unrelated to its diff.
  • Reviewers cannot distinguish "PR broke something" from "main was already red" without a local baseline run per review — which is not repeatable for hosted CI.

Suggested directions (maintainer's call)

  1. Land or coordinate the zero-Any wave to drive kernel-contracts back to green on main; until then, the strictly-typed surface keeps regressing under new features (the wave and new features are interleaving into the same 3,834-error mass).
  2. Triage the ~13 distinct shard failures on main — several look platform- or environment-shaped (dashboard launcher, integration-branch legacy git, delegation turn context), others look like real regressions (quota authority settlement journey, checkpoint provider fence).
  3. Consider un-gating the shards from kernel-contracts (or making the gate non-blocking temporarily) so PRs get suite results again while item 1 is in progress. The current gating means the suite signal is zero exactly when main is least stable.
  4. Shard deadline tuning: 5–6 of 6 shards hit the ~54-minute cap; coverage per run is also incomplete on main itself.

Scope and qualification

Activity

  1. LIHUA919 commented on Nov 29, 2026

    @LIHUA919
    Contributor

    Cross-referencing #9567, which I filed earlier today with the same core finding (kernel-contracts red on main → PR-side test-shard/windows-powershell skipped) — this report is the more complete one, so this issue should be the canonical thread; the two data points mine adds:

    • Regression window, bounded by run records: the last kernel-contracts success I can find is pull-request run 45609043562 (2026-11-25, head 83bbed022 on base b34f0e615); the first observed failure is main run on 509360fb0 at 2026-11-27T16:34Z. So the 3834-error state arrived somewhere in b34f0e615..509360fb0 (I did not bisect it).
    • Main runs after 2026-11-27 that look "not failed" in the list view were mostly concurrency-cancelled before the job started — worth checking kernel-contracts's own conclusion per run rather than the run-level conclusion when triaging.

    Also for the record: PR #9435's review thread hit exactly the gap this issue describes — the reviewer initially withheld approval over "no complete suite result on this head" and ultimately ruled (with the same reasoning as this report) that no PR on current main can produce one, approving on local parity evidence instead (#9435 (review)).

  2. gcl-coder commented on Nov 30, 2026

    @gcl-coder
    Contributor

    Partial triage of the ~13 distinct shard failures — one root-cause cluster, one environment gate, and a reproduction caveat

    I ran the failing modules against pristine 811c1a1f6. The useful result is a
    positive identification for one cluster; the rest cannot be attributed from this
    machine, and the reason is worth recording so the next person does not repeat it.

    0. Reproduction caveat (read this first)

    My local run is not a faithful replica of test-shard:

    local CI (test-shard)
    OS macOS ubuntu-latest
    Python 3.14 3.11
    Node 23.11 24
    SQLite (bundled) 3.49.1 (Node 24 driver)

    Two consequences, both measured:

    1. Every [sqlite] variant fails locally for an environment reason. The run
      stops at tests/control_plane/canonical_authority_fixture.py:160 with
      SQLite authority runtime is not qualified (SQLite 3.49.1 ...), raised from
      loopx/control_plane/coordination/local_authority_provider.ts:293. That is
      the documented gate, not the CI failure. 90 such blocks across my four
      batches.
    2. Extra failures appear locally that CI does not report (work-yardstick,
      delegation-turn-context, dashboard-launch, quota-journey [file]). With
      Python 3.14 these are unverified; they may be 3.14/macOS artifacts.

    So: I can only assert a failure is a main regression where it reproduces on a
    non-sqlite provider and appears in CI's own list. Everything else below is
    labelled accordingly.

    1. Identified cluster: the stride result-page replay guard

    Two of the three stride variants CI reports ([manual-measurement-file],
    [writeback-result-file]) fail identically here, on the file provider:

    tests/control_plane/test_stride_comparison_followthrough_cli.py:229
      assert "exact scoped result" in refused["error"]
    
    Actual: "Explore task result pages require current source replay; reread
             scoped pages under the original Turn."
    
    Expected path: "Selected candidate requires the current Todo's explicit link to
             the exact scoped result; reread changed sources."
    

    Both strings are in loopx/control_plane/work_items/stride_policy.ts:

    • :370 is the message actually returned,
    • :380 is the message the test expects.

    The guard at :364-371 walks each declared explore.result_pages entry and
    requires it to resolve against context.explore_result_pages:

    const deliveredPages = Array.isArray(context.explore_result_pages) ? ... : [];
    for (const page of (explore.result_pages ?? []) as JsonObject[]) {
      const resolved = deliveredPages.find(row => row.revision === page.revision &&
        row.offset === page.offset && row.limit === page.limit && row.todo_id === page.todo_id);
      if (!resolved || ...) return "…require current source replay…";   // :370

    context.explore_result_pages is populated in one place:

    // loopx/control_plane/work_items/replan_context.ts:778
    if (source.review_pages !== undefined) context.explore_result_pages = source.review_pages;

    So the page the caller submits is not resolving against the delivered set.
    Either review_pages is no longer reaching the context, or the identity
    comparison (revision/offset/limit/todo_id) no longer matches what the
    delivery records. Because the earlier guard returns, the deeper check at :380
    (the one the test is actually about) is unreachable — which is why the assertion
    fails rather than passing on a different message.

    [writeback-result-sqlite] cannot be tested here (environment gate above), but
    its [file] twin failing makes it likely the same cause rather than a
    provider-specific one.

    This also plausibly covers test_long_chain_projected_closeout[grow-paged] and
    [switch-paged], which abort on explore turn-context exiting 1
    (subprocess.CalledProcessError around
    --result-offset 3 --result-limit 3 --result-revision 2887c7d6…). I did not get
    the CLI's stderr out of the CalledProcessError, so treat that link as a
    hypothesis, not a finding.

    2. Reproduces here, non-sqlite, but not yet root-caused

    • test_connected_adapter_status_vocabulary_owner::test_the_owner_is_not_a_registered_vocabulary_owner
    • test_quota_authority_settlement_journey::test_original_turn_refuses_readiness_from_a_replacement_lease[file]
    • test_work_yardstick_cli::test_receipt_reentry_keeps_the_selected_work_outside_the_global_context_window[False-file]
    • test_dashboard_command—five launch/resolution tests; CI reports only the
      "stale recorded python" one, so the other four are probably local artifacts.

    3. Reported by CI, passes here — needs the CI environment or ordering

    • host_harness_capabilities lookup
    • research_execution_loop "sampled memory" (its [sqlite] sibling failed
      locally on the environment gate, the sampled-memory case itself passed)
    • checkpoint_provider_fence "exact-source goal instance" — locally it dies on
      the SQLite gate, so unconfirmed either way

    4. What would finish this triage

    • A run on Python 3.11 + Node 24, which removes both confounders and lets
      the [sqlite] variants be judged at all.
    • The python-diagnostics-*/longest_cases artifact (401 for me) or the shard
      stderr, to see the exact failure text CI recorded for each of the 13.
    • With those, the stride cluster above can be turned into a fix candidate
      directly: decide whether the delivery should be populating review_pages
      (replan_context.ts:778) or whether :364-371 should compare a looser
      identity than the four-field equality it uses now.

    I have not attempted a change; this is characterisation only, and section 1 is
    the only claim I would defend as a main regression right now.

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions