Evaluator reference¶
Every evaluator a criterion type can name, with the parameters compile_definition accepts. Templates only group evaluators here: type alone selects one. The same data is served by GET /api/v1/templates; the definition reference describes the rest of a definition.
Capabilities¶
An evaluator runs only on a host that provides its capabilities. The HTTP API composes execution_host.docker.DockerHost; the GitHub Action composes execution_host.runner.RunnerHost, which provides the same capabilities on the runner's Docker.
| Capability | Shipped hosts | Meaning |
|---|---|---|
sandbox_execution |
provided | Runs the submission through a host-supplied execution session. Unavailable without execution support for the selected language. |
http_network |
not provided (SERVER_CAPABILITY_UNAVAILABLE) |
Requires a host-supplied assessed-server session covering startup, readiness, HTTP reachability and teardown. The default Docker profile fails before acquisition because it supplies no server lifecycle. |
ai_provider |
provided | Delegates assessment to a host-supplied AI provider. Missing provider support fails the execution before scoring. |
structural_analysis |
provided | Uses in-process ast-grep structural analysis of the submission source. Requires ast-grep-py to be installed and a supported language; missing analysis fails the assessment instead of scoring zero. |
Html Css Js Template (webdev)¶
Static checks of HTML, CSS and JavaScript files for web development assignments.
| Evaluator | Description |
|---|---|
has_class |
Checks for the presence of specific CSS classes, with wildcard support, a minimum number of times. |
check_bootstrap_linked |
Checks if the Bootstrap framework (CSS or JS) is linked in the HTML file. |
check_internal_links |
Checks for the existence of internal anchor links pointing to valid element IDs. |
has_tag |
Checks if a specific HTML tag appears a minimum number of times. |
has_forbidden_tag |
Checks for the presence of a forbidden HTML tag. |
has_attribute |
Checks if a specific HTML attribute is present a minimum number of times. |
check_no_unclosed_tags |
Detects HTML tags that were opened but not closed. |
check_no_inline_styles |
Ensures that no inline styles are used in the HTML file. |
uses_semantic_tags |
Checks if the HTML uses at least one common semantic tag. |
check_css_linked |
Checks if an external CSS stylesheet is linked in the HTML. |
css_uses_property |
Checks if a specific CSS property and value pair exists. |
count_over_usage |
Penalizes the use of a specific text string if it exceeds a maximum allowed count. |
js_uses_feature |
Performs a simple string search to check if a specific feature is present. |
uses_forbidden_method |
Checks and penalizes the use of a forbidden method or keyword. |
count_global_vars |
Counts the number of variables declared in the global scope. |
check_headings_sequential |
Checks if heading levels (h1-h6) are sequential and do not skip levels. |
check_all_images_have_alt |
Checks if all <img> tags have a non-empty alt attribute. |
check_html_direct_children |
Ensures that the only direct children of the <html> tag are <head> and <body>. |
check_tag_not_inside |
Checks if a specific tag is not nested anywhere inside another specific tag. |
check_internal_links_to_article |
Checks for internal anchor links pointing to IDs on <article> tags. |
has_style |
Checks if a specific CSS style rule appears a minimum number of times. |
check_head_details |
Checks if a specific detail tag exists in the <head> section. |
check_attribute_and_value |
Checks if a specific HTML tag contains a specific attribute with a certain value. |
check_dir_exists |
Checks if a specific directory exists in the submission. |
check_project_structure |
Checks if the expected structure path exists in the submission files. |
check_id_selector_over_usage |
Counts valid ID selectors in the CSS. |
uses_relative_units |
Checks if the CSS file uses relative units like em, rem, %, vh, vw. |
check_media_queries |
Checks if there are media queries in the CSS file. |
check_flexbox_usage |
Checks if Flexbox properties are used in the CSS file. |
has_no_bootstrap |
Passes while the HTML file links no Bootstrap CSS or JS (the opposite of check_bootstrap_linked). |
link_points_to_page_with_query_param |
Checks for anchor tags leading to a specific page with a required query string parameter. |
js_uses_query_string_parsing |
Checks if the JavaScript code contains patterns for reading query strings from the URL. |
js_has_json_array_with_id |
Checks for the existence of a JS object array where each object has a specific required key. |
js_uses_dom_manipulation |
Checks if the JS code uses a minimum number of common DOM manipulation methods. |
has_no_js_framework |
Passes while no HTML or JavaScript file of the project references a JavaScript framework (React, Vue, Angular). |
count_unused_css_classes |
Counts the CSS classes the project's CSS files define but no HTML file uses (or, without CSS, the HTML classes no CSS defines). |
has_class¶
Checks for the presence of specific CSS classes, with wildcard support, a minimum number of times.
- Template:
webdev - Capabilities: none
- Languages: any allowed language
| Parameter | Type | Required | Default | Constraints | Description |
|---|---|---|---|---|---|
class_names |
list of string | yes | — | ≥ 1 items; each item length ≥ 1 | A list of class names to search for. Wildcards () are supported (e.g., 'col-'). |
required_count |
integer | no | 1 |
≥ 1 | The minimum total number of times the classes must appear. |
Example criterion (placeholder values; defaults written out):
{
"id": "has-class",
"type": "has_class",
"name": "Has class",
"parameters": {
"class_names": [
"example"
],
"required_count": 1
},
"weight": 100
}
check_bootstrap_linked¶
Checks if the Bootstrap framework (CSS or JS) is linked in the HTML file.
- Template:
webdev - Capabilities: none
- Languages: any allowed language
No parameters: use "parameters": {}.
Example criterion (placeholder values; defaults written out):
{
"id": "check-bootstrap-linked",
"type": "check_bootstrap_linked",
"name": "Check bootstrap linked",
"parameters": {},
"weight": 100
}
check_internal_links¶
Checks for the existence of internal anchor links pointing to valid element IDs.
- Template:
webdev - Capabilities: none
- Languages: any allowed language
| Parameter | Type | Required | Default | Constraints | Description |
|---|---|---|---|---|---|
required_count |
integer | no | 1 |
≥ 1 | The minimum number of links that point to an existing element ID. |
Example criterion (placeholder values; defaults written out):
{
"id": "check-internal-links",
"type": "check_internal_links",
"name": "Check internal links",
"parameters": {
"required_count": 1
},
"weight": 100
}
has_tag¶
Checks if a specific HTML tag appears a minimum number of times.
- Template:
webdev - Capabilities: none
- Languages: any allowed language
| Parameter | Type | Required | Default | Constraints | Description |
|---|---|---|---|---|---|
tag |
string | yes | — | length ≥ 1 | The HTML tag to search for (e.g., 'div'). |
required_count |
integer | no | 1 |
≥ 1 | The minimum number of times the tag must appear. |
Example criterion (placeholder values; defaults written out):
{
"id": "has-tag",
"type": "has_tag",
"name": "Has tag",
"parameters": {
"tag": "example",
"required_count": 1
},
"weight": 100
}
has_forbidden_tag¶
Checks for the presence of a forbidden HTML tag.
- Template:
webdev - Capabilities: none
- Languages: any allowed language
- Passes when absent: Prohibition: passes while the forbidden tag is absent.
| Parameter | Type | Required | Default | Constraints | Description |
|---|---|---|---|---|---|
tag |
string | yes | — | length ≥ 1 | The forbidden HTML tag to search for. |
Example criterion (placeholder values; defaults written out):
{
"id": "has-forbidden-tag",
"type": "has_forbidden_tag",
"name": "Has forbidden tag",
"parameters": {
"tag": "example"
},
"weight": 100
}
has_attribute¶
Checks if a specific HTML attribute is present a minimum number of times.
- Template:
webdev - Capabilities: none
- Languages: any allowed language
| Parameter | Type | Required | Default | Constraints | Description |
|---|---|---|---|---|---|
attribute |
string | yes | — | length ≥ 1 | The attribute to search for (e.g., 'alt'). |
required_count |
integer | no | 1 |
≥ 1 | The minimum number of times the attribute must appear. |
Example criterion (placeholder values; defaults written out):
{
"id": "has-attribute",
"type": "has_attribute",
"name": "Has attribute",
"parameters": {
"attribute": "example",
"required_count": 1
},
"weight": 100
}
check_no_unclosed_tags¶
Detects HTML tags that were opened but not closed.
- Template:
webdev - Capabilities: none
- Languages: any allowed language
- Passes when absent: Prohibition: passes while no tag is left unclosed.
No parameters: use "parameters": {}.
Example criterion (placeholder values; defaults written out):
{
"id": "check-no-unclosed-tags",
"type": "check_no_unclosed_tags",
"name": "Check no unclosed tags",
"parameters": {},
"weight": 100
}
check_no_inline_styles¶
Ensures that no inline styles are used in the HTML file.
- Template:
webdev - Capabilities: none
- Languages: any allowed language
- Passes when absent: Prohibition: passes while no element has an inline style.
No parameters: use "parameters": {}.
Example criterion (placeholder values; defaults written out):
{
"id": "check-no-inline-styles",
"type": "check_no_inline_styles",
"name": "Check no inline styles",
"parameters": {},
"weight": 100
}
uses_semantic_tags¶
Checks if the HTML uses at least one common semantic tag.
- Template:
webdev - Capabilities: none
- Languages: any allowed language
No parameters: use "parameters": {}.
Example criterion (placeholder values; defaults written out):
{
"id": "uses-semantic-tags",
"type": "uses_semantic_tags",
"name": "Uses semantic tags",
"parameters": {},
"weight": 100
}
check_css_linked¶
Checks if an external CSS stylesheet is linked in the HTML.
- Template:
webdev - Capabilities: none
- Languages: any allowed language
No parameters: use "parameters": {}.
Example criterion (placeholder values; defaults written out):
{
"id": "check-css-linked",
"type": "check_css_linked",
"name": "Check css linked",
"parameters": {},
"weight": 100
}
css_uses_property¶
Checks if a specific CSS property and value pair exists.
- Template:
webdev - Capabilities: none
- Languages: any allowed language
| Parameter | Type | Required | Default | Constraints | Description |
|---|---|---|---|---|---|
prop |
string | yes | — | length ≥ 1 | The CSS property. |
value |
string | yes | — | length ≥ 1 | The expected value. |
Example criterion (placeholder values; defaults written out):
{
"id": "css-uses-property",
"type": "css_uses_property",
"name": "Css uses property",
"parameters": {
"prop": "example",
"value": "example"
},
"weight": 100
}
count_over_usage¶
Penalizes the use of a specific text string if it exceeds a maximum allowed count.
- Template:
webdev - Capabilities: none
- Languages: any allowed language
- Passes when absent: Limit: passes while the text appears at most max_allowed times.
| Parameter | Type | Required | Default | Constraints | Description |
|---|---|---|---|---|---|
text |
string | yes | — | length ≥ 1 | The text to be counted. |
max_allowed |
integer | no | 0 |
≥ 0 | The maximum number of allowed occurrences. |
Example criterion (placeholder values; defaults written out):
{
"id": "count-over-usage",
"type": "count_over_usage",
"name": "Count over usage",
"parameters": {
"text": "example",
"max_allowed": 0
},
"weight": 100
}
js_uses_feature¶
Performs a simple string search to check if a specific feature is present.
- Template:
webdev - Capabilities: none
- Languages: any allowed language
| Parameter | Type | Required | Default | Constraints | Description |
|---|---|---|---|---|---|
feature |
string | yes | — | length ≥ 1 | The feature to search for. |
Example criterion (placeholder values; defaults written out):
{
"id": "js-uses-feature",
"type": "js_uses_feature",
"name": "Js uses feature",
"parameters": {
"feature": "example"
},
"weight": 100
}
uses_forbidden_method¶
Checks and penalizes the use of a forbidden method or keyword.
- Template:
webdev - Capabilities: none
- Languages: any allowed language
- Passes when absent: Prohibition: passes while the forbidden method is not called.
| Parameter | Type | Required | Default | Constraints | Description |
|---|---|---|---|---|---|
method |
string | yes | — | length ≥ 1 | The name of the forbidden method. |
Example criterion (placeholder values; defaults written out):
{
"id": "uses-forbidden-method",
"type": "uses_forbidden_method",
"name": "Uses forbidden method",
"parameters": {
"method": "example"
},
"weight": 100
}
count_global_vars¶
Counts the number of variables declared in the global scope.
- Template:
webdev - Capabilities: none
- Languages: any allowed language
- Passes when absent: Limit: passes while global variables number at most max_allowed.
| Parameter | Type | Required | Default | Constraints | Description |
|---|---|---|---|---|---|
max_allowed |
integer | no | 0 |
≥ 0 | The maximum number of allowed global variables. |
Example criterion (placeholder values; defaults written out):
{
"id": "count-global-vars",
"type": "count_global_vars",
"name": "Count global vars",
"parameters": {
"max_allowed": 0
},
"weight": 100
}
check_headings_sequential¶
Checks if heading levels (h1-h6) are sequential and do not skip levels.
- Template:
webdev - Capabilities: none
- Languages: any allowed language
- Passes when absent: Rule over headings: passes while no heading level is skipped, including pages with fewer than two levels.
No parameters: use "parameters": {}.
Example criterion (placeholder values; defaults written out):
{
"id": "check-headings-sequential",
"type": "check_headings_sequential",
"name": "Check headings sequential",
"parameters": {},
"weight": 100
}
check_all_images_have_alt¶
Checks if all <img> tags have a non-empty alt attribute.
- Template:
webdev - Capabilities: none
- Languages: any allowed language
- Passes when absent: Rule over images: passes while no image lacks alt text, including pages without images.
No parameters: use "parameters": {}.
Example criterion (placeholder values; defaults written out):
{
"id": "check-all-images-have-alt",
"type": "check_all_images_have_alt",
"name": "Check all images have alt",
"parameters": {},
"weight": 100
}
check_html_direct_children¶
Ensures that the only direct children of the <html> tag are <head> and <body>.
- Template:
webdev - Capabilities: none
- Languages: any allowed language
No parameters: use "parameters": {}.
Example criterion (placeholder values; defaults written out):
{
"id": "check-html-direct-children",
"type": "check_html_direct_children",
"name": "Check html direct children",
"parameters": {},
"weight": 100
}
check_tag_not_inside¶
Checks if a specific tag is not nested anywhere inside another specific tag.
- Template:
webdev - Capabilities: none
- Languages: any allowed language
- Passes when absent: Prohibition: passes while the child tag never appears inside the parent tag.
| Parameter | Type | Required | Default | Constraints | Description |
|---|---|---|---|---|---|
child_tag |
string | yes | — | length ≥ 1 | The child tag. |
parent_tag |
string | yes | — | length ≥ 1 | The parent tag. |
Example criterion (placeholder values; defaults written out):
{
"id": "check-tag-not-inside",
"type": "check_tag_not_inside",
"name": "Check tag not inside",
"parameters": {
"child_tag": "example",
"parent_tag": "example"
},
"weight": 100
}
check_internal_links_to_article¶
Checks for internal anchor links pointing to IDs on <article> tags.
- Template:
webdev - Capabilities: none
- Languages: any allowed language
| Parameter | Type | Required | Default | Constraints | Description |
|---|---|---|---|---|---|
required_count |
integer | no | 1 |
≥ 1 | The minimum number of links that point to the ID of an <article> element. |
Example criterion (placeholder values; defaults written out):
{
"id": "check-internal-links-to-article",
"type": "check_internal_links_to_article",
"name": "Check internal links to article",
"parameters": {
"required_count": 1
},
"weight": 100
}
has_style¶
Checks if a specific CSS style rule appears a minimum number of times.
- Template:
webdev - Capabilities: none
- Languages: any allowed language
| Parameter | Type | Required | Default | Constraints | Description |
|---|---|---|---|---|---|
style |
string | yes | — | length ≥ 1 | The style rule. |
required_count |
integer | no | 1 |
≥ 1 | The minimum number of occurrences. |
Example criterion (placeholder values; defaults written out):
{
"id": "has-style",
"type": "has_style",
"name": "Has style",
"parameters": {
"style": "example",
"required_count": 1
},
"weight": 100
}
check_head_details¶
Checks if a specific detail tag exists in the <head> section.
- Template:
webdev - Capabilities: none
- Languages: any allowed language
| Parameter | Type | Required | Default | Constraints | Description |
|---|---|---|---|---|---|
detail_tag |
string | yes | — | length ≥ 1 | The tag to be checked. |
Example criterion (placeholder values; defaults written out):
{
"id": "check-head-details",
"type": "check_head_details",
"name": "Check head details",
"parameters": {
"detail_tag": "example"
},
"weight": 100
}
check_attribute_and_value¶
Checks if a specific HTML tag contains a specific attribute with a certain value.
- Template:
webdev - Capabilities: none
- Languages: any allowed language
| Parameter | Type | Required | Default | Constraints | Description |
|---|---|---|---|---|---|
tag |
string | yes | — | length ≥ 1 | The tag. |
attribute |
string | yes | — | length ≥ 1 | The attribute. |
value |
string | yes | — | length ≥ 1 | The expected value. |
Example criterion (placeholder values; defaults written out):
{
"id": "check-attribute-and-value",
"type": "check_attribute_and_value",
"name": "Check attribute and value",
"parameters": {
"tag": "example",
"attribute": "example",
"value": "example"
},
"weight": 100
}
check_dir_exists¶
Checks if a specific directory exists in the submission.
- Template:
webdev - Capabilities: none
- Languages: any allowed language
| Parameter | Type | Required | Default | Constraints | Description |
|---|---|---|---|---|---|
dir_path |
string | yes | — | length ≥ 1 | The directory path. |
Example criterion (placeholder values; defaults written out):
{
"id": "check-dir-exists",
"type": "check_dir_exists",
"name": "Check dir exists",
"parameters": {
"dir_path": "example"
},
"weight": 100
}
check_project_structure¶
Checks if the expected structure path exists in the submission files.
- Template:
webdev - Capabilities: none
- Languages: any allowed language
| Parameter | Type | Required | Default | Constraints | Description |
|---|---|---|---|---|---|
expected_structure |
string | yes | — | length ≥ 1 | The expected file path. |
Example criterion (placeholder values; defaults written out):
{
"id": "check-project-structure",
"type": "check_project_structure",
"name": "Check project structure",
"parameters": {
"expected_structure": "example"
},
"weight": 100
}
check_id_selector_over_usage¶
Counts valid ID selectors in the CSS.
- Template:
webdev - Capabilities: none
- Languages: any allowed language
- Passes when absent: Limit: passes while ID selectors appear at most max_allowed times.
| Parameter | Type | Required | Default | Constraints | Description |
|---|---|---|---|---|---|
max_allowed |
integer | no | 0 |
≥ 0 | Maximum number of allowed ID selectors. |
Example criterion (placeholder values; defaults written out):
{
"id": "check-id-selector-over-usage",
"type": "check_id_selector_over_usage",
"name": "Check id selector over usage",
"parameters": {
"max_allowed": 0
},
"weight": 100
}
uses_relative_units¶
Checks if the CSS file uses relative units like em, rem, %, vh, vw.
- Template:
webdev - Capabilities: none
- Languages: any allowed language
No parameters: use "parameters": {}.
Example criterion (placeholder values; defaults written out):
{
"id": "uses-relative-units",
"type": "uses_relative_units",
"name": "Uses relative units",
"parameters": {},
"weight": 100
}
check_media_queries¶
Checks if there are media queries in the CSS file.
- Template:
webdev - Capabilities: none
- Languages: any allowed language
No parameters: use "parameters": {}.
Example criterion (placeholder values; defaults written out):
{
"id": "check-media-queries",
"type": "check_media_queries",
"name": "Check media queries",
"parameters": {},
"weight": 100
}
check_flexbox_usage¶
Checks if Flexbox properties are used in the CSS file.
- Template:
webdev - Capabilities: none
- Languages: any allowed language
No parameters: use "parameters": {}.
Example criterion (placeholder values; defaults written out):
{
"id": "check-flexbox-usage",
"type": "check_flexbox_usage",
"name": "Check flexbox usage",
"parameters": {},
"weight": 100
}
has_no_bootstrap¶
Passes while the HTML file links no Bootstrap CSS or JS (the opposite of check_bootstrap_linked).
- Template:
webdev - Capabilities: none
- Languages: any allowed language
- Passes when absent: Prohibition: passes while Bootstrap is not used.
No parameters: use "parameters": {}.
Example criterion (placeholder values; defaults written out):
{
"id": "has-no-bootstrap",
"type": "has_no_bootstrap",
"name": "Has no bootstrap",
"parameters": {},
"weight": 100
}
link_points_to_page_with_query_param¶
Checks for anchor tags leading to a specific page with a required query string parameter.
- Template:
webdev - Capabilities: none
- Languages: any allowed language
| Parameter | Type | Required | Default | Constraints | Description |
|---|---|---|---|---|---|
target_page |
string | yes | — | length ≥ 1 | The expected destination page (e.g., 'details.html'). |
query_param |
string | yes | — | length ≥ 1 | The name of the query string parameter to check (e.g., 'id'). |
required_count |
integer | no | 1 |
≥ 1 | The minimum number of valid links. |
Example criterion (placeholder values; defaults written out):
{
"id": "link-points-to-page-with-query-param",
"type": "link_points_to_page_with_query_param",
"name": "Link points to page with query param",
"parameters": {
"target_page": "example",
"query_param": "example",
"required_count": 1
},
"weight": 100
}
js_uses_query_string_parsing¶
Checks if the JavaScript code contains patterns for reading query strings from the URL.
- Template:
webdev - Capabilities: none
- Languages: any allowed language
No parameters: use "parameters": {}.
Example criterion (placeholder values; defaults written out):
{
"id": "js-uses-query-string-parsing",
"type": "js_uses_query_string_parsing",
"name": "Js uses query string parsing",
"parameters": {},
"weight": 100
}
js_has_json_array_with_id¶
Checks for the existence of a JS object array where each object has a specific required key.
- Template:
webdev - Capabilities: none
- Languages: any allowed language
| Parameter | Type | Required | Default | Constraints | Description |
|---|---|---|---|---|---|
required_key |
string | yes | — | length ≥ 1 | The key that must exist in each object (e.g., 'id'). |
min_items |
integer | no | 1 |
≥ 1 | The minimum number of items expected in the array. |
Example criterion (placeholder values; defaults written out):
{
"id": "js-has-json-array-with-id",
"type": "js_has_json_array_with_id",
"name": "Js has json array with id",
"parameters": {
"required_key": "example",
"min_items": 1
},
"weight": 100
}
js_uses_dom_manipulation¶
Checks if the JS code uses a minimum number of common DOM manipulation methods.
- Template:
webdev - Capabilities: none
- Languages: any allowed language
| Parameter | Type | Required | Default | Constraints | Description |
|---|---|---|---|---|---|
methods |
list of string | yes | — | ≥ 1 items; each item length ≥ 1 | A list of methods to search for (e.g., ['createElement', 'appendChild']). |
required_count |
integer | no | 1 |
≥ 1 | Total minimum number of times these methods must appear. |
Example criterion (placeholder values; defaults written out):
{
"id": "js-uses-dom-manipulation",
"type": "js_uses_dom_manipulation",
"name": "Js uses dom manipulation",
"parameters": {
"methods": [
"example"
],
"required_count": 1
},
"weight": 100
}
has_no_js_framework¶
Passes while no HTML or JavaScript file of the project references a JavaScript framework (React, Vue, Angular).
- Template:
webdev - Capabilities: none
- Languages: any allowed language
- Passes when absent: Prohibition: passes while no JavaScript framework is referenced.
No parameters: use "parameters": {}.
Example criterion (placeholder values; defaults written out):
{
"id": "has-no-js-framework",
"type": "has_no_js_framework",
"name": "Has no js framework",
"parameters": {},
"weight": 100
}
count_unused_css_classes¶
Counts the CSS classes the project's CSS files define but no HTML file uses (or, without CSS, the HTML classes no CSS defines).
- Template:
webdev - Capabilities: none
- Languages: any allowed language
- Passes when absent: Limit: passes while no CSS class is left unused.
No parameters: use "parameters": {}.
Example criterion (placeholder values; defaults written out):
{
"id": "count-unused-css-classes",
"type": "count_unused_css_classes",
"name": "Count unused css classes",
"parameters": {},
"weight": 100
}
API Testing (api)¶
A template for evaluating assignments where students create a web API.
Not available on the shipped hosts
Requires http_network, which the HTTP API and the GitHub Action do not provide: a definition using it fails with SERVER_CAPABILITY_UNAVAILABLE before any sandbox is acquired.
| Evaluator | Description |
|---|---|
health_check |
Checks if a specific endpoint is running and returns status code 200. |
check_response_json |
Checks if an endpoint's JSON response has a specific key and value. |
health_check¶
Checks if a specific endpoint is running and returns status code 200.
- Template:
api - Capabilities:
http_network - Languages: any allowed language
Not available on the shipped hosts
Requires http_network, which the HTTP API and the GitHub Action do not provide: a definition using it fails with SERVER_CAPABILITY_UNAVAILABLE before any sandbox is acquired.
| Parameter | Type | Required | Default | Constraints | Description |
|---|---|---|---|---|---|
endpoint |
string | yes | — | length ≥ 1 | The endpoint to be tested (e.g., '/health'). |
Example criterion (placeholder values; defaults written out):
{
"id": "health-check",
"type": "health_check",
"name": "Health check",
"parameters": {
"endpoint": "example"
},
"weight": 100
}
check_response_json¶
Checks if an endpoint's JSON response has a specific key and value.
- Template:
api - Capabilities:
http_network - Languages: any allowed language
Not available on the shipped hosts
Requires http_network, which the HTTP API and the GitHub Action do not provide: a definition using it fails with SERVER_CAPABILITY_UNAVAILABLE before any sandbox is acquired.
| Parameter | Type | Required | Default | Constraints | Description |
|---|---|---|---|---|---|
endpoint |
string | yes | — | length ≥ 1 | The API endpoint to be tested (e.g., '/api/data'). |
expected_key |
string | yes | — | length ≥ 1 | The JSON key to check. |
expected_value |
any JSON value | no | null |
— | The expected value for the specified key. |
Example criterion (placeholder values; defaults written out):
{
"id": "check-response-json",
"type": "check_response_json",
"name": "Check response json",
"parameters": {
"endpoint": "example",
"expected_key": "example",
"expected_value": null
},
"weight": 100
}
Input/Output (input_output)¶
A template for evaluating assignments based on command-line input and output.
| Evaluator | Description |
|---|---|
expect_output |
Executes the student program, providing a series of line-separated inputs and verifying if the final output is correct. |
dont_fail |
Executes the student program with specific input and verifies it doesn't fail (no crash, no timeout). |
expect_file_artifact |
Executes the student program, then extracts a generated file from the sandbox and validates its content against expected values. |
expect_output¶
Executes the student program, providing a series of line-separated inputs and verifying if the final output is correct.
- Template:
input_output - Capabilities:
sandbox_execution - Languages: any allowed language
| Parameter | Type | Required | Default | Constraints | Description |
|---|---|---|---|---|---|
inputs |
list of string | no | [] |
— | List of strings to be sent to the program, each on a new line. |
expected_output |
string | yes | — | — | The single string the program must print to standard output. |
program_command |
string or map of python or java or node or cpp or c to string |
yes | — | length ≥ 1; each value length ≥ 1 | Command that runs the program: a nonempty string, a map with a command for every allowed language, or 'CMD' for the conventional per-language default. It runs without a shell for every test: compile in preparation.setup_commands, never here; standalone shell operators (&&, |, ;, >, ...) are rejected. |
normalization |
boolean | no | true |
— | Strip trailing whitespace from each line and normalize line endings |
Example criterion (placeholder values; defaults written out):
{
"id": "expect-output",
"type": "expect_output",
"name": "Expect output",
"parameters": {
"inputs": [],
"expected_output": "example",
"program_command": "example",
"normalization": true
},
"weight": 100
}
dont_fail¶
Executes the student program with specific input and verifies it doesn't fail (no crash, no timeout).
- Template:
input_output - Capabilities:
sandbox_execution - Languages: any allowed language
| Parameter | Type | Required | Default | Constraints | Description |
|---|---|---|---|---|---|
inputs |
list of string | no | [] |
— | Lines sent to the program's standard input, each ending in a newline; empty sends nothing. |
program_command |
string or map of python or java or node or cpp or c to string |
yes | — | length ≥ 1; each value length ≥ 1 | Command that runs the program: a nonempty string, a map with a command for every allowed language, or 'CMD' for the conventional per-language default. It runs without a shell for every test: compile in preparation.setup_commands, never here; standalone shell operators (&&, |, ;, >, ...) are rejected. |
Example criterion (placeholder values; defaults written out):
{
"id": "dont-fail",
"type": "dont_fail",
"name": "Dont fail",
"parameters": {
"inputs": [],
"program_command": "example"
},
"weight": 100
}
expect_file_artifact¶
Executes the student program, then extracts a generated file from the sandbox and validates its content against expected values.
- Template:
input_output - Capabilities:
sandbox_execution - Languages: any allowed language
| Parameter | Type | Required | Default | Constraints | Description |
|---|---|---|---|---|---|
inputs |
list of string | no | [] |
— | List of strings to be sent to the program via stdin. |
program_command |
string or map of python or java or node or cpp or c to string |
yes | — | length ≥ 1; each value length ≥ 1 | Command that runs the program: a nonempty string, a map with a command for every allowed language, or 'CMD' for the conventional per-language default. It runs without a shell for every test: compile in preparation.setup_commands, never here; standalone shell operators (&&, |, ;, >, ...) are rejected. |
artifact_path |
string | yes | — | length ≥ 1 | Relative path (under /app) of the file the program must generate (e.g. 'output.txt'). |
expected_content |
string | yes | — | — | The expected file content or pattern to match against. |
match_mode |
"exact" or "contains" or "regex" |
no | "exact" |
— | Comparison mode: 'exact' (default), 'contains', or 'regex'. |
normalization |
boolean | no | true |
— | Whether to normalize line endings and trim trailing whitespace (default: true). |
Example criterion (placeholder values; defaults written out):
{
"id": "expect-file-artifact",
"type": "expect_file_artifact",
"name": "Expect file artifact",
"parameters": {
"inputs": [],
"program_command": "example",
"artifact_path": "example",
"expected_content": "example",
"match_mode": "exact",
"normalization": true
},
"weight": 100
}
Static Analysis (static_analysis)¶
A template for evaluating assignments through static and structural code analysis.
| Evaluator | Description |
|---|---|
forbidden_import |
Statically analyzes submission files to check if any forbidden libraries were imported. Penalizes the submission if any forbidden imports are found. |
forbidden_keyword |
Statically analyzes submission files using structural analysis to detect forbidden language constructs (like loops or eval calls). |
ai_sorting_algorithm |
Uses AI to verify that the submission implements the requested sorting algorithm rather than a library shortcut. |
ai_search_algorithm |
Uses AI to verify that the submission implements the requested search algorithm rather than a library shortcut. |
ai_graph_algorithm |
Uses AI to verify that the submission implements the requested graph algorithm rather than a library shortcut. |
forbidden_import¶
Statically analyzes submission files to check if any forbidden libraries were imported. Penalizes the submission if any forbidden imports are found.
- Template:
static_analysis - Capabilities: none
- Languages:
python,java,node,cpp,c - Passes when absent: Prohibition: passes while none of the forbidden libraries is imported.
| Parameter | Type | Required | Default | Constraints | Description |
|---|---|---|---|---|---|
forbidden_imports |
list of string | yes | — | ≥ 1 items; each item length ≥ 1 | List of library/module names whose import is forbidden (at least one). |
Example criterion (placeholder values; defaults written out):
{
"id": "forbidden-import",
"type": "forbidden_import",
"name": "Forbidden import",
"parameters": {
"forbidden_imports": [
"example"
]
},
"weight": 100
}
forbidden_keyword¶
Statically analyzes submission files using structural analysis to detect forbidden language constructs (like loops or eval calls).
- Template:
static_analysis - Capabilities:
structural_analysis - Languages:
python,java,node,cpp,c - Passes when absent: Prohibition: passes while none of the forbidden constructs is used.
| Parameter | Type | Required | Default | Constraints | Description |
|---|---|---|---|---|---|
forbidden_keywords |
list of string | no | [] |
— | List of predefined constructs to forbid (e.g., 'for_loop', 'while_loop', 'eval_call'). At least one keyword or custom rule is required. |
custom_ast_grep_rules |
list of object | no | [] |
— | List of custom ast-grep rules to apply. |
Example criterion (placeholder values; defaults written out):
{
"id": "forbidden-keyword",
"type": "forbidden_keyword",
"name": "Forbidden keyword",
"parameters": {
"forbidden_keywords": [
"for_loop"
],
"custom_ast_grep_rules": []
},
"weight": 100
}
ai_sorting_algorithm¶
Uses AI to verify that the submission implements the requested sorting algorithm rather than a library shortcut.
- Template:
static_analysis - Capabilities:
ai_provider - Languages: any allowed language
| Parameter | Type | Required | Default | Constraints | Description |
|---|---|---|---|---|---|
algorithm_name |
string | yes | — | length ≥ 1 | Name of the algorithm the submission must implement. |
Example criterion (placeholder values; defaults written out):
{
"id": "ai-sorting-algorithm",
"type": "ai_sorting_algorithm",
"name": "Ai sorting algorithm",
"parameters": {
"algorithm_name": "example"
},
"weight": 100
}
ai_search_algorithm¶
Uses AI to verify that the submission implements the requested search algorithm rather than a library shortcut.
- Template:
static_analysis - Capabilities:
ai_provider - Languages: any allowed language
| Parameter | Type | Required | Default | Constraints | Description |
|---|---|---|---|---|---|
algorithm_name |
string | yes | — | length ≥ 1 | Name of the algorithm the submission must implement. |
Example criterion (placeholder values; defaults written out):
{
"id": "ai-search-algorithm",
"type": "ai_search_algorithm",
"name": "Ai search algorithm",
"parameters": {
"algorithm_name": "example"
},
"weight": 100
}
ai_graph_algorithm¶
Uses AI to verify that the submission implements the requested graph algorithm rather than a library shortcut.
- Template:
static_analysis - Capabilities:
ai_provider - Languages: any allowed language
| Parameter | Type | Required | Default | Constraints | Description |
|---|---|---|---|---|---|
algorithm_name |
string | yes | — | length ≥ 1 | Name of the algorithm the submission must implement. |
Example criterion (placeholder values; defaults written out):
{
"id": "ai-graph-algorithm",
"type": "ai_graph_algorithm",
"name": "Ai graph algorithm",
"parameters": {
"algorithm_name": "example"
},
"weight": 100
}