Pipeline controller: plan 2 (hard +, error +50 %), backlog throttle, 2 trajectory workers, stop rules, summaries every 50; budget reserve

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
Kral
2026-10-05 13:35:54 +02:00
parent 1c4667a0fc
commit 13360292dd
781 changed files with 50211 additions and 22 deletions

View File

@@ -0,0 +1,21 @@
@AccessControl.authorizationCheck: #NOT_REQUIRED
@EndUserText.label: 'Grade of a tree sapling'
define view entity {{P}}I_PLANT_GRADE
as select from {{p}}plant as sapling
{
key sapling.tree_id as tree_id,
sapling.species as species,
cast( sapling.height_cm as abap.dec( 15, 2 ) )
/ 100 as height_m,
case when sapling.height_cm < 100 then 'S'
when sapling.height_cm >= 200 then 'M'
else 'L'
end as grade,
concat( concat(
case when sapling.height_cm < 100 then 'S'
when sapling.height_cm < 200 then 'M'
else 'L'
end,
'-' ),
sapling.species ) as grade_text
}

View File

@@ -0,0 +1,21 @@
@AccessControl.authorizationCheck: #NOT_REQUIRED
@EndUserText.label: 'Grade of a tree sapling'
define view entity {{P}}I_PLANT_GRADE
as select from {{p}}plant as sapling
{
key sapling.tree_id as tree_id,
sapling.species as species,
cast( sapling.height_cm as abap.dec( 15, 2 ) )
/ 100 as height_m,
case when sapling.height_cm < 100 then 'S'
when sapling.height_cm < 200 then 'M'
else 'L'
end as grade,
concat( concat(
case when sapling.height_cm >= 100 then 'S'
when sapling.height_cm < 200 then 'M'
else 'L'
end,
'-' ),
sapling.species ) as grade_text
}

View File

@@ -0,0 +1,21 @@
@AccessControl.authorizationCheck: #NOT_REQUIRED
@EndUserText.label: 'Grade of a tree sapling'
define view entity {{P}}I_PLANT_GRADE
as select from {{p}}plant as sapling
{
key sapling.tree_id as tree_id,
sapling.species as species,
cast( sapling.height_cm as abap.dec( 15, 2 ) )
/ 100 as height_m,
case when sapling.height_cm < 100 then 'S'
when sapling.height_cm < 200 then 'M'
else 'L'
end as grade,
concat( concat(
case when sapling.height_cm < 100 then 'S'
when sapling.height_cm < 201 then 'M'
else 'L'
end,
'-' ),
sapling.species ) as grade_text
}

View File

@@ -0,0 +1,21 @@
@AccessControl.authorizationCheck: #NOT_REQUIRED
@EndUserText.label: 'Grade of a tree sapling'
define view entity {{P}}I_PLANT_GRADE
as select from {{p}}plant as sapling
{
key sapling.tree_id as tree_id,
sapling.species as species,
cast( sapling.height_cm as abap.dec( 15, 2 ) )
/ 100 as height_m,
case when sapling.height_cm < 100 then 'S'
when sapling.height_cm < 200 then 'M'
else 'L'
end as grade,
concat( concat(
case when sapling.height_cm < 100 then 'S'
when sapling.height_cm < 200 then 'M'
else 'Z'
end,
'-' ),
sapling.species ) as grade_text
}

View File

@@ -0,0 +1,29 @@
{
"id": "G1020",
"pool": "train",
"object_type": "DDLS",
"category": "B",
"attempts": [
{
"stage": "validate",
"oracle": 0,
"null": 0
},
{
"stage": "validate",
"oracle": 0,
"null": 0
},
{
"stage": "validate",
"oracle": 100.0,
"null": 0,
"mutation": {
"valid": 5,
"killed": 4,
"ok": true
}
}
],
"accepted": true
}

View File

@@ -0,0 +1,86 @@
CLASS {{p}}t33_hidden DEFINITION PUBLIC FINAL CREATE PUBLIC
FOR TESTING DURATION SHORT RISK LEVEL HARMLESS.
PRIVATE SECTION.
CLASS-DATA go_env TYPE REF TO if_cds_test_environment.
CLASS-METHODS class_setup.
CLASS-METHODS class_teardown.
METHODS setup.
METHODS small_grade FOR TESTING.
METHODS medium_grade FOR TESTING.
METHODS large_grade FOR TESTING.
METHODS height_in_metres FOR TESTING.
METHODS grade_text_value FOR TESTING.
METHODS row_count FOR TESTING.
METHODS species_shown FOR TESTING.
ENDCLASS.
CLASS {{p}}t33_hidden IMPLEMENTATION.
METHOD class_setup.
go_env = cl_cds_test_environment=>create( i_for_entity = '{{P}}I_PLANT_GRADE' ).
ENDMETHOD.
METHOD class_teardown.
go_env->destroy( ).
ENDMETHOD.
METHOD setup.
DATA lt_plant TYPE STANDARD TABLE OF {{p}}plant WITH EMPTY KEY.
go_env->clear_doubles( ).
lt_plant = VALUE #( ( tree_id = 'T1' species = 'OAK' height_cm = 99 )
( tree_id = 'T2' species = 'OAK' height_cm = 150 )
( tree_id = 'T3' species = 'PINE' height_cm = 200 )
( tree_id = 'T4' species = 'PINE' height_cm = 100 )
( tree_id = 'T5' species = 'BIRCH' height_cm = 199 )
( tree_id = 'T6' species = 'BIRCH' height_cm = 250 ) ).
go_env->insert_test_data( lt_plant ).
ENDMETHOD.
METHOD small_grade.
DATA lv_grade TYPE c LENGTH 1.
SELECT SINGLE grade FROM {{p}}i_plant_grade WHERE tree_id = 'T1' INTO @lv_grade.
cl_abap_unit_assert=>assert_equals( exp = 'S' act = lv_grade ).
ENDMETHOD.
METHOD medium_grade.
DATA lv_grade TYPE c LENGTH 1.
SELECT SINGLE grade FROM {{p}}i_plant_grade WHERE tree_id = 'T2' INTO @lv_grade.
cl_abap_unit_assert=>assert_equals( exp = 'M' act = lv_grade ).
SELECT SINGLE grade FROM {{p}}i_plant_grade WHERE tree_id = 'T4' INTO @lv_grade.
cl_abap_unit_assert=>assert_equals( exp = 'M' act = lv_grade ).
SELECT SINGLE grade FROM {{p}}i_plant_grade WHERE tree_id = 'T5' INTO @lv_grade.
cl_abap_unit_assert=>assert_equals( exp = 'M' act = lv_grade ).
ENDMETHOD.
METHOD large_grade.
DATA lv_grade TYPE c LENGTH 1.
SELECT SINGLE grade FROM {{p}}i_plant_grade WHERE tree_id = 'T3' INTO @lv_grade.
cl_abap_unit_assert=>assert_equals( exp = 'L' act = lv_grade ).
SELECT SINGLE grade FROM {{p}}i_plant_grade WHERE tree_id = 'T6' INTO @lv_grade.
cl_abap_unit_assert=>assert_equals( exp = 'L' act = lv_grade ).
ENDMETHOD.
METHOD height_in_metres.
SELECT SINGLE height_m FROM {{p}}i_plant_grade WHERE tree_id = 'T2' INTO @DATA(lv_height).
cl_abap_unit_assert=>assert_equals( exp = CONV decfloat34( '1.50' )
act = CONV decfloat34( lv_height ) ).
ENDMETHOD.
METHOD grade_text_value.
DATA lv_text TYPE c LENGTH 30.
SELECT SINGLE grade_text FROM {{p}}i_plant_grade WHERE tree_id = 'T1' INTO @lv_text.
cl_abap_unit_assert=>assert_equals( exp = 'S-OAK' act = lv_text ).
SELECT SINGLE grade_text FROM {{p}}i_plant_grade WHERE tree_id = 'T3' INTO @lv_text.
cl_abap_unit_assert=>assert_equals( exp = 'L-PINE' act = lv_text ).
ENDMETHOD.
METHOD row_count.
SELECT COUNT(*) FROM {{p}}i_plant_grade INTO @DATA(lv_count).
cl_abap_unit_assert=>assert_equals( exp = 6 act = lv_count ).
ENDMETHOD.
METHOD species_shown.
SELECT SINGLE species FROM {{p}}i_plant_grade WHERE tree_id = 'T3' INTO @DATA(lv_species).
cl_abap_unit_assert=>assert_equals( exp = 'PINE' act = lv_species ).
ENDMETHOD.
ENDCLASS.

View File

@@ -0,0 +1,53 @@
{
"task": "G1020",
"mutants": [
{
"object": "{{P}}I_PLANT_GRADE",
"mutant": "line 11: < -> >= (rel)",
"status": "killed",
"hidden": "5/7",
"failed_tests": [
"LARGE_GRADE",
"MEDIUM_GRADE"
]
},
{
"object": "{{P}}I_PLANT_GRADE",
"mutant": "line 15: < -> >= (rel)",
"status": "killed",
"hidden": "6/7",
"failed_tests": [
"GRADE_TEXT_VALUE"
]
},
{
"object": "{{P}}I_PLANT_GRADE",
"mutant": "line 15: 100 -> 101 (const)",
"status": "survived",
"hidden": "7/7",
"failed_tests": []
},
{
"object": "{{P}}I_PLANT_GRADE",
"mutant": "line 16: 200 -> 201 (const)",
"status": "killed",
"hidden": "6/7",
"failed_tests": [
"GRADE_TEXT_VALUE"
]
},
{
"object": "{{P}}I_PLANT_GRADE",
"mutant": "line 17: 'L' -> 'Z' (lit)",
"status": "killed",
"hidden": "6/7",
"failed_tests": [
"GRADE_TEXT_VALUE"
]
}
],
"valid": 5,
"killed": 4,
"kill_rate": 0.8,
"ok": true
}

View File

@@ -0,0 +1,21 @@
@AccessControl.authorizationCheck: #NOT_REQUIRED
@EndUserText.label: 'Grade of a tree sapling'
define view entity {{P}}I_PLANT_GRADE
as select from {{p}}plant as sapling
{
key sapling.tree_id as tree_id,
sapling.species as species,
cast( sapling.height_cm as abap.dec( 15, 2 ) )
/ 100 as height_m,
case when sapling.height_cm < 100 then 'S'
when sapling.height_cm < 200 then 'M'
else 'L'
end as grade,
concat( concat(
case when sapling.height_cm < 100 then 'S'
when sapling.height_cm < 200 then 'M'
else 'L'
end,
'-' ),
sapling.species ) as grade_text
}

View File

@@ -0,0 +1,43 @@
CLASS {{p}}t33_test DEFINITION PUBLIC FINAL CREATE PUBLIC
FOR TESTING DURATION SHORT RISK LEVEL HARMLESS.
PRIVATE SECTION.
CLASS-DATA go_env TYPE REF TO if_cds_test_environment.
CLASS-METHODS class_setup.
CLASS-METHODS class_teardown.
METHODS setup.
METHODS grade_and_text FOR TESTING.
METHODS height_in_metres FOR TESTING.
ENDCLASS.
CLASS {{p}}t33_test IMPLEMENTATION.
METHOD class_setup.
go_env = cl_cds_test_environment=>create( i_for_entity = '{{P}}I_PLANT_GRADE' ).
ENDMETHOD.
METHOD class_teardown.
go_env->destroy( ).
ENDMETHOD.
METHOD setup.
DATA lt_plant TYPE STANDARD TABLE OF {{p}}plant WITH EMPTY KEY.
go_env->clear_doubles( ).
lt_plant = VALUE #( ( tree_id = 'A' species = 'OAK' height_cm = 150 ) ).
go_env->insert_test_data( lt_plant ).
ENDMETHOD.
METHOD grade_and_text.
DATA lv_grade TYPE c LENGTH 1.
DATA lv_text TYPE c LENGTH 30.
SELECT SINGLE grade, grade_text FROM {{p}}i_plant_grade WHERE tree_id = 'A'
INTO (@lv_grade, @lv_text).
cl_abap_unit_assert=>assert_equals( exp = 'M' act = lv_grade ).
cl_abap_unit_assert=>assert_equals( exp = 'M-OAK' act = lv_text ).
ENDMETHOD.
METHOD height_in_metres.
DATA lv_height TYPE decfloat34.
SELECT SINGLE height_m FROM {{p}}i_plant_grade WHERE tree_id = 'A' INTO @lv_height.
cl_abap_unit_assert=>assert_equals( exp = CONV decfloat34( '1.50' ) act = lv_height ).
ENDMETHOD.
ENDCLASS.

View File

@@ -0,0 +1,11 @@
@EndUserText.label : 'Tree sapling'
@AbapCatalog.enhancement.category : #NOT_EXTENSIBLE
@AbapCatalog.tableCategory : #TRANSPARENT
@AbapCatalog.deliveryClass : #A
@AbapCatalog.dataMaintenance : #RESTRICTED
define table {{p}}plant {
key client : abap.clnt not null;
key tree_id : abap.char(10) not null;
species : abap.char(20);
height_cm : abap.int4;
}

View File

@@ -0,0 +1,39 @@
# 1. Goal
Show the grade of each tree sapling in a plant nursery. A report and an OData
service will read the grades, so the calculation must be in the database, in a
CDS view.
# 2. Open questions
None.
# 3. Context
- Table {{P}}PLANT (tree sapling), package $TMP. Key: TREE_ID (CHAR 10).
Fields: SPECIES (CHAR 20), HEIGHT_CM (INT4, the height in centimetres).
# 4. Contract
- Create the CDS view entity {{P}}I_PLANT_GRADE in package $TMP.
- Elements, with these names: TREE_ID (key), SPECIES, HEIGHT_M, GRADE,
GRADE_TEXT.
- No authorization check (#NOT_REQUIRED).
# 5. Business rules
1. Show one row for each tree sapling. Do not add rows and do not remove rows.
2. SPECIES is the species of the sapling.
3. HEIGHT_M is the height in metres with 2 decimals. Example: 150 cm is
1.50 m.
4. GRADE is the size class of the sapling:
- 'S' when the height is less than 100 cm.
- 'M' when the height is 100 cm or more and less than 200 cm.
- 'L' when the height is 200 cm or more.
5. GRADE_TEXT is the grade, then a hyphen, then the species. Example: a pine
sapling of grade 'L' has the text 'L-PINE'.
# 6. Constraints
- Release target: 7.58.
- Coding standards: Clean ABAP. Use a CDS view entity, not a database view.
- Out of scope: do not change {{P}}PLANT.
# 7. Acceptance
- The view {{P}}I_PLANT_GRADE is active and has no syntax error.
- The hidden tests pass.
- Write ABAP Unit tests with CL_CDS_TEST_ENVIRONMENT in a global test class.

View File

@@ -0,0 +1,59 @@
{
"id": "G1020",
"category": "B",
"object_type": "DDLS",
"difficulty": 2,
"release_target": "v758",
"expected_outcome": "implement",
"budget": {
"max_tool_calls": 60,
"max_activations": 15
},
"seed": [
{
"type": "TABL",
"name": "{{P}}PLANT",
"file": "seed/plant.tabl.asabap",
"description": "Tree sapling"
}
],
"contract": [
{
"type": "DDLS",
"name": "{{P}}I_PLANT_GRADE",
"fields": [
"TREE_ID",
"SPECIES",
"HEIGHT_M",
"GRADE",
"GRADE_TEXT"
]
}
],
"out_of_scope": [
"{{P}}PLANT"
],
"hidden_tests": [
{
"type": "CLAS",
"name": "{{P}}T33_HIDDEN",
"file": "hidden/t33_hidden.clas.abap",
"description": "T33 hidden tests"
}
],
"reference": [
{
"type": "DDLS",
"name": "{{P}}I_PLANT_GRADE",
"file": "reference/i_plant_grade.ddls.asddls",
"description": "Grade of each tree sapling"
},
{
"type": "CLAS",
"name": "{{P}}T33_TEST",
"file": "reference/t33_test.clas.abap",
"description": "T33 own tests"
}
],
"craft_checks": []
}