Run pytest targets in the diff-test gate #1625
Labels
No labels
P0
P1
P2
P3
bug
category/code-change
category/cross-repo
category/eval-run
category/investigation
category/no-test-target
category/owner-ruling
category/prose-artifact
category/recurring-chore
category/structure
category/umbrella
crc-refactor
create
delete
enhancement
filed-by/agent
filed-by/user
frozen
lint-rule
needs-info
needs-triage
next
plugin/cc-architect
plugin/os
plugin/os-adr
plugin/os-aidd-lint
plugin/os-backlog
plugin/os-context
plugin/os-doc-hygiene
plugin/os-sdlc
plugin/os-vault
project/cc-os
ready-for-agent
ready-for-human
recurring
review
rule-proposal
update
waiting
wayfinder:grilling
wayfinder:map
wayfinder:map
wayfinder:research
wayfinder:task
wayfinder:task
wontfix
worklist/deviations
worklist/lint-rule
worklist/new-implement-build
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
jared/cc-os#1625
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
The diff-test gate cannot run a pytest target.
Suite::DiffPlan#test_pathskeeps only.rbpaths, so a Python target gets a nil command. The gate then exits 0 and classifiesunexpected_pass, even when every new test fails. No ticket on os-vault, os-context, or os-doc-hygiene can pass the red round. #1578, #1571, #1568, and #1570 are os-vault tickets that wait next in order.Three causes hold the defect together, and the fix must remove all three:
Suite::DiffPlanbuilds a command for.rbtests only. For a.pycode change with no test change, the widen-to-suite path also does not fire, becauseChanges#unmapped_code_pathskeeps only Ruby files.SuiteOutput#summaryreads only the Minitest summary line. Pytest prints1 failed, 2 passed in 0.1s, so the summary is nil.StepOutcome#classify(step_outcome.rb:27-48) then returns:brokenfor a correct red run and:failedfor a nonzero green run.Unchanged::MeasurementandLint::GreenAssertalso readSuiteOutput.Gate::StepRun(step_run.rb:18) returns exit 0 for a nil command, so a missing test command counts as a successful run. A gate that runs no test must not pass.Takedown run 1625-20261106-152708 fixed cause 1 only, and its grade was
cause_remains.Observed
Run 245 on #1576 escalated with
unexpected_pass:test-writer/diff-test. The step output was empty.Reproduce
Open any implementation on
--target os-vault, add one failing pytest file, and runos-sdlc-gatefor the test-writer dispatch.Origin
path.end_with?(".rb")in diff_plan.rb:45 ← DESIGN (DiffPlan builds aruby -Icommand only)VERDICT: CREATE
/os-backlog:ticket-decompose routed this to /os-sdlc:ticket-takedown.
a. One change:
SuiteOutputreads the target's test framework and returns the sameSummaryfor pytest output.Suite::DiffPlanthen buildspytest -q <paths>for.pytests.b. Owner:
SuiteOutputowns the summary, andStepOutcome#classifyasks it (step_outcome.rb:27-48). New object: a pytest summary parser. Its secret is the pytest summary line (1 failed, 2 passed in 0.1s).DiffPlanowns the command.Evidence from the probe:
SUPPORTED_TEST_FRAMEWORKS(lint/base_assert.rb:6) is not on the os-sdlc-gate path. It affects fix-lints only.SuiteOutput#summaryis nil. A nonzero green run gives :failed.Changes#unmapped_code_pathskeeps only Ruby files, so widen-to-suite never fires for a.pycode change. In the green round diff-test passes with no test run.lintandtest-linthave nil commands on a Python-only diff, so they pass with nothing checked.StepOutcome.Facts#round_testsandtest_changes(dispatch/brief/facts.rb:80-100),GoalpostCheck::FILE_TOKEN(goalpost_check.rb:6), andagents/test-writer.md.This ticket covers the test-gate part of #1554. #1578, #1571, #1568, #1570, and #1577 wait on it.
Parked by the orchestrator on 2026-11-06. The os-vault Python code is due for the Ruby port (#1527), so pytest support in the gates would lose its value when the port ships. Takedown designs are not implemented. Python os-vault tickets are finished by hand with tests and one audit until then.