mirror of
https://github.com/norandom/OpenUltraSAST.git
synced 2026-10-16 03:49:26 +00:00
fix(learning-harness): say why the proposer had nothing, and stop hard-coding its vendor
The meta-agent round journalled `no_proposal`. The real cause was an authentication failure: `_model_config` hard-coded the anthropic provider while the detector was talking to DeepSeek and no ANTHROPIC_API_KEY exists here. The composition itself was fine -- MetaAgent constructed, evolve started, budget $5 -- and the trace was thrown away. `no_proposal` covered two different worlds: a proposer that considered the facts and declined, and one that could not start at all. The journal now carries the proposer's own reason, and the vendor comes from `[harnessx] provider` instead of being assumed. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01T7XD7x5KonMdmGRkp63EQG
This commit is contained in:
co-authored by
Claude Opus 5
parent
84b1ba7a72
commit
cde57e4293
@@ -1369,7 +1369,7 @@ def _learning_run(args: argparse.Namespace, cases: Sequence[PairCase], taxonomy:
|
||||
family=args.family,
|
||||
taxonomy=taxonomy,
|
||||
configs_dir=configs_dir,
|
||||
proposer=_proposer(args, configs_dir, model),
|
||||
proposer=_proposer(args, configs_dir, model, config.harnessx.provider),
|
||||
scan_factory=factory,
|
||||
model=model,
|
||||
journal=journal,
|
||||
@@ -1402,13 +1402,13 @@ def _label(case: PairCase, taxonomy: object) -> str:
|
||||
return _family_of(case, taxonomy) # type: ignore[arg-type]
|
||||
|
||||
|
||||
def _proposer(args: argparse.Namespace, configs_dir: Path, model: str) -> Proposer:
|
||||
def _proposer(args: argparse.Namespace, configs_dir: Path, model: str, provider: str = "anthropic") -> Proposer:
|
||||
"""`--proposals FILE` runs a recorded sequence offline; without it the round asks the meta-agent."""
|
||||
from .learning.proposer import HarnessXProposer, Proposal, ScriptedProposer
|
||||
|
||||
path = getattr(args, "proposals", None)
|
||||
if path is None:
|
||||
return HarnessXProposer(configs_dir=configs_dir, model=model)
|
||||
return HarnessXProposer(configs_dir=configs_dir, model=model, provider=provider)
|
||||
rows = json.loads(Path(path).read_text(encoding="utf-8"))
|
||||
return ScriptedProposer(
|
||||
[
|
||||
|
||||
Reference in New Issue
Block a user