Skip to content

fix(scripts): supply full default runtime options to bench_collect - #359

Merged
gcko merged 1 commit into
mainfrom
fix/bench-collect-default-options
Sep 16, 2026
Merged

gcko merged 1 commit into
mainfrom
fix/bench-collect-default-options

Conversation

@gcko

@gcko gcko commented Sep 16, 2026

Copy link
Copy Markdown
Contributor

Summary

Populate runtime options in scripts/bench_collect.py using cli.build_parser().parse_args([]) rather than a hardcoded argparse.Namespace.

When new runtime flags (such as --no-tripwires) were added to cli.build_runtime, the manually constructed Namespace was missing them, causing an AttributeError on execution. Parsing CLI defaults directly ensures newly added options automatically receive their standard defaults without requiring manual Namespace synchronization.

Verification

  • python3 -m unittest scripts.tests.test_bench_collect (passes, 29 tests)
  • python3 scripts/bench_collect.py --repeat 2 (executes successfully with exit code 0)
  • Full static quality gate (ruff, mypy, lint_embedded, validate_plugins, bump_version) and test suite passed.

Signed-off-by: Jared Scott <jared.scott@variable.team>
@github-actions

Copy link
Copy Markdown
Contributor

Coverage

Name                                                                  Stmts   Miss Branch BrPart  Cover
-------------------------------------------------------------------------------------------------------
cargento/skills/cargento/agy_hook.py                                     79     14     28      7  78.5%
cargento/skills/cargento/cargento_runtime/__init__.py                     0      0      0      0 100.0%
cargento/skills/cargento/cargento_runtime/aggregate.py                  323      3    110      3  98.6%
cargento/skills/cargento/cargento_runtime/annotations.py                373     19    130     21  92.0%
cargento/skills/cargento/cargento_runtime/asks.py                       110      0     28      0 100.0%
cargento/skills/cargento/cargento_runtime/claude_data.py                340     40    158     18  88.4%
cargento/skills/cargento/cargento_runtime/cli.py                        212     20     52      6  89.4%
cargento/skills/cargento/cargento_runtime/collectors/__init__.py          0      0      0      0 100.0%
cargento/skills/cargento/cargento_runtime/collectors/antigravity.py     423     41    174     25  87.3%
cargento/skills/cargento/cargento_runtime/collectors/claude.py          305     17    112     15  91.8%
cargento/skills/cargento/cargento_runtime/collectors/codex.py           258     18     96     15  90.7%
cargento/skills/cargento/cargento_runtime/collectors/copilot.py         153      4     52      2  97.1%
cargento/skills/cargento/cargento_runtime/collectors/cursor.py          287     19    108     16  90.6%
cargento/skills/cargento/cargento_runtime/collectors/droid.py            34      3      6      1  90.0%
cargento/skills/cargento/cargento_runtime/collectors/gemini.py           54      7     16      4  84.3%
cargento/skills/cargento/cargento_runtime/collectors/goose.py            95      6     28      4  91.9%
cargento/skills/cargento/cargento_runtime/collectors/opencode.py        124      4     44      4  95.2%
cargento/skills/cargento/cargento_runtime/collectors/pi.py              328     34    152     20  88.8%
cargento/skills/cargento/cargento_runtime/config.py                     232      1     20      1  99.2%
cargento/skills/cargento/cargento_runtime/deliveries.py                 128     12     30      7  88.0%
cargento/skills/cargento/cargento_runtime/departures.py                 131      6     30      6  92.5%
cargento/skills/cargento/cargento_runtime/diagnostics.py                 88      3     26      3  94.7%
cargento/skills/cargento/cargento_runtime/dismissals.py                 111      3     32      3  95.8%
cargento/skills/cargento/cargento_runtime/ends.py                        89      5     18      0  95.3%
cargento/skills/cargento/cargento_runtime/events.py                     230      1     86      3  98.7%
cargento/skills/cargento/cargento_runtime/focus.py                       72      2     20      2  95.7%
cargento/skills/cargento/cargento_runtime/git_status.py                  59      1     22      2  96.3%
cargento/skills/cargento/cargento_runtime/history.py                    206      9     56      7  93.9%
cargento/skills/cargento/cargento_runtime/http_api.py                   933    107    300     37  88.3%
cargento/skills/cargento/cargento_runtime/interaction_prototype.py      709    221    198     38  65.7%
cargento/skills/cargento/cargento_runtime/io.py                         163      2     38      1  98.5%
cargento/skills/cargento/cargento_runtime/irreversible.py                39      0      6      0 100.0%
cargento/skills/cargento/cargento_runtime/lifecycle.py                  412     47    140     14  87.5%
cargento/skills/cargento/cargento_runtime/notifications.py              264     12     92      7  94.7%
cargento/skills/cargento/cargento_runtime/observation.py                412      6    122      3  98.3%
cargento/skills/cargento/cargento_runtime/observer.py                   388     24    156     15  92.8%
cargento/skills/cargento/cargento_runtime/probe.py                       44      0     18      1  98.4%
cargento/skills/cargento/cargento_runtime/project_context.py           1588    179    686    121  85.3%
cargento/skills/cargento/cargento_runtime/quota.py                      392      7    144      6  97.2%
cargento/skills/cargento/cargento_runtime/reach.py                       78      6     30      4  90.7%
cargento/skills/cargento/cargento_runtime/reading.py                    365      7    122      6  97.3%
cargento/skills/cargento/cargento_runtime/records.py                    265      5    118      9  96.3%
cargento/skills/cargento/cargento_runtime/semantic_history.py           290     14    110     18  92.0%
cargento/skills/cargento/cargento_runtime/sessions.py                   189      4     72      4  96.9%
cargento/skills/cargento/cargento_runtime/snapshot.py                    36      0      4      0 100.0%
cargento/skills/cargento/cargento_runtime/spacedock.py                  510     50    260     26  89.9%
cargento/skills/cargento/cargento_runtime/state.py                       83      0      2      0 100.0%
cargento/skills/cargento/cargento_runtime/stream.py                      57      0      8      0 100.0%
cargento/skills/cargento/cargento_runtime/transcripts.py                529     29    272     25  93.3%
cargento/skills/cargento/cargento_runtime/tripwires.py                  232     14     94     13  91.7%
cargento/skills/cargento/cargento_runtime/turns.py                      209     11    104     12  92.7%
cargento/skills/cargento/cargento_runtime/unasked.py                    119      2     34      1  98.0%
cargento/skills/cargento/cargento_runtime/web/__init__.py                 0      0      0      0 100.0%
cargento/skills/cargento/cargento_runtime/web/page.py                    38      0     10      0 100.0%
cargento/skills/cargento/event_hook.py                                  213     54     92     14  68.5%
cargento/skills/cargento/mcp_server.py                                  377     22    112     14  92.2%
cargento/skills/cargento/notify_hook.py                                  49     15      6      1  67.3%
cargento/skills/cargento/server.py                                        3      0      2      1  80.0%
cargento/skills/cargento/statusline_hook.py                             131     13     46      8  87.0%
scripts/bench_collect.py                                                214     13     54      6  92.9%
scripts/bench_event_latency.py                                           67     21     14      1  67.9%
scripts/bump_version.py                                                  60     12     24      5  77.4%
scripts/capture_focus_raise.py                                          729    131    236     16  79.4%
scripts/capture_hook.py                                                 292     30     90     11  88.7%
scripts/capture_team_registry.py                                        172     33     48      6  80.5%
scripts/capture_terminal_identity.py                                    347    108    104     14  66.3%
scripts/derive_prompt_shapes.py                                         210     16     88     14  89.3%
scripts/lint_embedded.py                                                 97      3     32      3  95.3%
scripts/mark_abstention.py                                              382    142    140     23  58.4%
scripts/score_abstention.py                                             493     52    182     18  88.4%
scripts/serve_operator_cockpit.py                                       448    191    112     20  54.5%
scripts/validate_plugins.py                                             762    202    434     67  70.8%
-------------------------------------------------------------------------------------------------------
TOTAL                                                                 18234   2097   6590    798  86.6%

Threshold: fail_under in pyproject.toml · label coverage-exception to bypass (visible in PR timeline).

@gcko
gcko merged commit a8cc8a7 into main Sep 16, 2026
12 checks passed
@gcko
gcko deleted the fix/bench-collect-default-options branch September 16, 2026 03:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant