@@ -608,7 +608,12 @@ public function addDebugInfo(
608608 ),
609609 new OA \Property (
610610 property: 'metadata ' ,
611- description: 'The (base64-encoded) metadata ' ,
611+ description: 'The (base64-encoded) metadata of the run ' ,
612+ type: 'string '
613+ ),
614+ new OA \Property (
615+ property: 'compare_metadata ' ,
616+ description: 'The (base64-encoded) metadata of the validator ' ,
612617 type: 'string '
613618 ),
614619 ]
@@ -647,14 +652,15 @@ public function addJudgingRunAction(
647652 $ teamMessage = $ request ->request ->get ('team_message ' );
648653 $ metadata = $ request ->request ->get ('metadata ' );
649654 $ testcasedir = $ request ->request ->get ('testcasedir ' );
655+ $ compareMeta = $ request ->request ->get ('compare_metadata ' );
650656
651657 $ judgehost = $ this ->em ->getRepository (Judgehost::class)->findOneBy (['hostname ' => $ hostname ]);
652658 if (!$ judgehost ) {
653659 throw new BadRequestHttpException ("Who are you and why are you sending us any data? " );
654660 }
655661
656662 $ hasFinalResult = $ this ->addSingleJudgingRun ($ judgeTaskId , $ hostname , $ runResult , $ runTime ,
657- $ outputSystem , $ outputError , $ outputDiff , $ outputRun , $ teamMessage , $ metadata , $ testcasedir );
663+ $ outputSystem , $ outputError , $ outputDiff , $ outputRun , $ teamMessage , $ metadata , $ testcasedir, $ compareMeta );
658664 $ judgehost = $ this ->em ->getRepository (Judgehost::class)->findOneBy (['hostname ' => $ hostname ]);
659665 $ judgehost ->setPolltime (Utils::now ());
660666 $ this ->em ->flush ();
@@ -910,16 +916,17 @@ protected function giveBackJudging(int $judgingId, ?Judgehost $judgehost): void
910916 */
911917 private function addSingleJudgingRun (
912918 int $ judgeTaskId ,
913- string $ hostname ,
914- string $ runResult ,
915- string $ runTime ,
916- string $ outputSystem ,
917- string $ outputError ,
918- string $ outputDiff ,
919- string $ outputRun ,
919+ string $ hostname ,
920+ string $ runResult ,
921+ string $ runTime ,
922+ string $ outputSystem ,
923+ string $ outputError ,
924+ string $ outputDiff ,
925+ string $ outputRun ,
920926 ?string $ teamMessage ,
921- string $ metadata ,
922- ?string $ testcasedir
927+ string $ metadata ,
928+ ?string $ testcasedir ,
929+ ?string $ compareMeta ,
923930 ): bool {
924931 $ resultsRemap = $ this ->config ->get ('results_remap ' );
925932 $ resultsPrio = $ this ->config ->get ('results_prio ' );
@@ -940,7 +947,8 @@ private function addSingleJudgingRun(
940947 $ outputRun ,
941948 $ teamMessage ,
942949 $ metadata ,
943- $ testcasedir
950+ $ testcasedir ,
951+ $ compareMeta
944952 ) {
945953 $ judgingRun = $ this ->em ->getRepository (JudgingRun::class)->findOneBy (
946954 ['judgetaskid ' => $ judgeTaskId ]);
@@ -962,6 +970,10 @@ private function addSingleJudgingRun(
962970 ->setOutputSystem (base64_decode ($ outputSystem ))
963971 ->setMetadata (base64_decode ($ metadata ));
964972
973+ if ($ compareMeta ) {
974+ $ judgingRunOutput ->setValidatorMetadata (base64_decode ($ compareMeta ));
975+ }
976+
965977 if ($ teamMessage ) {
966978 $ judgingRunOutput ->setTeamMessage (base64_decode ($ teamMessage ));
967979 }
0 commit comments