Skip to content

Commit ee029bc

Browse files
jgstern-agentjgstern
authored andcommitted
fix(tests): mock OSError for Gradle test (root in CI) and move changelog entry
- test_unreadable_settings_gradle: use monkeypatch instead of chmod (CI runs as root, bypassing file permissions) - Move "Per-session transcript sync" from Changed to Training data pipeline subsection per user request Signed-off-by: jgstern-agent <josh-agent@iterabloom.com>
1 parent ca2a87f commit ee029bc

3 files changed

Lines changed: 13 additions & 6 deletions

File tree

.ci/affected-tests.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Test selection manifest
2-
# Generated by smart-test at 2026-04-12T04:44:45-04:00
2+
# Generated by smart-test at 2026-04-12T04:55:12-04:00
33
# Mode: targeted
44
# Baseline: 4a043784bfa0467b7ffc73af361527d47e25da31
55
# Changed files: 10

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ This changelog tracks the **tool version** (package releases). The **schema vers
1212

1313
### Changed
1414

15-
- **Per-session transcript sync** (ADR-0018 amendment, INV-filaj): concurrent sessions now write to isolated files keyed by `session_id` instead of racing on shared state. Session-end rotation atomically promotes files into `.last_*`/`.second_to_last_*` slots. Cursor exempted via sibling check; injection-history sidecar tracks playbook events.
1615
- **Stop hook relaxed on CONVERGED bakeoffs** (WI-bibul): guidance now leads with `tracker ready` instead of requiring reflect/aggregate when bakeoff is converged.
1716
- **Bakeoff-deep hub-collision warning** (WI-gapom): `pick_reverse_slice_seeds` warns on seeds with `prod_in_degree > 1000`.
1817
- **`io-boundaries` defaults to production-only** (WI-sifif): test chains excluded by default (was 78% noise). `--include-tests` opts back in.
@@ -65,6 +64,7 @@ This changelog tracks the **tool version** (package releases). The **schema vers
6564

6665
#### Training data pipeline
6766

67+
- **Per-session transcript sync** (ADR-0018 amendment, INV-filaj): concurrent sessions now write to isolated files keyed by `session_id` instead of racing on shared state. Session-end rotation atomically promotes files into `.last_*`/`.second_to_last_*` slots. Cursor exempted via sibling check; injection-history sidecar tracks playbook events.
6868
- **v0 corpus cohort backfill** (WI-gigil): `backfill-training-data-cohort-tags.py` writes a sidecar with per-entry `infra_sha`, `playbook_registry_sha`, `main_llm_presumed`, and playbook counts. Re-runnable, non-destructive.
6969
- **Per-entry cohort metadata** (WI-tatuh / INV-gajap): `log_training_example` now writes `pipeline_version`, `infra_sha`, `playbook_registry_sha`, `main_llm`, `vendor`, `vendor_version`, and `scoring_model` on every entry. Distribution shifts discoverable from the corpus alone.
7070
- **Multi-vendor interjection normalization** (WI-nadud): `filter-transcript.py` emits `normalized_user_interjection` rows for user interjections across Claude Code, Codex CLI, and OpenHands. `pipeline_version` bumped to v2.

packages/hypergumbo-core/tests/test_supply_chain.py

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -644,18 +644,25 @@ def test_malformed_settings_gradle(self, tmp_path):
644644
# Should not crash; may or may not find roots depending on parsing
645645
assert isinstance(roots, set)
646646

647-
def test_unreadable_settings_gradle(self, tmp_path):
647+
def test_unreadable_settings_gradle(self, tmp_path, monkeypatch):
648648
"""Unreadable settings.gradle doesn't crash (OSError path)."""
649649
settings = tmp_path / "settings.gradle"
650650
settings.write_text("include 'core'\n")
651651
(tmp_path / "core").mkdir()
652-
settings.chmod(0o000)
652+
653+
# Mock read_text to raise OSError (chmod doesn't work as root in CI)
654+
original_read_text = Path.read_text
655+
656+
def _raise_on_settings(self, *args, **kwargs):
657+
if self.name.startswith("settings.gradle"):
658+
raise OSError("Permission denied")
659+
return original_read_text(self, *args, **kwargs)
660+
661+
monkeypatch.setattr(Path, "read_text", _raise_on_settings)
653662

654663
roots = detect_package_roots(tmp_path)
655664
# OSError on read → silently skipped, no Gradle roots detected
656665
assert tmp_path / "core" not in roots
657-
# Restore permissions so tmp_path cleanup succeeds
658-
settings.chmod(0o644)
659666

660667
def test_settings_gradle_multiple_include_lines(self, tmp_path):
661668
"""Multiple include lines are all parsed."""

0 commit comments

Comments
 (0)