Skip to content

fix(gate): cache host Dylint in a separate local lane - #3894

Closed
zackees wants to merge 3 commits into
masterfrom
fix/dylint-lane-3892
Closed

zackees wants to merge 3 commits into
masterfrom
fix/dylint-lane-3892

Conversation

@zackees

@zackees zackees commented Nov 7, 2026 •

Copy link
Copy Markdown
Member

Refs #3892.

Source-only edits currently rerun host and cross Dylint inside the source-sensitive local lint lanes. This changes only local-gate.toml: host Dylint has its own exact keep list, cross Dylint is an optional lane activated by OBS_GATE_DYLINT_CROSS=1, and the other local lanes compose the existing checks without Dylint. No Rust or workflow files change. The pinned schema has no default field, so the optional lane exits 75 unless explicitly selected through its recorded environment input.

The shared config launcher gives the composed local commands a common prefix. The native command arrays remain unchanged because ci/test_native_lanes.py explicitly requires them; this leaves two GATE-007 prefix findings that cannot be reconciled with that test solely through this TOML edit. The full command retains the existing runner as its fallback. Attestation coverage includes the newly separated checks, so Clippy alone cannot attest Dylint. There is no TOML generator for this file (ci.toml explicitly generates no YAML).

Targets remain covered:

  • Host: local dylint by default; unchanged CI rust-tests-linux/--lane lint also runs host Dylint.
  • x86_64-pc-windows-msvc and aarch64-apple-darwin: local opt-in dylint-cross; unchanged build-project.yaml:rust-cross-lint matrix runs uv run --no-project ci/local_gate.py --lane cross --cross-target ${{ matrix.target }}.
  • x86_64-apple-darwin: local opt-in dylint-cross; unchanged build-project.yaml:rust-cross-lint-release runs uv run --no-project ci/local_gate.py --lane cross-release.
  • aarch64-pc-windows-msvc and aarch64-unknown-linux-gnu: unchanged release cross job, as before.
  • Local cross retains the current PR target set, Clippy flags and test links. Apple x64 is already a release target on master, despite the old TOML comment.

Validation (draft; no claim that the full gate passes):

  • The pinned CLI has no plan command. Its actual lane_inputs API, with a synthetic source-only change to rust/obs-core/src/lib.rs, reports dylint unchanged, dylint-cross unchanged, and source-sensitive lanes selected: “Source-only change: no Dylint lane selected; default local Dylint runs in exactly one lane: dylint.” The explicit keep list has exactly the three requested entries; the framework also adds mandatory declaration/toolchain inputs (14 total inputs on this tree).
  • Two consecutive final-tree invocations of the pinned ci-lint local-gate run --no-stamp completed without any intervening tree change:
    local-gate: lane dylint: passed in 1s
    local-gate run: FAILED after 199s (dylint:run,dylint-cross:n/a)
    local-gate: lane dylint: reused (inputs unchanged since a pass 0.0 h ago that took 1s; key 8a6a8125628a, 14 inputs)
    local-gate run: FAILED after 219s (dylint:reused@8a6a8125628a,dylint-cross:n/a)
    
    The Dylint lane cache engaged. Neither full gate passed. Both lint runs failed in unchanged test_ci_tests_stdlib_only.py and test_qt_fastpath.py: the host's default Python 3.13 lacks the Python 3.14 stdlib compression.zstd. The first run also met the stale container from an interrupted initial attempt. After the second lint failure, its remaining Tier 2 container was explicitly stopped (exit 137); no containers were left running and no configuration checks were removed. Other host lanes were not run after the heavy-lane failure. The first Dylint command itself reused soldr's verdict; the second was skipped by the independent ci-lint lane cache.
  • ci-lint selftest against the exact pinned source: 1,332 tests, OK (skipped=2). The wheel itself omits test fixtures and fails with FileNotFoundError: missing fixture BIN-001/red; extracting the exact pinned GitHub archive and setting PYTHONPATH supplies those unmodified fixtures.
  • Module-form selftest: 1,332 tests, OK (skipped=2) in 237.104s with UV_PYTHON=3.14 PYTHONPATH=<exact-pinned-source> uv run --no-project --with pyyaml python -m ci_lint selftest. PyYAML is a declared package dependency. The command-form source selftest took 412.295s. Earlier attempts exposed missing wheel fixtures, one overlap timing flake under concurrent tests, and the fallback YAML parser's inability to run the full suite without PyYAML; only the final complete green runs are claimed as passes.
  • Focused repository checks: uv run --no-project ci/test_native_lanes.py 7 tests OK; uv run --no-project ci/test_uv_run.py 5 tests OK; TOML parse and git diff --check pass.
  • Static local-gate lint: 95 violations / 1 other finding, including the two native-command prefix conflicts described above and unrelated existing mirror/trust findings. No validation rules were disabled. Hosted checks have not been reported on this draft.

The original-tree RED evidence is the absence of a dedicated Dylint lane (local-gate lanes lists only lint, rust-test, cross, tier2-linux and native lanes). The config commits add that separation. No runtime/product behavior changes; Rust test tiers are not applicable to this config-only change.

Do not merge: the user explicitly requested an unmerged PR.

@zackees

zackees commented Nov 7, 2026

Copy link
Copy Markdown
Member Author

Closing as superseded — it proves the caching goal (run 2 reported dylint:reused@8a6a8125628a, which is the acceptance criterion) but implements it the wrong way: it rewrites every lane's run into an inline python -c one-liner containing multi-line Python, and rewrites [gate] run itself (+71/−10 in one file). That moves lane logic out of ci/local_gate.py and into TOML, which is exactly the declared-not-scripted rule this repo runs on.

The right shape is a real lane in Python plus a five-line TOML entry:

[gate.lanes.dylint]
run = ["uv", "run", "ci/local_gate.py", "--lane", "dylint"]
tools = ["soldr"]
exclude = ["**"]
keep = ["dylints/**", "rust-toolchain.toml", "Cargo.lock"]

with lane_dylint added to LANES and removed from lane_lint, and CI given --lane dylint so no target loses coverage. Replacing it with that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant