Keep generated orientation briefs local without Git writeback
Assistant: codex Assistant-Model: gpt-6-astra Assistant-Session: 01a15374-f59f-7a31-86d2-d23b5d2ed181
This commit is contained in:
parent
eac38b76ca
commit
39b51a21a5
8 changed files with 23 additions and 68 deletions
|
|
@ -18,9 +18,9 @@ def test_render_does_not_commit_and_timestamp_only_retry_is_unchanged(tmp_path,
|
|||
monkeypatch.setattr(owner, '_api_get', responses)
|
||||
commit = Mock(side_effect=AssertionError('Git operations forbidden'))
|
||||
monkeypatch.setattr(owner, '_git_commit_writeback', commit)
|
||||
assert owner._write_custodian_brief('unused', 'demo', str(tmp_path), commit=False, strict=True)
|
||||
assert owner._write_custodian_brief('unused', 'demo', str(tmp_path), strict=True)
|
||||
before = (tmp_path / '.custodian-brief.md').read_bytes()
|
||||
assert not owner._write_custodian_brief('unused', 'demo', str(tmp_path), commit=False, strict=True)
|
||||
assert not owner._write_custodian_brief('unused', 'demo', str(tmp_path), strict=True)
|
||||
assert (tmp_path / '.custodian-brief.md').read_bytes() == before
|
||||
commit.assert_not_called()
|
||||
|
||||
|
|
@ -37,7 +37,7 @@ def test_partial_snapshot_preserves_existing_brief(tmp_path, monkeypatch, failed
|
|||
monkeypatch.setattr(owner, '_api_get', read)
|
||||
path = tmp_path / '.custodian-brief.md'; path.write_text('preserved')
|
||||
with pytest.raises(ValueError, match='unavailable or malformed'):
|
||||
owner._write_custodian_brief('unused', 'demo', str(tmp_path), commit=False, strict=True)
|
||||
owner._write_custodian_brief('unused', 'demo', str(tmp_path), strict=True)
|
||||
assert path.read_text() == 'preserved'
|
||||
|
||||
|
||||
|
|
@ -45,5 +45,5 @@ def test_check_has_no_write(tmp_path, monkeypatch):
|
|||
monkeypatch.setattr(owner, '_api_get', responses)
|
||||
path = tmp_path / '.custodian-brief.md'; path.write_text('preserved')
|
||||
with pytest.raises(ValueError, match='differs'):
|
||||
owner._write_custodian_brief('unused', 'demo', str(tmp_path), commit=False, strict=True, check=True)
|
||||
owner._write_custodian_brief('unused', 'demo', str(tmp_path), strict=True, check=True)
|
||||
assert path.read_text() == 'preserved'
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue