Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
AgenticApproachprogramsMetric reference
Size
source_loc: physical lines, including blanks, comments, and docstringsnonblank_loc: non-empty physical lineslogical_loc: logical Python statements, approximated from tokenizer logical newlinescomment_lines: lines containing a Python commentast_nodes: total abstract-syntax-tree nodes; a largely formatting-insensitive measure of syntactic sizeclass_count/function_count: class and function or method definitionshelper_function_count: functions other than__init__,reset,get_action, andupdateBranching and control flow
branch_count:if,elif, and conditional expressionsloop_count:for, async-for, andwhileloopsexception_handler_count:excepthandlersmax_nesting_depth: deepest nesting of conditions, loops, context managers,try, andmatchcyclomatic_total: file-wide McCabe-style complexity, starting at one and adding contributions for branches, loops, handlers, Boolean alternatives, comprehensions, and match casescyclomatic_mean_function: mean cyclomatic complexity across functionscyclomatic_max_function: largest complexity of any functionget_action_cyclomatic/reset_cyclomatic/update_cyclomatic: complexity of each named policy methodCyclomatic complexity approximates independent control-flow paths; it is not the number of policy behaviors or runtime paths.
Policy state
persistent_state_fields: distinct attributes assigned throughself.<name>. This approximates memory retained across calls but includes episodic state and configuration references.Calls, dependencies, and constants
unique_imports: distinct directly imported modulesunique_calls: distinct statically recognizable called namesunique_numeric_literals: distinct numeric literals excluding booleans; a rough threshold-variety measureHalstead metrics
halstead_vocabulary: distinct operators plus distinct operandshalstead_length: total operator and operand occurrenceshalstead_volume: length × log2(vocabulary)halstead_difficulty:(distinct operators / 2) × (total operands / distinct operands)halstead_effort: volume × difficultymaintainability_index: clamped 0–100 composite of Halstead volume, cyclomatic complexity, and logical LOC; large generated policies may saturate near zeroParse, provenance, and results
syntax_valid/syntax_error: whetherast.parseaccepts the source and any error; parsing never executes the policysource,approach,environment,replicate_seed,experiment_id,access,backend: provenance and grouping fieldshas_results: whether the run containsresults.jsonresult_*: fields copied or flattened fromresults.json, not static metricsAggregation
The summary emits
<metric>_meanand<metric>_std. Standard deviation is sample SD across replicate seeds (N - 1denominator) and is undefined for one-program groups.The recommended headline profile is total cyclomatic complexity, maximum function complexity,
get_actioncomplexity, maximum nesting depth, persistent state fields, loop count, and logical LOC. These dimensions should not be collapsed into one universal score.Validation