Repository navigation
Tests: read the live ledger through ledger_records (CI flake); AGENTS.md's worktree gate puts the venv on PATH - #726
Merged
Conversation
…ee gate puts the venv on PATH Five tests parsed ledger.jsonl line by line while the signer appended to it, so a half-written last line failed json.loads (test_capture's test_hooks_disabled_mid_session_detected on py3.12 ubuntu, CI run 42985927432). factories.ledger_records already skips a line that doesn't parse; use it. The worktree gate command ran test-ts with the system python3 (TS tests use $TRACEKIT_PYTHON, else python3 from PATH). Signed-off-by: LoopGlitch26 <53336715+LoopGlitch26@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What and why
tests/test_capture.py::Proxy::test_hooks_disabled_mid_session_detectedfailed on py3.12 ubuntu (#719's run 42985927432) withJSONDecodeError: Unterminated string. Itsevents()parsedledger.jsonlline by line while the signer was still appending, so a half-written last line reachedjson.loads. Four other tests read the live ledger the same way (test_known_gaps.py, and three intest_v02.py).tests/factories.pyalready hasledger_records(home), which reads throughtracekit.ledger.read_recordsand skips a line that doesn't parse. All five now use it. No product code changes.AGENTS.md: the worktree gate command rantest-tswith the systempython3. The TypeScript tests use$TRACEKIT_PYTHON, elsepython3from PATH (sdk/typescript/test/v2.test.mjsL18), so the command now puts the venv first on PATH. Reported by the 11-11 upkeep run.How I ran it
pytest tests/test_capture.py tests/test_known_gaps.py tests/test_v02.py: 86 passed, 2 skipped, 10 xfailed. pyflakes is clean on the three files. The race needs the signer to be mid-write when the test reads, so there's no deterministic reproduction; the fix removes the parse of an unfinished line.