Merge pull request #133 from living-ip/codex/leo-v3-proposal-validator-followup-20260714
Some checks are pending
CI / lint-and-test (push) Waiting to run
Some checks are pending
CI / lint-and-test (push) Waiting to run
Fix named proposal response validation
This commit is contained in:
commit
aa1246c603
2 changed files with 5 additions and 1 deletions
|
|
@ -1245,7 +1245,8 @@ def compile_operational_response(contracts: list[dict[str, Any]]) -> str | None:
|
|||
f"{lead}\nFresh live readback.\n{format_database_count_readback(status_data)}\n"
|
||||
f"{format_proposal_readback(primary)}\nProposal states are applied: {states.get('applied', 0)}, "
|
||||
f"approved: {states.get('approved', 0)}, pending_review: {states.get('pending_review', 0)}, canceled: "
|
||||
f"{states.get('canceled', 0)}. {state_sentence} A proposal row is not canonical knowledge without "
|
||||
f"{states.get('canceled', 0)}. Approved is not applied. {state_sentence} A proposal row is not "
|
||||
"canonical knowledge without "
|
||||
"the guarded apply receipt and row-level public.* postflight.\n\n"
|
||||
"Next proof-changing follow-up: inspect the matching proposal payload and exact source binding, "
|
||||
"complete human review, obtain explicit guarded-apply authorization, then return non-null applied_at "
|
||||
|
|
|
|||
|
|
@ -21,6 +21,7 @@ from scripts.working_leo_open_ended_benchmark import (
|
|||
|
||||
ROOT = Path(__file__).resolve().parents[1]
|
||||
BRIDGE_DIR = ROOT / "hermes-agent" / "leoclean-bin"
|
||||
DB_CONTEXT_PLUGIN = ROOT / "hermes-agent" / "leoclean-plugins" / "vps" / "leo-db-context" / "__init__.py"
|
||||
|
||||
|
||||
def test_leoclean_bridge_files_are_present_and_parseable() -> None:
|
||||
|
|
@ -492,9 +493,11 @@ def test_vps_bridge_named_document_question_matches_exact_proposal_and_compiles_
|
|||
assert f"proposal: {corrected['id']}; status: pending_review; applied_at: none" in response
|
||||
assert corrected["source_ref"] in response
|
||||
assert "proposal states are applied: 2, approved: 3, pending_review: 16, canceled: 8" in response.lower()
|
||||
assert "Approved is not applied." in response
|
||||
assert "has not reached canonical apply" in response
|
||||
assert "telegram_file_refs" not in response
|
||||
assert len(re.findall(r"\b\w+(?:[-']\w+)*\b", response)) <= 200
|
||||
assert _load_module(DB_CONTEXT_PLUGIN).response_contract_issues(response, contracts) == []
|
||||
|
||||
|
||||
def test_vps_bridge_oos_intents_preserve_specific_contracts_and_negated_actions() -> None:
|
||||
|
|
|
|||
Loading…
Reference in a new issue