Skip to content

aprender-contracts lint::tests::lint_empty_dir fails on pristine main aa7c6ef03 (report.passed, mod_tests.rs:32), likely env-dependent #4207

Closed

Description

@noahgift

Reported by aprender-48 on 2026-09-24: cargo test -p aprender-contracts --lib lint::tests::lint_empty_dir FAILS on pristine main aa7c6ef on lambda. The assertion report.passed fails at mod_tests.rs:32. Nobody has investigated yet.

Work required:

  • Reproduce it.
  • Find the environment dependence, since CI's workspace-test is green.
  • Make the test hermetic.
  • Show red→green.

Owner: aprender-30.

Activity

  1. added this to the 0.70.0 milestone on Sep 24, 2026
  2. added
    kind:codeWork is a code change (derived rule, #4159)
    on Sep 24, 2026
  3. noahgift commented on Sep 24, 2026

    @noahgift
    MemberAuthor

    PR #4227 (head eb89fd9, judged head b4ef7f3, judged diff sha256 47ce7752…8bae). The cause: run_lint treats contract_dir.parent() as the project root. For a bare tempdir that root is /tmp, and a stray /tmp/scripts/ (present on lambda) makes every duplicate-stem baseline entry stale, which raises PV-DUP-002 and sets passed=false. The fix nests each test corpus as <private tempdir>/contracts. Measured with the stray file planted: main lib 257/1 and cli 362/3; branch 258/0 and 365/0. Quorum round 2 was 3/3 PASS (degraded: same-family, because agy returned 429). The artifact is docs/audits/quorum-PMAT-4207.json and the receipt is docs/audits/impl-PMAT-4207-receipt.md. The PR is not armed; it is waiting for the cop.

  4. modified the milestones: 0.70.0, 0.70.1 on Sep 24, 2026
  5. noahgift commented on Sep 24, 2026

    @noahgift
    MemberAuthor

    Milestone 0.70.0 → 0.70.1 (gate triage). 0.70.0 now holds only the operator's release gate: "FULL ontology spec and all aprender binary working" + "0.70 to crates.io" (ONT-001, every [[bin]] build+smoke, the publish cascade), plus P0s and operator-ruled rows. This issue isn't needed for any of those. Evidence: evidence/m070-gate-triage-1835.md. If that's wrong, move it back to 0.70.0 and say which gate it serves.

  6. noahgift commented on Sep 24, 2026

    @noahgift
    MemberAuthor

    Adopted by pvl-b (cop assign 21:15Z). PMAT-4207-lint-hermetic (12h stale, quorum r2 3/3 PASS; only in open fold #4317, not on batch) is merged onto batch/0.70.0 as GH-4207-lint-hermetic-batch @07c893b50. The roadmap was union-resolved and PMAT-4207 re-sorted; the ids_unique, sorted and completion_is_cited guards pass.

    Cause: the lint tests used a tempdir directly under /tmp as the project root, so a stray /tmp/scripts/contract_duplicate_stem_baseline.txt (present on lambda since 08:41) was read as the project's baseline. CI's runners have no such file, which is why workspace-test is green.

    Red→green, with TMPDIR=/tmp and the stray file present:

    • batch's mod_tests.rs: FAILED, 263/264, lint_empty_dir panics at mod_tests.rs:32.
    • fixed: 264/264.
    • ont6_lint_verdict: 7/7. pvl_zero_contracts: 22/22. fmt is clean.
  7. modified the milestones: 0.70.1, 0.71.0, backlog on Oct 4, 2026
  8. noahgift commented on Oct 12, 2026

    @noahgift
    MemberAuthor

    evidence for close: 989cb01 (#4655), ancestor of main 6bd89b0. Checked at main: lint_empty_dir in crates/aprender-contracts/src/lint/mod_tests.rs:79-91 builds its corpus as tmp.path().join("contracts") (comment cites #4207), so a stray scripts/ dir in the shared temp root no longer reaches it.

  9. noahgift commented on Oct 12, 2026

    @noahgift
    MemberAuthor

    Cop batch close (FLOW-004 drain, ≤43/d): fix verified on main — merged #4655 ; ancestor of origin/main: 989cb01 . Evidence: #4207 (comment)

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

    P2Medium prioritykind:codeWork is a code change (derived rule, #4159)size:MK̂ 3-4 h

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions