File tree Expand file tree Collapse file tree 15 files changed +2719
-24
lines changed
ccb_mcp_crossrepo_tracing
ccx-config-trace-010/tests
ccb_mcp_incident/ccx-incident-031/tests
ccb_mcp_platform/ccx-explore-091-ds/tests Expand file tree Collapse file tree 15 files changed +2719
-24
lines changed Original file line number Diff line number Diff line change @@ -400,10 +400,16 @@ def run_all_checks(
400400 oracle = spec .get ("artifacts" , {}).get ("oracle" , {})
401401 eval_checks = spec .get ("evaluation" , {}).get ("checks" , [])
402402
403- # If answer is a dict with "text" key, extract the text for text-based checks
403+ # If answer is a dict with "text" key, extract the text for text-based checks.
404+ # Also include the full JSON serialization so that provenance citations in
405+ # structured fields (e.g. chain[].repo) are found by substring matching.
406+ # This prevents penalizing agents that correctly cite repos in structured
407+ # data but use natural language (e.g. "Loki") in the narrative text.
404408 answer_text = ""
405409 if isinstance (answer_data , dict ):
406- answer_text = answer_data .get ("text" , answer_data .get ("answer" , json .dumps (answer_data )))
410+ narrative = answer_data .get ("text" , answer_data .get ("answer" , "" ))
411+ full_json = json .dumps (answer_data )
412+ answer_text = f"{ narrative } \n { full_json } " if narrative else full_json
407413 elif isinstance (answer_data , str ):
408414 answer_text = answer_data
409415
Original file line number Diff line number Diff line change @@ -400,10 +400,16 @@ def run_all_checks(
400400 oracle = spec .get ("artifacts" , {}).get ("oracle" , {})
401401 eval_checks = spec .get ("evaluation" , {}).get ("checks" , [])
402402
403- # If answer is a dict with "text" key, extract the text for text-based checks
403+ # If answer is a dict with "text" key, extract the text for text-based checks.
404+ # Also include the full JSON serialization so that provenance citations in
405+ # structured fields (e.g. chain[].repo) are found by substring matching.
406+ # This prevents penalizing agents that correctly cite repos in structured
407+ # data but use natural language (e.g. "Loki") in the narrative text.
404408 answer_text = ""
405409 if isinstance (answer_data , dict ):
406- answer_text = answer_data .get ("text" , answer_data .get ("answer" , json .dumps (answer_data )))
410+ narrative = answer_data .get ("text" , answer_data .get ("answer" , "" ))
411+ full_json = json .dumps (answer_data )
412+ answer_text = f"{ narrative } \n { full_json } " if narrative else full_json
407413 elif isinstance (answer_data , str ):
408414 answer_text = answer_data
409415
Original file line number Diff line number Diff line change @@ -400,10 +400,16 @@ def run_all_checks(
400400 oracle = spec .get ("artifacts" , {}).get ("oracle" , {})
401401 eval_checks = spec .get ("evaluation" , {}).get ("checks" , [])
402402
403- # If answer is a dict with "text" key, extract the text for text-based checks
403+ # If answer is a dict with "text" key, extract the text for text-based checks.
404+ # Also include the full JSON serialization so that provenance citations in
405+ # structured fields (e.g. chain[].repo) are found by substring matching.
406+ # This prevents penalizing agents that correctly cite repos in structured
407+ # data but use natural language (e.g. "Loki") in the narrative text.
404408 answer_text = ""
405409 if isinstance (answer_data , dict ):
406- answer_text = answer_data .get ("text" , answer_data .get ("answer" , json .dumps (answer_data )))
410+ narrative = answer_data .get ("text" , answer_data .get ("answer" , "" ))
411+ full_json = json .dumps (answer_data )
412+ answer_text = f"{ narrative } \n { full_json } " if narrative else full_json
407413 elif isinstance (answer_data , str ):
408414 answer_text = answer_data
409415
Original file line number Diff line number Diff line change @@ -400,10 +400,16 @@ def run_all_checks(
400400 oracle = spec .get ("artifacts" , {}).get ("oracle" , {})
401401 eval_checks = spec .get ("evaluation" , {}).get ("checks" , [])
402402
403- # If answer is a dict with "text" key, extract the text for text-based checks
403+ # If answer is a dict with "text" key, extract the text for text-based checks.
404+ # Also include the full JSON serialization so that provenance citations in
405+ # structured fields (e.g. chain[].repo) are found by substring matching.
406+ # This prevents penalizing agents that correctly cite repos in structured
407+ # data but use natural language (e.g. "Loki") in the narrative text.
404408 answer_text = ""
405409 if isinstance (answer_data , dict ):
406- answer_text = answer_data .get ("text" , answer_data .get ("answer" , json .dumps (answer_data )))
410+ narrative = answer_data .get ("text" , answer_data .get ("answer" , "" ))
411+ full_json = json .dumps (answer_data )
412+ answer_text = f"{ narrative } \n { full_json } " if narrative else full_json
407413 elif isinstance (answer_data , str ):
408414 answer_text = answer_data
409415
Original file line number Diff line number Diff line change @@ -400,10 +400,16 @@ def run_all_checks(
400400 oracle = spec .get ("artifacts" , {}).get ("oracle" , {})
401401 eval_checks = spec .get ("evaluation" , {}).get ("checks" , [])
402402
403- # If answer is a dict with "text" key, extract the text for text-based checks
403+ # If answer is a dict with "text" key, extract the text for text-based checks.
404+ # Also include the full JSON serialization so that provenance citations in
405+ # structured fields (e.g. chain[].repo) are found by substring matching.
406+ # This prevents penalizing agents that correctly cite repos in structured
407+ # data but use natural language (e.g. "Loki") in the narrative text.
404408 answer_text = ""
405409 if isinstance (answer_data , dict ):
406- answer_text = answer_data .get ("text" , answer_data .get ("answer" , json .dumps (answer_data )))
410+ narrative = answer_data .get ("text" , answer_data .get ("answer" , "" ))
411+ full_json = json .dumps (answer_data )
412+ answer_text = f"{ narrative } \n { full_json } " if narrative else full_json
407413 elif isinstance (answer_data , str ):
408414 answer_text = answer_data
409415
Original file line number Diff line number Diff line change @@ -400,10 +400,16 @@ def run_all_checks(
400400 oracle = spec .get ("artifacts" , {}).get ("oracle" , {})
401401 eval_checks = spec .get ("evaluation" , {}).get ("checks" , [])
402402
403- # If answer is a dict with "text" key, extract the text for text-based checks
403+ # If answer is a dict with "text" key, extract the text for text-based checks.
404+ # Also include the full JSON serialization so that provenance citations in
405+ # structured fields (e.g. chain[].repo) are found by substring matching.
406+ # This prevents penalizing agents that correctly cite repos in structured
407+ # data but use natural language (e.g. "Loki") in the narrative text.
404408 answer_text = ""
405409 if isinstance (answer_data , dict ):
406- answer_text = answer_data .get ("text" , answer_data .get ("answer" , json .dumps (answer_data )))
410+ narrative = answer_data .get ("text" , answer_data .get ("answer" , "" ))
411+ full_json = json .dumps (answer_data )
412+ answer_text = f"{ narrative } \n { full_json } " if narrative else full_json
407413 elif isinstance (answer_data , str ):
408414 answer_text = answer_data
409415
Original file line number Diff line number Diff line change @@ -400,10 +400,16 @@ def run_all_checks(
400400 oracle = spec .get ("artifacts" , {}).get ("oracle" , {})
401401 eval_checks = spec .get ("evaluation" , {}).get ("checks" , [])
402402
403- # If answer is a dict with "text" key, extract the text for text-based checks
403+ # If answer is a dict with "text" key, extract the text for text-based checks.
404+ # Also include the full JSON serialization so that provenance citations in
405+ # structured fields (e.g. chain[].repo) are found by substring matching.
406+ # This prevents penalizing agents that correctly cite repos in structured
407+ # data but use natural language (e.g. "Loki") in the narrative text.
404408 answer_text = ""
405409 if isinstance (answer_data , dict ):
406- answer_text = answer_data .get ("text" , answer_data .get ("answer" , json .dumps (answer_data )))
410+ narrative = answer_data .get ("text" , answer_data .get ("answer" , "" ))
411+ full_json = json .dumps (answer_data )
412+ answer_text = f"{ narrative } \n { full_json } " if narrative else full_json
407413 elif isinstance (answer_data , str ):
408414 answer_text = answer_data
409415
Original file line number Diff line number Diff line change @@ -400,10 +400,16 @@ def run_all_checks(
400400 oracle = spec .get ("artifacts" , {}).get ("oracle" , {})
401401 eval_checks = spec .get ("evaluation" , {}).get ("checks" , [])
402402
403- # If answer is a dict with "text" key, extract the text for text-based checks
403+ # If answer is a dict with "text" key, extract the text for text-based checks.
404+ # Also include the full JSON serialization so that provenance citations in
405+ # structured fields (e.g. chain[].repo) are found by substring matching.
406+ # This prevents penalizing agents that correctly cite repos in structured
407+ # data but use natural language (e.g. "Loki") in the narrative text.
404408 answer_text = ""
405409 if isinstance (answer_data , dict ):
406- answer_text = answer_data .get ("text" , answer_data .get ("answer" , json .dumps (answer_data )))
410+ narrative = answer_data .get ("text" , answer_data .get ("answer" , "" ))
411+ full_json = json .dumps (answer_data )
412+ answer_text = f"{ narrative } \n { full_json } " if narrative else full_json
407413 elif isinstance (answer_data , str ):
408414 answer_text = answer_data
409415
Original file line number Diff line number Diff line change @@ -400,10 +400,16 @@ def run_all_checks(
400400 oracle = spec .get ("artifacts" , {}).get ("oracle" , {})
401401 eval_checks = spec .get ("evaluation" , {}).get ("checks" , [])
402402
403- # If answer is a dict with "text" key, extract the text for text-based checks
403+ # If answer is a dict with "text" key, extract the text for text-based checks.
404+ # Also include the full JSON serialization so that provenance citations in
405+ # structured fields (e.g. chain[].repo) are found by substring matching.
406+ # This prevents penalizing agents that correctly cite repos in structured
407+ # data but use natural language (e.g. "Loki") in the narrative text.
404408 answer_text = ""
405409 if isinstance (answer_data , dict ):
406- answer_text = answer_data .get ("text" , answer_data .get ("answer" , json .dumps (answer_data )))
410+ narrative = answer_data .get ("text" , answer_data .get ("answer" , "" ))
411+ full_json = json .dumps (answer_data )
412+ answer_text = f"{ narrative } \n { full_json } " if narrative else full_json
407413 elif isinstance (answer_data , str ):
408414 answer_text = answer_data
409415
Original file line number Diff line number Diff line change @@ -400,10 +400,16 @@ def run_all_checks(
400400 oracle = spec .get ("artifacts" , {}).get ("oracle" , {})
401401 eval_checks = spec .get ("evaluation" , {}).get ("checks" , [])
402402
403- # If answer is a dict with "text" key, extract the text for text-based checks
403+ # If answer is a dict with "text" key, extract the text for text-based checks.
404+ # Also include the full JSON serialization so that provenance citations in
405+ # structured fields (e.g. chain[].repo) are found by substring matching.
406+ # This prevents penalizing agents that correctly cite repos in structured
407+ # data but use natural language (e.g. "Loki") in the narrative text.
404408 answer_text = ""
405409 if isinstance (answer_data , dict ):
406- answer_text = answer_data .get ("text" , answer_data .get ("answer" , json .dumps (answer_data )))
410+ narrative = answer_data .get ("text" , answer_data .get ("answer" , "" ))
411+ full_json = json .dumps (answer_data )
412+ answer_text = f"{ narrative } \n { full_json } " if narrative else full_json
407413 elif isinstance (answer_data , str ):
408414 answer_text = answer_data
409415
You can’t perform that action at this time.
0 commit comments