fix(fase3): stamp real proposer model into provenance, kill fake-model leak (F1)

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019any9zfGNNwWJPX5Zq2QRz
This commit is contained in:
Kjell Tore Guttormsen 2026-06-26 15:03:45 +02:00
commit e0f93dfa7b
2 changed files with 28 additions and 2 deletions

View file

@ -41,6 +41,24 @@ async def test_a_valid_proposal_end_to_end(docs_dir, make_client_factory, fresh_
assert stamp.token_usage > 0 # sourced from the synthetic UsageDetails
async def test_a1_provenance_stamps_injected_client_model_not_sentinel(
docs_dir, make_client_factory, fresh_store
) -> None:
"""F1 regression: an injected client_factory must stamp the injected client's REAL model
(SyntheticUsageChatClient.model == 'synthetic'), never the 'fake-model' literal the leak
falsified provenance on the public deployer seam (run.py:197)."""
result = await run_project(
"FV42-GSV-E1",
"local",
docs_dir=docs_dir,
verdict_input=_VI,
client_factory=make_client_factory(_VALID),
store=fresh_store,
)
assert result.provenance.model == "synthetic"
assert result.provenance.model != "fake-model"
async def test_b_out_of_range_is_rejected(docs_dir, make_client_factory, fresh_store) -> None:
result = await run_project(
"FV42-GSV-E1",