Step F first pass: 81/92 accepted; budget floor 60 calls; rejected slots moved for regeneration
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014aUaQeLnwbb1zTpN7kHeat
This commit is contained in:
18
tasks_gen/eval/G0179/empirical.json
Normal file
18
tasks_gen/eval/G0179/empirical.json
Normal file
@@ -0,0 +1,18 @@
|
||||
{
|
||||
"deepseek-v4.1-flash:cloud": {
|
||||
"score": 100.0,
|
||||
"parts": {
|
||||
"correctness": 40.0,
|
||||
"craft": 20.0,
|
||||
"clean": 15.0,
|
||||
"own_tests": 15.0,
|
||||
"discipline": 10.0,
|
||||
"total": 100.0,
|
||||
"note": "own_tests: faulty-reference part not implemented in skeleton"
|
||||
},
|
||||
"hidden": "10/10",
|
||||
"tool_calls": 6,
|
||||
"seconds": 23.4,
|
||||
"run_dir": "runs/emp/10003_G0007_llm_deepseek-v4.1-flash_cloud"
|
||||
}
|
||||
}
|
||||
16
tasks_gen/eval/G0179/generation.json
Normal file
16
tasks_gen/eval/G0179/generation.json
Normal file
@@ -0,0 +1,16 @@
|
||||
{
|
||||
"id": "G0179",
|
||||
"pool": "eval",
|
||||
"category": "K",
|
||||
"base_task": "G0007",
|
||||
"style": "incomplete",
|
||||
"tool_schema": "generic_v0",
|
||||
"attempts": [
|
||||
{
|
||||
"stage": "validate",
|
||||
"oracle": 100.0,
|
||||
"null": 0
|
||||
}
|
||||
],
|
||||
"accepted": true
|
||||
}
|
||||
103
tasks_gen/eval/G0179/hidden/t02_hidden.clas.abap
Normal file
103
tasks_gen/eval/G0179/hidden/t02_hidden.clas.abap
Normal file
@@ -0,0 +1,103 @@
|
||||
CLASS {{p}}t02_hidden DEFINITION PUBLIC FINAL CREATE PUBLIC
|
||||
FOR TESTING DURATION SHORT RISK LEVEL HARMLESS.
|
||||
PRIVATE SECTION.
|
||||
DATA mo_cut TYPE REF TO {{p}}if_loyalty_rules.
|
||||
METHODS setup.
|
||||
METHODS tier_boundaries FOR TESTING.
|
||||
METHODS tier_negative FOR TESTING.
|
||||
METHODS tier_zero FOR TESTING.
|
||||
METHODS discount_all_tiers FOR TESTING.
|
||||
METHODS discount_unknown_tier FOR TESTING.
|
||||
METHODS next_tier_from_basic FOR TESTING.
|
||||
METHODS next_tier_from_silver FOR TESTING.
|
||||
METHODS next_tier_from_gold FOR TESTING.
|
||||
METHODS next_tier_from_platinum FOR TESTING.
|
||||
METHODS next_tier_negative_points FOR TESTING.
|
||||
ENDCLASS.
|
||||
|
||||
|
||||
CLASS {{p}}t02_hidden IMPLEMENTATION.
|
||||
METHOD setup.
|
||||
mo_cut = NEW {{p}}loyalty_evaluator( ).
|
||||
ENDMETHOD.
|
||||
|
||||
METHOD tier_boundaries.
|
||||
cl_abap_unit_assert=>assert_equals( exp = {{p}}if_loyalty_rules=>c_tier-basic
|
||||
act = mo_cut->get_tier( 999 ) msg = `999` ).
|
||||
cl_abap_unit_assert=>assert_equals( exp = {{p}}if_loyalty_rules=>c_tier-silver
|
||||
act = mo_cut->get_tier( 1000 ) msg = `1000` ).
|
||||
cl_abap_unit_assert=>assert_equals( exp = {{p}}if_loyalty_rules=>c_tier-silver
|
||||
act = mo_cut->get_tier( 4999 ) msg = `4999` ).
|
||||
cl_abap_unit_assert=>assert_equals( exp = {{p}}if_loyalty_rules=>c_tier-gold
|
||||
act = mo_cut->get_tier( 5000 ) msg = `5000` ).
|
||||
cl_abap_unit_assert=>assert_equals( exp = {{p}}if_loyalty_rules=>c_tier-gold
|
||||
act = mo_cut->get_tier( 19999 ) msg = `19999` ).
|
||||
cl_abap_unit_assert=>assert_equals( exp = {{p}}if_loyalty_rules=>c_tier-platinum
|
||||
act = mo_cut->get_tier( 20000 ) msg = `20000` ).
|
||||
cl_abap_unit_assert=>assert_equals( exp = {{p}}if_loyalty_rules=>c_tier-platinum
|
||||
act = mo_cut->get_tier( 500000 ) msg = `500000` ).
|
||||
ENDMETHOD.
|
||||
|
||||
METHOD tier_negative.
|
||||
cl_abap_unit_assert=>assert_equals( exp = {{p}}if_loyalty_rules=>c_tier-basic
|
||||
act = mo_cut->get_tier( -1 ) ).
|
||||
cl_abap_unit_assert=>assert_equals( exp = {{p}}if_loyalty_rules=>c_tier-basic
|
||||
act = mo_cut->get_tier( -5000 ) ).
|
||||
ENDMETHOD.
|
||||
|
||||
METHOD tier_zero.
|
||||
cl_abap_unit_assert=>assert_equals( exp = {{p}}if_loyalty_rules=>c_tier-basic
|
||||
act = mo_cut->get_tier( 0 ) ).
|
||||
ENDMETHOD.
|
||||
|
||||
METHOD discount_all_tiers.
|
||||
cl_abap_unit_assert=>assert_equals( exp = 0
|
||||
act = mo_cut->get_discount( {{p}}if_loyalty_rules=>c_tier-basic ) msg = `basic` ).
|
||||
cl_abap_unit_assert=>assert_equals( exp = 3
|
||||
act = mo_cut->get_discount( {{p}}if_loyalty_rules=>c_tier-silver ) msg = `silver` ).
|
||||
cl_abap_unit_assert=>assert_equals( exp = 7
|
||||
act = mo_cut->get_discount( {{p}}if_loyalty_rules=>c_tier-gold ) msg = `gold` ).
|
||||
cl_abap_unit_assert=>assert_equals( exp = 12
|
||||
act = mo_cut->get_discount( {{p}}if_loyalty_rules=>c_tier-platinum ) msg = `platinum` ).
|
||||
ENDMETHOD.
|
||||
|
||||
METHOD discount_unknown_tier.
|
||||
cl_abap_unit_assert=>assert_equals( exp = 0
|
||||
act = mo_cut->get_discount( 'X' ) ).
|
||||
cl_abap_unit_assert=>assert_equals( exp = 0
|
||||
act = mo_cut->get_discount( ' ' ) ).
|
||||
ENDMETHOD.
|
||||
|
||||
METHOD next_tier_from_basic.
|
||||
cl_abap_unit_assert=>assert_equals( exp = 1000
|
||||
act = mo_cut->points_to_next_tier( 0 ) msg = `0` ).
|
||||
cl_abap_unit_assert=>assert_equals( exp = 1
|
||||
act = mo_cut->points_to_next_tier( 999 ) msg = `999` ).
|
||||
ENDMETHOD.
|
||||
|
||||
METHOD next_tier_from_silver.
|
||||
cl_abap_unit_assert=>assert_equals( exp = 4000
|
||||
act = mo_cut->points_to_next_tier( 1000 ) msg = `1000` ).
|
||||
cl_abap_unit_assert=>assert_equals( exp = 1
|
||||
act = mo_cut->points_to_next_tier( 4999 ) msg = `4999` ).
|
||||
ENDMETHOD.
|
||||
|
||||
METHOD next_tier_from_gold.
|
||||
cl_abap_unit_assert=>assert_equals( exp = 15000
|
||||
act = mo_cut->points_to_next_tier( 5000 ) msg = `5000` ).
|
||||
cl_abap_unit_assert=>assert_equals( exp = 1
|
||||
act = mo_cut->points_to_next_tier( 19999 ) msg = `19999` ).
|
||||
ENDMETHOD.
|
||||
|
||||
METHOD next_tier_from_platinum.
|
||||
cl_abap_unit_assert=>assert_equals( exp = 0
|
||||
act = mo_cut->points_to_next_tier( 20000 ) ).
|
||||
cl_abap_unit_assert=>assert_equals( exp = 0
|
||||
act = mo_cut->points_to_next_tier( 999999 ) ).
|
||||
ENDMETHOD.
|
||||
|
||||
METHOD next_tier_negative_points.
|
||||
cl_abap_unit_assert=>assert_equals( exp = 1000
|
||||
act = mo_cut->points_to_next_tier( -7 ) ).
|
||||
ENDMETHOD.
|
||||
ENDCLASS.
|
||||
79
tasks_gen/eval/G0179/reference/loyalty_evaluator.clas.abap
Normal file
79
tasks_gen/eval/G0179/reference/loyalty_evaluator.clas.abap
Normal file
@@ -0,0 +1,79 @@
|
||||
CLASS {{p}}loyalty_evaluator DEFINITION PUBLIC FINAL CREATE PUBLIC.
|
||||
PUBLIC SECTION.
|
||||
INTERFACES {{p}}if_loyalty_rules.
|
||||
|
||||
PRIVATE SECTION.
|
||||
CONSTANTS:
|
||||
c_silver_threshold TYPE i VALUE 1000,
|
||||
c_gold_threshold TYPE i VALUE 5000,
|
||||
c_platinum_threshold TYPE i VALUE 20000.
|
||||
|
||||
METHODS normalize_points
|
||||
IMPORTING iv_points TYPE i
|
||||
RETURNING VALUE(rv_points) TYPE i.
|
||||
|
||||
METHODS tier_of
|
||||
IMPORTING iv_points TYPE i
|
||||
RETURNING VALUE(rv_tier) TYPE {{p}}if_loyalty_rules=>ty_tier.
|
||||
|
||||
METHODS points_to_tier
|
||||
IMPORTING iv_points TYPE i
|
||||
iv_tier TYPE {{p}}if_loyalty_rules=>ty_tier
|
||||
RETURNING VALUE(rv_points) TYPE i.
|
||||
ENDCLASS.
|
||||
|
||||
|
||||
CLASS {{p}}loyalty_evaluator IMPLEMENTATION.
|
||||
METHOD {{p}}if_loyalty_rules~get_tier.
|
||||
rv_tier = tier_of( normalize_points( iv_points ) ).
|
||||
ENDMETHOD.
|
||||
|
||||
METHOD {{p}}if_loyalty_rules~get_discount.
|
||||
CASE iv_tier.
|
||||
WHEN {{p}}if_loyalty_rules=>c_tier-silver.
|
||||
rv_percent = 3.
|
||||
WHEN {{p}}if_loyalty_rules=>c_tier-gold.
|
||||
rv_percent = 7.
|
||||
WHEN {{p}}if_loyalty_rules=>c_tier-platinum.
|
||||
rv_percent = 12.
|
||||
WHEN OTHERS.
|
||||
rv_percent = 0.
|
||||
ENDCASE.
|
||||
ENDMETHOD.
|
||||
|
||||
METHOD {{p}}if_loyalty_rules~points_to_next_tier.
|
||||
DATA(lv_points) = normalize_points( iv_points ).
|
||||
DATA(lv_tier) = tier_of( lv_points ).
|
||||
rv_points = points_to_tier( iv_points = lv_points
|
||||
iv_tier = lv_tier ).
|
||||
ENDMETHOD.
|
||||
|
||||
METHOD normalize_points.
|
||||
rv_points = COND #( WHEN iv_points < 0 THEN 0 ELSE iv_points ).
|
||||
ENDMETHOD.
|
||||
|
||||
METHOD tier_of.
|
||||
IF iv_points >= c_platinum_threshold.
|
||||
rv_tier = {{p}}if_loyalty_rules=>c_tier-platinum.
|
||||
ELSEIF iv_points >= c_gold_threshold.
|
||||
rv_tier = {{p}}if_loyalty_rules=>c_tier-gold.
|
||||
ELSEIF iv_points >= c_silver_threshold.
|
||||
rv_tier = {{p}}if_loyalty_rules=>c_tier-silver.
|
||||
ELSE.
|
||||
rv_tier = {{p}}if_loyalty_rules=>c_tier-basic.
|
||||
ENDIF.
|
||||
ENDMETHOD.
|
||||
|
||||
METHOD points_to_tier.
|
||||
CASE iv_tier.
|
||||
WHEN {{p}}if_loyalty_rules=>c_tier-basic.
|
||||
rv_points = c_silver_threshold - iv_points.
|
||||
WHEN {{p}}if_loyalty_rules=>c_tier-silver.
|
||||
rv_points = c_gold_threshold - iv_points.
|
||||
WHEN {{p}}if_loyalty_rules=>c_tier-gold.
|
||||
rv_points = c_platinum_threshold - iv_points.
|
||||
WHEN OTHERS.
|
||||
rv_points = 0.
|
||||
ENDCASE.
|
||||
ENDMETHOD.
|
||||
ENDCLASS.
|
||||
@@ -0,0 +1,77 @@
|
||||
CLASS ltc_loyalty_evaluator DEFINITION FINAL FOR TESTING
|
||||
DURATION SHORT RISK LEVEL HARMLESS.
|
||||
|
||||
PRIVATE SECTION.
|
||||
DATA mo_cut TYPE REF TO {{p}}if_loyalty_rules.
|
||||
|
||||
METHODS setup.
|
||||
METHODS tier_of_boundary_points FOR TESTING.
|
||||
METHODS negative_points_are_basic FOR TESTING.
|
||||
METHODS discount_of_each_tier FOR TESTING.
|
||||
METHODS discount_of_unknown_tier FOR TESTING.
|
||||
METHODS points_to_silver FOR TESTING.
|
||||
METHODS points_to_gold FOR TESTING.
|
||||
METHODS points_to_platinum FOR TESTING.
|
||||
METHODS platinum_needs_no_points FOR TESTING.
|
||||
ENDCLASS.
|
||||
|
||||
|
||||
CLASS ltc_loyalty_evaluator IMPLEMENTATION.
|
||||
METHOD setup.
|
||||
mo_cut = NEW {{p}}loyalty_evaluator( ).
|
||||
ENDMETHOD.
|
||||
|
||||
METHOD tier_of_boundary_points.
|
||||
cl_abap_unit_assert=>assert_equals( exp = {{p}}if_loyalty_rules=>c_tier-basic
|
||||
act = mo_cut->get_tier( 0 ) ).
|
||||
cl_abap_unit_assert=>assert_equals( exp = {{p}}if_loyalty_rules=>c_tier-silver
|
||||
act = mo_cut->get_tier( 1000 ) ).
|
||||
cl_abap_unit_assert=>assert_equals( exp = {{p}}if_loyalty_rules=>c_tier-gold
|
||||
act = mo_cut->get_tier( 5000 ) ).
|
||||
cl_abap_unit_assert=>assert_equals( exp = {{p}}if_loyalty_rules=>c_tier-platinum
|
||||
act = mo_cut->get_tier( 20000 ) ).
|
||||
ENDMETHOD.
|
||||
|
||||
METHOD negative_points_are_basic.
|
||||
cl_abap_unit_assert=>assert_equals( exp = {{p}}if_loyalty_rules=>c_tier-basic
|
||||
act = mo_cut->get_tier( -100 ) ).
|
||||
ENDMETHOD.
|
||||
|
||||
METHOD discount_of_each_tier.
|
||||
cl_abap_unit_assert=>assert_equals( exp = 0
|
||||
act = mo_cut->get_discount( {{p}}if_loyalty_rules=>c_tier-basic ) ).
|
||||
cl_abap_unit_assert=>assert_equals( exp = 3
|
||||
act = mo_cut->get_discount( {{p}}if_loyalty_rules=>c_tier-silver ) ).
|
||||
cl_abap_unit_assert=>assert_equals( exp = 7
|
||||
act = mo_cut->get_discount( {{p}}if_loyalty_rules=>c_tier-gold ) ).
|
||||
cl_abap_unit_assert=>assert_equals( exp = 12
|
||||
act = mo_cut->get_discount( {{p}}if_loyalty_rules=>c_tier-platinum ) ).
|
||||
ENDMETHOD.
|
||||
|
||||
METHOD discount_of_unknown_tier.
|
||||
cl_abap_unit_assert=>assert_equals( exp = 0
|
||||
act = mo_cut->get_discount( 'X' ) ).
|
||||
ENDMETHOD.
|
||||
|
||||
METHOD points_to_silver.
|
||||
cl_abap_unit_assert=>assert_equals( exp = 1000
|
||||
act = mo_cut->points_to_next_tier( 0 ) ).
|
||||
cl_abap_unit_assert=>assert_equals( exp = 1
|
||||
act = mo_cut->points_to_next_tier( 999 ) ).
|
||||
ENDMETHOD.
|
||||
|
||||
METHOD points_to_gold.
|
||||
cl_abap_unit_assert=>assert_equals( exp = 4000
|
||||
act = mo_cut->points_to_next_tier( 1000 ) ).
|
||||
ENDMETHOD.
|
||||
|
||||
METHOD points_to_platinum.
|
||||
cl_abap_unit_assert=>assert_equals( exp = 15000
|
||||
act = mo_cut->points_to_next_tier( 5000 ) ).
|
||||
ENDMETHOD.
|
||||
|
||||
METHOD platinum_needs_no_points.
|
||||
cl_abap_unit_assert=>assert_equals( exp = 0
|
||||
act = mo_cut->points_to_next_tier( 20000 ) ).
|
||||
ENDMETHOD.
|
||||
ENDCLASS.
|
||||
7
tasks_gen/eval/G0179/review.json
Normal file
7
tasks_gen/eval/G0179/review.json
Normal file
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"decision": "accept",
|
||||
"note": "Interface must be read; fits F.",
|
||||
"by": "Claude",
|
||||
"date": "2026-10-03",
|
||||
"failed_checks": {}
|
||||
}
|
||||
24
tasks_gen/eval/G0179/seed/if_loyalty_rules.intf.abap
Normal file
24
tasks_gen/eval/G0179/seed/if_loyalty_rules.intf.abap
Normal file
@@ -0,0 +1,24 @@
|
||||
INTERFACE {{p}}if_loyalty_rules PUBLIC.
|
||||
TYPES ty_points TYPE i.
|
||||
TYPES ty_tier TYPE c LENGTH 1.
|
||||
|
||||
CONSTANTS:
|
||||
BEGIN OF c_tier,
|
||||
basic TYPE ty_tier VALUE 'B',
|
||||
silver TYPE ty_tier VALUE 'S',
|
||||
gold TYPE ty_tier VALUE 'G',
|
||||
platinum TYPE ty_tier VALUE 'P',
|
||||
END OF c_tier.
|
||||
|
||||
METHODS get_tier
|
||||
IMPORTING iv_points TYPE ty_points
|
||||
RETURNING VALUE(rv_tier) TYPE ty_tier.
|
||||
|
||||
METHODS get_discount
|
||||
IMPORTING iv_tier TYPE ty_tier
|
||||
RETURNING VALUE(rv_percent) TYPE i.
|
||||
|
||||
METHODS points_to_next_tier
|
||||
IMPORTING iv_points TYPE ty_points
|
||||
RETURNING VALUE(rv_points) TYPE i.
|
||||
ENDINTERFACE.
|
||||
9
tasks_gen/eval/G0179/spec.md
Normal file
9
tasks_gen/eval/G0179/spec.md
Normal file
@@ -0,0 +1,9 @@
|
||||
Create the public final class {{P}}LOYALTY_EVALUATOR in package $TMP. The class has a public constructor without parameters. The class implements the interface {{P}}IF_LOYALTY_RULES. Do not change {{P}}IF_LOYALTY_RULES. Do not add other public methods. Write ABAP Unit tests for the class.
|
||||
|
||||
The class must return the tier for a point value. A point value below zero counts as zero. 0 to 999 points is basic. 1000 to 4999 points is silver. 5000 to 19999 points is gold. 20000 points and more is platinum.
|
||||
|
||||
The class must return the discount percent for a tier. Basic is 0 percent. Silver is 3 percent. Gold is 7 percent. Platinum is 12 percent. Any other tier value is 0 percent.
|
||||
|
||||
The class must return the points to the next tier. A point value below zero counts as zero. Basic needs 1000 points minus the point value. Silver needs 5000 points minus the point value. Gold needs 20000 points minus the point value. Platinum needs 0 points.
|
||||
|
||||
The class must be active and have no syntax error. The hidden tests must pass.
|
||||
54
tasks_gen/eval/G0179/task.json
Normal file
54
tasks_gen/eval/G0179/task.json
Normal file
@@ -0,0 +1,54 @@
|
||||
{
|
||||
"id": "G0179",
|
||||
"category": "K",
|
||||
"object_type": "CLAS",
|
||||
"difficulty": 2,
|
||||
"release_target": "v816",
|
||||
"expected_outcome": "implement",
|
||||
"budget": {
|
||||
"max_tool_calls": 60,
|
||||
"max_activations": 15
|
||||
},
|
||||
"seed": [
|
||||
{
|
||||
"type": "INTF",
|
||||
"name": "{{P}}IF_LOYALTY_RULES",
|
||||
"file": "seed/if_loyalty_rules.intf.abap",
|
||||
"description": "Loyalty contract: tier type, point type, tier constants and three methods. The spec does not repeat the signature."
|
||||
}
|
||||
],
|
||||
"contract": [
|
||||
{
|
||||
"type": "CLAS",
|
||||
"name": "{{P}}LOYALTY_EVALUATOR",
|
||||
"implements": "{{P}}IF_LOYALTY_RULES"
|
||||
}
|
||||
],
|
||||
"out_of_scope": [
|
||||
"{{P}}IF_LOYALTY_RULES"
|
||||
],
|
||||
"hidden_tests": [
|
||||
{
|
||||
"type": "CLAS",
|
||||
"name": "{{P}}T02_HIDDEN",
|
||||
"file": "hidden/t02_hidden.clas.abap",
|
||||
"description": "T02 hidden tests"
|
||||
}
|
||||
],
|
||||
"reference": [
|
||||
{
|
||||
"type": "CLAS",
|
||||
"name": "{{P}}LOYALTY_EVALUATOR",
|
||||
"file": "reference/loyalty_evaluator.clas.abap",
|
||||
"description": "Loyalty evaluator",
|
||||
"testclasses_file": "reference/loyalty_evaluator.testclasses.abap"
|
||||
}
|
||||
],
|
||||
"craft_checks": [
|
||||
"method_length",
|
||||
"nesting_depth"
|
||||
],
|
||||
"base_task": "G0007",
|
||||
"input_style": "incomplete",
|
||||
"tool_schema": "generic_v0"
|
||||
}
|
||||
Reference in New Issue
Block a user