Repository navigation
Commit ff072aa
fix(tests): pin session id in the three session-filtered job-listing tests
`status` and `result` without an explicit job id filter the job list down to
the current Claude session (filterJobsForCurrentSession, job-control.mjs:22).
That filter is a no-op only when CODEX_COMPANION_SESSION_ID is unset.
Three tests wrote fixture jobs with no `sessionId` and invoked run() with no
`env`, so the child inherited whatever the host exported. In CI and a bare
shell the variable is unset, the filter is a no-op, and they pass. Inside a
Claude Code session the host exports a real session id, every fixture job is
filtered away, and all three fail:
✖ status shows phases, hints, and the latest finished job
✖ status preserves adversarial review kind labels
✖ result returns the stored output for the latest finished job by default
AssertionError: No finished Codex jobs found for this repository yet.
These were previously described as pre-existing flakes. They are not flaky —
they are deterministic given the ambient environment.
Fix follows the pattern already used by "status without a job id only shows
jobs from the current Claude session" (runtime.test.mjs:1703): pin
sessionId: "sess-current" on the fixture jobs and pass a matching
CODEX_COMPANION_SESSION_ID to the child. Production code is untouched.
Scrubbing the variable in helpers.mjs run() was tried first and rejected: it
makes the filter a no-op, so the listing then includes unrelated jobs and
breaks four other tests that rely on the filtering being active (status
--wait, both cancel tests, the stop-hook gate test).
Full suite is now 95/95 with the variable exported, where it was 92/95 before.
Refs #43
Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01FQBJirbWNKWhnpFUnWogB81 parent 3aad7f0 commit ff072aa
1 file changed
Lines changed: 30 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1651 | 1651 | | |
1652 | 1652 | | |
1653 | 1653 | | |
| 1654 | + | |
1654 | 1655 | | |
1655 | 1656 | | |
1656 | 1657 | | |
| |||
1662 | 1663 | | |
1663 | 1664 | | |
1664 | 1665 | | |
| 1666 | + | |
1665 | 1667 | | |
1666 | 1668 | | |
1667 | 1669 | | |
| |||
1677 | 1679 | | |
1678 | 1680 | | |
1679 | 1681 | | |
| 1682 | + | |
| 1683 | + | |
| 1684 | + | |
1680 | 1685 | | |
1681 | | - | |
| 1686 | + | |
| 1687 | + | |
| 1688 | + | |
| 1689 | + | |
| 1690 | + | |
1682 | 1691 | | |
1683 | 1692 | | |
1684 | 1693 | | |
| |||
1794 | 1803 | | |
1795 | 1804 | | |
1796 | 1805 | | |
| 1806 | + | |
1797 | 1807 | | |
1798 | 1808 | | |
1799 | 1809 | | |
| |||
1806 | 1816 | | |
1807 | 1817 | | |
1808 | 1818 | | |
| 1819 | + | |
1809 | 1820 | | |
1810 | 1821 | | |
1811 | 1822 | | |
| |||
1821 | 1832 | | |
1822 | 1833 | | |
1823 | 1834 | | |
| 1835 | + | |
| 1836 | + | |
1824 | 1837 | | |
1825 | | - | |
| 1838 | + | |
| 1839 | + | |
| 1840 | + | |
| 1841 | + | |
| 1842 | + | |
1826 | 1843 | | |
1827 | 1844 | | |
1828 | 1845 | | |
| |||
1992 | 2009 | | |
1993 | 2010 | | |
1994 | 2011 | | |
| 2012 | + | |
1995 | 2013 | | |
1996 | 2014 | | |
1997 | 2015 | | |
| |||
2005 | 2023 | | |
2006 | 2024 | | |
2007 | 2025 | | |
| 2026 | + | |
| 2027 | + | |
| 2028 | + | |
| 2029 | + | |
| 2030 | + | |
2008 | 2031 | | |
2009 | | - | |
| 2032 | + | |
| 2033 | + | |
| 2034 | + | |
| 2035 | + | |
| 2036 | + | |
2010 | 2037 | | |
2011 | 2038 | | |
2012 | 2039 | | |
| |||
0 commit comments