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,33 @@
{
"id": "G1008",
"pool": "train",
"object_type": "DDLS",
"category": "B",
"attempts": [
{
"stage": "bundle",
"errors": [
"hidden/turb_hidden.clas.abap line 77: syntax error for release v758 (abaplint): Statement does not exist in the configured ABAP version(or a parser error), \"SELECT\""
],
"by_check": {
"abaplint": 1
}
},
{
"stage": "validate",
"oracle": 0,
"null": 0
},
{
"stage": "validate",
"oracle": 0,
"null": 0
},
{
"stage": "validate",
"oracle": 73.0,
"null": 0
}
],
"accepted": false
}

View File

@@ -0,0 +1,103 @@
CLASS {{p}}turb_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 revenue_of_turbine FOR TESTING.
METHODS revenue_other_park FOR TESTING.
METHODS revenue_rounded FOR TESTING.
METHODS park_name_via_path FOR TESTING.
METHODS country_via_path FOR TESTING.
METHODS filter_by_country FOR TESTING.
METHODS row_per_turbine FOR TESTING.
METHODS nominal_kw_value FOR TESTING.
METHODS yield_value FOR TESTING.
METHODS park_id_value FOR TESTING.
ENDCLASS.
CLASS {{p}}turb_hidden IMPLEMENTATION.
METHOD class_setup.
go_env = cl_cds_test_environment=>create( i_for_entity = '{{P}}I_TURBINE' ).
ENDMETHOD.
METHOD class_teardown.
go_env->destroy( ).
ENDMETHOD.
METHOD setup.
DATA lt_park TYPE STANDARD TABLE OF {{p}}wpark WITH EMPTY KEY.
DATA lt_turb TYPE STANDARD TABLE OF {{p}}turbine WITH EMPTY KEY.
go_env->clear_doubles( ).
lt_park = VALUE #( ( park_id = 'P1' park_name = 'North Ridge' country = 'DE' tariff = '82.30' )
( park_id = 'P2' park_name = 'Sunny Hills' country = 'AT' tariff = '50.00' )
( park_id = 'P3' park_name = 'Coastal Wind' country = 'NL' tariff = '12.34' ) ).
lt_turb = VALUE #( ( turbine_id = 'T1' park_id = 'P1' nominal_kw = 3000 yield_mwh = '1234.50' )
( turbine_id = 'T2' park_id = 'P1' nominal_kw = 2000 yield_mwh = '100.00' )
( turbine_id = 'T3' park_id = 'P3' nominal_kw = 1500 yield_mwh = '0.50' )
( turbine_id = 'T4' park_id = 'P2' nominal_kw = 2500 yield_mwh = '10.00' )
( turbine_id = 'T5' park_id = 'P3' nominal_kw = 1000 yield_mwh = '0.33' ) ).
go_env->insert_test_data( lt_park ).
go_env->insert_test_data( lt_turb ).
ENDMETHOD.
METHOD revenue_of_turbine.
SELECT SINGLE revenue FROM {{p}}i_turbine WHERE turbine_id = 'T1' INTO @DATA(lv_revenue).
cl_abap_unit_assert=>assert_equals( exp = CONV decfloat34( '101599.35' )
act = CONV decfloat34( lv_revenue ) ).
ENDMETHOD.
METHOD revenue_other_park.
SELECT SINGLE revenue FROM {{p}}i_turbine WHERE turbine_id = 'T4' INTO @DATA(lv_revenue).
cl_abap_unit_assert=>assert_equals( exp = CONV decfloat34( '500.00' )
act = CONV decfloat34( lv_revenue ) ).
ENDMETHOD.
METHOD revenue_rounded.
SELECT SINGLE revenue FROM {{p}}i_turbine WHERE turbine_id = 'T5' INTO @DATA(lv_revenue).
cl_abap_unit_assert=>assert_equals( exp = CONV decfloat34( '4.07' )
act = CONV decfloat34( lv_revenue ) ).
ENDMETHOD.
METHOD park_name_via_path.
SELECT SINGLE \_PARK-park_name FROM {{p}}i_turbine
WHERE turbine_id = 'T1' INTO @DATA(lv_name).
cl_abap_unit_assert=>assert_equals( exp = 'North Ridge' act = lv_name ).
ENDMETHOD.
METHOD country_via_path.
SELECT SINGLE \_PARK-country FROM {{p}}i_turbine
WHERE turbine_id = 'T3' INTO @DATA(lv_country).
cl_abap_unit_assert=>assert_equals( exp = 'NL' act = lv_country ).
ENDMETHOD.
METHOD filter_by_country.
SELECT turbine_id, \_PARK-country AS country
FROM {{p}}i_turbine INTO TABLE @DATA(lt_rows).
DELETE lt_rows WHERE country <> 'DE'.
cl_abap_unit_assert=>assert_equals( exp = 2 act = lines( lt_rows ) ).
ENDMETHOD.
METHOD row_per_turbine.
SELECT turbine_id FROM {{p}}i_turbine INTO TABLE @DATA(lt_all).
cl_abap_unit_assert=>assert_equals( exp = 5 act = lines( lt_all ) ).
ENDMETHOD.
METHOD nominal_kw_value.
SELECT SINGLE nominal_kw FROM {{p}}i_turbine WHERE turbine_id = 'T2' INTO @DATA(lv_kw).
cl_abap_unit_assert=>assert_equals( exp = 2000 act = lv_kw ).
ENDMETHOD.
METHOD yield_value.
SELECT SINGLE yield_mwh FROM {{p}}i_turbine WHERE turbine_id = 'T3' INTO @DATA(lv_yield).
cl_abap_unit_assert=>assert_equals( exp = CONV decfloat34( '0.50' )
act = CONV decfloat34( lv_yield ) ).
ENDMETHOD.
METHOD park_id_value.
SELECT SINGLE park_id FROM {{p}}i_turbine WHERE turbine_id = 'T4' INTO @DATA(lv_park).
cl_abap_unit_assert=>assert_equals( exp = 'P2' act = lv_park ).
ENDMETHOD.
ENDCLASS.

View File

@@ -0,0 +1,42 @@
{
"task": "T16",
"mutants": [
{
"object": "{{P}}I_TURBINE",
"mutant": "revenue: * -> + (arithmetic)",
"status": "killed",
"hidden": "7/10",
"failed_tests": [
"REVENUE_OF_TURBINE",
"REVENUE_OTHER_PARK",
"REVENUE_ROUNDED"
]
},
{
"object": "{{P}}I_TURBINE",
"mutant": "association ON condition: = -> <> (eq)",
"status": "killed",
"hidden": "4/10",
"failed_tests": [
"PARK_NAME_VIA_PATH",
"COUNTRY_VIA_PATH",
"FILTER_BY_COUNTRY"
]
},
{
"object": "{{P}}I_TURBINE",
"mutant": "select list: _PARK removed (association not exposed)",
"status": "killed",
"hidden": "3/10",
"failed_tests": [
"PARK_NAME_VIA_PATH",
"COUNTRY_VIA_PATH",
"FILTER_BY_COUNTRY"
]
}
],
"valid": 3,
"killed": 3,
"kill_rate": 1.0,
"ok": true
}

View File

@@ -0,0 +1,14 @@
@AccessControl.authorizationCheck: #NOT_REQUIRED
@EndUserText.label: 'Wind turbine revenue'
define view entity {{P}}I_TURBINE
as select from {{p}}turbine as turbine
left outer join {{p}}wpark as park on park.park_id = turbine.park_id
association [0..1] to {{p}}wpark as _PARK on $projection.park_id = _PARK.park_id
{
key turbine.turbine_id as turbine_id,
turbine.park_id as park_id,
turbine.nominal_kw as nominal_kw,
turbine.yield_mwh as yield_mwh,
cast( turbine.yield_mwh * park.tariff as abap.dec(15,2) ) as revenue,
_PARK
}

View File

@@ -0,0 +1,41 @@
CLASS {{p}}turb_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 revenue_and_park FOR TESTING.
ENDCLASS.
CLASS {{p}}turb_test IMPLEMENTATION.
METHOD class_setup.
go_env = cl_cds_test_environment=>create( i_for_entity = '{{P}}I_TURBINE' ).
ENDMETHOD.
METHOD class_teardown.
go_env->destroy( ).
ENDMETHOD.
METHOD setup.
go_env->clear_doubles( ).
ENDMETHOD.
METHOD revenue_and_park.
DATA lt_park TYPE STANDARD TABLE OF {{p}}wpark WITH EMPTY KEY.
DATA lt_turb TYPE STANDARD TABLE OF {{p}}turbine WITH EMPTY KEY.
lt_park = VALUE #( ( park_id = 'A' park_name = 'Alpha Park' country = 'DE' tariff = '10.00' ) ).
lt_turb = VALUE #( ( turbine_id = 'X' park_id = 'A' nominal_kw = 100 yield_mwh = '5.00' ) ).
go_env->insert_test_data( lt_park ).
go_env->insert_test_data( lt_turb ).
SELECT SINGLE revenue FROM {{p}}i_turbine WHERE turbine_id = 'X' INTO @DATA(lv_revenue).
cl_abap_unit_assert=>assert_equals( exp = CONV decfloat34( '50.00' )
act = CONV decfloat34( lv_revenue ) ).
SELECT SINGLE \_PARK-park_name FROM {{p}}i_turbine
WHERE turbine_id = 'X' INTO @DATA(lv_name).
cl_abap_unit_assert=>assert_equals( exp = 'Alpha Park' act = lv_name ).
ENDMETHOD.
ENDCLASS.

View File

@@ -0,0 +1,12 @@
@EndUserText.label : 'Wind turbine'
@AbapCatalog.enhancement.category : #NOT_EXTENSIBLE
@AbapCatalog.tableCategory : #TRANSPARENT
@AbapCatalog.deliveryClass : #A
@AbapCatalog.dataMaintenance : #RESTRICTED
define table {{p}}turbine {
key client : abap.clnt not null;
key turbine_id : abap.char(10) not null;
park_id : abap.char(10);
nominal_kw : abap.int4;
yield_mwh : abap.dec(15,2);
}

View File

@@ -0,0 +1,12 @@
@EndUserText.label : 'Wind park'
@AbapCatalog.enhancement.category : #NOT_EXTENSIBLE
@AbapCatalog.tableCategory : #TRANSPARENT
@AbapCatalog.deliveryClass : #A
@AbapCatalog.dataMaintenance : #RESTRICTED
define table {{p}}wpark {
key client : abap.clnt not null;
key park_id : abap.char(10) not null;
park_name : abap.char(40);
country : abap.char(3);
tariff : abap.dec(15,2);
}

View File

@@ -0,0 +1,47 @@
# 1. Goal
A wind farm operator needs the revenue of each wind turbine. The revenue is the
yield of the turbine multiplied by the feed-in tariff of the wind park of the
turbine. A report and an OData service read the revenue, so the calculation must
be in the database, in a CDS view.
# 2. Open questions
None.
# 3. Context
- Table {{P}}WPARK (wind park), package $TMP. Key: PARK_ID (CHAR 10).
Fields: PARK_NAME (CHAR 40), COUNTRY (CHAR 3), TARIFF (DEC 15,2). TARIFF is
the feed-in tariff in euro for one MWh.
- Table {{P}}TURBINE (wind turbine), package $TMP. Key: TURBINE_ID (CHAR 10).
Fields: PARK_ID (CHAR 10), NOMINAL_KW (INT4), YIELD_MWH (DEC 15,2). YIELD_MWH
is the yield of the turbine in MWh.
# 4. Contract
- Create the CDS view entity {{P}}I_TURBINE in package $TMP.
- Elements, with these names: TURBINE_ID (key), PARK_ID, NOMINAL_KW, YIELD_MWH,
REVENUE.
- The view exposes an association with the name _PARK. The target of _PARK is
the wind park of the turbine.
- A caller reads the data of the wind park from the view with a path expression,
for example \_PARK-PARK_NAME or \_PARK-COUNTRY.
- No authorization check (#NOT_REQUIRED).
# 5. Business rules
1. The view shows one row for each turbine in {{P}}TURBINE.
2. PARK_ID is the park of the turbine.
3. NOMINAL_KW is the nominal power of the turbine.
4. YIELD_MWH is the yield of the turbine.
5. REVENUE is YIELD_MWH multiplied by the TARIFF of the wind park of the
turbine. REVENUE has 2 decimals.
6. _PARK points to the row of {{P}}WPARK that has the same PARK_ID as the
turbine.
7. PARK_NAME, COUNTRY and TARIFF of the wind park are available through _PARK.
# 6. Constraints
- Release target: 8.16.
- Coding standards: Clean ABAP.
- Out of scope: do not change {{P}}WPARK and {{P}}TURBINE.
# 7. Acceptance
- The view 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,66 @@
{
"id": "G1008",
"category": "B",
"object_type": "DDLS",
"difficulty": 2,
"release_target": "v816",
"expected_outcome": "implement",
"budget": {
"max_tool_calls": 60,
"max_activations": 15
},
"seed": [
{
"type": "TABL",
"name": "{{P}}WPARK",
"file": "seed/wpark.tabl.asabap",
"description": "Wind park"
},
{
"type": "TABL",
"name": "{{P}}TURBINE",
"file": "seed/turbine.tabl.asabap",
"description": "Wind turbine"
}
],
"contract": [
{
"type": "DDLS",
"name": "{{P}}I_TURBINE",
"fields": [
"TURBINE_ID",
"PARK_ID",
"NOMINAL_KW",
"YIELD_MWH",
"REVENUE"
]
}
],
"out_of_scope": [
"{{P}}WPARK",
"{{P}}TURBINE"
],
"hidden_tests": [
{
"type": "CLAS",
"name": "{{P}}TURB_HIDDEN",
"file": "hidden/turb_hidden.clas.abap",
"description": "Hidden tests for {{P}}I_TURBINE"
}
],
"reference": [
{
"type": "DDLS",
"name": "{{P}}I_TURBINE",
"file": "reference/i_turbine.ddls.asddls",
"description": "Wind turbine revenue"
},
{
"type": "CLAS",
"name": "{{P}}TURB_TEST",
"file": "reference/turb_test.clas.abap",
"description": "Own tests for {{P}}I_TURBINE"
}
],
"craft_checks": []
}