Skip to content

[P2][Bug] Post-0.50.1: preserve explicit pytest file selection in portable reviews #480

Open

Description

@djm81

Problem and release decision

Track the remaining P2 finding from release PR #477 for a version after Code Review 0.50.1. The maintainer explicitly deferred this finding in the review thread. The thread is resolved as deferred, not as fixed.

0.50.1 is frozen: do not modify or replace its source, signed bundle, signatures, or registry artifacts for this ticket. This follow-up does not block the agreed 0.50.1 promotion.

Outstanding finding — P2: preserve explicitly selected test files

A selected pytest file such as tests/checks.py is treated as production source when its basename does not match python_files. The selector then either substitutes a conventional matching test or raises project_test_selection_empty. An intended failing test can therefore be omitted from the review evidence.

Expected: preserve explicit pytest test-file selection using native pytest semantics, including filenames outside automatic discovery patterns. Keep ordinary production-source-to-test mapping distinct; do not indiscriminately execute every reviewed Python source file as a test.

Reproduction to turn into a regression

  1. Create a disposable Python project with default pytest filename patterns and tests/checks.py containing def test_selected(): assert False.
  2. Establish the native baseline with python -m pytest tests/checks.py: the explicitly supplied file should be collected and fail.
  3. Select the same test file for a portable capsule review. Verify the target worker receives and executes it rather than reporting project_test_selection_empty.
  4. Repeat with a passing tests/test_checks.py present. The conventional file must not replace or conceal the explicitly selected failing file.
  5. Repeat with custom python_files patterns and a mixed source/test review.

Evidence status: the annotation and current selector branch were inspected on 2026-09-17 (Europe/Berlin). Static inspection supports the finding. These reproduction steps are proposed regression cases, not a claim that an end-to-end capsule reproduction has already run. Confidence: high in the selection mismatch; end-to-end impact remains to be recorded during implementation.

Acceptance criteria

  • Specify explicit test-target semantics separately from automatic source-to-test discovery before implementation.
  • Record failing-before evidence for default/custom filename patterns, no conventional match, competing conventional test, and mixed source/test selection.
  • Preserve explicit test targets and native pytest configuration precedence without silent substitution or omission.
  • Keep source mapping, repository containment, exclusions, and supported selection controls intact.
  • Run the failing explicit-file fixture through the real capsule; prove actual collection, execution, and failing-test evidence. A skipped required analysis must not become PASS.
  • Record passing-after regression and relevant integration evidence, including ordinary conventionally named tests and full discovery.
  • Deliver through a separate reviewed change and a new signed module version using canonical CI publication; leave immutable 0.50.1 artifacts unchanged.

Review triage ledger

Priority PR #477 finding Disposition
P2 Preserve explicitly selected test files Outstanding; deferred to this ticket.
P1 Publish the corrected 0.50.1 bundle Already addressed by merged #479; reviewer confirmed the registry/archive correction in this follow-up. Excluded from new work.
P1 Preserve non-pass pytest outcomes Earlier finding addressed by merged #478 and included in #479 publication. Excluded from new work.
P1 Apply per-source coverage validation Earlier finding addressed by merged #478 and included in #479 publication. Excluded from new work.

Ownership and scope

Activity

  1. self-assigned this
    on Sep 16, 2026
  2. added
    bugSomething isn't working
    moduleSpecfact Module related topic
    codebaseSpecfact codebase related topic
    on Sep 16, 2026
  3. added theissue type on Sep 16, 2026
  4. djm81 commented on Sep 16, 2026

    @djm81
    ContributorAuthor

    Post-release acceptance investigation, recorded 2026-09-17 Europe/Berlin. This is separate from the confirmed explicit pytest-file P2 above; its root cause and priority are not yet established.

    Both release PRs are merged: modules #477 at b3ca3014c8d0e064b860856d4b560a2591999532, core nold-ai/specfact-cli#731 at 5262efb0881e4fac7697d629b0530250342bc656. Module signing and publication workflows passed. 0.50.1 remains frozen.

    Public capsule acceptance run 35158056310 failed on Python 3.11, 3.12 and 3.13 with warm: warm capsule composition identities changed and the equivalent alternate diagnostic. The subsequent external corpus step was skipped; public external-repository acceptance is therefore still outstanding.

    The Python 3.12 artifact 10471173804 independently confirms installed module 0.50.1, signature_verified: true, archive SHA256 61489b8b3e9596082f738d093987fe0427815b2a6148cfae678a996878d117e7. Cold, warm, alternate and targeted clean reviews returned PASS/exit0; the controlled defective review returned FAIL/exit1. The gate reports only the two composition identity mismatches. In that artifact all ten analyzer rows differ between cold and warm only in capsule_identity; warm and alternate share the same identity. This does not yet distinguish a runtime/cache defect from an incorrect acceptance-harness assumption.

    Next investigation: inspect the composed identity inputs and cold/warm cache receipts, reproduce the mismatch with the frozen signed bundle, and establish whether the harness or runtime contract is wrong. Preserve the failed evidence; do not waive the identity check or alter immutable 0.50.1 assets. Any product correction requires a subsequent version. Keep story #473 open for public acceptance and original customer bug #472 open for its independent reproduction.

  5. djm81 commented on Oct 16, 2026

    @djm81
    ContributorAuthor

    Keep this bug open until actual native explicit-test selection is demonstrated. The approved local replacement tracks its default/custom-pattern, nonstandard explicit filename, competing conventional test and mixed-source scenarios in #514. That story is now its native implementation blocker. Planning is not proof of a fix.

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

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingcodebaseSpecfact codebase related topicmoduleSpecfact Module related topic

Type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions